putitoutthere 0.3.12 → 0.3.14
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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -31
- package/dist/cli.js.map +1 -1
- package/dist/emit-plan-outputs.d.ts +24 -0
- package/dist/emit-plan-outputs.d.ts.map +1 -0
- package/dist/emit-plan-outputs.js +33 -0
- package/dist/emit-plan-outputs.js.map +1 -0
- package/dist/emit-release-outputs.d.ts +22 -0
- package/dist/emit-release-outputs.d.ts.map +1 -0
- package/dist/emit-release-outputs.js +35 -0
- package/dist/emit-release-outputs.js.map +1 -0
- package/dist/handlers/crates.d.ts +12 -14
- package/dist/handlers/crates.d.ts.map +1 -1
- package/dist/handlers/crates.js +43 -50
- package/dist/handlers/crates.js.map +1 -1
- package/dist/handlers/pypi.d.ts +12 -9
- package/dist/handlers/pypi.d.ts.map +1 -1
- package/dist/handlers/pypi.js +20 -18
- package/dist/handlers/pypi.js.map +1 -1
- package/dist/publish-progress.d.ts +25 -0
- package/dist/publish-progress.d.ts.map +1 -0
- package/dist/publish-progress.js +33 -0
- package/dist/publish-progress.js.map +1 -0
- package/dist/publish.d.ts +4 -1
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +37 -3
- package/dist/publish.js.map +1 -1
- package/dist/reconcile.d.ts +17 -6
- package/dist/reconcile.d.ts.map +1 -1
- package/dist/reconcile.js +31 -11
- package/dist/reconcile.js.map +1 -1
- package/dist/replace-cargo-version.d.ts +35 -0
- package/dist/replace-cargo-version.d.ts.map +1 -0
- package/dist/replace-cargo-version.js +71 -0
- package/dist/replace-cargo-version.js.map +1 -0
- package/dist/repo-relative-paths.d.ts +27 -0
- package/dist/repo-relative-paths.d.ts.map +1 -0
- package/dist/repo-relative-paths.js +40 -0
- package/dist/repo-relative-paths.js.map +1 -0
- package/dist/types.d.ts +26 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/unpublished-kinds.d.ts +21 -0
- package/dist/unpublished-kinds.d.ts.map +1 -0
- package/dist/unpublished-kinds.js +30 -0
- package/dist/unpublished-kinds.js.map +1 -0
- package/dist/write-resolved-cargo-version.js +1 -1
- package/dist/write-resolved-cargo-version.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrite the `version = "..."` assignment inside a manifest's `[package]`
|
|
3
|
+
* table, preserving everything else byte-for-byte.
|
|
4
|
+
*
|
|
5
|
+
* String surgery rather than a TOML round-trip, matching
|
|
6
|
+
* `replaceWorkspacePackageVersion` and `replaceDepVersionReq`: re-emitting
|
|
7
|
+
* parsed TOML discards the comments and formatting of a file the consumer
|
|
8
|
+
* owns.
|
|
9
|
+
*
|
|
10
|
+
* Lives in its own module rather than inside `handlers/crates.ts` so both
|
|
11
|
+
* the crates publish path and `writeResolvedCargoVersion` can reach it
|
|
12
|
+
* without an import cycle between the handler and the resolver it now
|
|
13
|
+
* delegates to. #639.
|
|
14
|
+
*
|
|
15
|
+
* **The match is bounded to the `[package]` table.** The original expression
|
|
16
|
+
*
|
|
17
|
+
* /(\[package\][\s\S]*?)(^\s*version\s*=\s*")([^"]*)(")/m
|
|
18
|
+
*
|
|
19
|
+
* was lazy and anchored only on the `[package]` *header*, so on a manifest
|
|
20
|
+
* with no literal `[package].version` — one that inherits via
|
|
21
|
+
* `version.workspace = true` — it walked past the table boundary and matched
|
|
22
|
+
* the next `version = "..."` in the file, typically a dependency's
|
|
23
|
+
* requirement in a section table. It then rewrote that requirement to the
|
|
24
|
+
* release version, naming a release of someone else's crate that does not
|
|
25
|
+
* exist, and reported success.
|
|
26
|
+
*
|
|
27
|
+
* Callers that need to handle inheritance go through
|
|
28
|
+
* `writeResolvedCargoVersion`, which detects it first and rewrites
|
|
29
|
+
* `[workspace.package].version` at the workspace root instead. This function
|
|
30
|
+
* stays literal-only on purpose; bounding the table means it now fails loud
|
|
31
|
+
* on a manifest it cannot legitimately rewrite instead of corrupting a
|
|
32
|
+
* neighbouring field.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* The `[package]` table's body: its header line, then every following line
|
|
36
|
+
* up to the next table header. Refusing any line that opens a table is what
|
|
37
|
+
* keeps the match inside the table — the same technique
|
|
38
|
+
* `replaceDepVersionReq` uses for `[dependencies.<key>]`.
|
|
39
|
+
*
|
|
40
|
+
* The `^` anchor matters: without it a `[package]` mentioned in a comment
|
|
41
|
+
* would start the match, and the body would then run from the comment to the
|
|
42
|
+
* real table header and stop there — empty.
|
|
43
|
+
*/
|
|
44
|
+
const PACKAGE_TABLE = /^\[package\][^\n]*\n((?:(?!\[)[^\n]*(?:\n|$))*)/m;
|
|
45
|
+
/**
|
|
46
|
+
* A literal `version = "..."` assignment on its own line. Anchored so a
|
|
47
|
+
* `version = "…"` inside a comment cannot be mistaken for the assignment,
|
|
48
|
+
* and tolerant of indentation and of spacing around the `=`.
|
|
49
|
+
*/
|
|
50
|
+
const VERSION_LINE = /^[ \t]*version[ \t]*=[ \t]*"([^"]*)"/m;
|
|
51
|
+
const NO_VERSION = 'Cargo.toml: no [package].version field found';
|
|
52
|
+
export function replaceCargoVersion(source, version) {
|
|
53
|
+
const table = PACKAGE_TABLE.exec(source);
|
|
54
|
+
if (table === null) {
|
|
55
|
+
throw new Error(NO_VERSION);
|
|
56
|
+
}
|
|
57
|
+
const body = table[1];
|
|
58
|
+
const line = VERSION_LINE.exec(body);
|
|
59
|
+
if (line === null) {
|
|
60
|
+
throw new Error(NO_VERSION);
|
|
61
|
+
}
|
|
62
|
+
const old = line[1];
|
|
63
|
+
// Offsets resolve against the original source: the table body starts after
|
|
64
|
+
// its header, and the value starts after this line's `version = "` prefix.
|
|
65
|
+
// Rewriting by offset rather than by `String.replace` keeps every other
|
|
66
|
+
// byte — comments, spacing, a same-valued `version` elsewhere — untouched.
|
|
67
|
+
const bodyStart = table.index + table[0].length - body.length;
|
|
68
|
+
const valueStart = bodyStart + line.index + line[0].length - old.length - 1;
|
|
69
|
+
return source.slice(0, valueStart) + version + source.slice(valueStart + old.length);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=replace-cargo-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-cargo-version.js","sourceRoot":"","sources":["../src/replace-cargo-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;GASG;AACH,MAAM,aAAa,GAAG,kDAAkD,CAAC;AAEzE;;;;GAIG;AACH,MAAM,YAAY,GAAG,uCAAuC,CAAC;AAE7D,MAAM,UAAU,GAAG,8CAA8C,CAAC;AAElE,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,OAAe;IACjE,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAAA,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAAA,CAAC;IAClD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAW,CAAC;IAEhC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAAA,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAAA,CAAC;IACjD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAW,CAAC;IAE9B,2EAA2E;IAC3E,2EAA2E;IAC3E,wEAAwE;IACxE,2EAA2E;IAC3E,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9D,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Absolute paths rendered the way `git status --porcelain` renders them:
|
|
3
|
+
* relative to the repository root, forward-slashed. #639.
|
|
4
|
+
*
|
|
5
|
+
* The crates pre-publish dirty-tree check compares engine-managed paths
|
|
6
|
+
* against porcelain output, and porcelain names every file relative to the
|
|
7
|
+
* repo root with forward slashes on every platform. Comparing an absolute,
|
|
8
|
+
* platform-separated path against that never matches, so the conversion has
|
|
9
|
+
* to happen first — and it happens for three different sets of paths (the
|
|
10
|
+
* manifests `writeVersion` wrote, the sibling package directories, the
|
|
11
|
+
* artifacts root), which is why it lives here rather than inline three times.
|
|
12
|
+
*
|
|
13
|
+
* Paths that do not sit under `cwd` are dropped rather than returned in
|
|
14
|
+
* `../…` form: porcelain can never name a file outside the repository, so
|
|
15
|
+
* such an entry could only ever fail to match, and keeping it would suggest
|
|
16
|
+
* to a reader that it might match something.
|
|
17
|
+
*/
|
|
18
|
+
/** Windows separators to the forward slashes git and this repo speak in. */
|
|
19
|
+
export declare function toPosixPath(p: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* `paths` as repo-relative, forward-slashed strings, dropping any that
|
|
22
|
+
* resolve to `cwd` itself or to somewhere outside it. `undefined` means "no
|
|
23
|
+
* paths" and yields an empty list, so callers holding an optional field can
|
|
24
|
+
* pass it straight through.
|
|
25
|
+
*/
|
|
26
|
+
export declare function repoRelativePaths(cwd: string, paths: readonly string[] | undefined): string[];
|
|
27
|
+
//# sourceMappingURL=repo-relative-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-relative-paths.d.ts","sourceRoot":"","sources":["../src/repo-relative-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACnC,MAAM,EAAE,CAQV"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Absolute paths rendered the way `git status --porcelain` renders them:
|
|
3
|
+
* relative to the repository root, forward-slashed. #639.
|
|
4
|
+
*
|
|
5
|
+
* The crates pre-publish dirty-tree check compares engine-managed paths
|
|
6
|
+
* against porcelain output, and porcelain names every file relative to the
|
|
7
|
+
* repo root with forward slashes on every platform. Comparing an absolute,
|
|
8
|
+
* platform-separated path against that never matches, so the conversion has
|
|
9
|
+
* to happen first — and it happens for three different sets of paths (the
|
|
10
|
+
* manifests `writeVersion` wrote, the sibling package directories, the
|
|
11
|
+
* artifacts root), which is why it lives here rather than inline three times.
|
|
12
|
+
*
|
|
13
|
+
* Paths that do not sit under `cwd` are dropped rather than returned in
|
|
14
|
+
* `../…` form: porcelain can never name a file outside the repository, so
|
|
15
|
+
* such an entry could only ever fail to match, and keeping it would suggest
|
|
16
|
+
* to a reader that it might match something.
|
|
17
|
+
*/
|
|
18
|
+
import { relative } from 'node:path';
|
|
19
|
+
/** Windows separators to the forward slashes git and this repo speak in. */
|
|
20
|
+
export function toPosixPath(p) {
|
|
21
|
+
return p.replaceAll('\\', '/');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* `paths` as repo-relative, forward-slashed strings, dropping any that
|
|
25
|
+
* resolve to `cwd` itself or to somewhere outside it. `undefined` means "no
|
|
26
|
+
* paths" and yields an empty list, so callers holding an optional field can
|
|
27
|
+
* pass it straight through.
|
|
28
|
+
*/
|
|
29
|
+
export function repoRelativePaths(cwd, paths) {
|
|
30
|
+
const out = [];
|
|
31
|
+
for (const p of paths ?? []) {
|
|
32
|
+
const rel = relative(cwd, p);
|
|
33
|
+
if (rel === '' || rel.startsWith('..')) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
out.push(toPosixPath(rel));
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=repo-relative-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-relative-paths.js","sourceRoot":"","sources":["../src/repo-relative-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,CAAS;IACnC,OAAO,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,KAAoC;IAEpC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAC7B,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAAA,SAAS;QAAA,CAAC;QACnD,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -73,6 +73,22 @@ export interface Ctx {
|
|
|
73
73
|
* can omit; absent => empty list.
|
|
74
74
|
*/
|
|
75
75
|
siblingPackagePaths?: readonly string[];
|
|
76
|
+
/**
|
|
77
|
+
* Absolute paths of the manifests this package's `writeVersion` just
|
|
78
|
+
* wrote, threaded from its return value so `publish` can tell a managed
|
|
79
|
+
* bump apart from a stray edit.
|
|
80
|
+
*
|
|
81
|
+
* The crates handler's pre-publish dirty-tree check (#135) used to assume
|
|
82
|
+
* the only file it could have touched was the package's own `Cargo.toml`.
|
|
83
|
+
* That stopped being true once `writeVersion` learned to follow workspace
|
|
84
|
+
* inheritance (#639): a crate declaring `version.workspace = true` has its
|
|
85
|
+
* version bumped at the workspace root, a file outside the package
|
|
86
|
+
* directory that the guard would otherwise refuse on.
|
|
87
|
+
*
|
|
88
|
+
* Optional so local/test flows can omit; absent => the guard falls back to
|
|
89
|
+
* allowing only the package's own manifest.
|
|
90
|
+
*/
|
|
91
|
+
managedManifestPaths?: readonly string[];
|
|
76
92
|
}
|
|
77
93
|
export interface Logger {
|
|
78
94
|
debug(msg: string, fields?: Record<string, unknown>): void;
|
|
@@ -108,7 +124,16 @@ export interface PlatformPublishSummary {
|
|
|
108
124
|
skipped: readonly string[];
|
|
109
125
|
}
|
|
110
126
|
export interface PublishResult {
|
|
111
|
-
|
|
127
|
+
/**
|
|
128
|
+
* `delegated` (#623) means the handler did NOT upload: the artifact's
|
|
129
|
+
* upload runs somewhere the engine isn't. Only pypi uses it — PyPI
|
|
130
|
+
* Trusted Publishers cannot validate an OIDC token minted inside a
|
|
131
|
+
* cross-repo reusable workflow (warehouse#11096), so the upload happens
|
|
132
|
+
* in a caller-side job. It is deliberately distinct from `published`:
|
|
133
|
+
* nothing is on the registry yet, so the publish path must not cut the
|
|
134
|
+
* package's git tag, which is the record of what shipped.
|
|
135
|
+
*/
|
|
136
|
+
status: 'published' | 'already-published' | 'skipped' | 'delegated';
|
|
112
137
|
url?: string;
|
|
113
138
|
bytes?: number;
|
|
114
139
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,M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AAS,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,GAAG,CAAC,CAGpF;AAED;;qBAEqB;AACrB,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAI5E"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAkB;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAA,CAAC;IAC1D,OAAO,KAAK,CAAC,MAAM,KAAK,SAAS;QAC/B,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;QAChD,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAkB;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAA,CAAC;IAC1D,OAAO,KAAK,CAAC,MAAM,KAAK,SAAS;QAC/B,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;QAChD,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AAC/B,CAAC;AAoKD,2CAA2C;AAC3C,MAAM,OAAO,SAAU,SAAQ,KAAK;IAChB,IAAI,GAAG,WAAW,CAAC;CACtC;AAED,4DAA4D;AAC5D,MAAM,OAAO,cAAe,SAAQ,KAAK;IACrB,IAAI,GAAG,gBAAgB,CAAC;CAC3C;AAkBD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C;+EAC+E;AAC/E,MAAM,UAAU,iBAAiB,CAAkB,GAAM,EAAE,IAAsB;IAC9E,GAAqD,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAChF,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;qBAEqB;AACrB,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;QAAA,OAAO,SAAS,CAAC;IAAA,CAAC;IAClD,MAAM,OAAO,GAAG,KAA0D,CAAC;IAC3E,OAAO,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The registry kinds a planned release still has work for (#622).
|
|
3
|
+
*
|
|
4
|
+
* Distinct `kind`s carrying at least one package whose planned version is
|
|
5
|
+
* NOT already on its registry, in first-seen order. The reusable workflow
|
|
6
|
+
* gates registry authentication on this: `release.yml` used to ask the build
|
|
7
|
+
* matrix "does this repo have a crates package?", which is true whenever a
|
|
8
|
+
* crate exists — published or not — so the crates.io OIDC exchange fired on
|
|
9
|
+
* re-runs with nothing left to ship, and a failing exchange killed the
|
|
10
|
+
* publish job before npm and PyPI got their turn.
|
|
11
|
+
*
|
|
12
|
+
* `unknown` (the registry could not be reached, so `plan` degraded rather
|
|
13
|
+
* than aborting) counts as unpublished. Reading "we could not tell" as
|
|
14
|
+
* "nothing to do" would drop the credential a publish may well still need,
|
|
15
|
+
* turning a registry blip at plan time into an auth failure at publish time;
|
|
16
|
+
* listing the kind preserves the pre-#622 behaviour in exactly that case.
|
|
17
|
+
*/
|
|
18
|
+
import type { PlanVerdict } from './plan-status-types.js';
|
|
19
|
+
import type { Kind } from './types.js';
|
|
20
|
+
export declare function unpublishedKinds(verdicts: readonly PlanVerdict[]): Kind[];
|
|
21
|
+
//# sourceMappingURL=unpublished-kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpublished-kinds.d.ts","sourceRoot":"","sources":["../src/unpublished-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,IAAI,EAAE,CAOzE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The registry kinds a planned release still has work for (#622).
|
|
3
|
+
*
|
|
4
|
+
* Distinct `kind`s carrying at least one package whose planned version is
|
|
5
|
+
* NOT already on its registry, in first-seen order. The reusable workflow
|
|
6
|
+
* gates registry authentication on this: `release.yml` used to ask the build
|
|
7
|
+
* matrix "does this repo have a crates package?", which is true whenever a
|
|
8
|
+
* crate exists — published or not — so the crates.io OIDC exchange fired on
|
|
9
|
+
* re-runs with nothing left to ship, and a failing exchange killed the
|
|
10
|
+
* publish job before npm and PyPI got their turn.
|
|
11
|
+
*
|
|
12
|
+
* `unknown` (the registry could not be reached, so `plan` degraded rather
|
|
13
|
+
* than aborting) counts as unpublished. Reading "we could not tell" as
|
|
14
|
+
* "nothing to do" would drop the credential a publish may well still need,
|
|
15
|
+
* turning a registry blip at plan time into an auth failure at publish time;
|
|
16
|
+
* listing the kind preserves the pre-#622 behaviour in exactly that case.
|
|
17
|
+
*/
|
|
18
|
+
export function unpublishedKinds(verdicts) {
|
|
19
|
+
const kinds = [];
|
|
20
|
+
for (const verdict of verdicts) {
|
|
21
|
+
if (verdict.verdict === 'skip') {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (!kinds.includes(verdict.kind)) {
|
|
25
|
+
kinds.push(verdict.kind);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return kinds;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=unpublished-kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpublished-kinds.js","sourceRoot":"","sources":["../src/unpublished-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,MAAM,UAAU,gBAAgB,CAAC,QAAgC;IAC/D,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;YAAA,SAAS;QAAA,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAAA,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAAA,CAAC;IAChE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { readFile, writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { parse as parseToml } from 'smol-toml';
|
|
4
4
|
import { findWorkspaceRoot } from './find-workspace-root.js';
|
|
5
|
-
import { replaceCargoVersion } from './
|
|
5
|
+
import { replaceCargoVersion } from './replace-cargo-version.js';
|
|
6
6
|
import { replaceWorkspacePackageVersion } from './replace-workspace-package-version.js';
|
|
7
7
|
/**
|
|
8
8
|
* Rewrite a crate's version to `version`, following Cargo workspace
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-resolved-cargo-version.js","sourceRoot":"","sources":["../src/write-resolved-cargo-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,C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