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

doc: experimental flag for global accessible APIs #54330

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
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
17 changes: 17 additions & 0 deletions doc/contributing/collaborator-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,23 @@ For pull requests introducing new core modules:
* Land with a [Stability Index][] of Experimental. The module must remain
Experimental until a semver-major release.

### Introducing new APIs on the global scope

Exposing new APIs to the global scope that are available without
an `import` or `require` call, including introducing new interfaces on
`globalThis` like `globalThis.navigator`, and adding new properties on
interfaces on `globalThis` like well known symbols, could break feature
detection and Node.js environment detection.

Exposing new APIs to the global scope unconditionally without any CLI
flags must always be labeled as `semver-major`. The `semver-major` label may
be waived through the regular TSC consensus process.

It is recommended to start with exposing APIs to the global scope with an
experimental CLI flag `--experimental-<feature-name>`, without being labeled as
`semver-major`. When the new APIs are feature complete, turn the flag on by
default with a CLI flag `--no-experimental-<feature-name>` to opt-out.

### Additions to Node-API

Node-API provides an ABI-stable API guaranteed for future Node.js versions.
Expand Down
Loading