Skip to content

fix(js_analyze): temporal global#9465

Merged
Netail merged 1 commit intobiomejs:mainfrom
Netail:fix/9464-Temporal-global
Mar 12, 2026
Merged

fix(js_analyze): temporal global#9465
Netail merged 1 commit intobiomejs:mainfrom
Netail:fix/9464-Temporal-global

Conversation

@Netail
Copy link
Copy Markdown
Member

@Netail Netail commented Mar 12, 2026

Summary

Added Temporal to the globals list, as it reached Stage 4

Closes #9464

Test Plan

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: 1d1ba52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Mar 12, 2026
@Netail Netail closed this Mar 12, 2026
@Netail Netail reopened this Mar 12, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 372ca3a8-f39e-43e4-98e5-b74bff46eaf5

📥 Commits

Reviewing files that changed from the base of the PR and between e7d0d85 and 1d1ba52.

⛔ Files ignored due to path filters (1)
  • crates/biome_js_analyze/tests/specs/correctness/noUndeclaredVariables/noUndeclaredVariables.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (4)
  • .changeset/some-rules-fly.md
  • crates/biome_js_analyze/src/globals/javascript/node.rs
  • crates/biome_js_analyze/src/globals/javascript/web.rs
  • crates/biome_js_analyze/tests/specs/correctness/noUndeclaredVariables/noUndeclaredVariables.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/biome_js_analyze/tests/specs/correctness/noUndeclaredVariables/noUndeclaredVariables.js
  • crates/biome_js_analyze/src/globals/javascript/node.rs

Walkthrough

Adds the Temporal global to Biome's recognised globals. A changeset file (.changeset/some-rules-fly.md) records the patch. Code updates add Temporal to Node builtins and to the BROWSER, SERVICE_WORKER, and WEB_WORKER global lists. A test was updated to call Temporal.Now.instant().

Suggested reviewers

  • ematipico
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarises the main change: adding Temporal to the globals list in the JavaScript analyser.
Description check ✅ Passed The description is concise and related to the changeset, explaining that Temporal was added to globals because it reached Stage 4.
Linked Issues check ✅ Passed The pull request successfully implements all coding requirements from issue #9464: Temporal is added to NODE, BROWSER, SERVICE_WORKER, and WEB_WORKER globals, and a test case is included.
Out of Scope Changes check ✅ Passed All changes are directly related to adding Temporal as a global; the changeset file and test addition are both in scope for this feature.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/biome_js_analyze/src/globals/javascript/node.rs (1)

116-116: Correctly placed in sorted order.

The addition is alphabetically correct between "SubtleCrypto" and "TextDecoder", and the existing test_order test will validate this.

One consideration: should Temporal also be added to the BUILTIN array (lines 4-72) for consistency? Since Temporal is now a Stage 4 ECMAScript feature, it would be available across all Node.js contexts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/globals/javascript/node.rs` at line 116, Add
"Temporal" to the BUILTIN array so the global listing is consistent with the new
entry in the exported list; specifically, insert "Temporal" into the BUILTIN
constant (the array presently containing globals like "SubtleCrypto" and
"TextDecoder") in the correct alphabetical position (between "SubtleCrypto" and
"TextDecoder") so the test_order check continues to pass and the new global is
available across Node contexts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_js_analyze/src/globals/javascript/web.rs`:
- Line 1145: Add the "Temporal" global to the BROWSER and WEB_WORKER arrays (in
addition to SERVICE_WORKER where it already exists) so Temporal is exposed in
main-thread and worker contexts; update the arrays named BROWSER and WEB_WORKER
to include "Temporal" in the correct alphabetical position to match the existing
ordering convention used alongside SERVICE_WORKER.

---

Nitpick comments:
In `@crates/biome_js_analyze/src/globals/javascript/node.rs`:
- Line 116: Add "Temporal" to the BUILTIN array so the global listing is
consistent with the new entry in the exported list; specifically, insert
"Temporal" into the BUILTIN constant (the array presently containing globals
like "SubtleCrypto" and "TextDecoder") in the correct alphabetical position
(between "SubtleCrypto" and "TextDecoder") so the test_order check continues to
pass and the new global is available across Node contexts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1208b098-ae0d-4808-8f27-cc48a7100aef

📥 Commits

Reviewing files that changed from the base of the PR and between 4305e9d and 983733e.

📒 Files selected for processing (3)
  • .changeset/some-rules-fly.md
  • crates/biome_js_analyze/src/globals/javascript/node.rs
  • crates/biome_js_analyze/src/globals/javascript/web.rs

Comment thread crates/biome_js_analyze/src/globals/javascript/web.rs
@Netail Netail force-pushed the fix/9464-Temporal-global branch from 983733e to e7d0d85 Compare March 12, 2026 22:30
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 12, 2026

Merging this PR will not alter performance

✅ 58 untouched benchmarks
⏩ 156 skipped benchmarks1


Comparing Netail:fix/9464-Temporal-global (1d1ba52) with main (4305e9d)

Open in CodSpeed

Footnotes

  1. 156 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Netail Netail force-pushed the fix/9464-Temporal-global branch from e7d0d85 to 1d1ba52 Compare March 12, 2026 22:59
@Netail Netail merged commit c8918d6 into biomejs:main Mar 12, 2026
18 checks passed
@Netail Netail deleted the fix/9464-Temporal-global branch March 12, 2026 23:18
@github-actions github-actions Bot mentioned this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📎 Add Temporal to list of globals

2 participants