Skip to content

Commit

Permalink
Merge branch 'oxc-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
woai3c authored Apr 14, 2024
2 parents e447840 + 5a286c3 commit 61fb4db
Show file tree
Hide file tree
Showing 234 changed files with 14,370 additions and 5,360 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[alias]
# Do not append `--` or it will break IDEs
ck = "check --workspace --all-targets --locked"
ck = "check --workspace --all-features --all-targets --locked"
lint = "clippy --workspace --all-targets --all-features"
codecov = "llvm-cov --workspace --ignore-filename-regex tasks"
coverage = "run -p oxc_coverage --release --"
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Bug report
about: Create a report to help us improve.
title: ''
labels: C-bug
assignees: Boshen

---


12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
contact_links:
- name: Github discussions
url: https://github.com/oxc-project/oxc/discussions
about: For general discussions.

- name: Discord server
url: https://discord.gg/9uXCAwqQZW
about: For lightweight questions.

- name: Website issues
url: https://github.com/oxc-project/oxc-project.github.io
about: For website issues.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Feature request
about: Suggest an idea for this project.
title: ''
labels: C-enhancement
assignees: Boshen

---


2 changes: 0 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ ignore:
- "crates/oxc_ast/src/span.rs"
- "crates/oxc_wasm" # Remove this once wasm is completed
- "crates/oxc_diagnostics"
- "crates/oxc_type_synthesis"
- "crates/oxc_transformer" # not ready
- "crates/oxc_js_regex" # not ready
25 changes: 21 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,31 @@
"crates/oxc_linter/fixtures/**"
],
"assignees": ["@Boshen"],
"lockFileMaintenance": {
"enabled": true
},
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^rust-toolchain\\.toml?$"],
"matchStrings": [
"channel\\s*=\\s*\"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)\""
],
"depNameTemplate": "rust",
"lookupNameTemplate": "rust-lang/rust",
"datasourceTemplate": "github-releases"
}
],
"packageRules": [
{
"groupName": "github-actions",
"matchManagers": ["github-actions"]
},
{
"groupName": "rust toolchain",
"matchManagers": ["regex"],
"matchPackageNames": ["rust"]
},
{
"groupName": "rust crates",
"matchManagers": ["cargo"],
Expand All @@ -33,8 +53,5 @@
"matchManagers": ["npm"],
"enabled": false
}
],
"lockFileMaintenance": {
"enabled": true
}
]
}
4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
benchmark-napi:
name: Benchmark NAPI parser
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout Branch
uses: taiki-e/checkout-action@v1
Expand Down Expand Up @@ -188,7 +189,8 @@ jobs:

upload:
name: Upload benchmarks
needs: [benchmark, benchmark-napi]
# needs: [benchmark, benchmark-napi]
needs: [benchmark]
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"

jobs:
cache: # Warm cache factory for all other CI jobs
name: Check and Build
Expand Down Expand Up @@ -108,6 +112,7 @@ jobs:
uses: taiki-e/install-action@cargo-deny

- uses: ./.github/actions/rustup
if: steps.filter.outputs.src == 'true'
with:
restore-cache: false

Expand All @@ -119,30 +124,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'Cargo.lock'
- '**/*.rs'
- '**/Cargo.toml'
- '.github/workflows/ci.yml'
- name: Install Rust Toolchain
- 'Cargo.lock'
- uses: ./.github/actions/rustup
with:
restore-cache: false
if: steps.filter.outputs.src == 'true'
uses: ./.github/actions/rustup

- name: Install cargo-binstall
- uses: cargo-bins/cargo-binstall@main
if: steps.filter.outputs.src == 'true'
uses: cargo-bins/cargo-binstall@main

- name: Install cargo-shear
- run: cargo binstall --no-confirm cargo-shear
if: steps.filter.outputs.src == 'true'
- run: cargo shear
if: steps.filter.outputs.src == 'true'
run: cargo binstall --no-confirm cargo-shear

- if: steps.filter.outputs.src == 'true'
run: cargo shear

format:
name: Format
Expand Down Expand Up @@ -184,7 +183,7 @@ jobs:
docs: true

- name: Run doc
run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps
run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items

test:
name: Test
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
shared-key: 'codecov'
save-cache: ${{ github.ref_name == 'main' }}

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
Expand All @@ -38,6 +41,9 @@ jobs:
run: rustup component add llvm-tools-preview

- name: Run
env:
# Increase stack size to 10MB, avoid `oxc_prettier` from stack overflowing when printing long assignment expressions.
RUST_MIN_STACK: 104857600
run: cargo codecov --lcov --output-path lcov.info

- name: Upload Artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
save-cache: ${{ github.ref_name == 'main' }}

- name: Build oxlint
run: cargo build --release -p oxc_cli --bin oxlint
run: cargo build --release -p oxc_cli --bin oxlint --features allocator

- name: Upload Binary
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
types: [opened, synchronize]
paths:
- 'crates/oxc_parser/**'
- 'crates/oxc_allocator/**'
- '.github/workflows/miri.yml'
push:
branches:
- main
paths:
- 'crates/oxc_parser/**'
- 'crates/oxc_allocator/**'
- '.github/workflows/miri.yml'

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

- name: Build Binary
# strip debug symbols from std, see https://github.com/johnthagen/min-sized-rust#remove-panic-string-formatting-with-panic_immediate_abort
run: cargo build --release --target ${{ matrix.target }} -p oxc_cli
run: cargo build --release --target ${{ matrix.target }} -p oxc_cli --features allocator
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
run: rustup target add ${{ matrix.target }}

- name: Build with cross
run: cross build -p oxc_cli --bin oxlint --release --target=${{ matrix.target }}
run: cross build -p oxc_cli --bin oxlint --release --target=${{ matrix.target }} --features allocator

# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Binary
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ jobs:
corepack enable
pnpm install
pnpm run build
pnpm run test
- name: Publish
working-directory: npm/parser-wasm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --tag latest --provenance --access public
run: npm publish --provenance --access public # --tag alpha
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ extend-exclude = [
"crates/oxc_parser/src/lexer/byte_handlers.rs",
"crates/oxc_linter/fixtures",
"crates/oxc_linter/src/rules/jsx_a11y/img_redundant_alt.rs",
"crates/oxc_linter/src/rules/react/no_unknown_property.rs",
"crates/oxc_syntax/src/xml_entities.rs",
"**/*.snap",
"pnpm-lock.yaml",
"**/*/CHANGELOG.md",
]

[default.extend-words]
Expand Down
Loading

0 comments on commit 61fb4db

Please sign in to comment.