|
11 | 11 | "license": "MIT",
|
12 | 12 | "author": "Microsoft and contributors",
|
13 | 13 | "sideEffects": false,
|
14 |
| - "type": "commonjs", |
| 14 | + "type": "module", |
15 | 15 | "exports": {
|
16 | 16 | ".": {
|
17 |
| - "types": "./dist/index.d.ts", |
18 |
| - "default": "./dist/index.js" |
| 17 | + "import": { |
| 18 | + "types": "./lib/index.d.ts" |
| 19 | + }, |
| 20 | + "require": { |
| 21 | + "types": "./dist/index.d.ts" |
| 22 | + } |
19 | 23 | },
|
20 |
| - "./alpha": { |
21 |
| - "types": "./dist/container-runtime-definitions-alpha.d.ts", |
22 |
| - "default": "./dist/index.js" |
| 24 | + "./public": { |
| 25 | + "import": { |
| 26 | + "types": "./lib/container-runtime-definitions-public.d.ts" |
| 27 | + }, |
| 28 | + "require": { |
| 29 | + "types": "./dist/container-runtime-definitions-public.d.ts" |
| 30 | + } |
23 | 31 | },
|
24 |
| - "./beta": { |
25 |
| - "types": "./dist/container-runtime-definitions-beta.d.ts", |
26 |
| - "default": "./dist/index.js" |
| 32 | + "./alpha": { |
| 33 | + "import": { |
| 34 | + "types": "./lib/container-runtime-definitions-alpha.d.ts" |
| 35 | + }, |
| 36 | + "require": { |
| 37 | + "types": "./dist/container-runtime-definitions-alpha.d.ts" |
| 38 | + } |
27 | 39 | },
|
28 | 40 | "./internal": {
|
29 |
| - "types": "./dist/index.d.ts", |
30 |
| - "default": "./dist/index.js" |
31 |
| - }, |
32 |
| - "./public": { |
33 |
| - "types": "./dist/container-runtime-definitions-public.d.ts", |
34 |
| - "default": "./dist/index.js" |
| 41 | + "import": { |
| 42 | + "types": "./lib/index.d.ts" |
| 43 | + }, |
| 44 | + "require": { |
| 45 | + "types": "./dist/index.d.ts" |
| 46 | + } |
35 | 47 | }
|
36 | 48 | },
|
37 |
| - "main": "dist/index.js", |
| 49 | + "main": "", |
38 | 50 | "types": "dist/index.d.ts",
|
39 | 51 | "scripts": {
|
40 | 52 | "api": "fluid-build . --task api",
|
41 |
| - "api-extractor:commonjs": "api-extractor run --local", |
| 53 | + "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json", |
| 54 | + "api-extractor:esnext": "api-extractor run --local", |
42 | 55 | "build": "fluid-build . --task build",
|
43 | 56 | "build:compile": "fluid-build . --task compile",
|
44 | 57 | "build:docs": "fluid-build . --task api",
|
45 |
| - "build:test": "tsc --project ./src/test/tsconfig.json", |
| 58 | + "build:esnext": "tsc --project ./tsconfig.json", |
| 59 | + "build:test": "npm run build:test:esm && npm run build:test:cjs", |
| 60 | + "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json", |
| 61 | + "build:test:esm": "tsc --project ./src/test/tsconfig.json", |
46 | 62 | "check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
47 | 63 | "check:biome": "biome check .",
|
48 | 64 | "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
49 | 65 | "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
50 | 66 | "ci:build:docs": "api-extractor run",
|
51 |
| - "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", |
| 67 | + "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", |
52 | 68 | "eslint": "eslint --format stylish src",
|
53 | 69 | "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
54 | 70 | "format": "fluid-build --task format .",
|
55 | 71 | "format:biome": "biome check --apply .",
|
56 | 72 | "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
57 | 73 | "lint": "fluid-build . --task lint",
|
58 | 74 | "lint:fix": "fluid-build . --task eslint:fix --task format",
|
59 |
| - "tsc": "tsc", |
| 75 | + "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist", |
60 | 76 | "typetests:gen": "fluid-type-test-generator",
|
61 | 77 | "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
62 | 78 | },
|
|
87 | 103 | "build:docs": {
|
88 | 104 | "dependsOn": [
|
89 | 105 | "...",
|
90 |
| - "api-extractor:commonjs" |
| 106 | + "api-extractor:commonjs", |
| 107 | + "api-extractor:esnext" |
91 | 108 | ],
|
92 | 109 | "script": false
|
93 | 110 | }
|
|
0 commit comments