Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update pnpm to v10 #9389

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,083 changes: 2,612 additions & 2,471 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scopes/dependencies/pnpm/lockfile-deps-graph-converter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import { type ProjectManifest, type Registries } from '@pnpm/types';
import { type InlineSpecifiersResolvedDependencies } from '@pnpm/lockfile.types';
import { type LockfileFileProjectResolvedDependencies } from '@pnpm/lockfile.types';
import { type ResolveFunction } from '@pnpm/client';
import * as dp from '@pnpm/dependency-path';
import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package';
Expand Down Expand Up @@ -38,7 +38,7 @@ function convertLockfileToGraphFromCapsule(
}

function importerDepsToNeighbours(
importerDependencies: InlineSpecifiersResolvedDependencies,
importerDependencies: LockfileFileProjectResolvedDependencies,
lifecycle: 'dev' | 'runtime',
optional: boolean
): DependencyNeighbour[] {
Expand Down
8 changes: 4 additions & 4 deletions scopes/dependencies/pnpm/lynx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { restartWorkerPool, finishWorkers } from '@pnpm/worker';
import { createPkgGraph } from '@pnpm/workspace.pkgs-graph';
import { PackageManifest, ProjectManifest, ReadPackageHook } from '@pnpm/types';
import { readWantedLockfile, writeWantedLockfile } from '@pnpm/lockfile.fs';
import { type LockfileFileV9, type Lockfile } from '@pnpm/lockfile.types'
import { type LockfileFile, type LockfileObject } from '@pnpm/lockfile.types'
import { Logger } from '@teambit/logger';
import { VIRTUAL_STORE_DIR_MAX_LENGTH } from '@teambit/dependencies.pnpm.dep-path';
import { isEqual } from 'lodash'
Expand Down Expand Up @@ -267,7 +267,6 @@ export async function install(
pruneLockfileImporters: true,
lockfileOnly: options.lockfileOnly ?? false,
modulesCacheMaxAge: Infinity, // pnpm should never prune the virtual store. Bit does it on its own.
neverBuiltDependencies: options.neverBuiltDependencies,
registries: registries.toMap(),
resolutionMode: 'highest',
rawConfig: authConfig,
Expand All @@ -285,6 +284,7 @@ export async function install(
},
userAgent: networkConfig.userAgent,
...options,
neverBuiltDependencies: options.neverBuiltDependencies ?? [],
returnListOfDepsRequiringBuild: true,
excludeLinksFromLockfile: options.excludeLinksFromLockfile ?? true,
depth: options.updateAll ? Infinity : 0,
Expand Down Expand Up @@ -583,11 +583,11 @@ async function addDepsRequiringBuildToLockfile(rootDir: string, depsRequiringBui
await writeWantedLockfile(rootDir, lockfile);
}

export interface BitLockfile extends Lockfile {
export interface BitLockfile extends LockfileObject {
bit?: BitLockfileAttributes;
}

export interface BitLockfileFile extends LockfileFileV9 {
export interface BitLockfileFile extends LockfileFile {
bit?: BitLockfileAttributes;
}

Expand Down
7 changes: 3 additions & 4 deletions scopes/dependencies/pnpm/pnpm.package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Registries, Registry } from '@teambit/pkg.entities.registry';
import { VIRTUAL_STORE_DIR_MAX_LENGTH } from '@teambit/dependencies.pnpm.dep-path';
import { DEPS_GRAPH, isFeatureEnabled } from '@teambit/harmony.modules.feature-toggle';
import { Logger } from '@teambit/logger';
import { type LockfileFileV9 } from '@pnpm/lockfile.types';
import { type LockfileFile } from '@pnpm/lockfile.types';
import fs from 'fs';
import { memoize, omit } from 'lodash';
import { PeerDependencyIssuesByProjects } from '@pnpm/core';
Expand Down Expand Up @@ -95,7 +95,7 @@ export class PnpmPackageManager implements PackageManager {
...opts,
registries,
});
const lockfile: LockfileFileV9 = await convertGraphToLockfile(dependenciesGraph, {
const lockfile: LockfileFile = await convertGraphToLockfile(dependenciesGraph, {
...opts,
resolve,
registries: registries.toMap(),
Expand Down Expand Up @@ -446,8 +446,7 @@ export class PnpmPackageManager implements PackageManager {
},
failOnMissingDependencies: false,
skipped: new Set(),
}),
{ forceSharedFormat: true }
})
);
const graph = convertLockfileToGraph(partialLockfile, opts);
return graph;
Expand Down
4 changes: 2 additions & 2 deletions scopes/scope/objects/models/dependencies-graph.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import semver from 'semver';
import { PackageInfo } from '@pnpm/lockfile.types';
import { LockfilePackageInfo } from '@pnpm/lockfile.types';
import * as dp from '@pnpm/dependency-path';

export type PackagesMap = Map<string, PackageAttributes>;

export type PackageAttributes = PackageInfo & {
export type PackageAttributes = LockfilePackageInfo & {
component?: {
scope: string;
name: string;
Expand Down
55 changes: 27 additions & 28 deletions workspace.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@
"@mdx-js/react": "1.6.22",
"@monaco-editor/react": "4.4.6",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
"@pnpm/client": "900.0.1",
"@pnpm/client": "1000.0.12",
"@pnpm/colorize-semver-diff": "1.0.1",
"@pnpm/config": "900.0.0",
"@pnpm/core": "900.0.1",
"@pnpm/default-reporter": "900.0.0",
"@pnpm/dependency-path": "900.0.0",
"@pnpm/error": "900.0.0",
"@pnpm/fetch": "900.0.0",
"@pnpm/list": "^900.0.0",
"@pnpm/lockfile.filtering": "^900.0.0",
"@pnpm/lockfile.fs": "^900.0.0",
"@pnpm/lockfile.types": "^900.0.0",
"@pnpm/logger": "900.0.0",
"@pnpm/modules-yaml": "900.0.0",
"@pnpm/network.ca-file": "3.0.0",
"@pnpm/config": "1002.5.4",
"@pnpm/core": "1005.0.1",
"@pnpm/default-reporter": "1001.3.8",
"@pnpm/dependency-path": "1000.0.5",
"@pnpm/error": "1000.0.2",
"@pnpm/fetch": "1000.1.5",
"@pnpm/list": "^1000.0.12",
"@pnpm/lockfile.filtering": "^1001.0.7",
"@pnpm/lockfile.fs": "^1001.1.7",
"@pnpm/lockfile.types": "^1001.0.4",
"@pnpm/logger": "1000.0.0",
"@pnpm/modules-yaml": "1000.2.0",
"@pnpm/network.ca-file": "3.0.2",
"@pnpm/node-fetch": "^1.0.0",
"@pnpm/package-store": "900.0.0",
"@pnpm/parse-overrides": "900.0.0",
"@pnpm/pick-registry-for-package": "900.0.0",
"@pnpm/plugin-commands-publishing": "900.0.1",
"@pnpm/plugin-commands-rebuild": "900.0.1",
"@pnpm/registry-mock": "3.44.0",
"@pnpm/reviewing.dependencies-hierarchy": "^900.0.0",
"@pnpm/package-store": "1001.0.1",
"@pnpm/parse-overrides": "1000.0.2",
"@pnpm/pick-registry-for-package": "1000.0.4",
"@pnpm/plugin-commands-publishing": "1000.1.16",
"@pnpm/plugin-commands-rebuild": "1002.0.7",
"@pnpm/registry-mock": "3.48.0",
"@pnpm/reviewing.dependencies-hierarchy": "^1001.0.9",
"@pnpm/semver-diff": "1.1.0",
"@pnpm/sort-packages": "900.0.0",
"@pnpm/store-connection-manager": "900.0.1",
"@pnpm/types": "900.0.0",
"@pnpm/worker": "900.0.0",
"@pnpm/workspace.pkgs-graph": "900.0.1",
"@pnpm/sort-packages": "1000.0.4",
"@pnpm/store-connection-manager": "1000.0.17",
"@pnpm/types": "1000.2.1",
"@pnpm/worker": "1000.1.1",
"@pnpm/workspace.pkgs-graph": "1000.0.9",
"@react-hook/latest": "1.0.3",
"@svgr/webpack": "8.1.0",
"@teambit/any-fs": "0.0.5",
Expand Down Expand Up @@ -153,7 +153,7 @@
"@teambit/defender.ui.test-loader": "^0.0.504",
"@teambit/defender.ui.test-table": "^0.0.510",
"@teambit/dependencies.modules.packages-excluder": "^1.0.8",
"@teambit/dependencies.pnpm.dep-path": "^0.0.2",
"@teambit/dependencies.pnpm.dep-path": "1.0.0",
"@teambit/design.buttons.action-button": "^0.0.3",
"@teambit/design.controls.menu": "^0.0.1",
"@teambit/design.elements.icon": "1.0.5",
Expand Down Expand Up @@ -606,7 +606,6 @@
}
},
"linkCoreAspects": false,
// "packageManager": "teambit.fusepm/aspects/fusepm",
"packageManager": "teambit.dependencies/pnpm",
"rootComponents": true,
"overrides": {
Expand Down