@cnpmjs/packument
Advanced tools
| import { Package as NativePackage } from '../index.js'; | ||
| export * from '../index.js'; | ||
| export declare class Package extends NativePackage { | ||
| #private; | ||
| constructor(data: Buffer); | ||
| getIn<T = unknown>(paths: string[]): T | undefined; | ||
| getBufferIn(paths: string[]): Buffer | undefined; | ||
| } |
| import { Package as NativePackage } from '../index.js'; | ||
| export * from '../index.js'; | ||
| export class Package extends NativePackage { | ||
| #data; | ||
| constructor(data) { | ||
| super(data); | ||
| this.#data = data; | ||
| } | ||
| getIn(paths) { | ||
| const buffer = this.getBufferIn(paths); | ||
| if (!buffer) { | ||
| return undefined; | ||
| } | ||
| // @ts-expect-error - JSON.parse can work with Uint8Array | ||
| return JSON.parse(buffer); | ||
| } | ||
| getBufferIn(paths) { | ||
| const position = this.getInPosition(paths); | ||
| if (!position) { | ||
| return undefined; | ||
| } | ||
| return this.#data.subarray(position[0], position[1]); | ||
| } | ||
| } |
| import { Package as NativePackage } from '../index.js' | ||
| export * from '../index.js' | ||
| export class Package extends NativePackage { | ||
| #data: Buffer | ||
| constructor(data: Buffer) { | ||
| super(data) | ||
| this.#data = data | ||
| } | ||
| getIn<T = unknown>(paths: string[]): T | undefined { | ||
| const buffer = this.getBufferIn(paths) | ||
| if (!buffer) { | ||
| return undefined | ||
| } | ||
| // @ts-expect-error - JSON.parse can work with Uint8Array | ||
| return JSON.parse(buffer) as T | ||
| } | ||
| getBufferIn(paths: string[]): Buffer | undefined { | ||
| const position = this.getInPosition(paths) | ||
| if (!position) { | ||
| return undefined | ||
| } | ||
| return this.#data.subarray(position[0], position[1]) | ||
| } | ||
| } |
+19
-0
@@ -56,2 +56,21 @@ /* auto-generated by NAPI-RS */ | ||
| getLatestVersion(): Version | null | ||
| /** | ||
| * Get the position of a value at the specified path in the package metadata. | ||
| * | ||
| * ### Parameters | ||
| * - `paths`: Array of strings representing the path to the value (e.g., `["versions", "1.0.0", "name"]`) | ||
| * | ||
| * ### Returns | ||
| * - `Option<(u32, u32)>`: Start and end byte positions of the value, or None if not found | ||
| * | ||
| * ### Example | ||
| * ```ts | ||
| * const pkg = new Package(buffer); | ||
| * const position = pkg.getInPosition(['versions', '1.0.0', 'name']); | ||
| * if (position) { | ||
| * const value = buffer.subarray(position[0], position[1]); | ||
| * } | ||
| * ``` | ||
| */ | ||
| getInPosition(paths: Array<string>): [number, number] | null | ||
| } | ||
@@ -58,0 +77,0 @@ |
+50
-50
@@ -84,4 +84,4 @@ // prettier-ignore | ||
| const bindingPackageVersion = require('@cnpmjs/packument-android-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -101,4 +101,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-android-arm-eabi/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -122,4 +122,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-win32-x64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -139,4 +139,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-win32-ia32-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -156,4 +156,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-win32-arm64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -176,4 +176,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-darwin-universal/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -193,4 +193,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-darwin-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -210,4 +210,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-darwin-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -231,4 +231,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-freebsd-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -248,4 +248,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-freebsd-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -270,4 +270,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-x64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -287,4 +287,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -306,4 +306,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-arm64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -323,4 +323,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-arm64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -342,4 +342,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-arm-musleabihf/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -359,4 +359,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-arm-gnueabihf/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -378,4 +378,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-loong64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -395,4 +395,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-loong64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -414,4 +414,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-riscv64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -431,4 +431,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-riscv64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -449,4 +449,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-ppc64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -466,4 +466,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-linux-s390x-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -487,4 +487,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-openharmony-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -504,4 +504,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-openharmony-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -521,4 +521,4 @@ return binding | ||
| const bindingPackageVersion = require('@cnpmjs/packument-openharmony-arm/package.json').version | ||
| if (bindingPackageVersion !== '1.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -525,0 +525,0 @@ return binding |
+1
-1
@@ -1,2 +0,2 @@ | ||
| export * from '../index.js'; | ||
| export * from './package.js'; | ||
| export * from './builder.js'; |
+1
-1
@@ -1,2 +0,2 @@ | ||
| export * from '../index.js'; | ||
| export * from './package.js'; | ||
| export * from './builder.js'; |
+1
-1
@@ -1,2 +0,2 @@ | ||
| export * from '../index.js' | ||
| export * from './package.js' | ||
| export * from './builder.js' |
+9
-9
| { | ||
| "name": "@cnpmjs/packument", | ||
| "version": "1.4.0", | ||
| "version": "1.5.0", | ||
| "description": "Packument helper", | ||
@@ -118,11 +118,11 @@ "repository": { | ||
| "optionalDependencies": { | ||
| "@cnpmjs/packument-win32-x64-msvc": "1.4.0", | ||
| "@cnpmjs/packument-darwin-x64": "1.4.0", | ||
| "@cnpmjs/packument-linux-x64-gnu": "1.4.0", | ||
| "@cnpmjs/packument-linux-x64-musl": "1.4.0", | ||
| "@cnpmjs/packument-linux-arm64-gnu": "1.4.0", | ||
| "@cnpmjs/packument-darwin-arm64": "1.4.0", | ||
| "@cnpmjs/packument-linux-arm64-musl": "1.4.0", | ||
| "@cnpmjs/packument-win32-arm64-msvc": "1.4.0" | ||
| "@cnpmjs/packument-win32-x64-msvc": "1.5.0", | ||
| "@cnpmjs/packument-darwin-x64": "1.5.0", | ||
| "@cnpmjs/packument-linux-x64-gnu": "1.5.0", | ||
| "@cnpmjs/packument-linux-x64-musl": "1.5.0", | ||
| "@cnpmjs/packument-linux-arm64-gnu": "1.5.0", | ||
| "@cnpmjs/packument-darwin-arm64": "1.5.0", | ||
| "@cnpmjs/packument-linux-arm64-musl": "1.5.0", | ||
| "@cnpmjs/packument-win32-arm64-msvc": "1.5.0" | ||
| } | ||
| } |
70439
3.37%14
27.27%1041
7.76%