Skip to content

Commit

Permalink
feat: rebase latest oxc-resolver and support pnp (#12)
Browse files Browse the repository at this point in the history
* chore: update lockfiles

* Release v1.9.4

* feat(napi): expose module type info in ResolveResult (#223)

* chore: update devDependencies

* Release v1.10.0

* fix(napi): update buggy NAPI-RS versions (#225)

fix(napi): update buggy @napi-rs/cli

* ci: all `--all-features` to various commands

* chore(deps): update crate-ci/typos action to v1.23.2

* chore(deps): update rust crate napi to 3.0.0-alpha

* chore(deps): update rust crates

* ci: add x86_64-unknown-freebsd target (#226)

* fix: resolve module `ipaddr.js` correctly when `extensionAlias` is provided (#228)

closes #227

* Release v1.10.1

* ci: fix FreeBSD build (#230)

* ci: add `needs` check in build-freebsd

* ci: publish needs build-freebsd (#232)

* Release v1.10.2

* feat: Yarn PnP (#217)

Part of oxc-project/oxc-resolver#53

* chore(deps): update rust crate napi-derive to 3.0.0-alpha

* chore(deps): update rust crates

* chore(deps): fix the lock

---------

Co-authored-by: Boshen <[email protected]>
Co-authored-by: LongYinan <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Maël Nison <[email protected]>
  • Loading branch information
5 people authored Jul 23, 2024
1 parent 798854a commit 948c53d
Show file tree
Hide file tree
Showing 32 changed files with 8,679 additions and 289 deletions.
12 changes: 11 additions & 1 deletion .github/actions/pnpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,15 @@ runs:
node-version-file: .node-version
cache: pnpm

- run: pnpm install
- name: yarn
shell: bash
run: |
cd fixtures/pnp
corepack enable
yarn install
- name: pnpm
shell: bash
run: |
corepack enable
pnpm install
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Check
run: |
rustup target add wasm32-unknown-unknown
cargo check --target wasm32-unknown-unknown
cargo check --all-features --target wasm32-unknown-unknown
wasi:
name: Test wasi target
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1

- uses: crate-ci/[email protected].1
- uses: crate-ci/[email protected].2
with:
files: .

Expand Down Expand Up @@ -148,36 +148,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: Boshen/setup-rust@main
with:
components: rustfmt
restore-cache: false

- run: cargo fmt --all -- --check

lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: Boshen/setup-rust@main
with:
components: clippy

- run: cargo clippy -- -D warnings
- run: cargo clippy --all-features -- -D warnings

doc:
name: Doc
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: Boshen/setup-rust@main
with:
components: rust-docs

- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features

test:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,59 @@ jobs:
napi/*.node
napi/*.wasm
build-freebsd:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Build FreeBSD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
id: build
uses: cross-platform-actions/[email protected]
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
with:
operating_system: freebsd
version: '14.0'
memory: 8G
cpu_count: 3
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
pwd
ls -lah
whoami
env
sudo corepack enable
pnpm install
pnpm build --target x86_64-unknown-freebsd
rm -rf node_modules
rm -rf target
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: napi/*.node
if-no-files-found: error

publish:
name: Publish NAPI
runs-on: ubuntu-latest
permissions:
id-token: write # for `npm publish --provenance`
needs:
- build
- build-freebsd
steps:
- uses: taiki-e/checkout-action@v1

Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.10.2](https://github.com/oxc-project/oxc_resolver/compare/oxc_resolver-v1.10.1...oxc_resolver-v1.10.2) - 2024-07-16

### Chore
- Release FreeBSD

## [1.10.1](https://github.com/oxc-project/oxc_resolver/compare/oxc_resolver-v1.10.0...oxc_resolver-v1.10.1) - 2024-07-15

### Fixed
- resolve module `ipaddr.js` correctly when `extensionAlias` is provided ([#228](https://github.com/oxc-project/oxc_resolver/pull/228))

## [1.10.0](https://github.com/oxc-project/oxc_resolver/compare/oxc_resolver-v1.9.4...oxc_resolver-v1.10.0) - 2024-07-11

### Added
- *(napi)* expose module type info in ResolveResult ([#223](https://github.com/oxc-project/oxc_resolver/pull/223))

### Fixed
- remove `#[cfg(target_os = "windows")]` logic in `canonicalize` ([#221](https://github.com/oxc-project/oxc_resolver/pull/221))

### Other
- update `cargo deny` ([#222](https://github.com/oxc-project/oxc_resolver/pull/222))
- pin crate-ci/typos version

## [1.9.4](https://github.com/oxc-project/oxc_resolver/compare/oxc_resolver-v1.9.3...oxc_resolver-v1.9.4) - 2024-07-10

### Other
Expand Down
Loading

0 comments on commit 948c53d

Please sign in to comment.