mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
a7e3c2e09e
In all my excitement about shipping types, we forgot to export the actual `d.ts` file that makes it all happen... :( I didn't pick this up locally because I was testing with `npm link`, which does a symbolic link and therefore doesn't mirror the list of files that make it into the published package. To test this change, I made the change and ran `npm pack` to generate a tar. I then created a new empty directory and did `npm init -y` followed by `npm install path/to/puppeteer-7.tgz`. I then initialised TypeScript, and wrote this: ```js import puppeteer from 'puppeteer'; async function run() { const browser = await puppeteer.launch() const page = await browser.newPage() await page.goto('https://foo.com') } run(); ``` As I typed I got autocompletions and if I were to make an error, I'd get a TypeScript error. There is follow up work to be done because this unfortunately does not work if you use `require` rather than ES Modules. @AviVahl suggested a change in https://github.com/puppeteer/puppeteer/issues/6807 but I cannot get it to work, so I'd like to do more investigation here. In the mean time, whatever the contents of `cjs-entry.d.ts`, we should definitely be exporting it as part of the module, so this PR is still good to land.
112 lines
3.9 KiB
JSON
112 lines
3.9 KiB
JSON
{
|
|
"name": "puppeteer",
|
|
"version": "7.0.0-post",
|
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
"main": "./cjs-entry.js",
|
|
"repository": "github:puppeteer/puppeteer",
|
|
"engines": {
|
|
"node": ">=10.18.1"
|
|
},
|
|
"scripts": {
|
|
"test-browser": "wtr",
|
|
"test-browser-watch": "wtr --watch",
|
|
"unit": "npm run tsc-cjs && mocha --config mocha-config/puppeteer-unit-tests.js",
|
|
"unit-debug": "npm run tsc-cjs && mocha --inspect-brk --config mocha-config/puppeteer-unit-tests.js",
|
|
"unit-with-coverage": "cross-env COVERAGE=1 npm run unit",
|
|
"assert-unit-coverage": "cross-env COVERAGE=1 mocha --config mocha-config/coverage-tests.js",
|
|
"funit": "PUPPETEER_PRODUCT=firefox npm run unit",
|
|
"test": "npm run tsc && npm run lint --silent && npm run unit-with-coverage && npm run test-browser",
|
|
"prepare": "node typescript-if-required.js",
|
|
"prepublishOnly": "npm run tsc",
|
|
"dev-install": "npm run tsc && node install.js",
|
|
"install": "node install.js",
|
|
"eslint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .)",
|
|
"eslint-fix": "eslint --ext js --ext ts --fix .",
|
|
"commitlint": "commitlint --from=HEAD~1",
|
|
"lint": "npm run eslint && npm run tsc && npm run doc && npm run commitlint",
|
|
"doc": "node utils/doclint/cli.js",
|
|
"clean-lib": "rm -rf lib",
|
|
"build": "npm run tsc",
|
|
"tsc": "npm run clean-lib && tsc --version && npm run tsc-cjs && npm run tsc-esm",
|
|
"tsc-cjs": "tsc -b src/tsconfig.cjs.json",
|
|
"tsc-esm": "tsc -b src/tsconfig.esm.json",
|
|
"apply-next-version": "node utils/apply_next_version.js",
|
|
"test-install": "scripts/test-install.sh",
|
|
"generate-docs": "npm run tsc && api-extractor run --local --verbose && api-documenter markdown -i temp -o new-docs",
|
|
"ensure-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
|
|
"release": "node utils/remove_version_suffix.js && standard-version --commit-all"
|
|
},
|
|
"files": [
|
|
"lib/",
|
|
"install.js",
|
|
"typescript-if-required.js",
|
|
"cjs-entry.js",
|
|
"cjs-entry-core.js",
|
|
"cjs-entry.d.ts"
|
|
],
|
|
"author": "The Chromium Authors",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"debug": "^4.1.0",
|
|
"devtools-protocol": "0.0.847576",
|
|
"extract-zip": "^2.0.0",
|
|
"https-proxy-agent": "^5.0.0",
|
|
"node-fetch": "^2.6.1",
|
|
"pkg-dir": "^4.2.0",
|
|
"progress": "^2.0.1",
|
|
"proxy-from-env": "^1.0.0",
|
|
"rimraf": "^3.0.2",
|
|
"tar-fs": "^2.0.0",
|
|
"unbzip2-stream": "^1.3.3",
|
|
"ws": "^7.2.3"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^11.0.0",
|
|
"@commitlint/config-conventional": "^11.0.0",
|
|
"@microsoft/api-documenter": "7.9.7",
|
|
"@microsoft/api-extractor": "7.10.4",
|
|
"@types/debug": "0.0.31",
|
|
"@types/mime": "^2.0.0",
|
|
"@types/mocha": "^7.0.2",
|
|
"@types/node": "^14.0.13",
|
|
"@types/proxy-from-env": "^1.0.1",
|
|
"@types/rimraf": "^2.0.2",
|
|
"@types/sinon": "^9.0.4",
|
|
"@types/tar-fs": "^1.16.2",
|
|
"@types/ws": "^7.2.4",
|
|
"@typescript-eslint/eslint-plugin": "^4.4.0",
|
|
"@typescript-eslint/parser": "^4.4.0",
|
|
"@web/test-runner": "^0.9.2",
|
|
"commonmark": "^0.28.1",
|
|
"cross-env": "^7.0.2",
|
|
"eslint": "^7.10.0",
|
|
"eslint-config-prettier": "^6.12.0",
|
|
"eslint-plugin-import": "^2.22.0",
|
|
"eslint-plugin-mocha": "^8.0.0",
|
|
"eslint-plugin-prettier": "^3.1.4",
|
|
"eslint-plugin-unicorn": "^22.0.0",
|
|
"esprima": "^4.0.0",
|
|
"expect": "^25.2.7",
|
|
"husky": "^4.3.0",
|
|
"jpeg-js": "^0.3.7",
|
|
"mime": "^2.0.3",
|
|
"minimist": "^1.2.0",
|
|
"mocha": "^8.2.0",
|
|
"ncp": "^2.0.0",
|
|
"pixelmatch": "^4.0.2",
|
|
"pngjs": "^5.0.0",
|
|
"prettier": "^2.1.2",
|
|
"sinon": "^9.0.2",
|
|
"source-map-support": "^0.5.19",
|
|
"standard-version": "^9.0.0",
|
|
"text-diff": "^1.0.1",
|
|
"ts-node": "^9.0.0",
|
|
"typescript": "3.9.5"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"commit-msg": "commitlint --env HUSKY_GIT_PARAMS"
|
|
}
|
|
}
|
|
}
|