Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: cargo codegen-bindings
- name: Run the migrate codegen
run: cargo codegen-migrate
- name: Regenerate global types
run: cargo run -p xtask_codegen --features global_types -- global-types

# Format Rust and TOML files
- name: Run format
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
- "rust-toolchain.toml"
- "rustfmt.toml"
- "deny.toml"
- "justfile"
- ".github/workflows/**"

# Cancel jobs when the PR is updated
concurrency:
Expand Down Expand Up @@ -99,6 +101,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: cargo test --workspace --features=js_plugin
- name: Test global types feature
run: cargo test -p xtask_codegen --features global_types
- name: Verify global types codegen
run: cargo run -p xtask_codegen --features global_types -- global-types --verify

e2e-tests:
name: End-to-end tests
Expand Down
67 changes: 67 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jiff = "0.2.24"
libc = "0.2.186"
mimalloc = "0.1.50"
papaya = "0.2.4"
pastey = "0.1.1"
path-absolutize = { version = "3.1.1", features = ["use_unix_paths_on_wasm"], optional = false }
phf = { version = "0.13.1", features = ["macros"] }
prettyplease = "0.2.37"
Expand All @@ -142,6 +143,7 @@ rustc-hash = "2.1.2"
schemars = { version = "1.2.1", features = ["indexmap2", "smallvec1"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
sha2 = "0.10.9"
similar = "2.7.0"
similar-asserts = "1.7.0"
smallvec = { version = "1.15.1", features = ["const_new", "serde", "union"] }
Expand Down
1 change: 1 addition & 0 deletions crates/biome_js_type_info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ biome_resolver = { workspace = true }
biome_rowan = { workspace = true }
camino = { workspace = true }
hashbrown = { workspace = true }
pastey = { workspace = true }
rustc-hash = { workspace = true }

[dev-dependencies]
Expand Down
106 changes: 106 additions & 0 deletions crates/biome_js_type_info/src/codegen/global_types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
//! Generated by `just gen-global-types`. Do not edit.
//! Source: microsoft/TypeScript v6.0.3 (git commit 050880ce59e30b356b686bd3144efe24f875ebc8)

// Some generated metadata is emitted before every item has a runtime consumer.
#![allow(dead_code)]

/// TypeScript release tag the generated data was sourced from.
pub(crate) const GENERATED_TYPESCRIPT_TAG: &str = "v6.0.3";

/// Commit SHA the [`GENERATED_TYPESCRIPT_TAG`] resolves to.
pub(crate) const GENERATED_TYPESCRIPT_SHA: &str = "050880ce59e30b356b686bd3144efe24f875ebc8";

/// SHA-256 digest of TypeScript's command-line parser source.
pub(crate) const COMMAND_LINE_PARSER_SHA256: &str =
"9b86708a7de0e1872e28319cf8d606761e59b0b2db5c67fd3efa28fa20728b2b";

/// Source files included in the generated global types data, in TypeScript Program order.
pub(crate) const GENERATED_SOURCE_FILES: &[(&str, &str)] = &[
(
"lib/lib.es5.d.ts",
"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd",
),
(
"lib/lib.es2015.collection.d.ts",
"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711",
),
(
"lib/lib.es2015.iterable.d.ts",
"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4",
),
(
"lib/lib.es2015.promise.d.ts",
"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad",
),
(
"lib/lib.es2015.reflect.d.ts",
"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60",
),
(
"lib/lib.es2015.symbol.d.ts",
"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f",
),
(
"lib/lib.es2015.symbol.wellknown.d.ts",
"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42",
),
(
"lib/lib.es2018.asynciterable.d.ts",
"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c",
),
(
"lib/lib.es2018.promise.d.ts",
"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad",
),
(
"lib/lib.es2020.promise.d.ts",
"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611",
),
(
"lib/lib.es2021.promise.d.ts",
"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357",
),
(
"lib/lib.es2024.promise.d.ts",
"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78",
),
(
"lib/lib.es2025.promise.d.ts",
"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9",
),
(
"lib/lib.esnext.disposable.d.ts",
"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f",
),
(
"lib/lib.decorators.d.ts",
"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4",
),
(
"lib/lib.decorators.legacy.d.ts",
"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da",
),
];

/// Declarations collected from the pinned TypeScript source profile.
pub(crate) const GENERATED_COLLECTED_DECLARATION_COUNT: usize = 330;

/// Coverage accounting outcomes collected from the pinned TypeScript source profile.
pub(crate) const GENERATED_COVERAGE_OUTCOME_COUNT: usize = 334;

/// SHA-256 digest of collected declaration records and coverage outcomes.
pub(crate) const GENERATED_COLLECTOR_OUTPUT_SHA256: &str =
"8c0f2985312df4a46ad6ca3138c7c0247b267ab81bd80d62f00a48b94be1d79a";

/// Number of predefined global slots populated by the generated module.
pub(crate) const GENERATED_GLOBAL_TYPE_COUNT: usize = 0;

/// Predefined global IDs whose `TypeData` is supplied by this generated module.
pub(crate) const MIGRATED_PREDEFINED_IDS: &[crate::globals::GlobalTypeId] = &[];

/// Registers all generated global type data into the resolver builder.
pub(crate) fn set_generated_global_type_data(
builder: &mut crate::globals_builder::GlobalsResolverBuilder,
) {
let _ = builder;
}
1 change: 1 addition & 0 deletions crates/biome_js_type_info/src/codegen/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub(crate) mod global_types;
Loading
Loading