Skip to content

Commit

Permalink
fix: use supported node range for types
Browse files Browse the repository at this point in the history
Using the supported node range for types ensures Puppeteer compiles to the correct types.
  • Loading branch information
jrandolf committed Sep 13, 2023
1 parent 29ff113 commit 10eca33
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 37 deletions.
45 changes: 13 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@types/diff": "5.0.3",
"@types/mime": "3.0.1",
"@types/mocha": "10.0.1",
"@types/node": "20.5.9",
"@types/node": ">=16.3.0",
"@types/pixelmatch": "5.2.4",
"@types/pngjs": "6.0.1",
"@types/progress": "2.0.5",
Expand Down
1 change: 0 additions & 1 deletion packages/browsers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"yargs": "17.7.1"
},
"devDependencies": {
"@types/node": "^16.11.7",
"@types/yargs": "17.0.22"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
import 'disposablestack/auto';

declare global {
interface SymbolConstructor {
/**
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
readonly dispose: unique symbol;

/**
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
readonly asyncDispose: unique symbol;
}

interface Disposable {
[Symbol.dispose](): void;
}

interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}

class DisposableStack implements Disposable {
constructor();

Expand Down
3 changes: 0 additions & 3 deletions packages/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
"type": "git",
"url": "https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer"
},
"engines": {
"node": ">=16.3.0"
},
"scripts": {
"build:docs": "wireit",
"build": "wireit",
Expand Down

0 comments on commit 10eca33

Please sign in to comment.