Skip to content

Commit 83ced0b

Browse files
committed
feat: merge from upstream oxc-project/oxc-resolver (#15)
1 parent dc80382 commit 83ced0b

File tree

99 files changed

+4644
-3811
lines changed

Some content is hidden

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

99 files changed

+4644
-3811
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Addresses a potential segmentation fault issue that occurs when
2+
# running napi-rs within a Node.js worker thread on GNU/Linux systems.
3+
# See https://x.com/Brooooook_lyn/status/1895848334692401270
4+
[target.'cfg(target_env = "gnu")']
5+
rustflags = ["-C", "link-args=-Wl,-z,nodelete"]

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root=true
2+
3+
[*]
4+
indent_style=space
5+
indent_size=2
6+
tab_width=2
7+
end_of_line=lf
8+
charset=utf-8
9+
trim_trailing_whitespace=true
10+
insert_final_newline=true

.github/CODE_OF_CONDUCT.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -105,7 +105,7 @@ Violating these terms may lead to a permanent ban.
105105
### 4. Permanent Ban
106106

107107
**Community Impact**: Demonstrating a pattern of violation of community
108-
standards, including sustained inappropriate behavior, harassment of an
108+
standards, including sustained inappropriate behavior, harassment of an
109109
individual, or aggression toward or disparagement of classes of individuals.
110110

111111
**Consequence**: A permanent ban from any sort of public interaction within
@@ -117,8 +117,7 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117117
version 2.0, available at
118118
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119119

120-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
121-
enforcement ladder](https://github.com/mozilla/diversity).
120+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
122121

123122
[homepage]: https://www.contributor-covenant.org
124123

.github/actions/pnpm/action.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,15 @@ runs:
1212
node-version-file: .node-version
1313
cache: pnpm
1414

15-
- name: Enable corepack
16-
if: ${{ inputs.node-version != '16' }}
15+
- name: pnpm
1716
shell: bash
1817
run: |
19-
if [[ "${{runner.os}}" == "Windows" ]]; then
20-
# add the npm prefix to PATH to ensure the installed corepack work properly
21-
NPM_PREFIX=$(cygpath -u "$(npm config get prefix)")
22-
export PATH="$NPM_PREFIX:$PATH"
23-
fi
24-
npm install -g [email protected] --force
25-
echo "Corepack version: $(corepack --version)"
2618
corepack enable
19+
pnpm install
2720
2821
- name: yarn
2922
shell: bash
3023
run: |
3124
cd fixtures/pnp
25+
corepack enable
3226
yarn install
33-
34-
- name: pnpm
35-
shell: bash
36-
run: |
37-
pnpm install

.github/workflows/autofix.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
autofix:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: taiki-e/checkout-action@v1
18+
19+
- uses: oxc-project/[email protected]
20+
with:
21+
restore-cache: false
22+
tools: just,cargo-shear@1,dprint
23+
components: rustfmt
24+
25+
- name: Restore dprint plugin cache
26+
id: cache-restore
27+
uses: actions/cache/restore@v4
28+
with:
29+
key: dprint-autofix-ci-${{ runner.os }}-${{ hashFiles('dprint.json') }}
30+
path: ~/.cache/dprint
31+
32+
- run: just fmt
33+
34+
- uses: autofix-ci/action@v1
35+
with:
36+
fail-fast: false
37+
38+
- name: Save dprint plugin cache
39+
if: ${{ github.ref_name == 'main' }}
40+
id: cache-save
41+
uses: actions/cache/save@v4
42+
with:
43+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
44+
path: ~/.cache/dprint

.github/workflows/benchmark.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ name: Benchmark
33
on:
44
workflow_dispatch:
55
pull_request:
6-
types: [opened, synchronize]
7-
paths-ignore:
8-
- '**/*.md'
6+
types:
7+
- opened
8+
- synchronize
9+
paths:
10+
- "src/*.rs"
11+
- "Cargo.lock"
912
push:
1013
branches:
1114
- main
12-
paths-ignore:
13-
- '**/*.md'
15+
paths:
16+
- "src/*.rs"
17+
- "Cargo.lock"
1418

1519
concurrency:
1620
group: ${{ github.workflow }}-${{ github.ref }}
@@ -21,20 +25,21 @@ jobs:
2125
name: Benchmark
2226
runs-on: ubuntu-latest
2327
steps:
24-
- name: Checkout Branch
25-
uses: taiki-e/checkout-action@v1
28+
- uses: taiki-e/checkout-action@v1
2629

27-
- uses: Boshen/[email protected]
30+
- uses: oxc-project/[email protected]
2831
with:
2932
cache-key: benchmark
3033
save-cache: ${{ github.ref_name == 'main' }}
3134
tools: cargo-codspeed
35+
3236
- uses: ./.github/actions/pnpm
33-
- name: Build Benchmark
34-
run: cargo codspeed build --features codspeed
3537

36-
- name: Run benchmark
37-
uses: CodSpeedHQ/action@v3
38+
- run: cargo codspeed build --features codspeed
39+
env:
40+
RUSTFLAGS: "-C debuginfo=1 -C strip=none"
41+
42+
- uses: CodSpeedHQ/action@v3
3843
timeout-minutes: 30
3944
with:
4045
run: cargo codspeed run

0 commit comments

Comments
 (0)