Remove the Prettier related stuff from the conformance, which is purely aimed at JS/TS.
Instead, `oxc_formatter_tests` manage Prettier's test fixtures along with Oxfmt.
- Rename workflow: update_compat_table.yml → update_submodules.yml
- Extract hardcoded SHAs in clone-parallel.sh into variables at the top
- Expand workflow to automatically update all 6 submodules:
- test262 (tc39/test262)
- babel (babel/babel)
- TypeScript (microsoft/TypeScript)
- prettier (prettier/prettier)
- acorn-test262 (oxc-project/acorn-test262)
- node-compat-table (williamkapke/node-compat-table)
- Workflow now fetches latest SHAs from all repos, compares with current, and updates clone-parallel.sh
- Creates single PR with summary of all updated submodules
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary
- Moved `clone-parallel.sh` from `.github/actions/clone-submodules/` to `.github/scripts/` for better organization and reusability
- Updated justfile `submodules` recipe to use the centralized script, eliminating duplication
- Fixed issue where script would fail with "destination path already exists" error when directories already exist
- Script now properly handles existing directories by initializing or updating git repos instead of failing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Cloning submodules takes a bit of time. Skip cloning `babel` and `prettier` repos in NAPI tests, because they doesn't need them. NAPI parser tests only need the other 3 submodules.
Related to #10307.
Re-arrange fields in ESTree AST, so `start` and `end` are last, instead of first.
Also bump `acorn-test262` submodule to include https://github.com/oxc-project/acorn-test262/pull/54, which rearranges the fields in test snapshots.
Bump `acorn-test262` submodule, which bumps `@typescript-eslint/parser`. Latest version of TS-ESLint contains fixes for bugs which I reported. Currently this breaks 1 conformance test - will fix in following PR.
Bump `acorn-test262` submodule to include https://github.com/oxc-project/acorn-test262/pull/47, which bumps Acorn dependency.
Acorn v8.15.0 fixes the formatting of the `bigint` field of `Literal`s to align with ESTree spec. Currently we are failing those test cases as our behavior is incorrect. Will fix it in following PR.
Re-order fields in ESTree and TS-ESTree ASTs to be in visitation order (which is the order in which they're defined in Rust types).
This does not align with either Acorn or TS-ESLint, but for the reasons discussed in https://github.com/oxc-project/oxc/issues/9705#issuecomment-2859250834, I feel this isn't a concern. The field order doesn't matter much per se, only that it's consistent, and this change has other benefits - it will make it simpler to build a visitor which visits fields in the correct order, and allows adding other parsers to `acorn-test262` in order to produce test cases for decorators.
Visitation order aligns with TS-ESLint except for the following types:
* `ExportSpecifier`
* `TSImportType`
* `TSIndexedAccessType`
* `TSMethodSignature`
* `TSPropertySignature`
* `TSTypePredicate`
In these 6 cases, TS-ESLint's `visitorKeys` has the wrong visitation order, because it does not visit fields in source order. I will open an issue and hopefully they can fix.
This PR also bumps `acorn-test262` to include https://github.com/oxc-project/acorn-test262/pull/37 which re-orders the fields in fixture snapshots to match the new field order here.
Related to #10978. Add `phase` property to `ImportExpression` in TS-ESTree AST.
This aligns with ESTree spec, but does *not* align with TS-ESLint - TS-ESLint outputs a `CallExpression` with a `MetaProperty` as its `callee` instead.
We don't have the necessary information in our AST to match TS-ESLint, because we don't have the spans of `import`, `defer`, or `import.defer`, to use for the `MetaProperty`, or the `IdentifierName`s it contains.
This is not completely ideal, but I figure it's preferable to represent this syntax *somehow* in the AST, rather than completely ignoring it, in which case there's no way to distinguish between `import("x")`, `import.defer("x")`, and `import.source("x")`.
Presumably TS-ESLint will change their AST shape to conform to ESTree spec once these reach stage 4, so I don't think we should expend effort changing our AST to align with them in the meantime. TypeScript doesn't even have test cases for these (we'd know if they did, as we'd be failing them) - so I doubt these are popular constructs in TS.
`acorn-test262` submodule is bumped to include https://github.com/oxc-project/acorn-test262/pull/36 which adds the `phase` field to `ImportExpression`s in test snapshots.
Fixes#10978. Add `phase` property to `ImportDeclaration` in ESTree and TS-ESTree ASTs.
`ImportExpression` is not covered by this PR. That's more tricky as TS-ESLint already supports `import.defer(...)` and `import.source(...)`, but does not align with ESTree - it outputs a `MetaProperty` instead.
`acorn-test262` submodule is bumped to include https://github.com/oxc-project/acorn-test262/pull/30.
Bump `acorn-test262` dependency to include https://github.com/oxc-project/acorn-test262/pull/13. This fixes the mismatch between how our conformance tester and the `acorn-test262` test case generator were handling final newlines in source files.
Similar to #9546. Acorn outputs `RegExpLiteral`'s flags in same order as in source text. There is nothing wrong with this, but it makes our serialization/deserialization code more complex than it needs to be, just to match Acorn. I don't think we need to follow Acorn here - there's no particular "good" order for the flags.
Bump `acorn-test262` to include commit https://github.com/oxc-project/acorn-test262/commit/3d7013e145499268dc8f985d087208aa013e0ba2, which reorders the flags in alphabetical order in Acorn's AST.
This allows simplifying serialization/deserialization code on our side.
After #9285, the ESTree conformance tests are fast enough to run in CI.
Do that, so we notice if we break anything.
Time to run conformance on CI:
Before this PR: 3m 39s
After this PR: 3m 55s
> https://prettier.io/blog/2025/02/09/3.5.0
Test coverage has dropped slightly because they added more tests for the
new `objectWrap` and `experimentalOperatorPosition` options.
I will try to support `objectWrap` in the near future.
Bump `test262` submodule to latest commit on main.
Also bump `acorn-test262` to latest, which is now using that same commit of `test262` as its base - so the 2 are in sync. This also integrates changes I made today to `acorn-test262` to alter the snapshotted JSON for `BigInt`s.
Update babel submodule for conformance tests to latest HEAD.
The test fixtures include a new one for a bug fix which @branchseer
intends to also apply to Oxc - https://github.com/babel/babel/pull/17050
(see #8342).