Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade dlint and run prefer-primordials #11777

Merged
merged 5 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use primordials instead of globals
  • Loading branch information
magurotuna committed Aug 19, 2021
commit 46fe09438bd65a026853d57cdcf1f148c5f77d40
1 change: 1 addition & 0 deletions ext/websocket/02_websocketstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
PromisePrototypeCatch,
Uint8Array,
TypeError,
Error,
} = window.__bootstrap.primordials;

webidl.converters.WebSocketStreamOptions = webidl.createDictionaryConverter(
Expand Down
2 changes: 2 additions & 0 deletions runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ delete Object.prototype.__proto__;
SymbolFor,
SymbolIterator,
PromisePrototypeThen,
TypeError,
} = window.__bootstrap.primordials;
const util = window.__bootstrap.util;
const eventTarget = window.__bootstrap.eventTarget;
Expand Down Expand Up @@ -228,6 +229,7 @@ delete Object.prototype.__proto__;
} else {
prepareStackTrace = core.createPrepareStackTrace();
}
// deno-lint-ignore prefer-primordials
Error.prepareStackTrace = prepareStackTrace;
Comment on lines +232 to 233
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Node.js, Error.prepareStackTrace is skipped linting because of the config. But deno_lint doesn't support it right now, so just added an ignore directive here for the moment.

}

Expand Down