Skip to content

Commit

Permalink
[public-api] export ESM modules
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Sep 19, 2023
1 parent e417a85 commit 66eb7fd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
26 changes: 23 additions & 3 deletions components/public-api/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,43 @@
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"module": "./lib/esm/index.js",
"files": [
"lib"
],
"exports": {
".": {
"types": "./lib/index.d.ts",
"import": "./lib/esm/index.js",
"require": "./lib/index.js"
},
"./lib/*": {
"types": "./lib/*.d.ts",
"import": "./lib/esm/*.js",
"require": "./lib/*.js"
},
"./lib/gitpod/experimental/v1": {
"types": "./lib/gitpod/experimental/v1/index.d.ts",
"import": "./lib/esm/gitpod/experimental/v1/index.js",
"require": "./lib/gitpod/experimental/v1/index.js"
}
},
"scripts": {
"build": "mkdir -p lib; tsc",
"build": "yarn run build:cjs && yarn run build:esm",
"build:cjs": "tsc",
"build:esm": "tsc --module es2015 --outDir ./lib/esm",
"watch": "leeway exec --package .:lib --transitive-dependencies --filter-type yarn --components --parallel -- tsc -w --preserveWatchOutput",
"test": "mocha --opts mocha.opts './**/*.spec.ts' --exclude './node_modules/**'",
"test:brk": "yarn test --inspect-brk"
},
"dependencies": {
"@bufbuild/connect": "^0.13.0",
"@bufbuild/protobuf": "^0.1.1",
"@bufbuild/protoc-gen-connect-web": "^0.2.1",
"@bufbuild/protoc-gen-es": "^0.1.1",
"prom-client": "^14.2.0"
},
"devDependencies": {
"@bufbuild/protoc-gen-connect-web": "^0.2.1",
"@bufbuild/protoc-gen-es": "^0.1.1",
"@testdeck/mocha": "0.1.2",
"@types/chai": "^4.1.2",
"@types/node": "^16.11.0",
Expand Down
3 changes: 2 additions & 1 deletion components/public-api/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"rootDir": "src",
"experimentalDecorators": true,
"outDir": "lib",
"declarationDir": "lib",
"lib": [
"es6",
"esnext.asynciterable",
Expand All @@ -14,7 +15,7 @@
"emitDecoratorMetadata": true,
"strictPropertyInitialization": false,
"downlevelIteration": true,
"module": "ES6",
"module": "CommonJS",
"moduleResolution": "node",
"target": "es6",
"jsx": "react",
Expand Down

0 comments on commit 66eb7fd

Please sign in to comment.