@pnpm/napi 12.0.0-beta.4 → 12.0.0-rc.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.ts +30 -0
  3. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @pnpm/napi
2
2
 
3
+ ## 12.0.0-rc.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 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`.
8
+
9
+ ## 12.0.0-rc.0
10
+
11
+ ### Minor Changes
12
+
13
+ - `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`.
14
+
15
+ ### Patch Changes
16
+
17
+ - 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.
18
+
3
19
  ## 12.0.0-beta.4
4
20
 
5
21
  ## 12.0.0-beta.3
package/index.d.ts CHANGED
@@ -104,6 +104,14 @@ export interface SharedEngineOptions {
104
104
  cacheDir?: string
105
105
  }
106
106
 
107
+ /** Manifest fields to add to a matching package. */
108
+ export interface PackageExtension {
109
+ dependencies?: Record<string, string>
110
+ optionalDependencies?: Record<string, string>
111
+ peerDependencies?: Record<string, string>
112
+ peerDependenciesMeta?: Record<string, { optional?: boolean }>
113
+ }
114
+
107
115
  export interface InstallOptions extends SharedEngineOptions {
108
116
  /** Lockfile / workspace root directory. */
109
117
  dir: string
@@ -132,6 +140,20 @@ export interface InstallOptions extends SharedEngineOptions {
132
140
  preferOffline?: boolean
133
141
  offline?: boolean
134
142
  virtualStoreDirMaxLength?: number
143
+ /** Whether to use the shared global virtual store for dependency slots. */
144
+ enableGlobalVirtualStore?: boolean
145
+ /** Overrides the global virtual store directory. */
146
+ globalVirtualStoreDir?: string
147
+ /** Manifest fields to add to packages selected by name or version range. */
148
+ packageExtensions?: Record<string, PackageExtension>
149
+ /** Patch paths keyed by package selector. Relative paths resolve from `dir`. */
150
+ patchedDependencies?: Record<string, string>
151
+ /**
152
+ * Warn instead of failing with `ERR_PNPM_UNUSED_PATCH` when a
153
+ * `patchedDependencies` entry matches no installed package. Lets an embedder
154
+ * ship a patch keyed to a version range that only some workspaces resolve.
155
+ */
156
+ allowUnusedPatches?: boolean
135
157
  peersSuffixMaxLength?: number
136
158
  dedupePeerDependents?: boolean
137
159
  /**
@@ -386,6 +408,14 @@ export interface ResolvedConfig {
386
408
  storeDir: string
387
409
  cacheDir: string
388
410
  virtualStoreDirMaxLength: number
411
+ /** Whether the resolved configuration uses the global virtual store. */
412
+ enableGlobalVirtualStore: boolean
413
+ /** Shared virtual-store root. */
414
+ globalVirtualStoreDir: string
415
+ /** Project-local virtual-store directory. */
416
+ virtualStoreDir: string
417
+ /** Virtual-store directory used by this configuration and recorded in `.modules.yaml`. */
418
+ effectiveVirtualStoreDir: string
389
419
  networkConcurrency: number
390
420
  maxSockets?: number
391
421
  fetchRetries: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/napi",
3
- "version": "12.0.0-beta.4",
3
+ "version": "12.0.0-rc.1",
4
4
  "description": "Node.js addon bindings for the pnpm v12 Rust engine (pacquet)",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,14 +27,14 @@
27
27
  "README.md"
28
28
  ],
29
29
  "optionalDependencies": {
30
- "@pnpm/napi.win32-x64": "12.0.0-beta.4",
31
- "@pnpm/napi.win32-arm64": "12.0.0-beta.4",
32
- "@pnpm/napi.darwin-x64": "12.0.0-beta.4",
33
- "@pnpm/napi.darwin-arm64": "12.0.0-beta.4",
34
- "@pnpm/napi.linux-x64": "12.0.0-beta.4",
35
- "@pnpm/napi.linux-arm64": "12.0.0-beta.4",
36
- "@pnpm/napi.linux-x64-musl": "12.0.0-beta.4",
37
- "@pnpm/napi.linux-arm64-musl": "12.0.0-beta.4"
30
+ "@pnpm/napi.win32-x64": "12.0.0-rc.1",
31
+ "@pnpm/napi.win32-arm64": "12.0.0-rc.1",
32
+ "@pnpm/napi.darwin-x64": "12.0.0-rc.1",
33
+ "@pnpm/napi.darwin-arm64": "12.0.0-rc.1",
34
+ "@pnpm/napi.linux-x64": "12.0.0-rc.1",
35
+ "@pnpm/napi.linux-arm64": "12.0.0-rc.1",
36
+ "@pnpm/napi.linux-x64-musl": "12.0.0-rc.1",
37
+ "@pnpm/napi.linux-arm64-musl": "12.0.0-rc.1"
38
38
  },
39
39
  "scripts": {
40
40
  "generate-packages": "node scripts/generate-packages.mjs"