From 243a7dd22a6ed92c4b969707a072ce1d2a577344 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Wed, 27 Apr 2022 11:17:57 -0500 Subject: [PATCH] api: make same dist updates as http-api --- pkg/npm/api/package.json | 8 ++++++-- pkg/npm/api/rollup.config.ts | 6 +++--- pkg/npm/http-api/package.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/npm/api/package.json b/pkg/npm/api/package.json index b6b376123..88caa2f89 100644 --- a/pkg/npm/api/package.json +++ b/pkg/npm/api/package.json @@ -1,6 +1,6 @@ { "name": "@urbit/api", - "version": "2.1.0", + "version": "2.1.1", "description": "A library that provides bindings and types for Urbit's various userspace desks", "repository": { "type": "git", @@ -8,8 +8,12 @@ "directory": "pkg/npm/api" }, "type": "module", - "main": "dist/cjs/index.js", + "main": "dist/cjs/index.cjs", "module": "dist/esm/index.js", + "exports": { + "require": "./dist/cjs/index.cjs", + "import": "./dist/esm/index.js" + }, "jsdelivr": "dist/urbit-api.min.js", "unpkg": "dist/urbit-api.min.js", "types": "dist/index.d.ts", diff --git a/pkg/npm/api/rollup.config.ts b/pkg/npm/api/rollup.config.ts index 449bcc869..8664a48ae 100644 --- a/pkg/npm/api/rollup.config.ts +++ b/pkg/npm/api/rollup.config.ts @@ -60,13 +60,13 @@ export default [ ], output: [ { - dir: 'dist/esm', + file: 'dist/esm/index.js', format: 'esm', exports: 'named', - sourcemap: true + sourcemap: true, }, { - dir: 'dist/cjs', + file: 'dist/cjs/index.cjs', format: 'cjs', exports: 'named', sourcemap: true diff --git a/pkg/npm/http-api/package.json b/pkg/npm/http-api/package.json index 4101cc4a0..1ac27d034 100644 --- a/pkg/npm/http-api/package.json +++ b/pkg/npm/http-api/package.json @@ -1,6 +1,6 @@ { "name": "@urbit/http-api", - "version": "2.1.0", + "version": "2.1.1", "license": "MIT", "description": "Library to interact with an Urbit ship over HTTP", "repository": {