@pnpm/patching.commands 1100.1.5 → 1100.1.7
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/lib/getPatchedDependency.js +3 -4
- package/lib/patchCommit.js +2 -1
- package/lib/patchRemove.js +1 -1
- package/package.json +21 -22
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { confirm, select } from '@inquirer/prompts';
|
|
3
3
|
import { PnpmError } from '@pnpm/error';
|
|
4
|
-
import { isGitHostedPkgUrl } from '@pnpm/fetching.pick-fetcher';
|
|
5
4
|
import { readCurrentLockfile } from '@pnpm/lockfile.fs';
|
|
6
|
-
import { nameVerFromPkgSnapshot } from '@pnpm/lockfile.utils';
|
|
5
|
+
import { isGitHostedTarballUrl, nameVerFromPkgSnapshot } from '@pnpm/lockfile.utils';
|
|
7
6
|
import { parseWantedDependency } from '@pnpm/resolving.parse-wanted-dependency';
|
|
8
7
|
import { realpathMissing } from 'realpath-missing';
|
|
9
8
|
import semver from 'semver';
|
|
@@ -47,7 +46,7 @@ export async function getPatchedDependency(rawDependency, opts) {
|
|
|
47
46
|
const preferred = preferredVersions[0];
|
|
48
47
|
if (preferred.gitTarballUrl) {
|
|
49
48
|
return {
|
|
50
|
-
...
|
|
49
|
+
...dep,
|
|
51
50
|
applyToAll: false,
|
|
52
51
|
bareSpecifier: preferred.gitTarballUrl,
|
|
53
52
|
};
|
|
@@ -83,7 +82,7 @@ export async function getVersionsFromLockfile(dep, opts) {
|
|
|
83
82
|
const tarball = pkgSnapshot.resolution?.tarball ?? '';
|
|
84
83
|
return {
|
|
85
84
|
...nameVerFromPkgSnapshot(depPath, pkgSnapshot),
|
|
86
|
-
gitTarballUrl: (
|
|
85
|
+
gitTarballUrl: (isGitHostedTarballUrl(tarball) || isPkgPrNewUrl(tarball)) ? tarball : undefined,
|
|
87
86
|
};
|
|
88
87
|
})
|
|
89
88
|
.filter(({ name }) => name === pkgName)
|
package/lib/patchCommit.js
CHANGED
|
@@ -97,11 +97,12 @@ export async function handler(opts, params) {
|
|
|
97
97
|
...opts,
|
|
98
98
|
workspaceDir: opts.workspaceDir ?? opts.rootProjectManifestDir,
|
|
99
99
|
});
|
|
100
|
-
|
|
100
|
+
await install.handler({
|
|
101
101
|
...opts,
|
|
102
102
|
patchedDependencies,
|
|
103
103
|
frozenLockfile: false,
|
|
104
104
|
});
|
|
105
|
+
return undefined;
|
|
105
106
|
}
|
|
106
107
|
async function getPatchContent(ctx, opts) {
|
|
107
108
|
const storeDir = await getStorePath({
|
package/lib/patchRemove.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/patching.commands",
|
|
3
|
-
"version": "1100.1.
|
|
3
|
+
"version": "1100.1.7",
|
|
4
4
|
"description": "Commands for creating patches",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"funding": "https://opencollective.com/pnpm",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/pnpm/pnpm/tree/main/patching/commands"
|
|
14
|
+
"url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/patching/commands"
|
|
15
15
|
},
|
|
16
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/patching/commands#readme",
|
|
16
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/patching/commands#readme",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
19
19
|
},
|
|
@@ -41,26 +41,25 @@
|
|
|
41
41
|
"semver": "^7.8.4",
|
|
42
42
|
"terminal-link": "^5.0.0",
|
|
43
43
|
"tinyglobby": "^0.2.16",
|
|
44
|
-
"@pnpm/config.reader": "1101.
|
|
44
|
+
"@pnpm/config.reader": "1101.10.1",
|
|
45
|
+
"@pnpm/cli.utils": "1101.0.13",
|
|
46
|
+
"@pnpm/config.writer": "1100.0.14",
|
|
45
47
|
"@pnpm/constants": "1100.0.0",
|
|
46
|
-
"@pnpm/config.writer": "1100.0.13",
|
|
47
48
|
"@pnpm/crypto.hash": "1100.0.1",
|
|
49
|
+
"@pnpm/error": "1100.0.1",
|
|
50
|
+
"@pnpm/installing.commands": "1100.10.1",
|
|
48
51
|
"@pnpm/fs.packlist": "1100.0.1",
|
|
49
|
-
"@pnpm/installing.commands": "1100.9.0",
|
|
50
52
|
"@pnpm/installing.modules-yaml": "1100.0.9",
|
|
51
|
-
"@pnpm/
|
|
52
|
-
"@pnpm/lockfile.utils": "1100.0
|
|
53
|
-
"@pnpm/patching.apply-patch": "1100.0.
|
|
54
|
-
"@pnpm/pkg-manifest.reader": "1100.0.
|
|
53
|
+
"@pnpm/lockfile.fs": "1100.1.7",
|
|
54
|
+
"@pnpm/lockfile.utils": "1100.1.0",
|
|
55
|
+
"@pnpm/patching.apply-patch": "1100.0.3",
|
|
56
|
+
"@pnpm/pkg-manifest.reader": "1100.0.9",
|
|
57
|
+
"@pnpm/store.connection-manager": "1100.3.2",
|
|
55
58
|
"@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
|
|
56
|
-
"@pnpm/store.
|
|
57
|
-
"@pnpm/store.path": "1100.0.1",
|
|
59
|
+
"@pnpm/store.path": "1100.0.2",
|
|
58
60
|
"@pnpm/types": "1101.3.2",
|
|
59
|
-
"@pnpm/workspace.project-manifest-reader": "1100.0.
|
|
60
|
-
"@pnpm/workspace.workspace-manifest-reader": "1100.0.
|
|
61
|
-
"@pnpm/error": "1100.0.0",
|
|
62
|
-
"@pnpm/fetching.pick-fetcher": "1100.0.12",
|
|
63
|
-
"@pnpm/lockfile.fs": "1100.1.5"
|
|
61
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.14",
|
|
62
|
+
"@pnpm/workspace.workspace-manifest-reader": "1100.0.9"
|
|
64
63
|
},
|
|
65
64
|
"peerDependencies": {
|
|
66
65
|
"@pnpm/logger": "^1100.0.0"
|
|
@@ -74,12 +73,12 @@
|
|
|
74
73
|
"tempy": "3.0.0",
|
|
75
74
|
"write-yaml-file": "^6.0.0",
|
|
76
75
|
"@pnpm/logger": "1100.0.0",
|
|
77
|
-
"@pnpm/patching.commands": "1100.1.
|
|
78
|
-
"@pnpm/prepare": "1100.0.
|
|
76
|
+
"@pnpm/patching.commands": "1100.1.7",
|
|
77
|
+
"@pnpm/prepare": "1100.0.17",
|
|
79
78
|
"@pnpm/test-fixtures": "1100.0.0",
|
|
80
|
-
"@pnpm/testing.command-defaults": "1100.0.
|
|
81
|
-
"@pnpm/testing.registry-mock": "1100.0.
|
|
82
|
-
"@pnpm/workspace.projects-filter": "1100.0.
|
|
79
|
+
"@pnpm/testing.command-defaults": "1100.0.7",
|
|
80
|
+
"@pnpm/testing.registry-mock": "1100.0.7",
|
|
81
|
+
"@pnpm/workspace.projects-filter": "1100.0.23"
|
|
83
82
|
},
|
|
84
83
|
"engines": {
|
|
85
84
|
"node": ">=22.13"
|