Skip to content

Commit 49cc7d0

Browse files
renovate[bot]autofix-ci[bot]Boshen
authored
chore(deps): lock file maintenance npm packages (#694)
This PR contains the following updates: | Package | Type | Update | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---|---|---| | | | lockFileMaintenance | All locks refreshed | | | | | | [@napi-rs/cli](https://redirect.github.com/napi-rs/napi-rs) | devDependencies | minor | [`3.1.5` -> `3.2.0`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.1.5/3.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.1.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.1.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@napi-rs/wasm-runtime](https://redirect.github.com/napi-rs/napi-rs) ([source](https://redirect.github.com/napi-rs/napi-rs/tree/HEAD/wasi-runtime)) | devDependencies | patch | [`1.0.3` -> `1.0.5`](https://renovatebot.com/diffs/npm/@napi-rs%2fwasm-runtime/1.0.3/1.0.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fwasm-runtime/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fwasm-runtime/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fwasm-runtime/1.0.3/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fwasm-runtime/1.0.3/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | devDependencies | minor | [`24.3.1` -> `24.4.0`](https://renovatebot.com/diffs/npm/@types%2fnode/24.3.1/24.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/24.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/24.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/24.3.1/24.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/24.3.1/24.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [pnpm](https://pnpm.io) ([source](https://redirect.github.com/pnpm/pnpm/tree/HEAD/pnpm)) | packageManager | minor | [`10.15.1` -> `10.16.1`](https://renovatebot.com/diffs/npm/pnpm/10.15.1/10.16.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.16.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.16.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.15.1/10.16.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.15.1/10.16.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Release Notes <details> <summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary> ### [`v3.2.0`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.2.0) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/[email protected]...@napi-rs/[email protected]) #### What's Changed - feat(target): add support for loongarch64-unknown-linux-gnu by [@&#8203;SkyBird233](https://redirect.github.com/SkyBird233) in [#&#8203;2887](https://redirect.github.com/napi-rs/napi-rs/pull/2887) - chore(cli): throw error if wasi file not found when NAPI\_RS\_FORCE\_WASI=error by [@&#8203;Brooooooklyn](https://redirect.github.com/Brooooooklyn) in [#&#8203;2919](https://redirect.github.com/napi-rs/napi-rs/pull/2919) #### New Contributors - [@&#8203;SkyBird233](https://redirect.github.com/SkyBird233) made their first contribution in [#&#8203;2887](https://redirect.github.com/napi-rs/napi-rs/pull/2887) **Full Changelog**: <https://github.com/napi-rs/napi-rs/compare/napi-v3.3.0...@&#8203;napi-rs/[email protected]> </details> <details> <summary>napi-rs/napi-rs (@&#8203;napi-rs/wasm-runtime)</summary> ### [`v1.0.5`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/[email protected]...@napi-rs/[email protected]) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/[email protected]...@napi-rs/[email protected]) ### [`v1.0.4`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/[email protected]...@napi-rs/[email protected]) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/[email protected]...@napi-rs/[email protected]) </details> <details> <summary>pnpm/pnpm (pnpm)</summary> ### [`v10.16.1`](https://redirect.github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#10161) [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.16.0...v10.16.1) ##### Patch Changes - The full metadata cache should be stored not at the same location as the abbreviated metadata. This fixes a bug where pnpm was loading the abbreviated metadata from cache and couldn't find the "time" field as a result [#&#8203;9963](https://redirect.github.com/pnpm/pnpm/issues/9963). - Forcibly disable ANSI color codes when generating patch diff [#&#8203;9914](https://redirect.github.com/pnpm/pnpm/pull/9914). ### [`v10.16.0`](https://redirect.github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#10160) [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.15.1...v10.16.0) ##### Minor Changes - There have been several incidents recently where popular packages were successfully attacked. To reduce the risk of installing a compromised version, we are introducing a new setting that delays the installation of newly released dependencies. In most cases, such attacks are discovered quickly and the malicious versions are removed from the registry within an hour. The new setting is called `minimumReleaseAge`. It specifies the number of minutes that must pass after a version is published before pnpm will install it. For example, setting `minimumReleaseAge: 1440` ensures that only packages released at least one day ago can be installed. If you set `minimumReleaseAge` but need to disable this restriction for certain dependencies, you can list them under the `minimumReleaseAgeExclude` setting. For instance, with the following configuration pnpm will always install the latest version of webpack, regardless of its release time: ```yaml minimumReleaseAgeExclude: - webpack ``` Related issue: [#&#8203;9921](https://redirect.github.com/pnpm/pnpm/issues/9921). - Added support for `finders` [#&#8203;9946](https://redirect.github.com/pnpm/pnpm/pull/9946). In the past, `pnpm list` and `pnpm why` could only search for dependencies by **name** (and optionally version). For example: ``` pnpm why minimist ``` prints the chain of dependencies to any installed instance of `minimist`: ``` verdaccio 5.20.1 ├─┬ handlebars 4.7.7 │ └── minimist 1.2.8 └─┬ mv 2.1.1 └─┬ mkdirp 0.5.6 └── minimist 1.2.8 ``` What if we want to search by **other properties** of a dependency, not just its name? For instance, find all packages that have `react@17` in their peer dependencies? This is now possible with "finder functions". Finder functions can be declared in `.pnpmfile.cjs` and invoked with the `--find-by=<function name>` flag when running `pnpm list` or `pnpm why`. Let's say we want to find any dependencies that have React 17 in peer dependencies. We can add this finder to our `.pnpmfile.cjs`: ```js module.exports = { finders: { react17: (ctx) => { return ctx.readManifest().peerDependencies?.react === "^17.0.0"; }, }, }; ``` Now we can use this finder function by running: ``` pnpm why --find-by=react17 ``` pnpm will find all dependencies that have this React in peer dependencies and print their exact locations in the dependency graph. ``` @&#8203;apollo/client 4.0.4 ├── @&#8203;graphql-typed-document-node/core 3.2.0 └── graphql-tag 2.12.6 ``` It is also possible to print out some additional information in the output by returning a string from the finder. For example, with the following finder: ```js module.exports = { finders: { react17: (ctx) => { const manifest = ctx.readManifest(); if (manifest.peerDependencies?.react === "^17.0.0") { return `license: ${manifest.license}`; } return false; }, }, }; ``` Every matched package will also print out the license from its `package.json`: ``` @&#8203;apollo/client 4.0.4 ├── @&#8203;graphql-typed-document-node/core 3.2.0 │ license: MIT └── graphql-tag 2.12.6 license: MIT ``` ##### Patch Changes - Fix deprecation warning printed when executing pnpm with Node.js 24 [#&#8203;9529](https://redirect.github.com/pnpm/pnpm/issues/9529). - Throw an error if `nodeVersion` is not set to an exact semver version [#&#8203;9934](https://redirect.github.com/pnpm/pnpm/issues/9934). - `pnpm publish` should be able to publish a `.tar.gz` file [#&#8203;9927](https://redirect.github.com/pnpm/pnpm/pull/9927). - Canceling a running process with Ctrl-C should make `pnpm run` return a non-zero exit code [#&#8203;9626](https://redirect.github.com/pnpm/pnpm/issues/9626). </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 9am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc-resolver). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Boshen <[email protected]>
1 parent fc6a10e commit 49cc7d0

File tree

3 files changed

+208
-167
lines changed

3 files changed

+208
-167
lines changed

napi/index.js

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const isMuslFromChildProcess = () => {
6666
function requireNative() {
6767
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
6868
try {
69-
nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
69+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
7070
} catch (err) {
7171
loadErrors.push(err)
7272
}
@@ -348,6 +348,40 @@ function requireNative() {
348348
loadErrors.push(e)
349349
}
350350
}
351+
} else if (process.arch === 'loong64') {
352+
if (isMusl()) {
353+
try {
354+
return require('./resolver.linux-loong64-musl.node')
355+
} catch (e) {
356+
loadErrors.push(e)
357+
}
358+
try {
359+
const binding = require('@oxc-resolver/binding-linux-loong64-musl')
360+
const bindingPackageVersion = require('@oxc-resolver/binding-linux-loong64-musl/package.json').version
361+
if (bindingPackageVersion !== '11.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362+
throw new Error(`Native binding package version mismatch, expected 11.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363+
}
364+
return binding
365+
} catch (e) {
366+
loadErrors.push(e)
367+
}
368+
} else {
369+
try {
370+
return require('./resolver.linux-loong64-gnu.node')
371+
} catch (e) {
372+
loadErrors.push(e)
373+
}
374+
try {
375+
const binding = require('@oxc-resolver/binding-linux-loong64-gnu')
376+
const bindingPackageVersion = require('@oxc-resolver/binding-linux-loong64-gnu/package.json').version
377+
if (bindingPackageVersion !== '11.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
378+
throw new Error(`Native binding package version mismatch, expected 11.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379+
}
380+
return binding
381+
} catch (e) {
382+
loadErrors.push(e)
383+
}
384+
}
351385
} else if (process.arch === 'riscv64') {
352386
if (isMusl()) {
353387
try {
@@ -477,22 +511,32 @@ function requireNative() {
477511
nativeBinding = requireNative()
478512

479513
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
514+
let wasiBinding = null
515+
let wasiBindingError = null
480516
try {
481-
nativeBinding = require('./resolver.wasi.cjs')
517+
wasiBinding = require('./resolver.wasi.cjs')
518+
nativeBinding = wasiBinding
482519
} catch (err) {
483520
if (process.env.NAPI_RS_FORCE_WASI) {
484-
loadErrors.push(err)
521+
wasiBindingError = err
485522
}
486523
}
487524
if (!nativeBinding) {
488525
try {
489-
nativeBinding = require('@oxc-resolver/binding-wasm32-wasi')
526+
wasiBinding = require('@oxc-resolver/binding-wasm32-wasi')
527+
nativeBinding = wasiBinding
490528
} catch (err) {
491529
if (process.env.NAPI_RS_FORCE_WASI) {
530+
wasiBindingError.cause = err
492531
loadErrors.push(err)
493532
}
494533
}
495534
}
535+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
536+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
537+
error.cause = wasiBindingError
538+
throw error
539+
}
496540
}
497541

498542
if (!nativeBinding && process.env.SKIP_OXC_RESOLVER_FALLBACK !== '1') {
@@ -509,7 +553,12 @@ if (!nativeBinding) {
509553
`Cannot find native binding. ` +
510554
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
511555
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
512-
{ cause: loadErrors }
556+
{
557+
cause: loadErrors.reduce((err, cur) => {
558+
cur.cause = err
559+
return cur
560+
}),
561+
},
513562
)
514563
}
515564
throw new Error(`Failed to load native binding`)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "11.7.2",
44
"license": "MIT",
55
"description": "Oxc Resolver Node API",
6-
"packageManager": "pnpm@10.15.1",
6+
"packageManager": "pnpm@10.16.1",
77
"homepage": "https://oxc.rs",
88
"repository": {
99
"type": "git",

0 commit comments

Comments
 (0)