@pnpm/plugin-commands-patching 1.0.0
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/LICENSE +22 -0
- package/README.md +13 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +31 -0
- package/lib/index.js.map +1 -0
- package/lib/patch.d.ts +11 -0
- package/lib/patch.js +60 -0
- package/lib/patch.js.map +1 -0
- package/lib/patchCommit.d.ts +6 -0
- package/lib/patchCommit.js +101 -0
- package/lib/patchCommit.js.map +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-2016 Rico Sta. Cruz and other contributors
|
|
4
|
+
Copyright (c) 2016-2022 Zoltan Kochan and other contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.patchCommit = exports.patch = void 0;
|
|
27
|
+
const patch = __importStar(require("./patch"));
|
|
28
|
+
exports.patch = patch;
|
|
29
|
+
const patchCommit = __importStar(require("./patchCommit"));
|
|
30
|
+
exports.patchCommit = patchCommit;
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAGvB,sBAAK;AAFd,2DAA4C;AAE5B,kCAAW"}
|
package/lib/patch.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Config } from '@pnpm/config';
|
|
2
|
+
import { LogBase } from '@pnpm/logger';
|
|
3
|
+
import { CreateStoreControllerOptions } from '@pnpm/store-connection-manager';
|
|
4
|
+
export declare const rcOptionsTypes: typeof cliOptionsTypes;
|
|
5
|
+
export declare function cliOptionsTypes(): Pick<any, never>;
|
|
6
|
+
export declare const commandNames: string[];
|
|
7
|
+
export declare function help(): string;
|
|
8
|
+
export declare type PatchCommandOptions = Pick<Config, 'dir' | 'registries' | 'tag' | 'storeDir'> & CreateStoreControllerOptions & {
|
|
9
|
+
reporter?: (logObj: LogBase) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function handler(opts: PatchCommandOptions, params: string[]): Promise<string>;
|
package/lib/patch.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.handler = exports.help = exports.commandNames = exports.cliOptionsTypes = exports.rcOptionsTypes = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const cli_utils_1 = require("@pnpm/cli-utils");
|
|
9
|
+
const config_1 = require("@pnpm/config");
|
|
10
|
+
const store_connection_manager_1 = require("@pnpm/store-connection-manager");
|
|
11
|
+
const parse_wanted_dependency_1 = __importDefault(require("@pnpm/parse-wanted-dependency"));
|
|
12
|
+
const pick_1 = __importDefault(require("ramda/src/pick"));
|
|
13
|
+
const pick_registry_for_package_1 = __importDefault(require("@pnpm/pick-registry-for-package"));
|
|
14
|
+
const render_help_1 = __importDefault(require("render-help"));
|
|
15
|
+
const tempy_1 = __importDefault(require("tempy"));
|
|
16
|
+
exports.rcOptionsTypes = cliOptionsTypes;
|
|
17
|
+
function cliOptionsTypes() {
|
|
18
|
+
return (0, pick_1.default)([], config_1.types);
|
|
19
|
+
}
|
|
20
|
+
exports.cliOptionsTypes = cliOptionsTypes;
|
|
21
|
+
exports.commandNames = ['patch'];
|
|
22
|
+
function help() {
|
|
23
|
+
return (0, render_help_1.default)({
|
|
24
|
+
description: 'Prepare a package for patching',
|
|
25
|
+
descriptionLists: [],
|
|
26
|
+
url: (0, cli_utils_1.docsUrl)('patch'),
|
|
27
|
+
usages: ['pnpm patch'],
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.help = help;
|
|
31
|
+
async function handler(opts, params) {
|
|
32
|
+
const store = await (0, store_connection_manager_1.createOrConnectStoreController)({
|
|
33
|
+
...opts,
|
|
34
|
+
packageImportMethod: 'clone-or-copy',
|
|
35
|
+
});
|
|
36
|
+
const dep = (0, parse_wanted_dependency_1.default)(params[0]);
|
|
37
|
+
const pkgResponse = await store.ctrl.requestPackage(dep, {
|
|
38
|
+
downloadPriority: 1,
|
|
39
|
+
lockfileDir: opts.dir,
|
|
40
|
+
preferredVersions: {},
|
|
41
|
+
projectDir: opts.dir,
|
|
42
|
+
registry: (dep.alias && (0, pick_registry_for_package_1.default)(opts.registries, dep.alias)) ?? opts.registries.default,
|
|
43
|
+
});
|
|
44
|
+
const filesResponse = await pkgResponse.files();
|
|
45
|
+
const tempDir = tempy_1.default.directory();
|
|
46
|
+
const userChangesDir = path_1.default.join(tempDir, 'user');
|
|
47
|
+
await Promise.all([
|
|
48
|
+
store.ctrl.importPackage(path_1.default.join(tempDir, 'source'), {
|
|
49
|
+
filesResponse,
|
|
50
|
+
force: true,
|
|
51
|
+
}),
|
|
52
|
+
store.ctrl.importPackage(userChangesDir, {
|
|
53
|
+
filesResponse,
|
|
54
|
+
force: true,
|
|
55
|
+
}),
|
|
56
|
+
]);
|
|
57
|
+
return `You can now edit the following folder: ${userChangesDir}`;
|
|
58
|
+
}
|
|
59
|
+
exports.handler = handler;
|
|
60
|
+
//# sourceMappingURL=patch.js.map
|
package/lib/patch.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch.js","sourceRoot":"","sources":["../src/patch.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,+CAAyC;AACzC,yCAAwD;AAExD,6EAA6G;AAC7G,4FAAiE;AACjE,0DAAiC;AACjC,gGAAoE;AACpE,8DAAoC;AACpC,kDAAyB;AAEZ,QAAA,cAAc,GAAG,eAAe,CAAA;AAE7C,SAAgB,eAAe;IAC7B,OAAO,IAAA,cAAI,EAAC,EAAE,EAAE,cAAQ,CAAC,CAAA;AAC3B,CAAC;AAFD,0CAEC;AAEY,QAAA,YAAY,GAAG,CAAC,OAAO,CAAC,CAAA;AAErC,SAAgB,IAAI;IAClB,OAAO,IAAA,qBAAU,EAAC;QAChB,WAAW,EAAE,gCAAgC;QAC7C,gBAAgB,EAAE,EAAE;QACpB,GAAG,EAAE,IAAA,mBAAO,EAAC,OAAO,CAAC;QACrB,MAAM,EAAE,CAAC,YAAY,CAAC;KACvB,CAAC,CAAA;AACJ,CAAC;AAPD,oBAOC;AAMM,KAAK,UAAU,OAAO,CAAE,IAAyB,EAAE,MAAgB;IACxE,MAAM,KAAK,GAAG,MAAM,IAAA,yDAA8B,EAAC;QACjD,GAAG,IAAI;QACP,mBAAmB,EAAE,eAAe;KACrC,CAAC,CAAA;IACF,MAAM,GAAG,GAAG,IAAA,iCAAqB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE;QACvD,gBAAgB,EAAE,CAAC;QACnB,WAAW,EAAE,IAAI,CAAC,GAAG;QACrB,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,IAAI,CAAC,GAAG;QACpB,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,IAAA,mCAAsB,EAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO;KACvG,CAAC,CAAA;IACF,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,KAAM,EAAE,CAAA;IAChD,MAAM,OAAO,GAAG,eAAK,CAAC,SAAS,EAAE,CAAA;IACjC,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IACjD,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;YACrD,aAAa;YACb,KAAK,EAAE,IAAI;SACZ,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE;YACvC,aAAa;YACb,KAAK,EAAE,IAAI;SACZ,CAAC;KACH,CAAC,CAAA;IACF,OAAO,0CAA0C,cAAc,EAAE,CAAA;AACnE,CAAC;AA3BD,0BA2BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { install } from '@pnpm/plugin-commands-installation';
|
|
2
|
+
export declare const rcOptionsTypes: typeof cliOptionsTypes;
|
|
3
|
+
export declare function cliOptionsTypes(): Pick<any, never>;
|
|
4
|
+
export declare const commandNames: string[];
|
|
5
|
+
export declare function help(): string;
|
|
6
|
+
export declare function handler(opts: install.InstallCommandOptions, params: string[]): Promise<void>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.handler = exports.help = exports.commandNames = exports.cliOptionsTypes = exports.rcOptionsTypes = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const cli_utils_1 = require("@pnpm/cli-utils");
|
|
10
|
+
const config_1 = require("@pnpm/config");
|
|
11
|
+
const plugin_commands_installation_1 = require("@pnpm/plugin-commands-installation");
|
|
12
|
+
const read_package_json_1 = require("@pnpm/read-package-json");
|
|
13
|
+
const read_project_manifest_1 = require("@pnpm/read-project-manifest");
|
|
14
|
+
const pick_1 = __importDefault(require("ramda/src/pick"));
|
|
15
|
+
const safe_execa_1 = __importDefault(require("safe-execa"));
|
|
16
|
+
const escape_string_regexp_1 = __importDefault(require("escape-string-regexp"));
|
|
17
|
+
const render_help_1 = __importDefault(require("render-help"));
|
|
18
|
+
exports.rcOptionsTypes = cliOptionsTypes;
|
|
19
|
+
function cliOptionsTypes() {
|
|
20
|
+
return (0, pick_1.default)([], config_1.types);
|
|
21
|
+
}
|
|
22
|
+
exports.cliOptionsTypes = cliOptionsTypes;
|
|
23
|
+
exports.commandNames = ['patch-commit'];
|
|
24
|
+
function help() {
|
|
25
|
+
return (0, render_help_1.default)({
|
|
26
|
+
description: 'Generate a patch out of a directory',
|
|
27
|
+
descriptionLists: [],
|
|
28
|
+
url: (0, cli_utils_1.docsUrl)('patch-commit'),
|
|
29
|
+
usages: ['pnpm patch-commit <patchDir>'],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.help = help;
|
|
33
|
+
async function handler(opts, params) {
|
|
34
|
+
const userDir = params[0];
|
|
35
|
+
const srcDir = path_1.default.join(userDir, '../source');
|
|
36
|
+
const patchContent = await diffFolders(srcDir, userDir);
|
|
37
|
+
const lockfileDir = opts.lockfileDir ?? opts.dir ?? process.cwd();
|
|
38
|
+
const patchesDir = path_1.default.join(lockfileDir, 'patches');
|
|
39
|
+
await fs_1.default.promises.mkdir(patchesDir, { recursive: true });
|
|
40
|
+
const patchedPkgManifest = await (0, read_package_json_1.fromDir)(srcDir);
|
|
41
|
+
const pkgNameAndVersion = `${patchedPkgManifest.name}@${patchedPkgManifest.version}`;
|
|
42
|
+
const patchFileName = pkgNameAndVersion.replace('/', '__');
|
|
43
|
+
await fs_1.default.promises.writeFile(path_1.default.join(patchesDir, `${patchFileName}.patch`), patchContent, 'utf8');
|
|
44
|
+
let { manifest, writeProjectManifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(lockfileDir);
|
|
45
|
+
if (!manifest) {
|
|
46
|
+
manifest = {};
|
|
47
|
+
}
|
|
48
|
+
if (!manifest.pnpm) {
|
|
49
|
+
manifest.pnpm = {
|
|
50
|
+
patchedDependencies: {},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
else if (!manifest.pnpm.patchedDependencies) {
|
|
54
|
+
manifest.pnpm.patchedDependencies = {};
|
|
55
|
+
}
|
|
56
|
+
manifest.pnpm.patchedDependencies[pkgNameAndVersion] = `patches/${patchFileName}.patch`;
|
|
57
|
+
await writeProjectManifest(manifest);
|
|
58
|
+
return plugin_commands_installation_1.install.handler(opts);
|
|
59
|
+
}
|
|
60
|
+
exports.handler = handler;
|
|
61
|
+
async function diffFolders(folderA, folderB) {
|
|
62
|
+
const folderAN = folderA.replace(/\\/g, '/');
|
|
63
|
+
const folderBN = folderB.replace(/\\/g, '/');
|
|
64
|
+
let stdout;
|
|
65
|
+
let stderr;
|
|
66
|
+
try {
|
|
67
|
+
const result = await (0, safe_execa_1.default)('git', ['-c', 'core.safecrlf=false', 'diff', '--src-prefix=a/', '--dst-prefix=b/', '--ignore-cr-at-eol', '--full-index', '--no-index', '--text', folderAN, folderBN], {
|
|
68
|
+
cwd: process.cwd(),
|
|
69
|
+
env: {
|
|
70
|
+
...process.env,
|
|
71
|
+
// #region Predictable output
|
|
72
|
+
// These variables aim to ignore the global git config so we get predictable output
|
|
73
|
+
// https://git-scm.com/docs/git#Documentation/git.txt-codeGITCONFIGNOSYSTEMcode
|
|
74
|
+
GIT_CONFIG_NOSYSTEM: '1',
|
|
75
|
+
HOME: '',
|
|
76
|
+
XDG_CONFIG_HOME: '',
|
|
77
|
+
USERPROFILE: '',
|
|
78
|
+
// #endregion
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
stdout = result.stdout;
|
|
82
|
+
stderr = result.stderr;
|
|
83
|
+
}
|
|
84
|
+
catch (err) { // eslint-disable-line
|
|
85
|
+
stdout = err.stdout;
|
|
86
|
+
stderr = err.stderr;
|
|
87
|
+
}
|
|
88
|
+
// we cannot rely on exit code, because --no-index implies --exit-code
|
|
89
|
+
// i.e. git diff will exit with 1 if there were differences
|
|
90
|
+
if (stderr.length > 0)
|
|
91
|
+
throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.\nThe following error was reported by 'git':\n${stderr}`);
|
|
92
|
+
const normalizePath = folderAN.startsWith('/')
|
|
93
|
+
? (p) => p.slice(1)
|
|
94
|
+
: (p) => p;
|
|
95
|
+
return stdout
|
|
96
|
+
.replace(new RegExp(`(a|b)(${(0, escape_string_regexp_1.default)(`/${normalizePath(folderAN)}/`)})`, 'g'), '$1/')
|
|
97
|
+
.replace(new RegExp(`(a|b)${(0, escape_string_regexp_1.default)(`/${normalizePath(folderBN)}/`)}`, 'g'), '$1/')
|
|
98
|
+
.replace(new RegExp((0, escape_string_regexp_1.default)(`${folderAN}/`), 'g'), '')
|
|
99
|
+
.replace(new RegExp((0, escape_string_regexp_1.default)(`${folderBN}/`), 'g'), '');
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=patchCommit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patchCommit.js","sourceRoot":"","sources":["../src/patchCommit.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AACnB,gDAAuB;AACvB,+CAAyC;AACzC,yCAAgD;AAChD,q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AAG,CAAC,EAAE,KAAK,CAAC;SAC7F,OAAO,CAAC,IAAI,MAAM,CAAC,IAAA,8BAAkB,EAAC,GAAG,QAAQ,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;SAChE,OAAO,CAAC,IAAI,MAAM,CAAC,IAAA,8BAAkB,EAAC,GAAG,QAAQ,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAA;AACrE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pnpm/plugin-commands-patching",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Commands for creating patches",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"!*.map"
|
|
10
|
+
],
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=14.6"
|
|
13
|
+
},
|
|
14
|
+
"repository": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-patching",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"pnpm7",
|
|
17
|
+
"pnpm",
|
|
18
|
+
"scripts"
|
|
19
|
+
],
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/pnpm/pnpm/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-patching#readme",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@pnpm/logger": "^4.0.0",
|
|
27
|
+
"@pnpm/plugin-commands-patching": "1.0.0",
|
|
28
|
+
"@pnpm/prepare": "0.0.44",
|
|
29
|
+
"@pnpm/registry-mock": "2.20.0",
|
|
30
|
+
"@types/ramda": "0.27.39"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@pnpm/cli-utils": "0.7.14",
|
|
34
|
+
"@pnpm/config": "15.4.0",
|
|
35
|
+
"@pnpm/parse-wanted-dependency": "3.0.0",
|
|
36
|
+
"@pnpm/pick-registry-for-package": "3.0.4",
|
|
37
|
+
"@pnpm/plugin-commands-installation": "10.3.0",
|
|
38
|
+
"@pnpm/read-package-json": "6.0.5",
|
|
39
|
+
"@pnpm/read-project-manifest": "3.0.5",
|
|
40
|
+
"@pnpm/store-connection-manager": "4.1.12",
|
|
41
|
+
"escape-string-regexp": "^4.0.0",
|
|
42
|
+
"ramda": "^0.27.1",
|
|
43
|
+
"render-help": "^1.0.1",
|
|
44
|
+
"safe-execa": "^0.1.1",
|
|
45
|
+
"tempy": "^1.0.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@pnpm/logger": "^4.0.0"
|
|
49
|
+
},
|
|
50
|
+
"funding": "https://opencollective.com/pnpm",
|
|
51
|
+
"exports": {
|
|
52
|
+
".": "./lib/index.js"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"lint": "eslint src/**/*.ts test/**/*.ts",
|
|
56
|
+
"registry-mock": "registry-mock",
|
|
57
|
+
"test:jest": "jest",
|
|
58
|
+
"test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest",
|
|
59
|
+
"_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7776 pnpm run test:e2e",
|
|
60
|
+
"test": "pnpm run compile && pnpm run _test",
|
|
61
|
+
"compile": "tsc --build && pnpm run lint --fix"
|
|
62
|
+
}
|
|
63
|
+
}
|