Skip to content

Commit

Permalink
Merge branch 'main' into don/09-20-feat_linter_support_user-configura…
Browse files Browse the repository at this point in the history
…ble_secrets_for_oxc-security_api-keys_
  • Loading branch information
DonIsaac authored Oct 28, 2024
2 parents 1b61b82 + 610621c commit 04b5429
Show file tree
Hide file tree
Showing 618 changed files with 34,953 additions and 16,190 deletions.
7 changes: 6 additions & 1 deletion .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To edit this generated file you have to edit `tasks/ast_tools/src/main.rs`
# Auto-generated code, DO NOT EDIT DIRECTLY!
# To edit this generated file you have to edit `tasks/ast_tools/src/main.rs`

src:
- 'crates/oxc_ast/src/ast/literal.rs'
Expand All @@ -23,10 +23,15 @@ src:
- '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'
- 'crates/oxc_syntax/src/generated/derive_estree.rs'
- 'crates/oxc_ast/src/generated/assert_layouts.rs'
- 'crates/oxc_ast/src/generated/ast_kind.rs'
- 'crates/oxc_ast/src/generated/ast_builder.rs'
- 'crates/oxc_ast/src/generated/visit.rs'
- 'crates/oxc_ast/src/generated/visit_mut.rs'
- 'npm/oxc-types/types.d.ts'
- 'tasks/ast_tools/src/**'
- '.github/.generated_ast_watch_list.yml'
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [Boshen]
github: [Boshen, Dunqing, DonIsaac, camc314, leaysgur]
open_collective: oxc
6 changes: 3 additions & 3 deletions .github/actions/clone-submodules/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ runs:
show-progress: false
repository: tc39/test262
path: tasks/coverage/test262
ref: d62fa93c8f9ce5e687c0bbaa5d2b59670ab2ff60
ref: 0645461999632a17426e45d044ee519a0f07d022

- uses: actions/checkout@v4
with:
show-progress: false
repository: babel/babel
path: tasks/coverage/babel
ref: 3bcfee232506a4cebe410f02042fb0f0adeeb0b1
ref: d20b314c14533ab86351ecf6ca6b7296b66a57b3

- uses: actions/checkout@v4
with:
show-progress: false
repository: microsoft/TypeScript
path: tasks/coverage/typescript
ref: a709f9899c2a544b6de65a0f2623ecbbe1394eab
ref: df9d16503f6755dd071e4c591b9d21c39d03d95e

- uses: actions/checkout@v4
with:
Expand Down
14 changes: 1 addition & 13 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@
{
"groupName": "rust crates",
"matchManagers": ["cargo"],
"ignoreDeps": ["syn", "ureq", "unicode-width"]
},
{
"groupName": "vscode npm packages",
"matchFileNames": ["editors/vscode/package.json"],
"matchManagers": ["npm"],
"ignoreDeps": ["@types/vscode"]
},
{
"groupName": "off",
"matchFileNames": ["napi/*/package.json", "npm/*/package.json"],
"matchManagers": ["npm"],
"enabled": false
"ignoreDeps": ["syn", "ureq"]
}
]
}
6 changes: 6 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: Boshen/setup-rust@main
with:
restore-cache: false
tools: just,cargo-shear@1,dprint
components: rustfmt

- name: Restore dprint plugin cache
id: cache-restore
uses: actions/cache/restore@v4
with:
key: dprint-autofix-ci-${{ runner.os }}-${{ hashFiles('dprint.json') }}
path: ~/.cache/dprint

- run: just fmt

- uses: autofix-ci/action@v1.3.1
with:
fail-fast: false

- name: Save dprint plugin cache
if: ${{ github.ref_name == 'main' }}
id: cache-save
uses: actions/cache/save@v4
with:
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,24 @@ jobs:
with:
cache-key: wasm
save-cache: ${{ github.ref_name == 'main' }}
tools: wasm-pack
tools: wasm-pack,just
- name: Check
run: |
rustup target add wasm32-unknown-unknown
cargo check -p oxc_wasm --target wasm32-unknown-unknown
- name: Build
run: |
wasm-pack build --target web --dev ./crates/oxc_wasm
wasm-pack build --target web --dev ./wasm/parser
- uses: ./.github/actions/pnpm
- run: just build-wasm debug
- working-directory: wasm/parser
run: pnpm run build
- name: Check output types
run: npx -y -p typescript tsc --lib es2020,dom crates/oxc_wasm/pkg/oxc_wasm.d.ts
run: npx -y -p typescript tsc --lib es2020,dom npm/parser-wasm/node/oxc_parser_wasm.d.ts

typos:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: crate-ci/typos@v1.26.0
- uses: crate-ci/typos@v1.26.1
with:
files: .

Expand Down Expand Up @@ -176,7 +175,8 @@ jobs:
- uses: taiki-e/checkout-action@v1
- uses: Boshen/setup-rust@main
with:
cache-key: warm
save-cache: ${{ github.ref_name == 'main' }}
cache-key: clippy
components: clippy
tools: ast-grep
- run: cargo lint -- -D warnings
Expand Down Expand Up @@ -261,16 +261,32 @@ jobs:
if: steps.filter.outputs.src == 'true'
with:
components: rustfmt
tools: dprint
cache-key: ast_changes
save-cache: ${{ github.ref_name == 'main' }}

- name: Restore dprint plugin cache
id: cache-restore
uses: actions/cache/restore@v4
with:
key: dprint-autofix-ci-${{ runner.os }}-${{ hashFiles('dprint.json') }}
path: ~/.cache/dprint

- name: Check AST Changes
if: steps.filter.outputs.src == 'true'
run: |
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)
- name: Save dprint plugin cache
if: ${{ github.ref_name == 'main' }}
id: cache-save
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
path: ~/.cache/dprint

napi:
name: Test NAPI
runs-on: ubuntu-latest
Expand All @@ -281,13 +297,10 @@ jobs:
with:
filters: |
src:
- 'pnpm-lock.yaml'
- 'napi/**'
- '!crates/oxc_linter/**'
- 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: ./.github/actions/pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_napi_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
# publish subpackages first
for package in npm/oxc-parser-*
do
pnpm publish $package/ --provenance --access public --tag latest --no-git-checks
pnpm publish $package/ --provenance --access public --no-git-checks
done
# publish root package last
pnpm publish npm/oxc-parser/ --provenance --access public --tag latest --no-git-checks
pnpm publish npm/oxc-parser/ --provenance --access public --no-git-checks
4 changes: 2 additions & 2 deletions .github/workflows/release_napi_transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
# publish subpackages first
for package in npm/oxc-transform-*
do
pnpm publish $package/ --provenance --access public --tag latest --no-git-checks
pnpm publish $package/ --provenance --access public --no-git-checks
done
# publish root package last
pnpm publish npm/oxc-transform/ --provenance --access public --tag latest --no-git-checks
pnpm publish npm/oxc-transform/ --provenance --access public --no-git-checks
4 changes: 2 additions & 2 deletions .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ jobs:
run: |
for package in npm/oxlint*
do
pnpm publish $package/ --tag latest --provenance --access public --no-git-checks
pnpm publish $package/ --provenance --access public --no-git-checks
echo '----'
done
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.run.outputs.CHANGELOG }}
draft: true
draft: false
files: oxlint-*
name: oxlint v${{ needs.check.outputs.version }}
tag_name: oxlint_v${{ needs.check.outputs.version }}
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/release_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release @oxc-project/types

on:
workflow_dispatch:
push:
branches:
- main
paths:
- npm/oxc-types/package.json # Please only commit this file, so we don't need to wait for all the other CI jobs to finish.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Check version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
version_changed: ${{ steps.version.outputs.changed }}
steps:
- uses: taiki-e/checkout-action@v1

- name: Check version changes
uses: EndBug/version-check@v2
id: version
with:
static-checking: localIsNew
file-url: https://unpkg.com/@oxc-project/types/package.json
file-name: npm/oxc-types/package.json

- name: Set version name
if: steps.version.outputs.changed == 'true'
run: |
echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"
build:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Release @oxc-project/types
runs-on: ubuntu-latest
permissions:
id-token: write # for `pnpm publish --provenance`
steps:
- uses: taiki-e/checkout-action@v1

- uses: ./.github/actions/pnpm

- name: Publish
working-directory: npm/oxc-types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --provenance --access public --no-git-checks
3 changes: 1 addition & 2 deletions .github/workflows/release_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ jobs:
working-directory: wasm/parser
run: |
rustup target add wasm32-unknown-unknown
pnpm install
pnpm run build
pnpm run test
- name: Publish
working-directory: npm/parser-wasm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --provenance --access public
run: pnpm publish --provenance --access public --no-git-checks
Loading

0 comments on commit 04b5429

Please sign in to comment.