Skip to content

Commit d6dba5f

Browse files
authored
Merge branch 'oxc-project:main' into jsx-handler-names
2 parents b3dd362 + e190ee5 commit d6dba5f

File tree

360 files changed

+12334
-4034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+12334
-4034
lines changed

.github/actions/clone-submodules/action.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,47 +36,12 @@ inputs:
3636
runs:
3737
using: composite
3838
steps:
39-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40-
if: ${{ inputs.test262 == 'true' }}
41-
with:
42-
show-progress: false
43-
persist-credentials: false
44-
repository: tc39/test262
45-
path: tasks/coverage/test262
46-
ref: 4b5d36ab6ef2f59d0a8902cd383762547a3a74c4
47-
48-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49-
if: ${{ inputs.babel == 'true' }}
50-
with:
51-
show-progress: false
52-
persist-credentials: false
53-
repository: babel/babel
54-
path: tasks/coverage/babel
55-
ref: 98d18aa4f66ce300a6a863bad223ab67b3fdf282
56-
57-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58-
if: ${{ inputs.typescript == 'true' }}
59-
with:
60-
show-progress: false
61-
persist-credentials: false
62-
repository: microsoft/TypeScript
63-
path: tasks/coverage/typescript
64-
ref: 81c951894e93bdc37c6916f18adcd80de76679bc
65-
66-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67-
if: ${{ inputs.prettier == 'true' }}
68-
with:
69-
show-progress: false
70-
persist-credentials: false
71-
repository: prettier/prettier
72-
path: tasks/prettier_conformance/prettier
73-
ref: 7584432401a47a26943dd7a9ca9a8e032ead7285 # v3.5.0
74-
75-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
76-
if: ${{ inputs.acorn-test262 == 'true' }}
77-
with:
78-
show-progress: false
79-
persist-credentials: false
80-
repository: oxc-project/acorn-test262
81-
path: tasks/coverage/acorn-test262
82-
ref: d9ba02ddea22800a285c7ad24e3fbfbb00ccbb02 # Latest main at 1/7/25
39+
- name: Clone submodules in parallel
40+
shell: bash
41+
run: |
42+
${{ github.action_path }}/clone-parallel.sh \
43+
"${{ inputs.test262 }}" \
44+
"${{ inputs.babel }}" \
45+
"${{ inputs.typescript }}" \
46+
"${{ inputs.prettier }}" \
47+
"${{ inputs.acorn-test262 }}"
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/bin/bash
2+
3+
# Clone submodules in parallel for faster setup
4+
# Usage: ./clone-parallel.sh [test262] [babel] [typescript] [prettier] [acorn-test262]
5+
# Arguments: "true" or "false" for each submodule
6+
7+
set -euo pipefail
8+
9+
# Default values
10+
TEST262=${1:-true}
11+
BABEL=${2:-true}
12+
TYPESCRIPT=${3:-true}
13+
PRETTIER=${4:-true}
14+
ACORN_TEST262=${5:-true}
15+
16+
# Array to store background process PIDs
17+
declare -a PIDS=()
18+
19+
# Function to clone a repository in the background
20+
clone_repo() {
21+
local should_clone="$1"
22+
local repo="$2"
23+
local path="$3"
24+
local ref="$4"
25+
local name="$5"
26+
27+
if [[ "$should_clone" == "true" ]]; then
28+
echo "Starting clone of $name..."
29+
(
30+
# Create the directory structure if it doesn't exist
31+
mkdir -p "$(dirname "$path")"
32+
33+
# Clone the repository with minimal progress output
34+
git clone --quiet --no-progress --single-branch --depth 1 \
35+
"https://github.com/$repo.git" "$path"
36+
37+
# Checkout the specific commit
38+
cd "$path"
39+
git fetch --quiet --depth 1 origin "$ref"
40+
git checkout --quiet "$ref"
41+
42+
echo "✓ Completed clone of $name"
43+
) &
44+
PIDS+=($!)
45+
else
46+
echo "Skipping $name"
47+
fi
48+
}
49+
50+
echo "Cloning submodules in parallel..."
51+
52+
# Start all clone operations in parallel
53+
clone_repo "$TEST262" "tc39/test262" "tasks/coverage/test262" "4b5d36ab6ef2f59d0a8902cd383762547a3a74c4" "test262"
54+
clone_repo "$BABEL" "babel/babel" "tasks/coverage/babel" "98d18aa4f66ce300a6a863bad223ab67b3fdf282" "babel"
55+
clone_repo "$TYPESCRIPT" "microsoft/TypeScript" "tasks/coverage/typescript" "81c951894e93bdc37c6916f18adcd80de76679bc" "typescript"
56+
clone_repo "$PRETTIER" "prettier/prettier" "tasks/prettier_conformance/prettier" "7584432401a47a26943dd7a9ca9a8e032ead7285" "prettier"
57+
clone_repo "$ACORN_TEST262" "oxc-project/acorn-test262" "tasks/coverage/acorn-test262" "d9ba02ddea22800a285c7ad24e3fbfbb00ccbb02" "acorn-test262"
58+
59+
# Wait for all background processes to complete
60+
echo "Waiting for all clone operations to complete..."
61+
failed_count=0
62+
for pid in "${PIDS[@]}"; do
63+
if ! wait "$pid"; then
64+
echo "❌ Clone operation failed (PID: $pid)"
65+
((failed_count++))
66+
fi
67+
done
68+
69+
if [[ $failed_count -eq 0 ]]; then
70+
echo "✅ All submodule clones completed successfully!"
71+
else
72+
echo "$failed_count clone operation(s) failed"
73+
exit 1
74+
fi

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- name: Restore dprint plugin cache
2323
id: cache-restore
24-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
24+
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
2525
with:
2626
key: dprint-${{ hashFiles('dprint.json') }}
2727
path: ~/.cache/dprint

.github/workflows/cargo_llvm_lines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
2323

2424
- name: Install cargo-llvm-lines
25-
uses: taiki-e/install-action@d31232495ad76f47aad66e3501e47780b49f0f3e # v2.57.5
25+
uses: taiki-e/install-action@5f6f3e0538d249cb0b47f8d5b636c120babeb082 # v2.58.6
2626
with:
2727
tool: cargo-llvm-lines
2828

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- run: git diff --exit-code # Must commit everything
3131

3232
test-ubuntu-aarch64:
33+
if: ${{ github.ref_name == 'main' }}
3334
name: Test Linux ARM64
3435
runs-on: ubuntu-24.04-arm
3536
steps:
@@ -43,11 +44,10 @@ jobs:
4344
- run: cargo test --all-features
4445
- run: git diff --exit-code # Must commit everything
4546

46-
# Separate job to save a job on PRs
47-
test-mac:
47+
test-mac: # Separate job to save a job on PRs
48+
if: ${{ github.ref_name == 'main' }}
4849
name: Test Mac
4950
runs-on: macos-latest
50-
if: ${{ github.ref_name == 'main' }}
5151
steps:
5252
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
5353
- uses: oxc-project/setup-node@f42e3bda950c7454575e78ee4eaac880a077700c # v1.0.0
@@ -60,12 +60,12 @@ jobs:
6060
- run: git diff --exit-code # Must commit everything
6161

6262
test-windows:
63-
name: Test Windows
6463
if: ${{ github.ref_name == 'main' }}
64+
name: Test Windows
6565
runs-on: windows-latest
6666
steps:
6767
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
68-
# Unsung heros of the internet, who led me here to speed up window's slowness:
68+
# Unsung heroes of the internet, who led me here to speed up Windows' slowness:
6969
# https://github.com/actions/cache/issues/752#issuecomment-1847036770
7070
# https://github.com/astral-sh/uv/blob/502e04200d52de30d3159894833b3db4f0d6644d/.github/workflows/ci.yml#L158
7171
- uses: oxc-project/setup-node@f42e3bda950c7454575e78ee4eaac880a077700c # v1.0.0
@@ -103,8 +103,8 @@ jobs:
103103
shell: bash
104104

105105
test-big-endian:
106-
name: Test big-endian # s390x-unknown-linux-gnu is a big-endian
107106
if: ${{ github.ref_name == 'main' }}
107+
name: Test big-endian # s390x-unknown-linux-gnu is a big-endian
108108
runs-on: ubuntu-latest
109109
steps:
110110
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
@@ -167,18 +167,18 @@ jobs:
167167
- '!crates/oxc_linter/**'
168168
- '!crates/oxc_language_server/**'
169169
- '!editors/**'
170-
- uses: ./.github/actions/clone-submodules
171-
if: steps.filter.outputs.src == 'true'
172-
with:
173-
babel: false
174-
prettier: false
175170
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
176171
if: steps.filter.outputs.src == 'true'
177172
with:
178173
cache-key: napi
179174
save-cache: ${{ github.ref_name == 'main' }}
180175
- uses: oxc-project/setup-node@f42e3bda950c7454575e78ee4eaac880a077700c # v1.0.0
181176
if: steps.filter.outputs.src == 'true'
177+
- uses: ./.github/actions/clone-submodules
178+
if: steps.filter.outputs.src == 'true'
179+
with:
180+
babel: false
181+
prettier: false
182182
- if: steps.filter.outputs.src == 'true'
183183
name: Run tests in workspace
184184
env:
@@ -202,7 +202,7 @@ jobs:
202202
runs-on: ubuntu-latest
203203
steps:
204204
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
205-
- uses: crate-ci/typos@52bd719c2c91f9d676e2aa359fc8e0db8925e6d8 # v1.35.3
205+
- uses: crate-ci/typos@a67079b4ae32e18c3f53d75368c52ce53b5fb56b # v1.35.4
206206
with:
207207
files: .
208208

@@ -350,7 +350,7 @@ jobs:
350350
save-cache: ${{ github.ref_name == 'main' }}
351351

352352
- name: Restore dprint plugin cache
353-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
353+
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
354354
with:
355355
key: dprint-${{ hashFiles('dprint.json') }}
356356
path: ~/.cache/dprint

.github/workflows/ci_security.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
2525

26-
- uses: taiki-e/install-action@d31232495ad76f47aad66e3501e47780b49f0f3e # v2.57.5
26+
- uses: taiki-e/install-action@5f6f3e0538d249cb0b47f8d5b636c120babeb082 # v2.58.6
2727
with:
2828
tool: zizmor
2929

@@ -33,7 +33,7 @@ jobs:
3333
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: Upload SARIF file
36-
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
36+
uses: github/codeql-action/upload-sarif@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.8
3737
with:
3838
sarif_file: results.sarif
3939
category: zizmor

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Download coverage file
6666
if: env.CODECOV_TOKEN
67-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
67+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
6868
with:
6969
name: codecov
7070

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
# Checkout full repo for git history.
27-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2828
with:
2929
persist-credentials: false
3030

@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Restore dprint plugin cache
4141
id: cache-restore
42-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
42+
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4343
with:
4444
key: dprint-${{ hashFiles('dprint.json') }}
4545
path: ~/.cache/dprint

.github/workflows/dprint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
steps:
1818
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
1919

20-
- uses: taiki-e/install-action@d31232495ad76f47aad66e3501e47780b49f0f3e # v2.57.5
20+
- uses: taiki-e/install-action@5f6f3e0538d249cb0b47f8d5b636c120babeb082 # v2.58.6
2121
with:
2222
tool: dprint
2323

2424
- run: dprint check
2525

2626
- name: Save dprint plugin cache
27-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
27+
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
2828
with:
2929
key: dprint-${{ hashFiles('dprint.json') }}
3030
path: ~/.cache/dprint

.github/workflows/release_crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
contents: write # For git tag push
2323
id-token: write # Required for OIDC token exchange
2424
steps:
25-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2626
with:
2727
token: ${{ secrets.OXC_BOT_PAT }} # required for git tag push
2828
persist-credentials: true # for git tag push

0 commit comments

Comments
 (0)