Skip to content

Commit

Permalink
Merge branch 'main' into 09-03-refactor_linter_use_parsed_pattern_for…
Browse files Browse the repository at this point in the history
…_no_div_regex_rule
  • Loading branch information
DonIsaac authored Sep 3, 2024
2 parents c978653 + 0a5780d commit e1697b9
Show file tree
Hide file tree
Showing 19 changed files with 2,087 additions and 2,272 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: autofix.ci # For security reasons, the workflow in which the autofix.ci ac

on:
pull_request:
paths:
- '**/*.rs'
- '**/*.toml'
- '.github/workflows/autofix.yml'
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
- '**/*.yml'
- '!.github/workflows/ci.yml'
- '!.github/actions/clone-submodules/action.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,25 @@ jobs:
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-codspeed

- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
package_json_file: ./tasks/benchmark/codspeed/package.json

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: ./tasks/benchmark/codspeed/package.json
cache: pnpm

- name: Start bench results interceptor server
working-directory: ./tasks/benchmark/codspeed
env:
COMPONENT: ${{ matrix.component }}
run: |
corepack enable
pnpm install
node capture.mjs &
pnpm run start &
- name: Build benchmark
env:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,44 @@ jobs:
cargo run -p oxc_ast_tools
git diff --exit-code ||
(echo 'AST changes caused the "generated" code to get outdated. Have you forgotten to run the `just ast` command and/or commit generated codes?' && exit 1)
napi:
name: Test NAPI
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'pnpm-lock.yaml'
- 'napi/**'
- uses: Boshen/setup-rust@main
if: steps.filter.outputs.src == 'true'
with:
# warm cache factory for all other CI jobs
# cache `target` directory to avoid download crates
save-cache: ${{ github.ref_name == 'main' }}
cache-key: warm
- uses: pnpm/action-setup@v4.0.0
if: steps.filter.outputs.src == 'true'
with:
package_json_file: ./package.json
- uses: actions/setup-node@v4
if: steps.filter.outputs.src == 'true'
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install
if: steps.filter.outputs.src == 'true'
- name: Test napi/parser
if: steps.filter.outputs.src == 'true'
working-directory: napi/parser
run: pnpm build && pnpm test
- name: Test napi/transform
if: steps.filter.outputs.src == 'true'
working-directory: napi/transform
run: pnpm build && pnpm test
- run: git diff --exit-code
if: steps.filter.outputs.src == 'true'
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: actions/labeler@v5

- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
# bot account with PAT required for triggering workflow runs
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
token: ${{ secrets.OXC_BOT_PAT }}
commit-message: Release ${{ inputs.name }}
commit-message: "release: ${{ inputs.name }}"
branch: release/${{ inputs.name }}
branch-suffix: timestamp
base: main
title: Release ${{ inputs.name }} v${{ steps.run.outputs.VERSION }}
title: "release: ${{ inputs.name }} v${{ steps.run.outputs.VERSION }}"
body: ${{ steps.run.outputs.CHANGELOG }}
assignees: Boshen
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ num-traits = "0.2.19"
once_cell = "1.19.0"
owo-colors = "4.0.0"
oxc_resolver = "1.10.2"
oxc-browserslist = "1.0.2"
oxc-browserslist = "1.0.3"
petgraph = "0.6.5"
phf = "0.11.2"
pico-args = "0.5.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ serialize = [
"dep:tsify",
"dep:wasm-bindgen",
"oxc_allocator/serialize",
"oxc_regular_expression/serialize",
"oxc_span/serialize",
"oxc_syntax/serialize",
"oxc_syntax/to_js_string",
"oxc_regular_expression/serialize"
]
17 changes: 7 additions & 10 deletions crates/oxc_regular_expression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@ rustc-hash = { workspace = true }
unicode-id-start = { workspace = true }
serde = { workspace = true, features = ["derive"], optional = true }

tsify = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
tsify = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }

[features]
default = []
serialize = [
"dep:serde",
"dep:tsify",
"dep:wasm-bindgen",
"oxc_allocator/serialize",
"oxc_span/serialize",
]
default = []
serialize = ["dep:serde", "dep:tsify", "dep:wasm-bindgen", "oxc_allocator/serialize", "oxc_span/serialize"]

[package.metadata.cargo-shear]
ignored = ["wasm-bindgen"] # wasm-bindgen used by tsify
6 changes: 0 additions & 6 deletions napi/parser/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"name": "@oxc-parser/binding",
"packageManager": "pnpm@9.8.0",
"private": true,
"scripts": {
"build": "napi build --platform --release",
"test": "node test.mjs",
"bench": "node parse.bench.mjs"
},
"devDependencies": {
"@napi-rs/cli": "3.0.0-alpha.61",
"es-module-lexer": "^1.4.1",
"tinybench": "^2.6.0"
},
"engines": {
"node": ">=14.*"
},
Expand Down
Loading

0 comments on commit e1697b9

Please sign in to comment.