putitoutthere 0.2.35 → 0.2.37
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 +2 -0
- package/MIGRATIONS.md +67 -0
- package/README.md +81 -1
- package/dist/find-workspace-root.d.ts +13 -0
- package/dist/find-workspace-root.d.ts.map +1 -0
- package/dist/find-workspace-root.js +46 -0
- package/dist/find-workspace-root.js.map +1 -0
- package/dist/replace-workspace-package-version.d.ts +9 -0
- package/dist/replace-workspace-package-version.d.ts.map +1 -0
- package/dist/replace-workspace-package-version.js +23 -0
- package/dist/replace-workspace-package-version.js.map +1 -0
- package/dist/write-crate-version.d.ts.map +1 -1
- package/dist/write-crate-version.js +3 -7
- package/dist/write-crate-version.js.map +1 -1
- package/dist/write-resolved-cargo-version.d.ts +16 -0
- package/dist/write-resolved-cargo-version.d.ts.map +1 -0
- package/dist/write-resolved-cargo-version.js +57 -0
- package/dist/write-resolved-cargo-version.js.map +1 -0
- package/dist/write-version.d.ts.map +1 -1
- package/dist/write-version.js +3 -7
- package/dist/write-version.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,8 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
16
16
|
|
|
17
17
|
### Fixed
|
|
18
18
|
|
|
19
|
+
- Fixed: `kind = "npm"` `build = "napi"` releases now bake the planned release version into the compiled `.node`. `_matrix.yml` (and its e2e mirror `e2e-fixture-job.yml`) run a `write-crate-version` step on each per-triple napi row before `npm run build`, so `napi build` compiles the addon with the right `CARGO_PKG_VERSION` — matching the maturin `write-version` (#276) and bundled-cli `write-crate-version` (#366) pre-build bumps. Previously napi had no pre-build bump: the synthesized per-platform `package.json` carried `matrix.version`, but the `.node` inside it embedded whatever literal sat in the crate's `Cargo.toml`, so a library re-exposing the Rust core's `version()` through napi reported a version diverging from the published npm package. The bump targets `matrix.path` and runs only when a `Cargo.toml` is colocated there (the napi-rs single-crate default — the shape template-lib and the `js-napi` fixture use), resolving `version.workspace = true` to the workspace root via #428. A multi-mode package (`build = ["napi", "bundled-cli"]`) or one whose napi crate lives elsewhere has no `Cargo.toml` at the package path and is skipped with a `::notice::` — there is no per-napi `crate_path` config to point at a non-colocated crate yet, so that `.node` still embeds its on-disk version. The noarch `main` row is excluded (it compiles no `.node`). See [MIGRATIONS.md](./MIGRATIONS.md#napi-node-embeds-the-release-version). #429. (verified by: unit/ubuntu-latest)
|
|
20
|
+
- Fixed: `putitoutthere`'s pre-build version rewrite now follows Cargo **workspace version inheritance** — a crate that sources its version from `[workspace.package].version` via `version.workspace = true` (the idiomatic polyglot layout: one Rust core wrapped by a PyO3 wheel and a napi addon) is now bumped correctly instead of failing the release. The maturin `write-version` (#276) and npm/pypi bundled-cli `write-crate-version` (#366) steps both rewrote only a literal `[package].version` and threw `Cargo.toml: no [package].version field found` on an inheriting member, because the inherited version lives in a different file — the workspace root — that neither step read. So a release for that layout was blocked, not merely mis-versioned. The rewrite path now resolves the manifest first: a literal `[package].version` is bumped in place byte-for-byte as before, while an inheriting member walks up to the nearest ancestor `[workspace]` `Cargo.toml` and rewrites its `[workspace.package].version`. Unparseable or version-less manifests fall through to the prior literal-only path (`replaceCargoVersion`'s existing error), so single-crate layouts are byte-for-byte unchanged. New `src/find-workspace-root.ts`, `src/replace-workspace-package-version.ts`, and `src/write-resolved-cargo-version.ts`; `write-version.ts` / `write-crate-version.ts` now delegate to the resolver. See [MIGRATIONS.md](./MIGRATIONS.md#version-bump-follows-cargo-workspace-inheritance). #428. (verified by: unit/ubuntu-latest)
|
|
19
21
|
- Fixed: `putitoutthere publish` now writes a package's git tag when that version is already live on the registry but untagged, instead of skipping it silently. The publish loop's already-published branch (`isPublished` → true) returned *before* the tag-creation step, so a version that reached the registry on a half-failed run (the run died after publishing but before tagging — e.g. a cancelled downstream job) was left published-but-untagged and never self-healed: piot derives "last released version" from git tags, so on every later run the package looked unreleased, fell back to `first_version` (already live), skipped again, and stayed stuck forever — while its dependents kept bumping and publishing, opening unflagged version skew. The skip branch now calls a shared, idempotent `ensureTag` (new `src/ensure-tag.ts`; a no-op when the tag already exists, and reused by the normal post-publish tag step), so a stuck package self-heals on its next release run. See [MIGRATIONS.md](./MIGRATIONS.md#publish-path-auto-heal-missing-tags). #407. (verified by: integration, unit/ubuntu-latest)
|
|
20
22
|
- Fixed: a `kind = "pypi"` `build = "maturin"` package whose wheel is **Python-version-independent** — `[tool.maturin].bindings = "bin"` (a Rust-binary wheel tagged `py3-none`) or a pyo3 `abi3` / `abi3-pyXY` extension (a stable-ABI wheel tagged `cp3x-abi3`) — no longer fans its wheel build across every CPython version `requires-python` / `python_versions` resolves to. Such a wheel is byte-identical regardless of the interpreter that built it, so the fan produced N duplicate wheels: each fanned row uploaded under its own `-py<ver>` artifact, and the documented consumer `pypi-publish` recipe's `actions/download-artifact … merge-multiple: true` then extracted N copies of the same wheel filename onto one path concurrently — a torn write that failed `twine check` with `zipfile.BadZipFile` (observed on a `bindings = "bin"`, `requires-python = ">=3.9"` package: six identical wheels per platform, the x86_64-linux copy losing its extraction race while macOS/aarch64 won theirs). The planner (`src/plan.ts`) now collapses the fan to a single wheel row per target for these packages — built once on the newest resolved interpreter, keeping the historical unsuffixed `<pkg>-wheel-<triple>` artifact name — and the new `src/wheel-abi.ts` detects version independence from the package's real `pyproject.toml` (`[tool.maturin].bindings`, `[tool.maturin].features`) and `Cargo.toml` (an `abi3` / `abi3-pyXY` feature on the `pyo3` / `pyo3-ffi` dependency). Ordinary per-version extension modules (no abi3, no `bindings = "bin"`) still fan and keep their `-py<ver>` suffixes; the sdist row is unchanged. Also saves the redundant N−1 wheel builds. Detection is conservative — an unrecognized abi3 setup (workspace-inherited `pyo3`, a target-specific dependency table) falls back to fanning, never worse than before. See [README → `kind = "pypi"`](./README.md#kind--pypi) and [MIGRATIONS.md](./MIGRATIONS.md#pypi-version-independent-wheels-build-once). #401. (verified by: integration, unit/ubuntu-latest)
|
|
21
23
|
- Fixed: `kind = "npm"` releases no longer abort mid-matrix on npm's Sigstore/Rekor transparency-log dedupe (`TLOG_CREATE_ENTRY_ERROR`, HTTP 409, "an equivalent entry already exists in the transparency log"). npm's retry-on-transient-network-error re-submits a byte-identical `--provenance` attestation after a flaky response, and Rekor rejects the duplicate with a 409. Previously only the registry-PUT edition of that race (`E403` "cannot publish over the previously published versions", matched by `looksLikePublishOverRace`) was tolerated, so the attestation edition fell through to the generic `throw` and killed the publish job — for a multi-platform (`napi` / `bundled-cli`) package that meant the first sub-package published, the next 409'd, and the remaining sub-packages **and the main package** were left unpublished (a partial release; observed on a 3-language repo's first `0.0.1`). Unlike the E403 shape, a 409 from Rekor does **not** by itself prove the artifact landed (the first submit may have written the transparency-log entry but still failed the registry upload), so both the main-package (`src/handlers/npm.ts`) and per-platform (`src/handlers/npm-platform.ts`) publish catches now re-probe `npm view` to disambiguate: present on the registry ⇒ treated as a benign duplicate (`already-published` / counted as published, and the cascade's `optionalDependencies` rewrite still runs); absent ⇒ a genuine partial publish, surfaced as an actionable error telling the operator to re-run the release so a fresh attestation (new `runID`/attempt ⇒ new Rekor entry) gets past the dedupe. The engine cannot retry the attestation in-process. See [MIGRATIONS.md](./MIGRATIONS.md#npm-tlog_create_entry_error-409-provenance-retry-race). #399. (verified by: unit/ubuntu-latest)
|
package/MIGRATIONS.md
CHANGED
|
@@ -21,6 +21,73 @@ Each section covers five things, in order:
|
|
|
21
21
|
|
|
22
22
|
## Unreleased
|
|
23
23
|
|
|
24
|
+
### napi `.node` embeds the release version
|
|
25
|
+
|
|
26
|
+
**Summary.** `kind = "npm"` `build = "napi"` releases now rewrite the napi
|
|
27
|
+
crate's version to the planned release version before `napi build` compiles
|
|
28
|
+
the `.node`, mirroring the maturin (#276) and bundled-cli (#366) pre-build
|
|
29
|
+
bumps. Previously the compiled `.node` embedded whatever `[package].version`
|
|
30
|
+
literal sat on disk, so a library re-exposing the Rust core's `version()`
|
|
31
|
+
through napi reported a version diverging from the published npm package
|
|
32
|
+
(whose `package.json` version was already correct).
|
|
33
|
+
|
|
34
|
+
**Required changes.** None for the common case. The bump is a
|
|
35
|
+
workflow-internal step; a consumer whose napi crate's `Cargo.toml` is
|
|
36
|
+
colocated with `package.json` (the napi-rs single-crate default, including
|
|
37
|
+
the `version.workspace = true` workspace shape via #428) needs no config
|
|
38
|
+
change. A **multi-mode** package (`build = ["napi", "bundled-cli"]`) or one
|
|
39
|
+
whose napi crate lives outside the package directory has no `Cargo.toml` at
|
|
40
|
+
the package path — piot skips the bump there with a `::notice::` (no
|
|
41
|
+
per-napi `crate_path` config exists yet), so such a `.node` still embeds
|
|
42
|
+
its on-disk `CARGO_PKG_VERSION`. Until a `crate_path` field lands, bump that
|
|
43
|
+
crate's version yourself or colocate its manifest with `package.json`.
|
|
44
|
+
|
|
45
|
+
**Deprecations removed.** None.
|
|
46
|
+
|
|
47
|
+
**Behavior changes without code changes.** For a napi package, the
|
|
48
|
+
per-platform `.node` now reports the released version from any API sourced
|
|
49
|
+
on `CARGO_PKG_VERSION` (e.g. a Rust `version()` re-exported through napi).
|
|
50
|
+
The synthesized per-platform `package.json` version is unchanged (it was
|
|
51
|
+
already `matrix.version`). Non-napi npm packages are unaffected.
|
|
52
|
+
|
|
53
|
+
**Verification.** Release a napi package and read its Rust-sourced
|
|
54
|
+
`version()` from the installed addon (or inspect the crate manifest the
|
|
55
|
+
build rewrote): it matches the published npm version, not the pre-release
|
|
56
|
+
on-disk literal.
|
|
57
|
+
|
|
58
|
+
### Version bump follows Cargo workspace inheritance
|
|
59
|
+
|
|
60
|
+
**Summary.** piot's pre-build version rewrite — the maturin `write-version`
|
|
61
|
+
step (#276) and the npm / pypi bundled-cli `write-crate-version` step
|
|
62
|
+
(#366) — now understands Cargo **workspace version inheritance**. A crate
|
|
63
|
+
whose `[package]` declares `version.workspace = true` and inherits its
|
|
64
|
+
version from `[workspace.package].version` at the workspace root (the
|
|
65
|
+
standard shape for a single Rust core re-exposed as a PyO3 wheel and a napi
|
|
66
|
+
addon) previously failed these steps with `Cargo.toml: no [package].version
|
|
67
|
+
field found`. The rewrite now resolves the inheritance: a literal
|
|
68
|
+
`[package].version` is bumped in place, while an inheriting member's version
|
|
69
|
+
is bumped at the workspace root's `[workspace.package].version`.
|
|
70
|
+
|
|
71
|
+
**Required changes.** None. Additive — a repo layout that previously errored
|
|
72
|
+
at release now works. If you kept a duplicated literal `[package].version`
|
|
73
|
+
in each crate to work around this, you may switch the members to
|
|
74
|
+
`version.workspace = true` and let piot bump the workspace root.
|
|
75
|
+
|
|
76
|
+
**Deprecations removed.** None.
|
|
77
|
+
|
|
78
|
+
**Behavior changes without code changes.** A `kind = "pypi"`
|
|
79
|
+
`build = "maturin"` or `kind = "npm"` `build = "bundled-cli"` package whose
|
|
80
|
+
crate inherits its version from the workspace no longer fails the build
|
|
81
|
+
step; the produced wheel / cross-compiled binary now carries the planned
|
|
82
|
+
release version. Single-crate layouts with a literal `[package].version` are
|
|
83
|
+
byte-for-byte unchanged.
|
|
84
|
+
|
|
85
|
+
**Verification.** In a cargo workspace whose root declares
|
|
86
|
+
`[workspace.package]` `version = "X"` and whose maturin/napi crate sets
|
|
87
|
+
`version.workspace = true`, run a release: the published wheel / `.node`
|
|
88
|
+
carries the planned release version (not the stale on-disk `X`), and the
|
|
89
|
+
workspace-root `Cargo.toml` is the manifest rewritten during the build.
|
|
90
|
+
|
|
24
91
|
### verify: publish trust posture
|
|
25
92
|
|
|
26
93
|
**Summary.** New command `putitoutthere verify` reports, per package, how
|
package/README.md
CHANGED
|
@@ -310,7 +310,7 @@ version = 1 # required; only 1 is valid today
|
|
|
310
310
|
| `npm` | string | Override `name` → npm name (for scoped packages). |
|
|
311
311
|
| `access` | enum | `public` \| `restricted`. Default `public`. |
|
|
312
312
|
| `tag` | string | dist-tag. Default `latest`. |
|
|
313
|
-
| `build` | string \| array | `"napi"` \| `"bundled-cli"` (single mode), or an array of entries (each: a bare mode string or `{ mode, name }` with a [name template](#multi-mode-npm-family)). Omitted = vanilla. See
|
|
313
|
+
| `build` | string \| array | `"napi"` \| `"bundled-cli"` (single mode), or an array of entries (each: a bare mode string or `{ mode, name }` with a [name template](#multi-mode-npm-family)). Omitted = vanilla. See Recipes → [napi](#napi-npm-family) / [Bundled-CLI](#bundled-cli-npm-family) npm family. |
|
|
314
314
|
| `targets` | (string \| object)[] | Required when `build` is set. |
|
|
315
315
|
| `[package.bundle_cli]` | sub-table | Declarative cross-compile for `build = "bundled-cli"` rows. Fields: `bin` (required), `crate_path` (default `"."`), `features` (default `[]`), `no_default_features` (default `false`). See [Recipes → Bundled-CLI npm family](#bundled-cli-npm-family). |
|
|
316
316
|
|
|
@@ -747,6 +747,86 @@ registration (a policy on `my-cli` does not cover
|
|
|
747
747
|
> No consumer-side change is required; you can keep the lockfile
|
|
748
748
|
> committed and the `optionalDependencies` declared.
|
|
749
749
|
|
|
750
|
+
### napi npm family
|
|
751
|
+
|
|
752
|
+
Ship a [napi-rs](https://napi.rs) Node addon (a `.node` native library) as
|
|
753
|
+
an npm per-platform family — consumers `import` the package and Node loads
|
|
754
|
+
the prebuilt binary for their platform. The `@node-rs/*` / `@swc/core`
|
|
755
|
+
distribution shape.
|
|
756
|
+
|
|
757
|
+
Config:
|
|
758
|
+
|
|
759
|
+
```toml
|
|
760
|
+
[[package]]
|
|
761
|
+
name = "my-addon"
|
|
762
|
+
kind = "npm"
|
|
763
|
+
path = "packages/node"
|
|
764
|
+
build = "napi"
|
|
765
|
+
globs = ["packages/node/**", "crates/core/**"]
|
|
766
|
+
targets = [
|
|
767
|
+
"x86_64-unknown-linux-gnu",
|
|
768
|
+
"aarch64-unknown-linux-gnu",
|
|
769
|
+
"x86_64-apple-darwin",
|
|
770
|
+
"aarch64-apple-darwin",
|
|
771
|
+
"x86_64-pc-windows-msvc",
|
|
772
|
+
]
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
The engine publishes a per-platform sub-package per target
|
|
776
|
+
(`my-addon-<triple>`) plus a top-level package whose `optionalDependencies`
|
|
777
|
+
pin them at the published version; napi-rs's loader resolves the matching
|
|
778
|
+
one at runtime. The reusable workflow fans the build across your `targets`
|
|
779
|
+
— one native runner per triple — so you never wire per-target steps
|
|
780
|
+
yourself.
|
|
781
|
+
|
|
782
|
+
**You own the build script.** Unlike `bundled-cli` — where the engine runs
|
|
783
|
+
the cross-compile for you — the napi toolchain stays consumer-owned. For
|
|
784
|
+
each per-target row the workflow runs your `package.json` `build` script
|
|
785
|
+
with `TARGET` set to that triple (and `BUILD=napi`); your script runs
|
|
786
|
+
`napi build` for it and stages the resulting `.node` under
|
|
787
|
+
`build/<triple>/`, the directory the engine packages per-platform
|
|
788
|
+
artifacts from:
|
|
789
|
+
|
|
790
|
+
```js
|
|
791
|
+
// scripts/build.cjs — invoked by your package.json "build" script
|
|
792
|
+
const target = process.env.TARGET;
|
|
793
|
+
// The noarch main row runs with TARGET=main (or unset) — nothing to build.
|
|
794
|
+
if (!target || target === 'main' || target === 'noarch') process.exit(0);
|
|
795
|
+
|
|
796
|
+
// napi-rs emits `<name>.<triple>.node`; stage it under build/<triple>/,
|
|
797
|
+
// e.g. napi build --release --target ${target} --output-dir build/${target}
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
The `main` (noarch) row carries no per-target binary — its build run is a
|
|
801
|
+
no-op for the `.node` and compiles only your TypeScript / JS.
|
|
802
|
+
|
|
803
|
+
> [!NOTE]
|
|
804
|
+
> **Cross-compilation is yours to arrange.** Each target builds on a
|
|
805
|
+
> native runner where one exists (`x86_64-linux` on `ubuntu-latest`,
|
|
806
|
+
> `aarch64-linux` on `ubuntu-24.04-arm`, darwin on `macos-latest`,
|
|
807
|
+
> windows on `windows-2022`), so the common triples need no cross
|
|
808
|
+
> toolchain — `napi build --target <native triple>` just works. For a
|
|
809
|
+
> target that isn't native to its runner (a `*-musl` triple, or an
|
|
810
|
+
> x86_64 macOS build on the arm64 runner), your build script owns
|
|
811
|
+
> `rustup target add <triple>` and any linker / C-toolchain setup. This
|
|
812
|
+
> is the one place napi differs from `bundled-cli`, where the engine
|
|
813
|
+
> performs the gnu→musl mapping and installs the musl toolchain for you.
|
|
814
|
+
|
|
815
|
+
Each per-platform sub-package needs its own npm trusted-publisher
|
|
816
|
+
registration (a policy on `my-addon` does not cover
|
|
817
|
+
`my-addon-x86_64-unknown-linux-gnu`) — same as the bundled-cli family
|
|
818
|
+
above.
|
|
819
|
+
|
|
820
|
+
The **first-publish lockfile chicken-and-egg** note under
|
|
821
|
+
[Bundled-CLI npm family](#bundled-cli-npm-family) applies identically to
|
|
822
|
+
napi families: the reusable workflow's strict installs self-heal, so you
|
|
823
|
+
can keep the lockfile committed and the `optionalDependencies` declared.
|
|
824
|
+
|
|
825
|
+
> [!NOTE]
|
|
826
|
+
> **Both modes at once.** A package that is *both* a `.node` addon and a
|
|
827
|
+
> CLI declares `build` as an array — see
|
|
828
|
+
> [Multi-mode npm family](#multi-mode-npm-family) below.
|
|
829
|
+
|
|
750
830
|
### Multi-mode npm family
|
|
751
831
|
|
|
752
832
|
For a package that is both a napi-rs Node addon (a `.node` library) **and**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk up from `startDir` for the Cargo.toml that declares a `[workspace]`
|
|
3
|
+
* table — the root that a `version.workspace = true` member inherits its
|
|
4
|
+
* version from. Returns that directory, or `null` if none exists between
|
|
5
|
+
* `startDir` and the filesystem root. #428.
|
|
6
|
+
*
|
|
7
|
+
* Sync `readFileSync` with an ENOENT skip (not an `existsSync` precheck)
|
|
8
|
+
* to avoid the TOCTOU shape CodeQL flags, matching the rest of the
|
|
9
|
+
* version-write path. A malformed ancestor Cargo.toml is not treated as
|
|
10
|
+
* the workspace root; the walk continues past it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function findWorkspaceRoot(startDir: string): string | null;
|
|
13
|
+
//# sourceMappingURL=find-workspace-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-workspace-root.d.ts","sourceRoot":"","sources":["../src/find-workspace-root.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4BjE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { parse as parseToml } from 'smol-toml';
|
|
4
|
+
/**
|
|
5
|
+
* Walk up from `startDir` for the Cargo.toml that declares a `[workspace]`
|
|
6
|
+
* table — the root that a `version.workspace = true` member inherits its
|
|
7
|
+
* version from. Returns that directory, or `null` if none exists between
|
|
8
|
+
* `startDir` and the filesystem root. #428.
|
|
9
|
+
*
|
|
10
|
+
* Sync `readFileSync` with an ENOENT skip (not an `existsSync` precheck)
|
|
11
|
+
* to avoid the TOCTOU shape CodeQL flags, matching the rest of the
|
|
12
|
+
* version-write path. A malformed ancestor Cargo.toml is not treated as
|
|
13
|
+
* the workspace root; the walk continues past it.
|
|
14
|
+
*/
|
|
15
|
+
export function findWorkspaceRoot(startDir) {
|
|
16
|
+
let dir = startDir;
|
|
17
|
+
for (;;) {
|
|
18
|
+
let source = '';
|
|
19
|
+
try {
|
|
20
|
+
source = readFileSync(join(dir, 'Cargo.toml'), 'utf8');
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
if (err.code !== 'ENOENT') {
|
|
24
|
+
throw err;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (source) {
|
|
28
|
+
let parsed;
|
|
29
|
+
try {
|
|
30
|
+
parsed = parseToml(source);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
parsed = undefined;
|
|
34
|
+
}
|
|
35
|
+
if (parsed && typeof parsed === 'object' && 'workspace' in parsed) {
|
|
36
|
+
return dir;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const parent = dirname(dir);
|
|
40
|
+
if (parent === dir) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
dir = parent;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=find-workspace-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-workspace-root.js","sourceRoot":"","sources":["../src/find-workspace-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,IAAI,GAAG,GAAG,QAAQ,CAAC;IACnB,SAAS,CAAC;QACR,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;QACzD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrD,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,MAAe,CAAC;YACpB,IAAI,CAAC;gBACH,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,GAAG,SAAS,CAAC;YACrB,CAAC;YACD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;gBAClE,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrites the first `version = "..."` under the `[workspace.package]`
|
|
3
|
+
* table, preserving the rest of the file byte-for-byte. Throws if the
|
|
4
|
+
* field is absent. The `[workspace.package]` mirror of
|
|
5
|
+
* `replaceCargoVersion` (`src/handlers/crates.ts`), for crates that
|
|
6
|
+
* inherit their version via `version.workspace = true`. #428.
|
|
7
|
+
*/
|
|
8
|
+
export declare function replaceWorkspacePackageVersion(source: string, version: string): string;
|
|
9
|
+
//# sourceMappingURL=replace-workspace-package-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-workspace-package-version.d.ts","sourceRoot":"","sources":["../src/replace-workspace-package-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CActF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrites the first `version = "..."` under the `[workspace.package]`
|
|
3
|
+
* table, preserving the rest of the file byte-for-byte. Throws if the
|
|
4
|
+
* field is absent. The `[workspace.package]` mirror of
|
|
5
|
+
* `replaceCargoVersion` (`src/handlers/crates.ts`), for crates that
|
|
6
|
+
* inherit their version via `version.workspace = true`. #428.
|
|
7
|
+
*/
|
|
8
|
+
export function replaceWorkspacePackageVersion(source, version) {
|
|
9
|
+
// [workspace.package] header, then the first `version = "x.y.z"` line.
|
|
10
|
+
const re = /(\[workspace\.package\][\s\S]*?)(^\s*version\s*=\s*")([^"]*)(")/m;
|
|
11
|
+
const m = re.exec(source);
|
|
12
|
+
if (!m) {
|
|
13
|
+
throw new Error('Cargo.toml: no [workspace.package].version field found');
|
|
14
|
+
}
|
|
15
|
+
const [, pre, prefix, old, suffix] = m;
|
|
16
|
+
if (old === version) {
|
|
17
|
+
return source;
|
|
18
|
+
}
|
|
19
|
+
const start = m.index + pre.length;
|
|
20
|
+
const end = start + prefix.length + old.length + suffix.length;
|
|
21
|
+
return source.slice(0, start) + prefix + version + suffix + source.slice(end);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=replace-workspace-package-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-workspace-package-version.js","sourceRoot":"","sources":["../src/replace-workspace-package-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAAC,MAAc,EAAE,OAAe;IAC5E,uEAAuE;IACvE,MAAM,EAAE,GAAG,kEAAkE,CAAC;IAC9E,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAwD,CAAC;IAC9F,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;IACnC,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-crate-version.d.ts","sourceRoot":"","sources":["../src/write-crate-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"write-crate-version.d.ts","sourceRoot":"","sources":["../src/write-crate-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAerF"}
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* `Cargo.toml`, so it needs a manifest-direct bump with no pyproject
|
|
18
18
|
* gate. This is that command.
|
|
19
19
|
*/
|
|
20
|
-
import { readFileSync
|
|
20
|
+
import { readFileSync } from 'node:fs';
|
|
21
21
|
import { join } from 'node:path';
|
|
22
|
-
import {
|
|
22
|
+
import { writeResolvedCargoVersion } from './write-resolved-cargo-version.js';
|
|
23
23
|
/**
|
|
24
24
|
* Rewrite `[package].version` in the crate at `crateDir` to `version`
|
|
25
25
|
* and return the list of absolute paths that were modified.
|
|
@@ -43,10 +43,6 @@ export function writeCrateVersionForBuild(crateDir, version) {
|
|
|
43
43
|
}
|
|
44
44
|
throw err;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
if (updated !== original) {
|
|
48
|
-
writeFileSync(cargoPath, updated, 'utf8');
|
|
49
|
-
}
|
|
50
|
-
return [cargoPath];
|
|
46
|
+
return writeResolvedCargoVersion(crateDir, original, version);
|
|
51
47
|
}
|
|
52
48
|
//# sourceMappingURL=write-crate-version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-crate-version.js","sourceRoot":"","sources":["../src/write-crate-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"write-crate-version.js","sourceRoot":"","sources":["../src/write-crate-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB,EAAE,OAAe;IACzE,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC/C,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,QAAQ,GAAG,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CACb,gDAAgD,SAAS,wGAAwG,EACjK,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IACD,OAAO,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrite a crate's version to `version`, following Cargo workspace
|
|
3
|
+
* inheritance (#428):
|
|
4
|
+
*
|
|
5
|
+
* - a literal `[package].version = "x.y.z"` is rewritten in place;
|
|
6
|
+
* - a member that inherits via `version.workspace = true` has the
|
|
7
|
+
* workspace root's `[workspace.package].version` rewritten instead.
|
|
8
|
+
*
|
|
9
|
+
* `crateDir` is the crate's directory and `cargoSource` its already-read
|
|
10
|
+
* `Cargo.toml` (callers own the file-missing error message and hand the
|
|
11
|
+
* bytes here). Returns the absolute path(s) actually modified. Throws when
|
|
12
|
+
* the crate declares no resolvable version source (via `replaceCargoVersion`),
|
|
13
|
+
* or when it inherits but no ancestor `[workspace]` exists.
|
|
14
|
+
*/
|
|
15
|
+
export declare function writeResolvedCargoVersion(crateDir: string, cargoSource: string, version: string): string[];
|
|
16
|
+
//# sourceMappingURL=write-resolved-cargo-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-resolved-cargo-version.d.ts","sourceRoot":"","sources":["../src/write-resolved-cargo-version.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAmCV"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { parse as parseToml } from 'smol-toml';
|
|
4
|
+
import { findWorkspaceRoot } from './find-workspace-root.js';
|
|
5
|
+
import { replaceCargoVersion } from './handlers/crates.js';
|
|
6
|
+
import { replaceWorkspacePackageVersion } from './replace-workspace-package-version.js';
|
|
7
|
+
/**
|
|
8
|
+
* Rewrite a crate's version to `version`, following Cargo workspace
|
|
9
|
+
* inheritance (#428):
|
|
10
|
+
*
|
|
11
|
+
* - a literal `[package].version = "x.y.z"` is rewritten in place;
|
|
12
|
+
* - a member that inherits via `version.workspace = true` has the
|
|
13
|
+
* workspace root's `[workspace.package].version` rewritten instead.
|
|
14
|
+
*
|
|
15
|
+
* `crateDir` is the crate's directory and `cargoSource` its already-read
|
|
16
|
+
* `Cargo.toml` (callers own the file-missing error message and hand the
|
|
17
|
+
* bytes here). Returns the absolute path(s) actually modified. Throws when
|
|
18
|
+
* the crate declares no resolvable version source (via `replaceCargoVersion`),
|
|
19
|
+
* or when it inherits but no ancestor `[workspace]` exists.
|
|
20
|
+
*/
|
|
21
|
+
export function writeResolvedCargoVersion(crateDir, cargoSource, version) {
|
|
22
|
+
// Detect inheritance from the parsed manifest. An unparseable manifest
|
|
23
|
+
// falls through to the literal path, preserving the pre-#428 regex
|
|
24
|
+
// behavior for odd-but-writable manifests.
|
|
25
|
+
let pkgVersion;
|
|
26
|
+
try {
|
|
27
|
+
pkgVersion = parseToml(cargoSource).package?.version;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
pkgVersion = undefined;
|
|
31
|
+
}
|
|
32
|
+
const inherits = !!pkgVersion &&
|
|
33
|
+
typeof pkgVersion === 'object' &&
|
|
34
|
+
pkgVersion.workspace === true;
|
|
35
|
+
if (!inherits) {
|
|
36
|
+
// Literal `[package].version` (or genuinely absent — replaceCargoVersion
|
|
37
|
+
// throws the same "no [package].version" error the callers relied on).
|
|
38
|
+
const cargoPath = join(crateDir, 'Cargo.toml');
|
|
39
|
+
const updated = replaceCargoVersion(cargoSource, version);
|
|
40
|
+
if (updated !== cargoSource) {
|
|
41
|
+
writeFileSync(cargoPath, updated, 'utf8');
|
|
42
|
+
}
|
|
43
|
+
return [cargoPath];
|
|
44
|
+
}
|
|
45
|
+
const root = findWorkspaceRoot(crateDir);
|
|
46
|
+
if (root === null) {
|
|
47
|
+
throw new Error(`Cargo.toml: ${join(crateDir, 'Cargo.toml')} sets \`version.workspace = true\` but no ancestor [workspace] Cargo.toml was found. Declare [workspace.package].version at the workspace root.`);
|
|
48
|
+
}
|
|
49
|
+
const rootPath = join(root, 'Cargo.toml');
|
|
50
|
+
const rootSource = readFileSync(rootPath, 'utf8');
|
|
51
|
+
const updated = replaceWorkspacePackageVersion(rootSource, version);
|
|
52
|
+
if (updated !== rootSource) {
|
|
53
|
+
writeFileSync(rootPath, updated, 'utf8');
|
|
54
|
+
}
|
|
55
|
+
return [rootPath];
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=write-resolved-cargo-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-resolved-cargo-version.js","sourceRoot":"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AAC;IACzC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,eAAe,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,iJAAiJ,CAC7L,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,8BAA8B,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QAAA,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAAA,CAAC;IACvE,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-version.d.ts","sourceRoot":"","sources":["../src/write-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAaH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"write-version.d.ts","sourceRoot":"","sources":["../src/write-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAaH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAqD9E"}
|
package/dist/write-version.js
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
* for the same reason, so a CLI-direct invocation surfaces the same
|
|
17
17
|
* actionable error rather than building an under-versioned artifact.
|
|
18
18
|
*/
|
|
19
|
-
import { readFileSync
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
20
|
import { join } from 'node:path';
|
|
21
21
|
import { parse as parseToml } from 'smol-toml';
|
|
22
22
|
import { ErrorCodes } from './error-codes.js';
|
|
23
|
-
import {
|
|
23
|
+
import { writeResolvedCargoVersion } from './write-resolved-cargo-version.js';
|
|
24
24
|
const DYNAMIC_VERSION_DOC_POINTER = 'https://thekevinscott.github.io/putitoutthere/guide/dynamic-versions';
|
|
25
25
|
/**
|
|
26
26
|
* Rewrite the version source for a maturin package and return the list
|
|
@@ -82,11 +82,7 @@ export function writeVersionForBuild(pkgDir, version) {
|
|
|
82
82
|
/* v8 ignore next -- non-ENOENT read errors surface as-is */
|
|
83
83
|
throw err;
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
if (cargoUpdated !== cargoOriginal) {
|
|
87
|
-
writeFileSync(cargoPath, cargoUpdated, 'utf8');
|
|
88
|
-
}
|
|
89
|
-
return [cargoPath];
|
|
85
|
+
return writeResolvedCargoVersion(pkgDir, cargoOriginal, version);
|
|
90
86
|
}
|
|
91
87
|
function isDynamicVersion(project) {
|
|
92
88
|
const { dynamic } = project;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-version.js","sourceRoot":"","sources":["../src/write-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"write-version.js","sourceRoot":"","sources":["../src/write-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,MAAM,2BAA2B,GAC/B,sEAAsE,CAAC;AAEzE;;;;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