@wtf/release-npm 3.0.0 → 3.1.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/README.md +27 -12
- package/dist/check.d.ts +0 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js.map +1 -1
- package/dist/ecosystem.d.ts +0 -1
- package/dist/ecosystem.d.ts.map +1 -1
- package/dist/ecosystem.js.map +1 -1
- package/dist/errors.d.ts +11 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/manifests.d.ts +0 -1
- package/dist/manifests.d.ts.map +1 -1
- package/dist/manifests.js.map +1 -1
- package/dist/placeholder.d.ts +168 -0
- package/dist/placeholder.d.ts.map +1 -0
- package/dist/placeholder.js +355 -0
- package/dist/placeholder.js.map +1 -0
- package/dist/prepare.d.ts.map +1 -1
- package/dist/prepare.js +0 -1
- package/dist/prepare.js.map +1 -1
- package/dist/publishers.d.ts.map +1 -1
- package/dist/publishers.js +4 -1
- package/dist/publishers.js.map +1 -1
- package/dist/registry.d.ts +283 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +314 -0
- package/dist/registry.js.map +1 -0
- package/dist/release.d.ts.map +1 -1
- package/dist/release.js +0 -1
- package/dist/release.js.map +1 -1
- package/dist/smoke.d.ts +14 -1
- package/dist/smoke.d.ts.map +1 -1
- package/dist/smoke.js +9 -1
- package/dist/smoke.js.map +1 -1
- package/dist/trust.d.ts +246 -0
- package/dist/trust.d.ts.map +1 -0
- package/dist/trust.js +343 -0
- package/dist/trust.js.map +1 -0
- package/dist/workspace.d.ts +0 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js.map +1 -1
- package/package.json +21 -7
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm's registry, asked and changed by a maintainer, of no release: what `./placeholder` and
|
|
3
|
+
* `./trust` build on. The packages a command is of ({@link targetsOf}), each of the workspace that
|
|
4
|
+
* publishes to npm's registry, or each named; npm asked of a package ({@link viewPackage}), its
|
|
5
|
+
* output read and its error told ({@link readNpm}); npm's version held to what a command needs
|
|
6
|
+
* ({@link requireNpm}); and npm run on the maintainer's terminal ({@link onTerminal}), where it
|
|
7
|
+
* asks for a one-time password, by the {@link TerminalRun} the caller gives.
|
|
8
|
+
*
|
|
9
|
+
* Each npm command names npm's registry, and the registry of the package's scope, as
|
|
10
|
+
* {@link registryFlagsOf} gives them: a maintainer's `.npmrc` may name another registry of the
|
|
11
|
+
* scope, as of GitLab's, where the release does not publish. `npm trust` is given npm's registry
|
|
12
|
+
* alone: npm 11 refuses a flag its trust commands do not declare, as the registry of a scope, and
|
|
13
|
+
* their requests name no package spec, so the registry of a scope would not apply to them.
|
|
14
|
+
*
|
|
15
|
+
* npm 11 and npm 12 differ in what they write: `npm view --json` of several fields gives an object
|
|
16
|
+
* on npm 11, and an array of one object on npm 12, which {@link viewPackage} reads both of.
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* import type { FileSystemDirectoryHandle } from '@wtf/platform/fs'
|
|
20
|
+
* import { targetsOf } from '@wtf/release-npm/registry'
|
|
21
|
+
*
|
|
22
|
+
* declare const root: FileSystemDirectoryHandle
|
|
23
|
+
*
|
|
24
|
+
* // Each package of the workspace that publishes to npm's registry; each other skipped, and why.
|
|
25
|
+
* const targets = await targetsOf(root, [])
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @packageDocumentation
|
|
29
|
+
*/
|
|
30
|
+
import type { ProcessPlatform } from '@wtf/platform';
|
|
31
|
+
import type { FileSystemDirectoryHandle } from '@wtf/platform/fs';
|
|
32
|
+
import type { RepoContext, RepoPlatform } from '@wtf/release';
|
|
33
|
+
import { NpmError } from './errors.ts';
|
|
34
|
+
/**
|
|
35
|
+
* What asks npm's registry: the platform's programs, of the folder of the repo, and its timers and
|
|
36
|
+
* wall time, which a wait for a package and the window of an unpublish are counted by.
|
|
37
|
+
*/
|
|
38
|
+
export type RegistryPlatform = RepoPlatform & Pick<ProcessPlatform, 'setTimeout' | 'clearTimeout' | 'performance'>;
|
|
39
|
+
/**
|
|
40
|
+
* Runs `command` with `args` on the terminal of the person who runs it, its input and its output the
|
|
41
|
+
* terminal's, so npm can ask for a one-time password, and gives the code it exited with. No web
|
|
42
|
+
* standard and no platform of ours gives a process a terminal: the caller gives this, as a bin on
|
|
43
|
+
* Node gives `spawn` of `node:child_process` with `stdio: 'inherit'`.
|
|
44
|
+
*
|
|
45
|
+
* @param command - The command, by its name on the path of the environment.
|
|
46
|
+
* @param args - Its arguments, each as it is, of no shell.
|
|
47
|
+
* @param options - The folder it runs in, absolute, and its whole environment.
|
|
48
|
+
* @returns The code it exited with.
|
|
49
|
+
*/
|
|
50
|
+
export type TerminalRun = (command: string, args: readonly string[], options: {
|
|
51
|
+
readonly cwd: string;
|
|
52
|
+
readonly env: Readonly<Record<string, string>>;
|
|
53
|
+
}) => Promise<number>;
|
|
54
|
+
/**
|
|
55
|
+
* Where a command of a maintainer runs: the folder of the repo and the platform, the terminal npm
|
|
56
|
+
* changes a package on, whether it changes nothing, and where it says what it waits for.
|
|
57
|
+
*
|
|
58
|
+
* @typeParam P - What the command takes of the platform.
|
|
59
|
+
*/
|
|
60
|
+
export interface RegistryContext<P extends RegistryPlatform = RegistryPlatform> extends RepoContext<P> {
|
|
61
|
+
/** What runs npm on the terminal, for each change of a package. */
|
|
62
|
+
readonly terminal: TerminalRun;
|
|
63
|
+
/** Whether to change nothing, and say what would change. */
|
|
64
|
+
readonly dryRun: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Where a line of progress goes, as of a wait for a package: nowhere by default.
|
|
67
|
+
*
|
|
68
|
+
* @param line - The line.
|
|
69
|
+
*/
|
|
70
|
+
readonly log?: ((line: string) => void) | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** A failure of a package, as a record gives it: the code, what is wrong, and how to fix it. */
|
|
73
|
+
export interface Failure {
|
|
74
|
+
/** The stable code, of `NPM_ERRORS` of `./errors`. */
|
|
75
|
+
readonly code: string;
|
|
76
|
+
/** What is wrong. */
|
|
77
|
+
readonly message: string;
|
|
78
|
+
/** How to fix it. */
|
|
79
|
+
readonly details: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The failure of what was thrown: of a `ReleaseError`, its code, message and details; of any other,
|
|
83
|
+
* `ENPMREAD` of its message.
|
|
84
|
+
*
|
|
85
|
+
* @param error - What was thrown.
|
|
86
|
+
* @returns The failure.
|
|
87
|
+
*/
|
|
88
|
+
export declare function failureOf(error: unknown): Failure;
|
|
89
|
+
/** A package a command skips: of a registry other than npm's, or private. */
|
|
90
|
+
export interface Skipped {
|
|
91
|
+
/** The name of the package. */
|
|
92
|
+
readonly name: string;
|
|
93
|
+
/** It is skipped. */
|
|
94
|
+
readonly status: 'skipped';
|
|
95
|
+
/** Why. */
|
|
96
|
+
readonly reason: string;
|
|
97
|
+
}
|
|
98
|
+
/** A package a command failed of. */
|
|
99
|
+
export interface Failed {
|
|
100
|
+
/** The name of the package. */
|
|
101
|
+
readonly name: string;
|
|
102
|
+
/** It failed. */
|
|
103
|
+
readonly status: 'failed';
|
|
104
|
+
/** Why, and how to fix it. */
|
|
105
|
+
readonly error: Failure;
|
|
106
|
+
}
|
|
107
|
+
/** A package a command is of: ready, of its manifest; skipped; or failed, as of a name unknown. */
|
|
108
|
+
export type Target = {
|
|
109
|
+
/** The name of the package. */
|
|
110
|
+
readonly name: string;
|
|
111
|
+
/** It is ready. */
|
|
112
|
+
readonly status: 'ready';
|
|
113
|
+
/** Its package.json. */
|
|
114
|
+
readonly manifest: Readonly<Record<string, unknown>>;
|
|
115
|
+
} | Skipped | Failed;
|
|
116
|
+
/**
|
|
117
|
+
* Whether `registry` is npm's: none, of a package of no `publishConfig.registry`, publishes there.
|
|
118
|
+
*
|
|
119
|
+
* @param registry - The URL of the registry, or `undefined`.
|
|
120
|
+
* @returns Whether it is npm's registry.
|
|
121
|
+
*/
|
|
122
|
+
export declare function isNpmjs(registry: string | undefined): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* The packages a command is of: each of `names`, by its name in the workspace at `root`; of none,
|
|
125
|
+
* each package of the workspace that is not private, as `publishableOf` of `./workspace` reads
|
|
126
|
+
* them. Each is ready of npm's registry, skipped of a private one or of another registry, with the
|
|
127
|
+
* reason, and failed of a name of no package of the workspace (`ENPMPACKAGE`).
|
|
128
|
+
*
|
|
129
|
+
* @param root - The folder of the workspace.
|
|
130
|
+
* @param names - The names of the packages: every one that publishes of none.
|
|
131
|
+
* @returns The targets, in the order of the names, or of the workspace.
|
|
132
|
+
*/
|
|
133
|
+
export declare function targetsOf(root: FileSystemDirectoryHandle, names: readonly string[]): Promise<Target[]>;
|
|
134
|
+
/**
|
|
135
|
+
* The flags of an npm command of a package: npm's registry, and npm's registry of its scope, so
|
|
136
|
+
* a scope an `.npmrc` maps to another registry is asked and changed on npm's. `npm trust` takes
|
|
137
|
+
* npm's registry alone: npm 11 refuses the flag of the registry of a scope of its trust commands,
|
|
138
|
+
* `EUSAGE`, as they declare their own flags, and their requests name no package spec, so
|
|
139
|
+
* `--registry` alone decides where they go.
|
|
140
|
+
*
|
|
141
|
+
* @param name - The name of the package, as `@acme/core`.
|
|
142
|
+
* @param args - The arguments of npm, as `['trust', 'list', '@acme/core']`: of no `trust`, by
|
|
143
|
+
* default, the flags of both registries.
|
|
144
|
+
* @returns The flags.
|
|
145
|
+
*/
|
|
146
|
+
export declare const registryFlagsOf: (name: string, args?: readonly string[]) => string[];
|
|
147
|
+
/**
|
|
148
|
+
* What npm wrote of a command, and the code it exited with, of {@link readNpm}: whether it said
|
|
149
|
+
* its registry holds no such package, of `E404`.
|
|
150
|
+
*/
|
|
151
|
+
export interface NpmRead {
|
|
152
|
+
/** What it wrote on its stdout. */
|
|
153
|
+
readonly stdout: string;
|
|
154
|
+
/** What it wrote on its stderr. */
|
|
155
|
+
readonly stderr: string;
|
|
156
|
+
/** The code it exited with. */
|
|
157
|
+
readonly code: number;
|
|
158
|
+
/** Whether it failed of a package or a version its registry does not hold. */
|
|
159
|
+
readonly notFound: boolean;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Runs `npm <args>`, of the flags of the registry of `name` ({@link registryFlagsOf}), in the
|
|
163
|
+
* folder of the repo, and gives what it wrote, read and not shown, as a question of a package is.
|
|
164
|
+
* npm cannot ask for a one-time password of it: a question that wants one fails, as
|
|
165
|
+
* {@link readFailureOf} tells. A command that cannot start rejects with `ENPMREAD`.
|
|
166
|
+
*
|
|
167
|
+
* @param name - The name of the package the command is of.
|
|
168
|
+
* @param args - The arguments of npm, as `['view', '@acme/core', '--json']`.
|
|
169
|
+
* @param context - The platform npm runs by.
|
|
170
|
+
* @returns What npm wrote, its exit code, and whether it failed of a package its registry lacks.
|
|
171
|
+
*/
|
|
172
|
+
export declare function readNpm(name: string, args: readonly string[], { platform }: {
|
|
173
|
+
readonly platform: RepoPlatform;
|
|
174
|
+
}): Promise<NpmRead>;
|
|
175
|
+
/**
|
|
176
|
+
* The error of a question of npm that failed, by what it wrote: `ENPMOTP` of one that wants a
|
|
177
|
+
* one-time password, `ENPMLOGIN` of one that wants a login, and `ENPMREAD` of any other, each with
|
|
178
|
+
* what npm wrote on its stderr.
|
|
179
|
+
*
|
|
180
|
+
* @param command - The command, as `npm view @acme/core`, as the message names it.
|
|
181
|
+
* @param read - What npm wrote, and its exit code.
|
|
182
|
+
* @returns The error.
|
|
183
|
+
*/
|
|
184
|
+
export declare function readFailureOf(command: string, read: Pick<NpmRead, 'stdout' | 'stderr' | 'code'>): NpmError;
|
|
185
|
+
/** What npm's registry holds of a package: its versions, its dist-tags, and when each was published. */
|
|
186
|
+
export interface PackageView {
|
|
187
|
+
/** Its versions, in the order npm gives them. */
|
|
188
|
+
readonly versions: readonly string[];
|
|
189
|
+
/** Its dist-tags, each to the version it points at. */
|
|
190
|
+
readonly distTags: Readonly<Record<string, string>>;
|
|
191
|
+
/** When each version was published, as an ISO date, of `npm view <name> time`. */
|
|
192
|
+
readonly time: Readonly<Record<string, string>>;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The JSON of `npm view --json` of several fields: npm 11 writes an object, and npm 12 an array of
|
|
196
|
+
* an object of each version it views, of which a view of a package's `latest` gives one.
|
|
197
|
+
*
|
|
198
|
+
* @param json - What npm wrote, parsed.
|
|
199
|
+
* @returns The object, of the last version npm viewed; `undefined` of no object.
|
|
200
|
+
*/
|
|
201
|
+
export declare function viewedOf(json: unknown): Record<string, unknown> | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* What npm's registry holds of the package `name`, by
|
|
204
|
+
* `npm view <name> versions dist-tags time --json`, as npm 11 and npm 12 write it
|
|
205
|
+
* ({@link viewedOf}): `undefined` of a package it does not hold, of npm's `E404` alone, as of a name
|
|
206
|
+
* it never had, one unpublished whole, or one the account cannot read. Throws the error of
|
|
207
|
+
* {@link readFailureOf} of any other failure, and `ENPMREAD` of output it cannot read, as of no
|
|
208
|
+
* versions: a reader that is not sure never takes a package as absent.
|
|
209
|
+
*
|
|
210
|
+
* @param name - The name of the package.
|
|
211
|
+
* @param context - The platform npm runs by.
|
|
212
|
+
* @returns What it holds, or `undefined`.
|
|
213
|
+
*/
|
|
214
|
+
export declare function viewPackage(name: string, context: {
|
|
215
|
+
readonly platform: RepoPlatform;
|
|
216
|
+
}): Promise<PackageView | undefined>;
|
|
217
|
+
/** How often {@link waitForPackage} asks npm again: every 30 seconds. */
|
|
218
|
+
export declare const WAIT_INTERVAL = 30000;
|
|
219
|
+
/**
|
|
220
|
+
* What npm's registry holds of the package `name`, as {@link viewPackage} reads it, asked again
|
|
221
|
+
* every {@link WAIT_INTERVAL} until it holds it or `seconds` have passed, as of a package published
|
|
222
|
+
* a moment ago, which npm's registry may not show for a few minutes.
|
|
223
|
+
*
|
|
224
|
+
* @param name - The name of the package.
|
|
225
|
+
* @param seconds - How long to wait for it: 0 asks once.
|
|
226
|
+
* @param context - The platform npm runs by, and where each wait is said.
|
|
227
|
+
* @returns What it holds, or `undefined` once the wait is over.
|
|
228
|
+
*/
|
|
229
|
+
export declare function waitForPackage(name: string, seconds: number, context: Pick<RegistryContext, 'platform' | 'log'>): Promise<PackageView | undefined>;
|
|
230
|
+
/** The npm the trust commands need: `--allow-publish` came in npm 11.15. */
|
|
231
|
+
export declare const TRUST_NPM = "11.15.0";
|
|
232
|
+
/**
|
|
233
|
+
* The version of the npm that runs, of `npm --version`. Throws `ENPMREAD` of an npm that fails, or
|
|
234
|
+
* gives no version.
|
|
235
|
+
*
|
|
236
|
+
* @param context - The platform npm runs by.
|
|
237
|
+
* @returns The version, as `11.15.0`.
|
|
238
|
+
*/
|
|
239
|
+
export declare function npmVersionOf({ platform }: {
|
|
240
|
+
readonly platform: RepoPlatform;
|
|
241
|
+
}): Promise<string>;
|
|
242
|
+
/**
|
|
243
|
+
* The version of the npm that runs, held to `minimum`. Throws `ENPMVERSION` of an older one, with
|
|
244
|
+
* the command that updates it: npm 11 of its line from 11.15, as npm 12 does not run on Node 24.0
|
|
245
|
+
* to 24.14.
|
|
246
|
+
*
|
|
247
|
+
* @param context - The platform npm runs by.
|
|
248
|
+
* @param minimum - The version the command needs: {@link TRUST_NPM} by default.
|
|
249
|
+
* @returns The version.
|
|
250
|
+
*/
|
|
251
|
+
export declare function requireNpm(context: {
|
|
252
|
+
readonly platform: RepoPlatform;
|
|
253
|
+
}, minimum?: string): Promise<string>;
|
|
254
|
+
/**
|
|
255
|
+
* Runs `npm <args>`, of the flags of the registry of `name` ({@link registryFlagsOf}), on the
|
|
256
|
+
* terminal of the context, in the folder of the repo, of the platform's environment: npm shows what
|
|
257
|
+
* it does, and asks for a one-time password there, or reads one of `npm_config_otp`.
|
|
258
|
+
*
|
|
259
|
+
* @param name - The name of the package the command is of.
|
|
260
|
+
* @param args - The arguments of npm.
|
|
261
|
+
* @param context - The platform, and the terminal npm runs on.
|
|
262
|
+
* @returns The code npm exited with.
|
|
263
|
+
*/
|
|
264
|
+
export declare function onTerminal(name: string, args: readonly string[], context: Pick<RegistryContext, 'platform' | 'terminal'>): Promise<number>;
|
|
265
|
+
/**
|
|
266
|
+
* The error of a change of npm that failed on the terminal, where npm said why: its output is the
|
|
267
|
+
* terminal's, so the error says what to do of what npm said.
|
|
268
|
+
*
|
|
269
|
+
* @param command - The command, as `npm publish`, as the message names it.
|
|
270
|
+
* @param code - The code npm exited with.
|
|
271
|
+
* @returns The error.
|
|
272
|
+
*/
|
|
273
|
+
export declare function writeFailureOf(command: string, code: number): NpmError;
|
|
274
|
+
/**
|
|
275
|
+
* The command line of `npm <args>` of the package `name`, of the flags of its registry, as a person
|
|
276
|
+
* runs it by hand, and as a dry run says it.
|
|
277
|
+
*
|
|
278
|
+
* @param name - The name of the package the command is of.
|
|
279
|
+
* @param args - The arguments of npm.
|
|
280
|
+
* @returns The command line.
|
|
281
|
+
*/
|
|
282
|
+
export declare const npmCommandOf: (name: string, args: readonly string[]) => string;
|
|
283
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAK7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAItC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GACzC,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,cAAc,GAAG,aAAa,CAAC,CAAA;AAEtE;;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AsB,YAAY,CAAC,EACjC,QAAQ,EACT,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;CAChC,GAAG,OAAO,CAAC,MAAM,CAAC,CAclB;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,EAC5C,OAAO,SAAY,GAClB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,UAAU,CAAC,GACtD,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAMtE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,MAAM,SAAS,MAAM,EAAE,KAAG,MACT,CAAA"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { sleep, wallTime } from '@wtf/platform/timers';
|
|
2
|
+
import { isReleaseError } from '@wtf/release/errors';
|
|
3
|
+
import { envOf, run } from '@wtf/release/process';
|
|
4
|
+
import semver from 'semver';
|
|
5
|
+
import { NpmError } from "./errors.js";
|
|
6
|
+
import { NPM_REGISTRY } from "./publishers.js";
|
|
7
|
+
import { publishableOf, readWorkspace } from "./workspace.js";
|
|
8
|
+
/**
|
|
9
|
+
* The failure of what was thrown: of a `ReleaseError`, its code, message and details; of any other,
|
|
10
|
+
* `ENPMREAD` of its message.
|
|
11
|
+
*
|
|
12
|
+
* @param error - What was thrown.
|
|
13
|
+
* @returns The failure.
|
|
14
|
+
*/
|
|
15
|
+
export function failureOf(error) {
|
|
16
|
+
if (isReleaseError(error))
|
|
17
|
+
return { code: error.code, message: error.message, details: error.details };
|
|
18
|
+
return {
|
|
19
|
+
code: 'ENPMREAD',
|
|
20
|
+
message: error instanceof Error ? error.message : String(error),
|
|
21
|
+
details: 'Run the command again; of the same error, report it.'
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Whether `registry` is npm's: none, of a package of no `publishConfig.registry`, publishes there.
|
|
26
|
+
*
|
|
27
|
+
* @param registry - The URL of the registry, or `undefined`.
|
|
28
|
+
* @returns Whether it is npm's registry.
|
|
29
|
+
*/
|
|
30
|
+
export function isNpmjs(registry) {
|
|
31
|
+
if (registry === undefined)
|
|
32
|
+
return true;
|
|
33
|
+
try {
|
|
34
|
+
return new URL(registry).host === new URL(NPM_REGISTRY).host;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** The target of a package of the workspace: ready of npm's registry, skipped of another. */
|
|
41
|
+
function targetOf(name, json) {
|
|
42
|
+
if (json['private'] === true)
|
|
43
|
+
return { name, status: 'skipped', reason: 'it is private, so it publishes nowhere' };
|
|
44
|
+
const registry = json['publishConfig']?.registry;
|
|
45
|
+
if (!isNpmjs(typeof registry === 'string' ? registry : undefined))
|
|
46
|
+
return {
|
|
47
|
+
name,
|
|
48
|
+
status: 'skipped',
|
|
49
|
+
reason: `it publishes to ${String(registry)}, not npm's registry: no trusted publishing of npm, and no placeholder needed`
|
|
50
|
+
};
|
|
51
|
+
return { name, status: 'ready', manifest: json };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The packages a command is of: each of `names`, by its name in the workspace at `root`; of none,
|
|
55
|
+
* each package of the workspace that is not private, as `publishableOf` of `./workspace` reads
|
|
56
|
+
* them. Each is ready of npm's registry, skipped of a private one or of another registry, with the
|
|
57
|
+
* reason, and failed of a name of no package of the workspace (`ENPMPACKAGE`).
|
|
58
|
+
*
|
|
59
|
+
* @param root - The folder of the workspace.
|
|
60
|
+
* @param names - The names of the packages: every one that publishes of none.
|
|
61
|
+
* @returns The targets, in the order of the names, or of the workspace.
|
|
62
|
+
*/
|
|
63
|
+
export async function targetsOf(root, names) {
|
|
64
|
+
const packages = await readWorkspace(root);
|
|
65
|
+
if (names.length === 0)
|
|
66
|
+
return publishableOf(packages).flatMap(({ name, json }) => name === undefined ? [] : [targetOf(name, json)]);
|
|
67
|
+
return [...new Set(names)].map((name) => {
|
|
68
|
+
const found = packages.find((each) => each.name === name);
|
|
69
|
+
return found === undefined
|
|
70
|
+
? {
|
|
71
|
+
name,
|
|
72
|
+
status: 'failed',
|
|
73
|
+
error: {
|
|
74
|
+
code: 'ENPMPACKAGE',
|
|
75
|
+
message: `No package of the workspace is named ${name}.`,
|
|
76
|
+
details: `Name a package of the workspace: ${packages.flatMap((each) => (each.name === undefined ? [] : [each.name])).join(', ')}.`
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
: targetOf(name, found.json);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The flags of an npm command of a package: npm's registry, and npm's registry of its scope, so
|
|
84
|
+
* a scope an `.npmrc` maps to another registry is asked and changed on npm's. `npm trust` takes
|
|
85
|
+
* npm's registry alone: npm 11 refuses the flag of the registry of a scope of its trust commands,
|
|
86
|
+
* `EUSAGE`, as they declare their own flags, and their requests name no package spec, so
|
|
87
|
+
* `--registry` alone decides where they go.
|
|
88
|
+
*
|
|
89
|
+
* @param name - The name of the package, as `@acme/core`.
|
|
90
|
+
* @param args - The arguments of npm, as `['trust', 'list', '@acme/core']`: of no `trust`, by
|
|
91
|
+
* default, the flags of both registries.
|
|
92
|
+
* @returns The flags.
|
|
93
|
+
*/
|
|
94
|
+
export const registryFlagsOf = (name, args = []) => {
|
|
95
|
+
const scope = args[0] === 'trust' ? undefined : /^(@[^/]+)\//.exec(name)?.[1];
|
|
96
|
+
return [
|
|
97
|
+
'--registry',
|
|
98
|
+
NPM_REGISTRY,
|
|
99
|
+
...(scope === undefined ? [] : [`--${scope}:registry=${NPM_REGISTRY}`])
|
|
100
|
+
];
|
|
101
|
+
};
|
|
102
|
+
/** npm, of a package or a version its registry does not hold. */
|
|
103
|
+
const NOT_FOUND = /\bE404\b|404 Not Found|is not in this registry/;
|
|
104
|
+
/** npm, of a command that wants a one-time password. */
|
|
105
|
+
const OTP = /\bEOTP\b|one-time pass/i;
|
|
106
|
+
/** npm, of a command that wants a login. */
|
|
107
|
+
const LOGIN = /\bE401\b|\bENEEDAUTH\b|requires you to be logged in|need auth/;
|
|
108
|
+
/**
|
|
109
|
+
* Runs `npm <args>`, of the flags of the registry of `name` ({@link registryFlagsOf}), in the
|
|
110
|
+
* folder of the repo, and gives what it wrote, read and not shown, as a question of a package is.
|
|
111
|
+
* npm cannot ask for a one-time password of it: a question that wants one fails, as
|
|
112
|
+
* {@link readFailureOf} tells. A command that cannot start rejects with `ENPMREAD`.
|
|
113
|
+
*
|
|
114
|
+
* @param name - The name of the package the command is of.
|
|
115
|
+
* @param args - The arguments of npm, as `['view', '@acme/core', '--json']`.
|
|
116
|
+
* @param context - The platform npm runs by.
|
|
117
|
+
* @returns What npm wrote, its exit code, and whether it failed of a package its registry lacks.
|
|
118
|
+
*/
|
|
119
|
+
export async function readNpm(name, args, { platform }) {
|
|
120
|
+
let result;
|
|
121
|
+
try {
|
|
122
|
+
result = await run(platform, 'npm', [...args, ...registryFlagsOf(name, args)]);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
throw new NpmError('ENPMREAD', `npm cannot run: ${error.message}`, 'Install npm, or put it on the PATH.');
|
|
126
|
+
}
|
|
127
|
+
const { stdout, stderr, code } = result;
|
|
128
|
+
return {
|
|
129
|
+
stdout,
|
|
130
|
+
stderr,
|
|
131
|
+
code,
|
|
132
|
+
notFound: code !== 0 && NOT_FOUND.test(`${stdout}\n${stderr}`)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The error of a question of npm that failed, by what it wrote: `ENPMOTP` of one that wants a
|
|
137
|
+
* one-time password, `ENPMLOGIN` of one that wants a login, and `ENPMREAD` of any other, each with
|
|
138
|
+
* what npm wrote on its stderr.
|
|
139
|
+
*
|
|
140
|
+
* @param command - The command, as `npm view @acme/core`, as the message names it.
|
|
141
|
+
* @param read - What npm wrote, and its exit code.
|
|
142
|
+
* @returns The error.
|
|
143
|
+
*/
|
|
144
|
+
export function readFailureOf(command, read) {
|
|
145
|
+
const text = `${read.stdout}\n${read.stderr}`;
|
|
146
|
+
const said = read.stderr.trim() === '' ? read.stdout.trim() : read.stderr.trim();
|
|
147
|
+
const message = `${command} failed (exit ${read.code}):\n${said}`;
|
|
148
|
+
if (OTP.test(text))
|
|
149
|
+
return new NpmError('ENPMOTP', message, 'npm wants a one-time password, and cannot ask for one of a question it does not show: run it again with `npm_config_otp=<code>` in the environment.');
|
|
150
|
+
if (LOGIN.test(text))
|
|
151
|
+
return new NpmError('ENPMLOGIN', message, "npm wants a login of npm's registry: run `npm login`, then this again.");
|
|
152
|
+
return new NpmError('ENPMREAD', message, 'Read what npm says above, fix it, and run this again.');
|
|
153
|
+
}
|
|
154
|
+
/** The strings of a record of strings, as npm gives `dist-tags` and `time`. */
|
|
155
|
+
const stringsOf = (value) => typeof value === 'object' && value !== null
|
|
156
|
+
? Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === 'string'))
|
|
157
|
+
: {};
|
|
158
|
+
/**
|
|
159
|
+
* The JSON of `npm view --json` of several fields: npm 11 writes an object, and npm 12 an array of
|
|
160
|
+
* an object of each version it views, of which a view of a package's `latest` gives one.
|
|
161
|
+
*
|
|
162
|
+
* @param json - What npm wrote, parsed.
|
|
163
|
+
* @returns The object, of the last version npm viewed; `undefined` of no object.
|
|
164
|
+
*/
|
|
165
|
+
export function viewedOf(json) {
|
|
166
|
+
const viewed = Array.isArray(json) ? json.at(-1) : json;
|
|
167
|
+
return typeof viewed === 'object' && viewed !== null && !Array.isArray(viewed)
|
|
168
|
+
? viewed
|
|
169
|
+
: undefined;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* What npm's registry holds of the package `name`, by
|
|
173
|
+
* `npm view <name> versions dist-tags time --json`, as npm 11 and npm 12 write it
|
|
174
|
+
* ({@link viewedOf}): `undefined` of a package it does not hold, of npm's `E404` alone, as of a name
|
|
175
|
+
* it never had, one unpublished whole, or one the account cannot read. Throws the error of
|
|
176
|
+
* {@link readFailureOf} of any other failure, and `ENPMREAD` of output it cannot read, as of no
|
|
177
|
+
* versions: a reader that is not sure never takes a package as absent.
|
|
178
|
+
*
|
|
179
|
+
* @param name - The name of the package.
|
|
180
|
+
* @param context - The platform npm runs by.
|
|
181
|
+
* @returns What it holds, or `undefined`.
|
|
182
|
+
*/
|
|
183
|
+
export async function viewPackage(name, context) {
|
|
184
|
+
const args = ['view', name, 'versions', 'dist-tags', 'time', '--json'];
|
|
185
|
+
const read = await readNpm(name, args, context);
|
|
186
|
+
if (read.notFound)
|
|
187
|
+
return undefined;
|
|
188
|
+
if (read.code !== 0)
|
|
189
|
+
throw readFailureOf(`npm view ${name}`, read);
|
|
190
|
+
const unclear = (why) => new NpmError('ENPMREAD', `npm view ${name} gave ${why}: ${read.stdout.trim().split('\n').slice(0, 5).join(' ')}`, "Run it by hand to see why, fix it, and run this again: a package is taken as absent of npm's E404 alone.");
|
|
191
|
+
let json;
|
|
192
|
+
try {
|
|
193
|
+
json = viewedOf(JSON.parse(read.stdout));
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
throw unclear('no JSON');
|
|
197
|
+
}
|
|
198
|
+
if (json === undefined)
|
|
199
|
+
throw unclear('no object of the package');
|
|
200
|
+
// npm gives a list of one version as the version alone.
|
|
201
|
+
const versions = [json['versions']]
|
|
202
|
+
.flat()
|
|
203
|
+
.filter((each) => typeof each === 'string');
|
|
204
|
+
if (versions.length === 0)
|
|
205
|
+
throw unclear('no versions');
|
|
206
|
+
return { versions, distTags: stringsOf(json['dist-tags']), time: stringsOf(json['time']) };
|
|
207
|
+
}
|
|
208
|
+
/** How often {@link waitForPackage} asks npm again: every 30 seconds. */
|
|
209
|
+
export const WAIT_INTERVAL = 30_000;
|
|
210
|
+
/**
|
|
211
|
+
* What npm's registry holds of the package `name`, as {@link viewPackage} reads it, asked again
|
|
212
|
+
* every {@link WAIT_INTERVAL} until it holds it or `seconds` have passed, as of a package published
|
|
213
|
+
* a moment ago, which npm's registry may not show for a few minutes.
|
|
214
|
+
*
|
|
215
|
+
* @param name - The name of the package.
|
|
216
|
+
* @param seconds - How long to wait for it: 0 asks once.
|
|
217
|
+
* @param context - The platform npm runs by, and where each wait is said.
|
|
218
|
+
* @returns What it holds, or `undefined` once the wait is over.
|
|
219
|
+
*/
|
|
220
|
+
export async function waitForPackage(name, seconds, context) {
|
|
221
|
+
const { platform } = context;
|
|
222
|
+
const deadline = wallTime(platform) + seconds * 1000;
|
|
223
|
+
for (;;) {
|
|
224
|
+
// oxlint-disable-next-line no-await-in-loop -- one question after the wait of the one before
|
|
225
|
+
const view = await viewPackage(name, context);
|
|
226
|
+
const left = deadline - wallTime(platform);
|
|
227
|
+
if (view !== undefined || left <= 0)
|
|
228
|
+
return view;
|
|
229
|
+
const wait = Math.min(WAIT_INTERVAL, left);
|
|
230
|
+
context.log?.(`${name}: npm does not show it yet; asking again in ${Math.ceil(wait / 1000)} s.`);
|
|
231
|
+
// oxlint-disable-next-line no-await-in-loop -- one wait after another
|
|
232
|
+
await sleep(wait, platform);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/** The npm the trust commands need: `--allow-publish` came in npm 11.15. */
|
|
236
|
+
export const TRUST_NPM = '11.15.0';
|
|
237
|
+
/**
|
|
238
|
+
* The version of the npm that runs, of `npm --version`. Throws `ENPMREAD` of an npm that fails, or
|
|
239
|
+
* gives no version.
|
|
240
|
+
*
|
|
241
|
+
* @param context - The platform npm runs by.
|
|
242
|
+
* @returns The version, as `11.15.0`.
|
|
243
|
+
*/
|
|
244
|
+
export async function npmVersionOf({ platform }) {
|
|
245
|
+
let result;
|
|
246
|
+
try {
|
|
247
|
+
result = await run(platform, 'npm', ['--version']);
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
throw new NpmError('ENPMREAD', `npm cannot run: ${error.message}`, 'Install npm, or put it on the PATH.');
|
|
251
|
+
}
|
|
252
|
+
const version = semver.valid(result.stdout.trim());
|
|
253
|
+
if (result.code !== 0 || version === null)
|
|
254
|
+
throw readFailureOf('npm --version', result);
|
|
255
|
+
return version;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* The version of the npm that runs, held to `minimum`. Throws `ENPMVERSION` of an older one, with
|
|
259
|
+
* the command that updates it: npm 11 of its line from 11.15, as npm 12 does not run on Node 24.0
|
|
260
|
+
* to 24.14.
|
|
261
|
+
*
|
|
262
|
+
* @param context - The platform npm runs by.
|
|
263
|
+
* @param minimum - The version the command needs: {@link TRUST_NPM} by default.
|
|
264
|
+
* @returns The version.
|
|
265
|
+
*/
|
|
266
|
+
export async function requireNpm(context, minimum = TRUST_NPM) {
|
|
267
|
+
const version = await npmVersionOf(context);
|
|
268
|
+
if (semver.gte(version, minimum))
|
|
269
|
+
return version;
|
|
270
|
+
throw new NpmError('ENPMVERSION', `npm ${version} runs, and the command needs npm ${minimum} or later.`, `Update it: \`npm install -g npm@^${minimum}\`. (npm 12 does not run on Node 24.0 to 24.14.)`);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Runs `npm <args>`, of the flags of the registry of `name` ({@link registryFlagsOf}), on the
|
|
274
|
+
* terminal of the context, in the folder of the repo, of the platform's environment: npm shows what
|
|
275
|
+
* it does, and asks for a one-time password there, or reads one of `npm_config_otp`.
|
|
276
|
+
*
|
|
277
|
+
* @param name - The name of the package the command is of.
|
|
278
|
+
* @param args - The arguments of npm.
|
|
279
|
+
* @param context - The platform, and the terminal npm runs on.
|
|
280
|
+
* @returns The code npm exited with.
|
|
281
|
+
*/
|
|
282
|
+
export async function onTerminal(name, args, context) {
|
|
283
|
+
const { platform, terminal } = context;
|
|
284
|
+
try {
|
|
285
|
+
return await terminal('npm', [...args, ...registryFlagsOf(name, args)], {
|
|
286
|
+
cwd: platform.dirs.cwd,
|
|
287
|
+
env: envOf(platform.env)
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
throw new NpmError('ENPMWRITE', `npm cannot run: ${error.message}`, 'Install npm, or put it on the PATH.');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* The error of a change of npm that failed on the terminal, where npm said why: its output is the
|
|
296
|
+
* terminal's, so the error says what to do of what npm said.
|
|
297
|
+
*
|
|
298
|
+
* @param command - The command, as `npm publish`, as the message names it.
|
|
299
|
+
* @param code - The code npm exited with.
|
|
300
|
+
* @returns The error.
|
|
301
|
+
*/
|
|
302
|
+
export function writeFailureOf(command, code) {
|
|
303
|
+
return new NpmError('ENPMWRITE', `${command} failed (exit ${code}); npm said why above.`, 'Of E401 or ENEEDAUTH, run `npm login`; of EOTP, run it again with `npm_config_otp=<code>`; else fix what npm says, and run it again.');
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* The command line of `npm <args>` of the package `name`, of the flags of its registry, as a person
|
|
307
|
+
* runs it by hand, and as a dry run says it.
|
|
308
|
+
*
|
|
309
|
+
* @param name - The name of the package the command is of.
|
|
310
|
+
* @param args - The arguments of npm.
|
|
311
|
+
* @returns The command line.
|
|
312
|
+
*/
|
|
313
|
+
export const npmCommandOf = (name, args) => ['npm', ...args, ...registryFlagsOf(name, args)].join(' ');
|
|
314
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEtD,O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AAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
package/dist/release.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGpE,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,oBAAoB,CAAA;AAGlE,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAI/B,OAAO,EAAiB,KAAK,UAAU,EAAuB,MAAM,gBAAgB,CAAA;AAKpF,OAAO,KAAK,EAEV,QAAQ,EACR,UAAU,EACV,SAAS,EAET,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EAA0D,CAAA;AAEjG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAGhD,CAAA;AAED;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,UAAU,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAA;IACrD;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAA;CACpD;AAyBD,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,UAAU,CAuCjD,CAAA;AA6BF;;;;;;;;;;;;GAY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