Skip to content

Commit 58863b5

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/transform-async-to-generator
2 parents 4ee2faf + 67ad08a commit 58863b5

File tree

616 files changed

+37899
-27998
lines changed

Some content is hidden

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

616 files changed

+37899
-27998
lines changed

.devcontainer/devcontainer.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Rust",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/rust:latest",
7+
"features": {
8+
// add `just` for running scripts
9+
"ghcr.io/guiyomh/features/just:0": {
10+
"version": "latest"
11+
},
12+
// add `cargo-binstall` for installing other tools.
13+
"ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall:0": {
14+
"version": "latest"
15+
}
16+
},
17+
// Configure tool-specific properties.
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"rust-lang.rust-analyzer"
22+
]
23+
}
24+
},
25+
26+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
27+
// "mounts": [
28+
// {
29+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
30+
// "target": "/usr/local/cargo",
31+
// "type": "volume"
32+
// }
33+
// ]
34+
35+
// Features to add to the dev container. More info: https://containers.dev/features.
36+
// "features": {},
37+
38+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
39+
// "forwardPorts": [],
40+
41+
// Use 'postCreateCommand' to run commands after the container is created.
42+
"postCreateCommand": "just init"
43+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44+
// "remoteUser": "root"
45+
}

.github/.generated_ast_watch_list.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ src:
66
- 'crates/oxc_ast/src/ast/js.rs'
77
- 'crates/oxc_ast/src/ast/ts.rs'
88
- 'crates/oxc_ast/src/ast/jsx.rs'
9+
- 'crates/oxc_ast/src/ast/comment.rs'
910
- 'crates/oxc_syntax/src/number.rs'
1011
- 'crates/oxc_syntax/src/operator.rs'
1112
- 'crates/oxc_span/src/span/types.rs'

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ about: Create a report to help us improve.
44
title: ''
55
labels: C-bug
66
---
7+
8+
<!--
9+
!!IMPORTANT!! If you are reporting a bug for Oxlint or the Oxc VSCode extension,
10+
please use the "Linter bug report" template instead. You can find it here:
11+
https://github.com/oxc-project/oxc/issues/new?assignees=DonIsaac&labels=C-bug,A-linter&projects=&template=linter_bug_report.yaml&title=linter:+
12+
-->

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ A-cli:
1414
- changed-files:
1515
- any-glob-to-any-file: ["apps/oxlint/**"]
1616

17+
A-editor:
18+
- changed-files:
19+
- any-glob-to-any-file: ["crates/oxc_language_server/**", "editors/**"]
20+
1721
A-prettier:
1822
- changed-files:
1923
- any-glob-to-any-file: ["crates/oxc_prettier/**", "tasks/prettier_conformance/**"]

.github/workflows/benchmark.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ jobs:
123123
cache-key: benchmark-linter
124124
save-cache: ${{ github.ref_name == 'main' }}
125125

126-
- uses: mozilla-actions/[email protected]
127-
if: ${{ vars.USE_SCCACHE == 'true' }}
128-
129126
- name: Build benchmark
130127
env:
131128
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"

.github/workflows/ci.yml

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

4949
test-windows:
50+
if: false
5051
name: Test (windows-latest)
5152
runs-on: windows-latest
5253
steps:
@@ -142,7 +143,7 @@ jobs:
142143
runs-on: ubuntu-latest
143144
steps:
144145
- uses: taiki-e/checkout-action@v1
145-
- uses: crate-ci/typos@v1.24.5
146+
- uses: crate-ci/typos@v1.26.0
146147
with:
147148
files: .
148149

@@ -177,7 +178,16 @@ jobs:
177178
with:
178179
cache-key: warm
179180
components: clippy
181+
tools: ast-grep
180182
- run: cargo lint -- -D warnings
183+
- name: Check Char and Byte Offset
184+
run: |
185+
output=$(sg -p '$A.chars().enumerate()' -r '$A.char_indices()' -l rs)
186+
echo "Output: $output"
187+
if [ -n "$output" ]; then
188+
echo "Error: Unexpected output detected"
189+
exit 1
190+
fi
181191
182192
doc:
183193
name: Doc
@@ -273,13 +283,7 @@ jobs:
273283
cache-key: warm
274284
- uses: ./.github/actions/pnpm
275285
if: steps.filter.outputs.src == 'true'
276-
- name: Test napi/parser
277-
run: pnpm build && pnpm test
278-
if: steps.filter.outputs.src == 'true'
279-
working-directory: napi/parser
280-
- name: Test napi/transform
286+
- run: pnpm run build
281287
if: steps.filter.outputs.src == 'true'
282-
working-directory: napi/transform
283-
run: pnpm build && pnpm test
284-
- run: git diff --exit-code
288+
- run: pnpm run test
285289
if: steps.filter.outputs.src == 'true'

.github/workflows/miri.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77
paths:
8-
- "crates/oxc_parser/**"
98
- "crates/oxc_allocator/**"
9+
- "crates/oxc_data_structures/**"
10+
- "crates/oxc_parser/**"
11+
- "crates/oxc_traverse/**"
1012
- ".github/workflows/miri.yml"
1113
push:
1214
branches:
1315
- main
1416
paths:
15-
- "crates/oxc_parser/**"
1617
- "crates/oxc_allocator/**"
18+
- "crates/oxc_data_structures/**"
19+
- "crates/oxc_parser/**"
20+
- "crates/oxc_traverse/**"
1721
- ".github/workflows/miri.yml"
1822

1923
concurrency:

.github/workflows/prepare_release_crates.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,25 @@ jobs:
2828
name: crates
2929
secrets:
3030
OXC_BOT_PAT: ${{ secrets.OXC_BOT_PAT }}
31+
32+
ecosystem-ci:
33+
needs: prepare
34+
name: Trigger Monitor Oxc
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: taiki-e/checkout-action@v1
38+
39+
- uses: peter-evans/create-or-update-comment@v4
40+
id: comment
41+
with:
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
issue-number: ${{ needs.prepare.outputs.pull-request-number }}
44+
body: Triggering Monitor Oxc https://github.com/oxc-project/monitor-oxc/actions/workflows/ci.yml
45+
46+
- uses: benc-uk/workflow-dispatch@v1
47+
with:
48+
repo: oxc-project/monitor-oxc
49+
workflow: ci.yml
50+
token: ${{ secrets.OXC_BOT_PAT }}
51+
ref: main
52+
inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "comment-id": "${{ steps.comment.outputs.comment-id }}" }'

.github/workflows/release_napi_parser.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ jobs:
130130
mv target/${{ matrix.target }}/release/*.@(so|dll|dylib) napi/parser/parser.${{ matrix.code-target }}.node
131131
ls napi/parser
132132
133+
- uses: ./.github/actions/pnpm
134+
if: ${{ contains(matrix.target, 'x86') && !contains(matrix.target, 'musl') }} # Need docker for aarch64
135+
133136
- name: Test
134137
working-directory: napi/parser
135138
if: ${{ contains(matrix.target, 'x86') && !contains(matrix.target, 'musl') }} # Need docker for aarch64
136-
run: |
137-
ls
138-
node test.mjs
139+
run: pnpm run test
139140

140141
# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
141142
- name: Archive Binary

.github/workflows/release_napi_transform.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ jobs:
130130
mv target/${{ matrix.target }}/release/*.@(so|dll|dylib) napi/transform/transform.${{ matrix.code-target }}.node
131131
ls napi/transform
132132
133+
- uses: ./.github/actions/pnpm
134+
if: ${{ contains(matrix.target, 'x86') && !contains(matrix.target, 'musl') }} # Need docker for aarch64
135+
133136
- name: Test
134137
working-directory: napi/transform
135138
if: ${{ contains(matrix.target, 'x86') && !contains(matrix.target, 'musl') }} # Need docker for aarch64
136-
run: |
137-
ls
138-
node test.mjs
139+
run: pnpm run test
139140

140141
# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
141142
- name: Archive Binary

0 commit comments

Comments
 (0)