@pnpm/napi 12.0.0-rc.9 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @pnpm/napi
2
2
 
3
+ ## 12.1.0
4
+
5
+ ## 12.0.0
6
+
7
+ ### Minor Changes
8
+
9
+ - `@pnpm/napi`'s `install` now honors the last two install options it accepted without acting on them:
10
+
11
+ - `ignorePackageManifest: true` installs from `pnpm-lock.yaml` alone, ignoring the project manifests — pnpm's `pnpm fetch` semantics. Every importer the lockfile records is imported into the virtual store, and no post-import linking is performed: no importer symlinks, no `.bin` entries, no hoisting, and no project lifecycle scripts. It previously only skipped the manifest ↔ lockfile freshness check and otherwise linked a full `node_modules`.
12
+ - `pnpmHomeDir` now places the default store at `<pnpmHomeDir>/store`, with the same same-volume fallback pnpm applies. An explicit `storeDir` — passed alongside it or set by a config source — still wins. It was previously ignored.
13
+
14
+ - Added an `allowUnusedPatches` install option. When `true`, a `patchedDependencies` entry that matches no installed package warns instead of failing the install with `ERR_PNPM_UNUSED_PATCH`.
15
+
16
+ - `readConfig` now returns `explicitSettings` — the camelCase names of settings the config cascade set explicitly — so hosts that layer the resolved config over their own defaults can forward only the values the user actually configured.
17
+
18
+ - `install` accepts `enableGlobalVirtualStore`, `globalVirtualStoreDir`, `packageExtensions` and `patchedDependencies`, and `readConfig` reports `enableGlobalVirtualStore`, `globalVirtualStoreDir`, `virtualStoreDir` and `effectiveVirtualStoreDir`. Hosts embedding the engine can now use the global virtual store, declare dependencies a package failed to declare, patch a package, and locate the virtual store instead of assuming `node_modules/.pnpm`.
19
+
20
+ - Added `readConfig(options)`: resolves the configuration the engine's own installs use — registries with their resolved `Authorization` headers, `authHeaderByUri`, proxy, TLS, network limits, store/cache directories, and install behavior settings from the `.npmrc` / `pnpm-workspace.yaml` cascade — so hosts that embed the engine no longer need a JavaScript config reader.
21
+
22
+ - Added the `trustLockfile` install option to skip verifying lockfile resolutions against current registry metadata.
23
+
24
+ - Added `pnpm licenses` command to the Rust pacquet port to list package licenses in a tabular or JSON format.
25
+
26
+ - Added `fetchWarnTimeoutMs` and `fetchMinSpeedKiBps` to the Rust pnpm CLI and its N-API bindings. Slow registry metadata requests and tarball downloads now emit pnpm-compatible warnings without exposing URL credentials, query parameters, fragments, or control characters [pnpm/pnpm#12042](https://github.com/pnpm/pnpm/issues/12042).
27
+
28
+ - Added a `returnListOfDepsRequiringBuild` install option. When it is set, `InstallResult.depsRequiringBuild` lists the dep path of every package whose files carry install scripts, whether or not the scripts were allowed to run, matching the TypeScript CLI's option of the same name. An install that computes no list, such as one served from the lockfile, leaves the field undefined.
29
+
30
+ ### Patch Changes
31
+
32
+ - Fixed repeat installs ignoring changes in caller-supplied in-memory project manifests.
33
+
34
+ - Fixed `resolveDependency({ fullMetadata: true })` returning a manifest stripped down to the abbreviated npm field set. Registry-custom fields on the version object (such as Bit's `componentId`) are now preserved.
35
+
36
+ ## 12.0.0-rc.11
37
+
38
+ ## 12.0.0-rc.10
39
+
3
40
  ## 12.0.0-rc.9
4
41
 
5
42
  ### Minor Changes
package/README.md CHANGED
@@ -37,7 +37,7 @@ See [`index.d.ts`](./index.d.ts) for the full typed contract.
37
37
  | `filterLockfileByImporters(lockfile, importerIds, options?)` | Narrow a lockfile to the transitive closure of what the named importers reach. |
38
38
  | `readModulesManifest(modulesDir)` | The `.modules.yaml` state of an installed `node_modules`. |
39
39
  | `engineVersion()` | Version string of the underlying Rust engine (pacquet). |
40
- | `getPeerDependencyIssues(options)` | **Not yet implemented** — throws `ERR_PNPM_NAPI_UNIMPLEMENTED`. Peer-issue reporting is not ported in pacquet's CLI either; consumers should degrade gracefully. |
40
+ | `getPeerDependencyIssues(options)` | Resolve the in-memory importers without writing an install and return missing or incompatible peer dependencies by importer. `autoInstallPeers` defaults to `false` for this query. |
41
41
 
42
42
  ### Output
43
43
 
package/index.d.ts CHANGED
@@ -212,12 +212,20 @@ export interface InstallOptions extends SharedEngineOptions {
212
212
  */
213
213
  enableModulesDir?: boolean
214
214
  /**
215
- * Install from the lockfile without gating on the `package.json` ↔
216
- * `pnpm-lock.yaml` freshness check, so an in-memory manifest that disagrees
217
- * with the lockfile does not block the install.
215
+ * Install from the lockfile alone, ignoring the project manifests —
216
+ * pnpm's `pnpm fetch` semantics. The resolution step and the
217
+ * `package.json` ↔ `pnpm-lock.yaml` freshness check are skipped, every
218
+ * importer the lockfile records is imported into the virtual store, and
219
+ * no post-import linking is performed: no importer symlinks, no `.bin`
220
+ * entries, no hoisting, no project lifecycle scripts.
218
221
  */
219
222
  ignorePackageManifest?: boolean
220
- /** pnpm home directory. Accepted for compatibility; unused for project installs. */
223
+ /**
224
+ * The pnpm home directory the default store location is resolved under
225
+ * when no `storeDir` is configured (`<pnpmHomeDir>/store`, with pnpm's
226
+ * same-volume fallback). An explicit `storeDir` — passed here or set by
227
+ * a config source — wins.
228
+ */
221
229
  pnpmHomeDir?: string
222
230
  /**
223
231
  * Fail with `ERR_PNPM_IGNORED_BUILDS` when a dependency build script is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/napi",
3
- "version": "12.0.0-rc.9",
3
+ "version": "12.1.0",
4
4
  "description": "Node.js addon bindings for the pnpm v12 Rust engine (pacquet)",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -28,14 +28,14 @@
28
28
  "THIRD-PARTY-NOTICES.md"
29
29
  ],
30
30
  "optionalDependencies": {
31
- "@pnpm/napi.win32-x64": "12.0.0-rc.9",
32
- "@pnpm/napi.win32-arm64": "12.0.0-rc.9",
33
- "@pnpm/napi.darwin-x64": "12.0.0-rc.9",
34
- "@pnpm/napi.darwin-arm64": "12.0.0-rc.9",
35
- "@pnpm/napi.linux-x64": "12.0.0-rc.9",
36
- "@pnpm/napi.linux-arm64": "12.0.0-rc.9",
37
- "@pnpm/napi.linux-x64-musl": "12.0.0-rc.9",
38
- "@pnpm/napi.linux-arm64-musl": "12.0.0-rc.9"
31
+ "@pnpm/napi.win32-x64": "12.1.0",
32
+ "@pnpm/napi.win32-arm64": "12.1.0",
33
+ "@pnpm/napi.darwin-x64": "12.1.0",
34
+ "@pnpm/napi.darwin-arm64": "12.1.0",
35
+ "@pnpm/napi.linux-x64": "12.1.0",
36
+ "@pnpm/napi.linux-arm64": "12.1.0",
37
+ "@pnpm/napi.linux-x64-musl": "12.1.0",
38
+ "@pnpm/napi.linux-arm64-musl": "12.1.0"
39
39
  },
40
40
  "scripts": {
41
41
  "generate-packages": "node scripts/generate-packages.mjs"