diff --git a/.npmignore b/.npmignore index fa13cfadef30b..66b6d6145cba3 100644 --- a/.npmignore +++ b/.npmignore @@ -8,8 +8,8 @@ node6 test utils/node6-transform -# exclude internal type definition files -/lib/*.d.ts +# exclude internal type definitions +/lib/externs.d.ts # repeats from .gitignore node_modules diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 777bfb04b1f80..c085c00a03a52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -252,8 +252,9 @@ Releasing to npm consists of the following phases: 1. On your local machine, pull from [upstream](https://github.com/GoogleChrome/puppeteer) and make sure the last commit is the one just merged. 2. Run `git status` and make sure there are no untracked files. - **WHY**: this is to avoid adding unnecessary files to the npm package. - 3. Run [`npx pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary. - 4. Run `npm publish`. This publishes the `puppeteer` package. + 3. Run `npm install` to make sure the latest `lib/protocol.d.ts` is generated. + 4. Run [`npx pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary. + 5. Run `npm publish`. This publishes the `puppeteer` package. 3. Publish `puppeteer-core` to npm. 1. Run `./utils/prepare_puppeteer_core.js`. The script changes the name inside `package.json` to `puppeteer-core`. 2. Run `npm publish`. This publishes the `puppeteer-core` package. diff --git a/utils/protocol-types-generator/index.js b/utils/protocol-types-generator/index.js index c1d46ce5f6f56..80e3036dc5314 100644 --- a/utils/protocol-types-generator/index.js +++ b/utils/protocol-types-generator/index.js @@ -69,8 +69,8 @@ declare global { } } } -// empty export to keep file a module -export {} + +export default Protocol; `; const outputPath = path.join(__dirname, '..', '..', 'lib', 'protocol.d.ts'); require('fs').writeFileSync(outputPath, output);