Skip to content

Commit

Permalink
Merge branch 'main' into token_eight_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jan 18, 2025
2 parents 84bc0de + 63eb298 commit daa2a58
Show file tree
Hide file tree
Showing 863 changed files with 32,332 additions and 28,025 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ rule = "run -p rulegen"

# Build oxlint in release mode
oxlint = "build --release --bin oxlint --features allocator"

[resolver]
incompatible-rust-versions = "fallback"
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer"
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig",
"tamasfe.even-better-toml",
"eamodio.gitlens"
]
}
},
Expand Down
3 changes: 0 additions & 3 deletions .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ src:
- 'crates/oxc_ast/src/generated/derive_content_eq.rs'
- 'crates/oxc_regular_expression/src/generated/derive_content_eq.rs'
- 'crates/oxc_syntax/src/generated/derive_content_eq.rs'
- 'crates/oxc_ast/src/generated/derive_content_hash.rs'
- 'crates/oxc_regular_expression/src/generated/derive_content_hash.rs'
- 'crates/oxc_syntax/src/generated/derive_content_hash.rs'
- 'crates/oxc_ast/src/generated/derive_estree.rs'
- 'crates/oxc_regular_expression/src/generated/derive_estree.rs'
- 'crates/oxc_span/src/generated/derive_estree.rs'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/clone-submodules/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
show-progress: false
repository: babel/babel
path: tasks/coverage/babel
ref: 54a8389fa31ce4fd18b0335b05832dc1ad3cc21f
ref: acbc09a87016778c1551ab5e7162fdd0e70b6663

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: cargo codspeed run

- name: Upload bench data artefact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: result-${{ matrix.component }}
path: ${{ env.DATA_DIR }} # env.DATA_DIR from `capture.mjs`
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
rm target/codspeed/oxc_benchmark/*.d
- name: Upload Binary
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
if-no-files-found: error
name: benchmark-linter
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
chmod +x ./target/codspeed/oxc_benchmark/*
- name: Install codspeed
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cargo-codspeed

Expand All @@ -193,7 +193,7 @@ jobs:
run: cargo codspeed run

- name: Upload bench data artefact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: result-linter${{ matrix.fixture }}
path: ${{ env.DATA_DIR }} # env.DATA_DIR from `capture.mjs`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-llvm-lines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0

- name: Install cargo-llvm-lines
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cargo-llvm-lines

Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Unsung heros of the internet, who led me here to speed up window's slowness:
# https://github.com/actions/cache/issues/752#issuecomment-1847036770
# https://github.com/astral-sh/uv/blob/502e04200d52de30d3159894833b3db4f0d6644d/.github/workflows/ci.yml#L158
- uses: samypr100/setup-dev-drive@d3f2420389ae9ea6e91dd178779e122c42352047 # v3
- uses: samypr100/setup-dev-drive@c13db539c98b4353ff2bc78fb8f775b94336025b # v3
with:
workspace-copy: true
drive-size: 8GB
Expand All @@ -77,7 +77,7 @@ jobs:
rustup show
git restore .
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
with:
workspaces: ${{ env.DEV_DRIVE_WORKSPACE }}
save-if: ${{ github.ref_name == 'main' }}
Expand Down Expand Up @@ -162,6 +162,7 @@ jobs:
cache-key: clippy
components: clippy
- run: cargo lint -- -D warnings
- run: cargo lint --profile dev-no-debug-assertions -- -D warnings
- name: Check Char and Byte Offset
run: |
npm i @ast-grep/cli -g
Expand Down Expand Up @@ -313,9 +314,9 @@ jobs:
cache-key: warm
- uses: ./.github/actions/pnpm
if: steps.filter.outputs.src == 'true'
- run: pnpm run build-dev
if: steps.filter.outputs.src == 'true'
- run: pnpm run test
if: steps.filter.outputs.src == 'true'
- run: git diff --exit-code # Must commit everything
if: steps.filter.outputs.src == 'true'
- if: steps.filter.outputs.src == 'true'
run: |
pnpm run build-dev
pnpm run test
pnpm --filter e2e run test
git diff --exit-code # Must commit everything
4 changes: 2 additions & 2 deletions .github/workflows/ci_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
persist-credentials: false

- uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
- uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: zizmor

Expand All @@ -35,7 +35,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3
with:
sarif_file: results.sarif
category: zizmor
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: cargo codecov --lcov --output-path lcov.info

- name: Upload Artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: codecov
path: lcov.info
Expand All @@ -66,7 +66,7 @@ jobs:

- name: Upload to codecov.io
if: env.CODECOV_TOKEN
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- name: Check Links
uses: lycheeverse/lychee-action@f81112d0d2814ded911bd23e3beaa9dda9093915 # v2.1.0
uses: lycheeverse/lychee-action@f796c8b7d468feb9b8c0a46da3fac0af6874d374 # v2.2.0
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
# Accept 429 for now due to GitHub rate limit.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_napi_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ jobs:

- name: Install cargo-zigbuild
if: ${{ contains(matrix.target, 'musl') }}
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cargo-zigbuild

### install non-musl dependencies ###

- name: Install cross
if: ${{ !contains(matrix.target, 'musl') }}
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cross

Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
run: tar czf ${{ matrix.code-target }}.tar.gz napi/parser/parser.${{ matrix.code-target }}.node

- name: Upload artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
if-no-files-found: error
name: binaries-${{ matrix.code-target }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_napi_transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ jobs:

- name: Install cargo-zigbuild
if: ${{ contains(matrix.target, 'musl') }}
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cargo-zigbuild

### install non-musl dependencies ###

- name: Install cross
if: ${{ !contains(matrix.target, 'musl') }}
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cross

Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
run: tar czf ${{ matrix.code-target }}.tar.gz napi/transform/transform.${{ matrix.code-target }}.node

- name: Upload artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
if-no-files-found: error
name: binaries-${{ matrix.code-target }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ jobs:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- name: Install cross
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cross

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
shared-key: release-${{ matrix.target }}

Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
tar czf $OXLS_BIN_NAME.tar.gz $OXLS_BIN_NAME
- name: Upload Binary
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
if-no-files-found: error
name: binaries-${{ matrix.code-target }}
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
done
- name: Create GitHub Release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
body: ${{ steps.run.outputs.CHANGELOG }}
draft: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ jobs:
run: pnpm run compile

- name: Install cross
uses: taiki-e/install-action@8c39981484df4e7ba41af8e8e078ac546d5e1b11 # v2.46.8
uses: taiki-e/install-action@df5dec2a2f73ff6dbace3072df1242669b7bb7d1 # v2.47.9
with:
tool: cross

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
shared-key: release-${{ matrix.target }}

Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
pnpm exec vsce package -o "../../oxc_language_server-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
- name: Upload VSCode extension artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: packages-${{ matrix.code-target }}
path: ./oxc_language_server-${{ matrix.code-target }}.vsix
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# update `Cargo.lock`
- run: cargo check

- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
- uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
id: pr
with:
# bot account with PAT required for triggering workflow runs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target/
/tasks/benchmark/codspeed/node_modules/
/tasks/transform_conformance/node_modules/
/tasks/compat_data/node_modules/
/tasks/e2e/node_modules/
/npm/*/node_modules

# vscode
Expand Down
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extend-exclude = [
"tasks/transform_conformance/overrides",
"tasks/transform_conformance/snapshots",
"npm/oxc-wasm/oxc_wasm.js",
"napi/minify/test/terser.test.ts",
]

[default]
Expand Down
Loading

0 comments on commit daa2a58

Please sign in to comment.