|
2 | 2 | "name": "puppeteer",
|
3 | 3 | "version": "13.2.0-post",
|
4 | 4 | "description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
| 5 | + "type": "commonjs", |
5 | 6 | "main": "./cjs-entry.js",
|
| 7 | + "exports": { |
| 8 | + "import": "./lib/esm/puppeteer/node.js", |
| 9 | + "require": "./cjs-entry.js" |
| 10 | + }, |
6 | 11 | "types": "lib/types.d.ts",
|
7 | 12 | "repository": "github:puppeteer/puppeteer",
|
8 | 13 | "engines": {
|
|
29 | 34 | "lint": "npm run eslint && npm run build && npm run doc && npm run markdownlint",
|
30 | 35 | "doc": "node utils/doclint/cli.js",
|
31 | 36 | "clean-lib": "rimraf lib",
|
32 |
| - "build": "npm run tsc && npm run generate-d-ts", |
33 |
| - "tsc": "npm run clean-lib && tsc --version && npm run tsc-cjs && npm run tsc-esm", |
| 37 | + "build": "npm run tsc && npm run generate-d-ts && npm run generate-pkg-json", |
| 38 | + "tsc": "npm run clean-lib && tsc --version && (npm run tsc-cjs & npm run tsc-esm) && (npm run tsc-compat-cjs & npm run tsc-compat-esm)", |
34 | 39 | "tsc-cjs": "tsc -b src/tsconfig.cjs.json",
|
35 | 40 | "tsc-esm": "tsc -b src/tsconfig.esm.json",
|
| 41 | + "tsc-compat-cjs": "tsc -b compat/cjs/tsconfig.json", |
| 42 | + "tsc-compat-esm": "tsc -b compat/esm/tsconfig.json", |
36 | 43 | "apply-next-version": "node utils/apply_next_version.js",
|
37 | 44 | "test-install": "scripts/test-install.sh",
|
38 | 45 | "clean-docs": "rimraf website/docs && rimraf docs-api-json",
|
39 | 46 | "generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose",
|
40 | 47 | "generate-docs": "npm run generate-d-ts && api-documenter markdown -i docs-api-json -o website/docs && node utils/remove-tag.js",
|
| 48 | + "generate-pkg-json": "echo '{\"type\": \"module\"}' > lib/esm/package.json", |
41 | 49 | "ensure-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
|
42 | 50 | "ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps",
|
43 | 51 | "test-types-file": "ts-node -s scripts/test-ts-definition-files.ts",
|
|
50 | 58 | "lib/**/*.d.ts.map",
|
51 | 59 | "lib/**/*.js",
|
52 | 60 | "lib/**/*.js.map",
|
| 61 | + "lib/**/package.json", |
53 | 62 | "install.js",
|
54 | 63 | "typescript-if-required.js",
|
55 | 64 | "cjs-entry.js",
|
|
0 commit comments