@pnpm/releasing.commands 1100.6.0 → 1100.6.2
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/CHANGELOG.md +42 -0
- package/package.json +23 -23
- package/lib/change/index.d.ts +0 -41
- package/lib/change/index.js +0 -245
- package/lib/deploy/createDeployFiles.d.ts +0 -26
- package/lib/deploy/createDeployFiles.js +0 -255
- package/lib/deploy/deploy.d.ts +0 -12
- package/lib/deploy/deploy.js +0 -398
- package/lib/deploy/deployHook.d.ts +0 -2
- package/lib/deploy/deployHook.js +0 -15
- package/lib/deploy/index.d.ts +0 -2
- package/lib/deploy/index.js +0 -3
- package/lib/index.d.ts +0 -7
- package/lib/lane/index.d.ts +0 -24
- package/lib/lane/index.js +0 -157
- package/lib/pack-app/index.d.ts +0 -2
- package/lib/pack-app/index.js +0 -3
- package/lib/pack-app/packApp.d.ts +0 -22
- package/lib/pack-app/packApp.js +0 -558
- package/lib/publish/FailedToPublishError.d.ts +0 -22
- package/lib/publish/FailedToPublishError.js +0 -40
- package/lib/publish/batchPublish.d.ts +0 -20
- package/lib/publish/batchPublish.js +0 -201
- package/lib/publish/displayError.d.ts +0 -1
- package/lib/publish/displayError.js +0 -23
- package/lib/publish/executeTokenHelper.d.ts +0 -4
- package/lib/publish/executeTokenHelper.js +0 -17
- package/lib/publish/extractManifestFromPacked.d.ts +0 -19
- package/lib/publish/extractManifestFromPacked.js +0 -110
- package/lib/publish/index.d.ts +0 -3
- package/lib/publish/index.js +0 -4
- package/lib/publish/oidc/authToken.d.ts +0 -73
- package/lib/publish/oidc/authToken.js +0 -97
- package/lib/publish/oidc/idToken.d.ts +0 -76
- package/lib/publish/oidc/idToken.js +0 -90
- package/lib/publish/oidc/provenance.d.ts +0 -73
- package/lib/publish/oidc/provenance.js +0 -91
- package/lib/publish/otp.d.ts +0 -38
- package/lib/publish/otp.js +0 -41
- package/lib/publish/otpEnv.d.ts +0 -7
- package/lib/publish/otpEnv.js +0 -5
- package/lib/publish/pack.d.ts +0 -34
- package/lib/publish/pack.js +0 -408
- package/lib/publish/previousChangelog.d.ts +0 -19
- package/lib/publish/previousChangelog.js +0 -182
- package/lib/publish/publish.d.ts +0 -40
- package/lib/publish/publish.js +0 -256
- package/lib/publish/publishPackedPkg.d.ts +0 -79
- package/lib/publish/publishPackedPkg.js +0 -298
- package/lib/publish/recursivePublish.d.ts +0 -18
- package/lib/publish/recursivePublish.js +0 -132
- package/lib/publish/registryConfigKeys.d.ts +0 -30
- package/lib/publish/registryConfigKeys.js +0 -50
- package/lib/publish/utils/shared-context.d.ts +0 -7
- package/lib/publish/utils/shared-context.js +0 -20
- package/lib/stage/approve.d.ts +0 -2
- package/lib/stage/approve.js +0 -14
- package/lib/stage/context.d.ts +0 -14
- package/lib/stage/context.js +0 -25
- package/lib/stage/download.d.ts +0 -2
- package/lib/stage/download.js +0 -32
- package/lib/stage/errors.d.ts +0 -15
- package/lib/stage/errors.js +0 -17
- package/lib/stage/help.d.ts +0 -1
- package/lib/stage/help.js +0 -84
- package/lib/stage/index.d.ts +0 -13
- package/lib/stage/index.js +0 -57
- package/lib/stage/list.d.ts +0 -2
- package/lib/stage/list.js +0 -49
- package/lib/stage/parsing.d.ts +0 -6
- package/lib/stage/parsing.js +0 -27
- package/lib/stage/publish.d.ts +0 -7
- package/lib/stage/publish.js +0 -38
- package/lib/stage/reject.d.ts +0 -2
- package/lib/stage/reject.js +0 -16
- package/lib/stage/rendering.d.ts +0 -11
- package/lib/stage/rendering.js +0 -50
- package/lib/stage/request.d.ts +0 -29
- package/lib/stage/request.js +0 -110
- package/lib/stage/types.d.ts +0 -38
- package/lib/stage/types.js +0 -3
- package/lib/stage/view.d.ts +0 -2
- package/lib/stage/view.js +0 -14
- package/lib/tarball/index.d.ts +0 -2
- package/lib/tarball/index.js +0 -3
- package/lib/tarball/publishSummary.d.ts +0 -47
- package/lib/tarball/publishSummary.js +0 -36
- package/lib/tarball/safeTarballFilename.d.ts +0 -8
- package/lib/tarball/safeTarballFilename.js +0 -21
- package/lib/tarball/summarizeTarball.d.ts +0 -12
- package/lib/tarball/summarizeTarball.js +0 -84
- package/lib/version/index.d.ts +0 -33
- package/lib/version/index.js +0 -337
package/lib/deploy/index.d.ts
DELETED
package/lib/deploy/index.js
DELETED
package/lib/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { change } from './change/index.js';
|
|
2
|
-
export { deploy } from './deploy/index.js';
|
|
3
|
-
export { lane } from './lane/index.js';
|
|
4
|
-
export { packApp } from './pack-app/index.js';
|
|
5
|
-
export { pack, publish } from './publish/index.js';
|
|
6
|
-
export * as stage from './stage/index.js';
|
|
7
|
-
export { version } from './version/index.js';
|
package/lib/lane/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Config } from '@pnpm/config.reader';
|
|
2
|
-
import type { Project, ProjectsGraph } from '@pnpm/types';
|
|
3
|
-
export declare function rcOptionsTypes(): Record<string, unknown>;
|
|
4
|
-
export declare function cliOptionsTypes(): Record<string, unknown>;
|
|
5
|
-
export declare const commandNames: string[];
|
|
6
|
-
/**
|
|
7
|
-
* The reserved name of the default lane: every package is on it unless
|
|
8
|
-
* assigned elsewhere, packages on it release stable versions, and no
|
|
9
|
-
* prerelease lane can take the name.
|
|
10
|
-
*/
|
|
11
|
-
export declare const MAIN_LANE = "main";
|
|
12
|
-
export declare function help(): string;
|
|
13
|
-
export type LaneCommandOptions = Pick<Config, 'dir' | 'filter' | 'versioning' | 'workspaceDir'> & {
|
|
14
|
-
allProjects?: Project[];
|
|
15
|
-
selectedProjectsGraph?: ProjectsGraph;
|
|
16
|
-
};
|
|
17
|
-
export declare function handler(opts: LaneCommandOptions, params: string[]): Promise<string>;
|
|
18
|
-
export declare const lane: {
|
|
19
|
-
handler: typeof handler;
|
|
20
|
-
help: typeof help;
|
|
21
|
-
commandNames: string[];
|
|
22
|
-
cliOptionsTypes: typeof cliOptionsTypes;
|
|
23
|
-
rcOptionsTypes: typeof rcOptionsTypes;
|
|
24
|
-
};
|
package/lib/lane/index.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { PnpmError } from '@pnpm/error';
|
|
2
|
-
import { indexProjectRefs, toProjectDir } from '@pnpm/releasing.versioning';
|
|
3
|
-
import { updateWorkspaceManifest } from '@pnpm/workspace.workspace-manifest-writer';
|
|
4
|
-
import { renderHelp } from 'render-help';
|
|
5
|
-
import { getReleasableProjects } from '../change/index.js';
|
|
6
|
-
export function rcOptionsTypes() {
|
|
7
|
-
return {};
|
|
8
|
-
}
|
|
9
|
-
export function cliOptionsTypes() {
|
|
10
|
-
return {
|
|
11
|
-
recursive: Boolean,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export const commandNames = ['lane'];
|
|
15
|
-
/**
|
|
16
|
-
* The reserved name of the default lane: every package is on it unless
|
|
17
|
-
* assigned elsewhere, packages on it release stable versions, and no
|
|
18
|
-
* prerelease lane can take the name.
|
|
19
|
-
*/
|
|
20
|
-
export const MAIN_LANE = 'main';
|
|
21
|
-
export function help() {
|
|
22
|
-
return renderHelp({
|
|
23
|
-
description: 'Manages per-package release lanes. A lane is a parallel release track: while a package is on one, the bare "pnpm version -r" releases it as X.Y.Z-<lane>.N prereleases while the rest of the workspace keeps releasing stable versions. Moving a package back to the main lane releases its accumulated stable version on the next run. Membership lives under the versioning.lanes key of pnpm-workspace.yaml; this command is a convenience editor for that key.',
|
|
24
|
-
usages: [
|
|
25
|
-
'pnpm lane',
|
|
26
|
-
'pnpm lane <name> --filter <pattern>',
|
|
27
|
-
'pnpm lane main --filter <pattern>',
|
|
28
|
-
],
|
|
29
|
-
descriptionLists: [
|
|
30
|
-
{
|
|
31
|
-
title: 'Options',
|
|
32
|
-
list: [
|
|
33
|
-
{
|
|
34
|
-
description: 'Select the packages to move between lanes',
|
|
35
|
-
name: '--filter <pattern>',
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export async function handler(opts, params) {
|
|
43
|
-
const workspaceDir = opts.workspaceDir;
|
|
44
|
-
if (!workspaceDir) {
|
|
45
|
-
throw new PnpmError('WORKSPACE_ONLY', 'pnpm lane is only supported in a workspace');
|
|
46
|
-
}
|
|
47
|
-
if (params.length === 0) {
|
|
48
|
-
return renderLanes(opts.versioning?.lanes ?? {});
|
|
49
|
-
}
|
|
50
|
-
const laneName = params[0];
|
|
51
|
-
if ((opts.filter ?? []).length === 0) {
|
|
52
|
-
throw new PnpmError('VERSIONING_LANE_FILTER_REQUIRED', 'Select the packages to move with --filter, e.g. "pnpm lane alpha --filter <pkg>..."');
|
|
53
|
-
}
|
|
54
|
-
const refs = indexProjectRefs(opts.allProjects ?? [], workspaceDir);
|
|
55
|
-
const releasableDirs = new Set(getReleasableProjects(opts.allProjects ?? [], workspaceDir, opts.versioning).map((project) => project.dir));
|
|
56
|
-
const selected = Object.values(opts.selectedProjectsGraph ?? {})
|
|
57
|
-
.map((node) => ({
|
|
58
|
-
name: node.package.manifest.name,
|
|
59
|
-
dir: toProjectDir(workspaceDir, node.package.rootDir),
|
|
60
|
-
}))
|
|
61
|
-
.filter((project) => project.name != null && releasableDirs.has(project.dir));
|
|
62
|
-
if (selected.length === 0) {
|
|
63
|
-
throw new PnpmError('VERSIONING_NO_PACKAGES', 'The filter selected no releasable packages');
|
|
64
|
-
}
|
|
65
|
-
// Existing entries may reference projects by name or by directory; resolve
|
|
66
|
-
// them so assignments and removals key on the project, not the spelling.
|
|
67
|
-
const lanes = { ...opts.versioning?.lanes };
|
|
68
|
-
const laneByDir = new Map();
|
|
69
|
-
for (const [key, lane] of Object.entries(lanes)) {
|
|
70
|
-
for (const dir of refs.refToDirs(key)) {
|
|
71
|
-
laneByDir.set(dir, { key, lane });
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
let output;
|
|
75
|
-
if (laneName === MAIN_LANE) {
|
|
76
|
-
for (const project of selected) {
|
|
77
|
-
const existing = laneByDir.get(project.dir);
|
|
78
|
-
if (existing != null) {
|
|
79
|
-
delete lanes[existing.key];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
output = `Moved to the main lane:\n${selected.map((project) => ` ${refFor(project, refs)}\n`).join('')}` +
|
|
83
|
-
'The accumulated stable versions release on the next "pnpm version -r" run.';
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
if (laneName.toLowerCase() === MAIN_LANE) {
|
|
87
|
-
throw new PnpmError('VERSIONING_INVALID_LANE_NAME', `Invalid lane name: ${laneName}. "main" is the reserved default lane; spell it in lowercase to move packages back onto it.`);
|
|
88
|
-
}
|
|
89
|
-
// A purely numeric lane name is rejected because semver parses an
|
|
90
|
-
// all-digit prerelease identifier as a number, which changes sorting
|
|
91
|
-
// semantics.
|
|
92
|
-
if (!/^[0-9A-Z-]+$/i.test(laneName) || /^\d+$/.test(laneName)) {
|
|
93
|
-
throw new PnpmError('VERSIONING_INVALID_LANE_NAME', `Invalid lane name: ${laneName}. Lane names may contain only alphanumerics and hyphens, and cannot be purely numeric.`);
|
|
94
|
-
}
|
|
95
|
-
for (const project of selected) {
|
|
96
|
-
const existing = laneByDir.get(project.dir);
|
|
97
|
-
if (existing != null && existing.lane !== laneName) {
|
|
98
|
-
throw new PnpmError('VERSIONING_ALREADY_ON_LANE', `${refFor(project, refs)} is already on the "${existing.lane}" lane. Move it back with "pnpm lane main" first.`);
|
|
99
|
-
}
|
|
100
|
-
if (existing == null) {
|
|
101
|
-
lanes[refFor(project, refs)] = laneName;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
output = `Moved to the "${laneName}" lane:\n${selected.map((project) => ` ${refFor(project, refs)}\n`).join('')}`;
|
|
105
|
-
}
|
|
106
|
-
const versioning = { ...opts.versioning };
|
|
107
|
-
if (Object.keys(lanes).length > 0) {
|
|
108
|
-
versioning.lanes = lanes;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
delete versioning.lanes;
|
|
112
|
-
}
|
|
113
|
-
await updateWorkspaceManifest(workspaceDir, {
|
|
114
|
-
updatedFields: {
|
|
115
|
-
versioning: Object.keys(versioning).length > 0 ? versioning : undefined,
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
return output;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* How the project is referenced in versioning.lanes and in output: the bare
|
|
122
|
-
* name, or the directory path when the name is shared by several projects.
|
|
123
|
-
*/
|
|
124
|
-
function refFor(project, refs) {
|
|
125
|
-
return refs.nameToDirs(project.name).length > 1 ? `./${project.dir}` : project.name;
|
|
126
|
-
}
|
|
127
|
-
function renderLanes(lanes) {
|
|
128
|
-
const laneEntries = Object.entries(lanes);
|
|
129
|
-
if (laneEntries.length === 0) {
|
|
130
|
-
return 'All packages are on the main lane.';
|
|
131
|
-
}
|
|
132
|
-
const byLane = new Map();
|
|
133
|
-
for (const [ref, laneName] of laneEntries) {
|
|
134
|
-
let members = byLane.get(laneName);
|
|
135
|
-
if (members == null) {
|
|
136
|
-
members = [];
|
|
137
|
-
byLane.set(laneName, members);
|
|
138
|
-
}
|
|
139
|
-
members.push(ref);
|
|
140
|
-
}
|
|
141
|
-
let output = 'Lanes:\n';
|
|
142
|
-
for (const [laneName, members] of Array.from(byLane.entries()).sort(([left], [right]) => left.localeCompare(right))) {
|
|
143
|
-
output += ` ${laneName}:\n`;
|
|
144
|
-
for (const ref of members.sort()) {
|
|
145
|
-
output += ` ${ref}\n`;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return output;
|
|
149
|
-
}
|
|
150
|
-
export const lane = {
|
|
151
|
-
handler,
|
|
152
|
-
help,
|
|
153
|
-
commandNames,
|
|
154
|
-
cliOptionsTypes,
|
|
155
|
-
rcOptionsTypes,
|
|
156
|
-
};
|
|
157
|
-
//# sourceMappingURL=index.js.map
|
package/lib/pack-app/index.d.ts
DELETED
package/lib/pack-app/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Config } from '@pnpm/config.reader';
|
|
2
|
-
export declare const commandNames: string[];
|
|
3
|
-
export declare function rcOptionsTypes(): Record<string, unknown>;
|
|
4
|
-
export declare function cliOptionsTypes(): Record<string, unknown>;
|
|
5
|
-
export declare const shorthands: Record<string, string>;
|
|
6
|
-
export declare function help(): string;
|
|
7
|
-
export type PackAppOptions = Pick<Config, 'dir' | 'pnpmHomeDir'> & Partial<Pick<Config, 'ca' | 'cert' | 'configByUri' | 'httpProxy' | 'httpsProxy' | 'key' | 'localAddress' | 'nodeDownloadMirrors' | 'noProxy' | 'strictSsl' | 'userAgent'>> & {
|
|
8
|
-
entry?: string;
|
|
9
|
-
target?: string | string[];
|
|
10
|
-
runtime?: string;
|
|
11
|
-
outputDir?: string;
|
|
12
|
-
outputName?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function handler(opts: PackAppOptions, params: string[]): Promise<string>;
|
|
15
|
-
/** Fields pack-app reads from `pnpm.app` in package.json. */
|
|
16
|
-
export interface ProjectAppConfig {
|
|
17
|
-
entry?: string;
|
|
18
|
-
targets?: string[];
|
|
19
|
-
runtime?: string;
|
|
20
|
-
outputDir?: string;
|
|
21
|
-
outputName?: string;
|
|
22
|
-
}
|