From fc1bdbc14fb5467946832978f22246121e5ebc02 Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Fri, 19 Apr 2024 15:21:34 +0200 Subject: [PATCH] fix(core): modify pnpm normalizer --- package.json | 3 +- packages/nx/package.json | 3 +- .../src/plugins/js/lock-file/pnpm-parser.ts | 38 +- .../js/lock-file/utils/pnpm-normalizer.ts | 716 +----------------- pnpm-lock.yaml | 240 +++++- 5 files changed, 289 insertions(+), 711 deletions(-) diff --git a/package.json b/package.json index 47e11ab38fab72..cdb5caccbf0496 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "@phenomnomnominal/tsquery": "~5.0.1", "@playwright/test": "^1.36.1", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", + "@pnpm/lockfile-file": "^9.0.0", "@pnpm/lockfile-types": "^6.0.0", "@reduxjs/toolkit": "1.9.0", "@remix-run/dev": "^2.8.1", @@ -324,7 +325,7 @@ "@widgetbot/react-embed": "^1.9.0", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", - "@zkochan/js-yaml": "0.0.6", + "@zkochan/js-yaml": "0.0.7", "axios": "^1.6.0", "classnames": "^2.3.1", "cliui": "^8.0.1", diff --git a/packages/nx/package.json b/packages/nx/package.json index 19950bd77e88a1..8791538ca88e18 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -33,9 +33,10 @@ }, "homepage": "https://nx.dev", "dependencies": { + "@pnpm/lockfile-file": "^9.0.0", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", - "@zkochan/js-yaml": "0.0.6", + "@zkochan/js-yaml": "0.0.7", "axios": "^1.6.0", "chalk": "^4.1.0", "cli-cursor": "3.1.0", diff --git a/packages/nx/src/plugins/js/lock-file/pnpm-parser.ts b/packages/nx/src/plugins/js/lock-file/pnpm-parser.ts index 856fea2ade5d1c..d747e30aee12d8 100644 --- a/packages/nx/src/plugins/js/lock-file/pnpm-parser.ts +++ b/packages/nx/src/plugins/js/lock-file/pnpm-parser.ts @@ -5,7 +5,7 @@ import type { ProjectSnapshot, } from '@pnpm/lockfile-types'; import { - isV6Lockfile, + usesParenthesisVersionSeparator, loadPnpmHoistedDepsDefinition, parseAndNormalizePnpmLockfile, stringifyToPnpmYaml, @@ -49,9 +49,9 @@ export function getPnpmLockfileNodes( lockFileHash: string ) { const data = parsePnpmLockFile(lockFileContent, lockFileHash); - const isV6 = isV6Lockfile(data); + const useParensDivider = usesParenthesisVersionSeparator(data); - return getNodes(data, keyMap, isV6); + return getNodes(data, keyMap, useParensDivider); } export function getPnpmLockfileDependencies( @@ -60,22 +60,22 @@ export function getPnpmLockfileDependencies( ctx: CreateDependenciesContext ) { const data = parsePnpmLockFile(lockFileContent, lockFileHash); - const isV6 = isV6Lockfile(data); + const useParensDivider = usesParenthesisVersionSeparator(data); - return getDependencies(data, keyMap, isV6, ctx); + return getDependencies(data, keyMap, useParensDivider, ctx); } function getNodes( data: Lockfile, keyMap: Map, - isV6: boolean + useParensDivider: boolean ): Record { const nodes: Map> = new Map(); Object.entries(data.packages).forEach(([key, snapshot]) => { findPackageNames(key, snapshot, data).forEach((packageName) => { const rawVersion = findVersion(key, packageName); - const version = parseBaseVersion(rawVersion, isV6); + const version = parseBaseVersion(rawVersion, useParensDivider); // we don't need to keep duplicates, we can just track the keys const existingNode = nodes.get(packageName)?.get(version); @@ -117,7 +117,11 @@ function getNodes( if (versionMap.size === 1) { hoistedNode = versionMap.values().next().value; } else { - const hoistedVersion = getHoistedVersion(hoistedDeps, packageName, isV6); + const hoistedVersion = getHoistedVersion( + hoistedDeps, + packageName, + useParensDivider + ); hoistedNode = versionMap.get(hoistedVersion); } if (hoistedNode) { @@ -134,7 +138,7 @@ function getNodes( function getHoistedVersion( hoistedDependencies: Record, packageName: string, - isV6: boolean + useParensDivider: boolean ): string { let version = getHoistedPackageVersion(packageName); @@ -143,7 +147,10 @@ function getHoistedVersion( k.startsWith(`/${packageName}/`) ); if (key) { - version = parseBaseVersion(getVersion(key, packageName), isV6); + version = parseBaseVersion( + getVersion(key, packageName), + useParensDivider + ); } else { // pnpm might not hoist every package // similarly those packages will not be available to be used via import @@ -157,7 +164,7 @@ function getHoistedVersion( function getDependencies( data: Lockfile, keyMap: Map, - isV6: boolean, + useParensDivider: boolean, ctx: CreateDependenciesContext ): RawProjectGraphDependency[] { const results: RawProjectGraphDependency[] = []; @@ -169,7 +176,7 @@ function getDependencies( Object.entries(section).forEach(([name, versionRange]) => { const version = parseBaseVersion( findVersion(versionRange, name), - isV6 + useParensDivider ); const target = ctx.externalNodes[`npm:${name}@${version}`] || @@ -192,8 +199,11 @@ function getDependencies( return results; } -function parseBaseVersion(rawVersion: string, isV6: boolean): string { - return isV6 ? rawVersion.split('(')[0] : rawVersion.split('_')[0]; +function parseBaseVersion( + rawVersion: string, + useParensDivider: boolean +): string { + return useParensDivider ? rawVersion.split('(')[0] : rawVersion.split('_')[0]; } export function stringifyPnpmLockfile( diff --git a/packages/nx/src/plugins/js/lock-file/utils/pnpm-normalizer.ts b/packages/nx/src/plugins/js/lock-file/utils/pnpm-normalizer.ts index dc70dcfbff95ac..4065d830f3b4b9 100644 --- a/packages/nx/src/plugins/js/lock-file/utils/pnpm-normalizer.ts +++ b/packages/nx/src/plugins/js/lock-file/utils/pnpm-normalizer.ts @@ -3,17 +3,18 @@ * It will convert inline specifiers to the separate specifiers format and ensure importers are present. */ -import type { - Lockfile, - ProjectSnapshot, - ResolvedDependencies, -} from '@pnpm/lockfile-types'; +import type { Lockfile } from '@pnpm/lockfile-types'; import { existsSync, readFileSync } from 'fs'; import { workspaceRoot } from '../../../../utils/workspace-root'; -import { valid } from 'semver'; -export function isV6Lockfile(data: InlineSpecifiersLockfile | Lockfile) { - return data.lockfileVersion.toString().startsWith('6.'); +export function usesParenthesisVersionSeparator(data: { + lockfileVersion: number | string; +}) { + if (+data.lockfileVersion.toString() >= 6) { + true; + } else { + return false; + } } export function loadPnpmHoistedDepsDefinition() { @@ -28,50 +29,21 @@ export function loadPnpmHoistedDepsDefinition() { } } -/************************************************************************* - * THE FOLLOWING CODE IS COPIED & simplified FROM @pnpm/lockfile-file for convenience - *************************************************************************/ - /** * Parsing and mapping logic from pnpm lockfile `read` function - * https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/read.ts#L91 */ export function parseAndNormalizePnpmLockfile(content: string): Lockfile { const { load } = require('@zkochan/js-yaml'); - const lockFileData = load(content); - return revertFromInlineSpecifiersFormatIfNecessary( - convertFromLockfileFileMutable(lockFileData) - ); -} - -/** - * Reverts changes from the "forceSharedFormat" write option if necessary. - * https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/read.ts#L234 - */ -function convertFromLockfileFileMutable(lockfileFile: LockfileFile): Lockfile { - if (typeof lockfileFile?.['importers'] === 'undefined') { - lockfileFile.importers = { - '.': { - specifiers: lockfileFile['specifiers'] ?? {}, - dependenciesMeta: lockfileFile['dependenciesMeta'], - publishDirectory: lockfileFile['publishDirectory'], - }, - }; - delete lockfileFile.specifiers; - for (const depType of DEPENDENCIES_FIELDS) { - if (lockfileFile[depType] != null) { - lockfileFile.importers['.'][depType] = lockfileFile[depType]; - delete lockfileFile[depType]; - } - } - } - return lockfileFile as Lockfile; + const { + convertToLockfileObject, + } = require('@pnpm/lockfile-file/lib/lockfileFormatConverters.js'); + return convertToLockfileObject(load(content)); } -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L27 +// https://github.com/pnpm/pnpm/blob/50e37072f42bcca6d393a74bed29f7f0e029805d/lockfile/lockfile-file/src/write.ts#L22 const LOCKFILE_YAML_FORMAT = { blankLines: true, - lineWidth: 1000, + lineWidth: -1, // This is setting line width to never wrap noCompatMode: true, noRefs: true, sortKeys: false, @@ -79,658 +51,16 @@ const LOCKFILE_YAML_FORMAT = { /** * Mapping and writing logic from pnpm lockfile `write` function - * https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L77 */ export function stringifyToPnpmYaml(lockfile: Lockfile): string { - const isLockfileV6 = isV6Lockfile(lockfile); - const adaptedLockfile = isLockfileV6 - ? convertToInlineSpecifiersFormat(lockfile) - : lockfile; + const { + convertToLockfileFile, + } = require('@pnpm/lockfile-file/lib/lockfileFormatConverters.js'); + const { + sortLockfileKeys, + } = require('@pnpm/lockfile-file/lib/sortLockfileKeys.js'); const { dump } = require('@zkochan/js-yaml'); - return dump( - sortLockfileKeys( - normalizeLockfile(adaptedLockfile as Lockfile, isLockfileV6) - ), - LOCKFILE_YAML_FORMAT - ); -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L99 -type LockfileFile = Omit & - Partial & - Partial>; - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L106 -function normalizeLockfile(lockfile: Lockfile, isLockfileV6: boolean) { - let lockfileToSave!: LockfileFile; - if (Object.keys(lockfile.importers).length === 1 && lockfile.importers['.']) { - lockfileToSave = { - ...lockfile, - ...lockfile.importers['.'], - }; - delete lockfileToSave.importers; - for (const depType of DEPENDENCIES_FIELDS) { - if (isEmpty(lockfileToSave[depType])) { - delete lockfileToSave[depType]; - } - } - if (isEmpty(lockfileToSave.packages) || lockfileToSave.packages == null) { - delete lockfileToSave.packages; - } - } else { - lockfileToSave = { - ...lockfile, - importers: mapValues(lockfile.importers, (importer: ProjectSnapshot) => { - const normalizedImporter: Partial = {}; - if (!isEmpty(importer.specifiers ?? {}) || !isLockfileV6) { - normalizedImporter['specifiers'] = importer.specifiers ?? {}; - } - if ( - importer.dependenciesMeta != null && - !isEmpty(importer.dependenciesMeta) - ) { - normalizedImporter['dependenciesMeta'] = importer.dependenciesMeta; - } - for (const depType of DEPENDENCIES_FIELDS) { - if (!isEmpty(importer[depType] ?? {})) { - normalizedImporter[depType] = importer[depType]; - } - } - if (importer.publishDirectory) { - normalizedImporter.publishDirectory = importer.publishDirectory; - } - return normalizedImporter as ProjectSnapshot; - }), - }; - if (isEmpty(lockfileToSave.packages) || lockfileToSave.packages == null) { - delete lockfileToSave.packages; - } - } - if (lockfileToSave.time) { - lockfileToSave.time = (isLockfileV6 ? pruneTimeInLockfileV6 : pruneTime)( - lockfileToSave.time, - lockfile.importers - ); - } - if (lockfileToSave.overrides != null && isEmpty(lockfileToSave.overrides)) { - delete lockfileToSave.overrides; - } - if ( - lockfileToSave.patchedDependencies != null && - isEmpty(lockfileToSave.patchedDependencies) - ) { - delete lockfileToSave.patchedDependencies; - } - if (!lockfileToSave.packageExtensionsChecksum) { - delete lockfileToSave.packageExtensionsChecksum; - } - return lockfileToSave; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L173 -function pruneTimeInLockfileV6( - time: Record, - importers: Record -): Record { - const rootDepPaths = new Set(); - for (const importer of Object.values(importers)) { - for (const depType of DEPENDENCIES_FIELDS) { - for (let [depName, ref] of Object.entries(importer[depType] ?? {})) { - let version: string; - if (ref['version']) { - version = ref['version']; - } else { - version = ref as string; - } - const suffixStart = version.indexOf('('); - const refWithoutPeerSuffix = - suffixStart === -1 ? version : version.slice(0, suffixStart); - const depPath = refToRelative(refWithoutPeerSuffix, depName); - if (!depPath) continue; - rootDepPaths.add(depPath); - } - } - } - return pickBy((prop) => rootDepPaths.has(prop), time); -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L191 -function refToRelative(reference: string, pkgName: string): string | null { - if (reference.startsWith('link:')) { - return null; - } - if (reference.startsWith('file:')) { - return reference; - } - if ( - !reference.includes('/') || - !reference.replace(/(\([^)]+\))+$/, '').includes('/') - ) { - return `/${pkgName}@${reference}`; - } - return reference; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/write.ts#L207 -function pruneTime( - time: Record, - importers: Record -): Record { - const rootDepPaths = new Set(); - for (const importer of Object.values(importers)) { - for (const depType of DEPENDENCIES_FIELDS) { - for (let [depName, ref] of Object.entries(importer[depType] ?? {})) { - let version: string; - if (ref['version']) { - version = ref['version']; - } else { - version = ref as string; - } - const suffixStart = version.indexOf('_'); - const refWithoutPeerSuffix = - suffixStart === -1 ? version : version.slice(0, suffixStart); - const depPath = dpRefToRelative(refWithoutPeerSuffix, depName); - if (!depPath) continue; - rootDepPaths.add(depPath); - } - } - } - return pickBy((depPath) => rootDepPaths.has(depPath), time); -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/sortLockfileKeys.ts#L34 -const ROOT_KEYS_ORDER = { - lockfileVersion: 1, - // only and never are conflict options. - neverBuiltDependencies: 2, - onlyBuiltDependencies: 2, - overrides: 3, - packageExtensionsChecksum: 4, - patchedDependencies: 5, - specifiers: 10, - dependencies: 11, - optionalDependencies: 12, - devDependencies: 13, - dependenciesMeta: 14, - importers: 15, - packages: 16, -}; - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/sortLockfileKeys.ts#L60 -function sortLockfileKeys(lockfile: LockfileFile): LockfileFile { - let sortedLockfile = {} as Lockfile; - const sortedKeys = Object.keys(lockfile).sort( - (a, b) => ROOT_KEYS_ORDER[a] - ROOT_KEYS_ORDER[b] - ); - for (const key of sortedKeys) { - sortedLockfile[key] = lockfile[key]; - } - return sortedLockfile; -} - -/** - * Types from https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/InlineSpecifiersLockfile.ts - */ - -const INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX = '-inlineSpecifiers'; - -interface InlineSpecifiersLockfile - extends Omit { - lockfileVersion: string; - importers: Record; -} - -interface InlineSpecifiersProjectSnapshot { - dependencies?: InlineSpecifiersResolvedDependencies; - devDependencies?: InlineSpecifiersResolvedDependencies; - optionalDependencies?: InlineSpecifiersResolvedDependencies; - dependenciesMeta?: ProjectSnapshot['dependenciesMeta']; -} - -interface InlineSpecifiersResolvedDependencies { - [depName: string]: SpecifierAndResolution; -} - -interface SpecifierAndResolution { - specifier: string; - version: string; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L10 -function isExperimentalInlineSpecifiersFormat( - lockfile: InlineSpecifiersLockfile | Lockfile -): lockfile is InlineSpecifiersLockfile { - const { lockfileVersion } = lockfile; - return ( - lockfileVersion.toString().startsWith('6.') || - (typeof lockfileVersion === 'string' && - lockfileVersion.endsWith( - INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX - )) - ); -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L17 -function convertToInlineSpecifiersFormat( - lockfile: Lockfile -): InlineSpecifiersLockfile { - let importers = lockfile.importers; - let packages = lockfile.packages; - if (isV6Lockfile(lockfile)) { - importers = Object.fromEntries( - Object.entries(lockfile.importers ?? {}).map( - ([importerId, pkgSnapshot]: [string, ProjectSnapshot]) => { - const newSnapshot = { ...pkgSnapshot }; - if (newSnapshot.dependencies != null) { - newSnapshot.dependencies = mapValues( - newSnapshot.dependencies, - convertOldRefToNewRef - ); - } - if (newSnapshot.optionalDependencies != null) { - newSnapshot.optionalDependencies = mapValues( - newSnapshot.optionalDependencies, - convertOldRefToNewRef - ); - } - if (newSnapshot.devDependencies != null) { - newSnapshot.devDependencies = mapValues( - newSnapshot.devDependencies, - convertOldRefToNewRef - ); - } - return [importerId, newSnapshot]; - } - ) - ); - packages = Object.fromEntries( - Object.entries(lockfile.packages ?? {}).map(([depPath, pkgSnapshot]) => { - const newSnapshot = { ...pkgSnapshot }; - if (newSnapshot.dependencies != null) { - newSnapshot.dependencies = mapValues( - newSnapshot.dependencies, - convertOldRefToNewRef - ); - } - if (newSnapshot.optionalDependencies != null) { - newSnapshot.optionalDependencies = mapValues( - newSnapshot.optionalDependencies, - convertOldRefToNewRef - ); - } - return [convertOldDepPathToNewDepPath(depPath), newSnapshot]; - }) - ); - } - const newLockfile = { - ...lockfile, - packages, - lockfileVersion: isV6Lockfile(lockfile) - ? lockfile.lockfileVersion.toString() - : lockfile.lockfileVersion - .toString() - .endsWith(INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX) - ? lockfile.lockfileVersion.toString() - : `${lockfile.lockfileVersion}${INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX}`, - importers: mapValues( - importers, - convertProjectSnapshotToInlineSpecifiersFormat - ), - }; - if (isV6Lockfile(lockfile) && newLockfile.time) { - newLockfile.time = Object.fromEntries( - Object.entries(newLockfile.time).map(([depPath, time]) => [ - convertOldDepPathToNewDepPath(depPath), - time, - ]) - ); - } - return newLockfile; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L72 -function convertOldDepPathToNewDepPath(oldDepPath: string) { - const parsedDepPath = dpParse(oldDepPath); - if (!parsedDepPath.name || !parsedDepPath.version) return oldDepPath; - let newDepPath = `/${parsedDepPath.name}@${parsedDepPath.version}`; - if (parsedDepPath.peersSuffix) { - if (parsedDepPath.peersSuffix.startsWith('(')) { - newDepPath += parsedDepPath.peersSuffix; - } else { - newDepPath += `_${parsedDepPath.peersSuffix}`; - } - } - if (parsedDepPath.host) { - newDepPath = `${parsedDepPath.host}${newDepPath}`; - } - return newDepPath; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L89 -function convertOldRefToNewRef(oldRef: string) { - if (oldRef.startsWith('link:') || oldRef.startsWith('file:')) { - return oldRef; - } - if (oldRef.includes('/')) { - return convertOldDepPathToNewDepPath(oldRef); - } - return oldRef; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L99 -function revertFromInlineSpecifiersFormatIfNecessary( - lockfile: Lockfile | InlineSpecifiersLockfile -): Lockfile { - return isExperimentalInlineSpecifiersFormat(lockfile) - ? revertFromInlineSpecifiersFormat(lockfile) - : lockfile; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L105 -function revertFromInlineSpecifiersFormat( - lockfile: InlineSpecifiersLockfile -): Lockfile { - const { lockfileVersion, importers, ...rest } = lockfile; - - const originalVersionStr = lockfileVersion.replace( - INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX, - '' - ); - const originalVersion = Number(originalVersionStr); - if (isNaN(originalVersion)) { - throw new Error( - `Unable to revert lockfile from inline specifiers format. Invalid version parsed: ${originalVersionStr}` - ); - } - - let revertedImporters = mapValues(importers, revertProjectSnapshot); - let packages = lockfile.packages; - if (originalVersionStr.startsWith('6.')) { - revertedImporters = Object.fromEntries( - Object.entries(revertedImporters ?? {}).map( - ([importerId, pkgSnapshot]: [string, ProjectSnapshot]) => { - const newSnapshot = { ...pkgSnapshot }; - if (newSnapshot.dependencies != null) { - newSnapshot.dependencies = mapValues( - newSnapshot.dependencies, - convertNewRefToOldRef - ); - } - if (newSnapshot.optionalDependencies != null) { - newSnapshot.optionalDependencies = mapValues( - newSnapshot.optionalDependencies, - convertNewRefToOldRef - ); - } - if (newSnapshot.devDependencies != null) { - newSnapshot.devDependencies = mapValues( - newSnapshot.devDependencies, - convertNewRefToOldRef - ); - } - return [importerId, newSnapshot]; - } - ) - ); - packages = Object.fromEntries( - Object.entries(lockfile.packages ?? {}).map(([depPath, pkgSnapshot]) => { - const newSnapshot = { ...pkgSnapshot }; - if (newSnapshot.dependencies != null) { - newSnapshot.dependencies = mapValues( - newSnapshot.dependencies, - convertNewRefToOldRef - ); - } - if (newSnapshot.optionalDependencies != null) { - newSnapshot.optionalDependencies = mapValues( - newSnapshot.optionalDependencies, - convertNewRefToOldRef - ); - } - return [convertNewDepPathToOldDepPath(depPath), newSnapshot]; - }) - ); - } - const newLockfile = { - ...rest, - lockfileVersion: lockfileVersion.endsWith( - INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX - ) - ? originalVersion - : lockfileVersion, - packages, - importers: revertedImporters, - }; - if (originalVersionStr.startsWith('6.') && newLockfile.time) { - newLockfile.time = Object.fromEntries( - Object.entries(newLockfile.time).map(([depPath, time]) => [ - convertNewDepPathToOldDepPath(depPath), - time, - ]) - ); - } - return newLockfile; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L162 -function convertNewDepPathToOldDepPath(oldDepPath: string) { - if (!oldDepPath.includes('@', 2)) return oldDepPath; - const index = oldDepPath.indexOf('@', oldDepPath.indexOf('/@') + 2); - if (oldDepPath.includes('(') && index > oldDepPath.indexOf('(')) - return oldDepPath; - return `${oldDepPath.substring(0, index)}/${oldDepPath.substring(index + 1)}`; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L169 -function convertNewRefToOldRef(oldRef: string) { - if (oldRef.startsWith('link:') || oldRef.startsWith('file:')) { - return oldRef; - } - if (oldRef.includes('@')) { - return convertNewDepPathToOldDepPath(oldRef); - } - return oldRef; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L179 -function convertProjectSnapshotToInlineSpecifiersFormat( - projectSnapshot: ProjectSnapshot -): InlineSpecifiersProjectSnapshot { - const { specifiers, ...rest } = projectSnapshot; - const convertBlock = (block?: ResolvedDependencies) => - block != null - ? convertResolvedDependenciesToInlineSpecifiersFormat(block, { - specifiers, - }) - : block; - return { - ...rest, - dependencies: convertBlock(projectSnapshot.dependencies), - optionalDependencies: convertBlock(projectSnapshot.optionalDependencies), - devDependencies: convertBlock(projectSnapshot.devDependencies), - } as InlineSpecifiersProjectSnapshot; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L195 -function convertResolvedDependenciesToInlineSpecifiersFormat( - resolvedDependencies: ResolvedDependencies, - { specifiers }: { specifiers: ResolvedDependencies } -): InlineSpecifiersResolvedDependencies { - return mapValues(resolvedDependencies, (version, depName) => ({ - specifier: specifiers[depName], - version, - })); -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L205 -function revertProjectSnapshot( - from: InlineSpecifiersProjectSnapshot -): ProjectSnapshot { - const specifiers: ResolvedDependencies = {}; - - function moveSpecifiers( - from: InlineSpecifiersResolvedDependencies - ): ResolvedDependencies { - const resolvedDependencies: ResolvedDependencies = {}; - for (const [depName, { specifier, version }] of Object.entries(from)) { - const existingValue = specifiers[depName]; - if (existingValue != null && existingValue !== specifier) { - throw new Error( - `Project snapshot lists the same dependency more than once with conflicting versions: ${depName}` - ); - } - - specifiers[depName] = specifier; - resolvedDependencies[depName] = version; - } - return resolvedDependencies; - } - - const dependencies: ResolvedDependencies = from.dependencies - ? moveSpecifiers(from.dependencies) - : null; - const devDependencies: ResolvedDependencies = from.devDependencies - ? moveSpecifiers(from.devDependencies) - : null; - const optionalDependencies: ResolvedDependencies = from.optionalDependencies - ? moveSpecifiers(from.optionalDependencies) - : null; - - return { - ...from, - specifiers, - dependencies, - devDependencies, - optionalDependencies, - }; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L241 -function mapValues( - obj: Record, - mapper: (val: T, key: string) => U -): Record { - const result: Record = {}; - for (const [key, value] of Object.entries(obj)) { - result[key] = mapper(value, key); - } - return result; -} - -/************************************************************************* - * THE FOLLOWING CODE IS COPIED FROM @pnpm/types for convenience - *************************************************************************/ - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/packages/types/src/misc.ts#L6 -const DEPENDENCIES_FIELDS = [ - 'optionalDependencies', - 'dependencies', - 'devDependencies', -]; - -/************************************************************************* - * THE FOLLOWING CODE IS COPIED FROM @pnpm/dependency-path for convenience - *************************************************************************/ - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/packages/dependency-path/src/index.ts#L6 -function isAbsolute(dependencyPath) { - return dependencyPath[0] !== '/'; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/packages/dependency-path/src/index.ts#L80 -function dpRefToRelative(reference, pkgName) { - if (reference.startsWith('link:')) { - return null; - } - if (reference.startsWith('file:')) { - return reference; - } - if ( - !reference.includes('/') || - (reference.includes('(') && - reference.lastIndexOf('/', reference.indexOf('(')) === -1) - ) { - return `/${pkgName}/${reference}`; - } - return reference; -} - -// https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/packages/dependency-path/src/index.ts#L96 -function dpParse(dependencyPath) { - // eslint-disable-next-line: strict-type-predicates - if (typeof dependencyPath !== 'string') { - throw new TypeError( - `Expected \`dependencyPath\` to be of type \`string\`, got \`${ - // eslint-disable-next-line: strict-type-predicates - dependencyPath === null ? 'null' : typeof dependencyPath - }\`` - ); - } - const _isAbsolute = isAbsolute(dependencyPath); - const parts = dependencyPath.split('/'); - if (!_isAbsolute) parts.shift(); - const host = _isAbsolute ? parts.shift() : undefined; - if (parts.length === 0) - return { - host, - isAbsolute: _isAbsolute, - }; - const name = parts[0].startsWith('@') - ? `${parts.shift()}/${parts.shift()}` // eslint-disable-line @typescript-eslint/restrict-template-expressions - : parts.shift(); - let version = parts.join('/'); - if (version) { - let peerSepIndex; - let peersSuffix; - if (version.includes('(') && version.endsWith(')')) { - peerSepIndex = version.indexOf('('); - if (peerSepIndex !== -1) { - peersSuffix = version.substring(peerSepIndex); - version = version.substring(0, peerSepIndex); - } - } else { - peerSepIndex = version.indexOf('_'); - if (peerSepIndex !== -1) { - peersSuffix = version.substring(peerSepIndex + 1); - version = version.substring(0, peerSepIndex); - } - } - if (valid(version)) { - return { - host, - isAbsolute: _isAbsolute, - name, - peersSuffix, - version, - }; - } - } - if (!_isAbsolute) - throw new Error(`${dependencyPath} is an invalid relative dependency path`); - return { - host, - isAbsolute: _isAbsolute, - }; -} - -/******************************************************************************** - * THE FOLLOWING CODE IS COPIED AND SIMPLIFIED FROM @pnpm/ramda for convenience - *******************************************************************************/ - -// https://github.com/pnpm/ramda/blob/50c6b57110b2f3631ed8633141f12012b7768d85/source/pickBy.js#L24 -function pickBy(test: (prop: string) => boolean, obj: Record) { - let result = {}; - - for (const prop in obj) { - if (test(obj[prop])) { - result[prop] = obj[prop]; - } - } - - return result; -} -// https://github.com/pnpm/ramda/blob/50c6b57110b2f3631ed8633141f12012b7768d85/source/isEmpty.js#L28 -function isEmpty(obj: object) { - return obj != null && Object.keys(obj).length === 0; + const adaptedLockfile = convertToLockfileFile(lockfile); + return dump(sortLockfileKeys(adaptedLockfile), LOCKFILE_YAML_FORMAT); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12912c132f752e..38bc59698a15cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,8 +61,8 @@ importers: specifier: 3.0.0-rc.46 version: 3.0.0-rc.46 '@zkochan/js-yaml': - specifier: 0.0.6 - version: 0.0.6 + specifier: 0.0.7 + version: 0.0.7 axios: specifier: ^1.6.0 version: 1.6.2 @@ -328,6 +328,9 @@ importers: '@pmmmwh/react-refresh-webpack-plugin': specifier: ^0.5.7 version: 0.5.8(react-refresh@0.10.0)(type-fest@3.13.1)(webpack-dev-server@4.11.1(bufferutil@4.0.7)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.3.86(@swc/helpers@0.5.3))(esbuild@0.19.5)))(webpack-hot-middleware@2.25.3)(webpack@5.88.0(@swc/core@1.3.86(@swc/helpers@0.5.3))(esbuild@0.19.5)) + '@pnpm/lockfile-file': + specifier: ^9.0.0 + version: 9.0.0(@pnpm/logger@5.0.0) '@pnpm/lockfile-types': specifier: ^6.0.0 version: 6.0.0 @@ -4395,14 +4398,67 @@ packages: webpack-plugin-serve: optional: true + '@pnpm/constants@8.0.0': + resolution: {integrity: sha512-yQosGUvYPpAjb1jOFcdbwekRjZRVxN6C0hHzfRCZrMKbxGjt/E0g0RcFlEDNVZ95tm4oMMcr7nEPa7H7LX3emw==} + engines: {node: '>=18.12'} + + '@pnpm/crypto.base32-hash@3.0.0': + resolution: {integrity: sha512-iGKP6rRKng5Tcad1+S+j3UoY5wVZN+z0ZgemlGp69jNgn6EaM4N0Q3mvnDNJ7UZFmL2ClXZZYLNuCk9pUYV3Xg==} + engines: {node: '>=18.12'} + + '@pnpm/dependency-path@3.0.0': + resolution: {integrity: sha512-7n6pwEN/BiqUQEEBct62kXU0SB0gSgt2b+1RObAD7aEo4kvHbqgRy5ZXn4/DPStUy6YlccZJ8veI5ne+GQ9hKA==} + engines: {node: '>=18.12'} + + '@pnpm/error@6.0.0': + resolution: {integrity: sha512-SKtHdV09k9+6jkohv9YuYmKMKNpxknoGjo0c6eN8x2Z3MHW2cuSt1OD/L16eCqdKQL+FUbvULxig0b9X9VK2/g==} + engines: {node: '>=18.12'} + + '@pnpm/git-utils@2.0.0': + resolution: {integrity: sha512-k1rv4Zvno/5zJAqE/Mh9V0ehlm14NsYwpXTdaGMtyhkoHvlSckRfr23OIOIM7Q/TRX+LhqyJ2kep50SY2TsZ+g==} + engines: {node: '>=18.12'} + + '@pnpm/lockfile-file@9.0.0': + resolution: {integrity: sha512-/V39Zl6EwHtgfZTgnwymQk6xCcC9uikHrrG677wyFfSOcBC4rPSSASan+Rbky8w2ztW+iMjSsfSZPCsIg2A7/Q==} + engines: {node: '>=18.12'} + peerDependencies: + '@pnpm/logger': ^5.0.0 + '@pnpm/lockfile-types@6.0.0': resolution: {integrity: sha512-a4/ULIPLZIIq8Qmi2HEoFgRTtEouGU5RNhuGDxnSmkxu1BjlNMNjLJeEI5jzMZCGOjBoML+AirY/XOO3bcEQ/w==} engines: {node: '>=18.12'} + '@pnpm/lockfile-utils@10.0.0': + resolution: {integrity: sha512-R2JXeAVdtXwu7NxfA4936Og6JHMGZCjOJ+45DUVP9SR7k2WS1bfOSeD5NRuuwqqdw+gYjsTvaYMYXhH6Sr0k2Q==} + engines: {node: '>=18.12'} + + '@pnpm/logger@5.0.0': + resolution: {integrity: sha512-YfcB2QrX+Wx1o6LD1G2Y2fhDhOix/bAY/oAnMpHoNLsKkWIRbt1oKLkIFvxBMzLwAEPqnYWguJrYC+J6i4ywbw==} + engines: {node: '>=12.17'} + + '@pnpm/merge-lockfile-changes@6.0.0': + resolution: {integrity: sha512-K9ARTZ+o/EZ10RPZY4dftlSnvPgJrVeOG0QwZLNTb9Z9q8D6EqSVwEh7CxDobGFe5FAj2lkDK6DY7EgPI4hhdw==} + engines: {node: '>=18.12'} + + '@pnpm/pick-fetcher@3.0.0': + resolution: {integrity: sha512-2eisylRAU/jeuxFEPnS1gjLZKJGbYc4QEtEW6MVUYjO4Xi+2ttkSm7825S0J5IPpUIvln8HYPCUS0eQWSfpOaQ==} + engines: {node: '>=18.12'} + + '@pnpm/ramda@0.28.1': + resolution: {integrity: sha512-zcAG+lvU0fMziNeGXpPyCyCJYp5ZVrPElEE4t14jAmViaihohocZ+dDkcRIyAomox8pQsuZnv1EyHR+pOhmUWw==} + + '@pnpm/resolver-base@12.0.0': + resolution: {integrity: sha512-R5FmojIoHRIC8hZDyr6a9SM6TkpAQXQXgq5QrycUwknRvGjTnrOFD5JaTzMZohcfFg6TWdA3sp3B0w/mhj98Rg==} + engines: {node: '>=18.12'} + '@pnpm/types@10.0.0': resolution: {integrity: sha512-P608MRTOExt5BkIN2hsrb/ycEchwaPW/x80ujJUAqxKZSXNVAOrlEu3KJ+2+jTCunyWmo/EcE01ZdwCw8jgVrQ==} engines: {node: '>=18.12'} + '@pnpm/util.lex-comparator@1.0.0': + resolution: {integrity: sha512-3aBQPHntVgk5AweBWZn+1I/fqZ9krK/w01197aYVkAJQGftb+BVWgEepxY5GChjSW12j52XX+CmfynYZ/p0DFQ==} + engines: {node: '>=12.22.0'} + '@polka/url@1.0.0-next.24': resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} @@ -6551,6 +6607,19 @@ packages: resolution: {integrity: sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==} hasBin: true + '@zkochan/js-yaml@0.0.7': + resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} + hasBin: true + + '@zkochan/rimraf@2.1.3': + resolution: {integrity: sha512-mCfR3gylCzPC+iqdxEA6z5SxJeOgzgbwmyxanKriIne5qZLswDe/M43aD3p5MNzwzXRhbZg/OX+MpES6Zk1a6A==} + engines: {node: '>=12.10'} + + '@zkochan/which@2.0.3': + resolution: {integrity: sha512-C1ReN7vt2/2O0fyTsx5xnbQuxBrmG5NMSbcIkPKCCfCTJgpZBsuRYzFXHj3nVq8vTfK7vxHUmzfCpSHgO7j4rg==} + engines: {node: '>= 8'} + hasBin: true + '@zxing/text-encoding@0.9.0': resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} @@ -7203,6 +7272,9 @@ packages: resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + bole@5.0.11: + resolution: {integrity: sha512-KB0Ye0iMAW5BnNbnLfMSQcnI186hKUzE2fpkZWqcxsoTR7eqzlTidSOMYPHJOn/yR7VGH7uSZp37qH9q2Et0zQ==} + bonjour-service@1.0.14: resolution: {integrity: sha512-HIMbgLnk1Vqvs6B4Wq5ep7mxvj9sGz5d1JJyDNSGNIdA/w2MCz6GTjWTdjqOJV1bEPj+6IkxDvWNFKEBxNt4kQ==} @@ -7704,6 +7776,10 @@ packages: resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==} engines: {node: '>= 0.8.0'} + comver-to-semver@1.0.0: + resolution: {integrity: sha512-gcGtbRxjwROQOdXLUWH1fQAXqThUVRZ219aAwgtX3KfYw429/Zv6EIJRf5TBSzWdAGwePmqH7w70WTaX4MDqag==} + engines: {node: '>=12.17'} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -9459,6 +9535,10 @@ packages: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} + get-npm-tarball-url@2.1.0: + resolution: {integrity: sha512-ro+DiMu5DXgRBabqXupW38h7WPZ9+Ad8UjwhvsmmN8w1sU7ab0nzAXvVZ4kqYg57OrqomRtJvepX5/xvFKNtjA==} + engines: {node: '>=12.17'} + get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -10032,6 +10112,9 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} + individual@3.0.0: + resolution: {integrity: sha512-rUY5vtT748NMRbEMrTNiFfy29BgGZwGXUi2NFUVMWQrogSLzlJvQV9eeMWi+g1aVaQ53tpyLAQtd5x/JH0Nh1g==} + infer-owner@1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} @@ -10297,6 +10380,10 @@ packages: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + is-plain-obj@3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} @@ -11695,6 +11782,11 @@ packages: resolution: {integrity: sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==} hasBin: true + ndjson@2.0.0: + resolution: {integrity: sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==} + engines: {node: '>=10'} + hasBin: true + needle@3.3.1: resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} engines: {node: '>= 4.4.x'} @@ -12341,6 +12433,9 @@ packages: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} engines: {node: '>=12'} + path-name@1.0.0: + resolution: {integrity: sha512-/dcAb5vMXH0f51yvMuSUqFpxUcA8JelbRmE5mW/p4CUJxrNgK24IkstnV7ENtg2IDGBOu6izKTG6eilbnbNKWQ==} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -13748,6 +13843,9 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfc4648@1.5.3: + resolution: {integrity: sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ==} + rfdc@1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} @@ -13838,6 +13936,10 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + safe-execa@0.1.2: + resolution: {integrity: sha512-vdTshSQ2JsRCgT8eKZWNJIL26C6bVqy1SOmuCMlKHegVeo8KYRobRrefOdUq9OozSPUUiSxrylteeRmLOMFfWg==} + engines: {node: '>=12'} + safe-identifier@0.4.2: resolution: {integrity: sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==} @@ -14190,6 +14292,10 @@ packages: resolution: {integrity: sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==} engines: {node: '>=0.10.0'} + sort-keys@4.2.0: + resolution: {integrity: sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==} + engines: {node: '>=8'} + source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -16021,6 +16127,10 @@ packages: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} @@ -21495,12 +21605,86 @@ snapshots: webpack-dev-server: 4.11.1(bufferutil@4.0.7)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.3.86(@swc/helpers@0.5.3))(esbuild@0.19.5)) webpack-hot-middleware: 2.25.3 + '@pnpm/constants@8.0.0': {} + + '@pnpm/crypto.base32-hash@3.0.0': + dependencies: + rfc4648: 1.5.3 + + '@pnpm/dependency-path@3.0.0': + dependencies: + '@pnpm/crypto.base32-hash': 3.0.0 + '@pnpm/types': 10.0.0 + semver: 7.6.0 + + '@pnpm/error@6.0.0': + dependencies: + '@pnpm/constants': 8.0.0 + + '@pnpm/git-utils@2.0.0': + dependencies: + execa: safe-execa@0.1.2 + + '@pnpm/lockfile-file@9.0.0(@pnpm/logger@5.0.0)': + dependencies: + '@pnpm/constants': 8.0.0 + '@pnpm/dependency-path': 3.0.0 + '@pnpm/error': 6.0.0 + '@pnpm/git-utils': 2.0.0 + '@pnpm/lockfile-types': 6.0.0 + '@pnpm/lockfile-utils': 10.0.0 + '@pnpm/logger': 5.0.0 + '@pnpm/merge-lockfile-changes': 6.0.0 + '@pnpm/types': 10.0.0 + '@pnpm/util.lex-comparator': 1.0.0 + '@zkochan/rimraf': 2.1.3 + comver-to-semver: 1.0.0 + js-yaml: '@zkochan/js-yaml@0.0.7' + normalize-path: 3.0.0 + ramda: '@pnpm/ramda@0.28.1' + semver: 7.6.0 + sort-keys: 4.2.0 + strip-bom: 4.0.0 + write-file-atomic: 5.0.1 + '@pnpm/lockfile-types@6.0.0': dependencies: '@pnpm/types': 10.0.0 + '@pnpm/lockfile-utils@10.0.0': + dependencies: + '@pnpm/dependency-path': 3.0.0 + '@pnpm/lockfile-types': 6.0.0 + '@pnpm/pick-fetcher': 3.0.0 + '@pnpm/resolver-base': 12.0.0 + '@pnpm/types': 10.0.0 + get-npm-tarball-url: 2.1.0 + ramda: '@pnpm/ramda@0.28.1' + + '@pnpm/logger@5.0.0': + dependencies: + bole: 5.0.11 + ndjson: 2.0.0 + + '@pnpm/merge-lockfile-changes@6.0.0': + dependencies: + '@pnpm/lockfile-types': 6.0.0 + comver-to-semver: 1.0.0 + ramda: '@pnpm/ramda@0.28.1' + semver: 7.6.0 + + '@pnpm/pick-fetcher@3.0.0': {} + + '@pnpm/ramda@0.28.1': {} + + '@pnpm/resolver-base@12.0.0': + dependencies: + '@pnpm/types': 10.0.0 + '@pnpm/types@10.0.0': {} + '@pnpm/util.lex-comparator@1.0.0': {} + '@polka/url@1.0.0-next.24': {} '@popperjs/core@2.11.6': {} @@ -24551,6 +24735,18 @@ snapshots: dependencies: argparse: 2.0.1 + '@zkochan/js-yaml@0.0.7': + dependencies: + argparse: 2.0.1 + + '@zkochan/rimraf@2.1.3': + dependencies: + rimraf: 3.0.2 + + '@zkochan/which@2.0.3': + dependencies: + isexe: 2.0.0 + '@zxing/text-encoding@0.9.0': optional: true @@ -25392,6 +25588,11 @@ snapshots: transitivePeerDependencies: - supports-color + bole@5.0.11: + dependencies: + fast-safe-stringify: 2.1.1 + individual: 3.0.0 + bonjour-service@1.0.14: dependencies: array-flatten: 2.1.2 @@ -25935,6 +26136,8 @@ snapshots: transitivePeerDependencies: - supports-color + comver-to-semver@1.0.0: {} + concat-map@0.0.1: {} concat-stream@1.6.2: @@ -28344,6 +28547,8 @@ snapshots: get-nonce@1.0.1: {} + get-npm-tarball-url@2.1.0: {} + get-package-type@0.1.0: {} get-pkg-repo@4.2.1: @@ -29047,6 +29252,8 @@ snapshots: indent-string@4.0.0: {} + individual@3.0.0: {} + infer-owner@1.0.4: {} inflight@1.0.6: @@ -29315,6 +29522,8 @@ snapshots: is-plain-obj@1.1.0: {} + is-plain-obj@2.1.0: {} + is-plain-obj@3.0.0: {} is-plain-obj@4.1.0: {} @@ -31310,6 +31519,14 @@ snapshots: ncp@2.0.0: {} + ndjson@2.0.0: + dependencies: + json-stringify-safe: 5.0.1 + minimist: 1.2.8 + readable-stream: 3.6.0 + split2: 3.2.2 + through2: 4.0.2 + needle@3.3.1: dependencies: iconv-lite: 0.6.3 @@ -32331,6 +32548,8 @@ snapshots: path-key@4.0.0: {} + path-name@1.0.0: {} + path-parse@1.0.7: {} path-scurry@1.7.0: @@ -33976,6 +34195,8 @@ snapshots: reusify@1.0.4: {} + rfc4648@1.5.3: {} + rfdc@1.3.0: {} rimraf@2.4.5: @@ -34099,6 +34320,12 @@ snapshots: safe-buffer@5.2.1: {} + safe-execa@0.1.2: + dependencies: + '@zkochan/which': 2.0.3 + execa: 5.1.1 + path-name: 1.0.0 + safe-identifier@0.4.2: {} safe-regex-test@1.0.0: @@ -34494,6 +34721,10 @@ snapshots: dependencies: is-plain-obj: 1.1.0 + sort-keys@4.2.0: + dependencies: + is-plain-obj: 2.1.0 + source-map-js@1.0.2: {} source-map-loader@3.0.2(webpack@5.88.0(@swc/core@1.3.86(@swc/helpers@0.5.3))(esbuild@0.19.5)): @@ -36721,6 +36952,11 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + ws@7.5.9(bufferutil@4.0.7)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.7