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

Adopt ESM #344

Merged
merged 7 commits into from
Nov 10, 2022
Merged

Adopt ESM #344

merged 7 commits into from
Nov 10, 2022

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Nov 9, 2022

Also removes the deprecated Runtime.load method, adopts Mocha, etc.

Depends on observablehq/stdlib#316.
Depends on observablehq/inspector#183.
Fixes #340.

@mbostock mbostock requested a review from visnup November 9, 2022 03:38
@mbostock mbostock marked this pull request as ready for review November 9, 2022 04:13
@@ -370,5 +361,5 @@ function variable_reachable(variable) {
}

function window_global(name) {
return window[name];
return globalThis[name];
Copy link
Member Author

Choose a reason for hiding this comment

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

Adopting globalThis so that the runtime can be used more easily in non-windowed environments such as Node and Web Workers.

@mbostock mbostock merged commit 9e1817b into main Nov 10, 2022
@mbostock mbostock deleted the mbostock/esm branch November 10, 2022 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt ES modules (type: "module")
2 participants