putitoutthere 0.2.3 → 0.2.4
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 +7 -7
- package/MIGRATIONS.md +13 -14
- package/README.md +12 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,7 +13,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
15
|
- **`PIOT_PUBLISH_EMPTY_PLAN` error code.** Surfaced when `publish` is invoked with an empty matrix. Joins `PIOT_AUTH_NO_TOKEN` in the stable error-code vocabulary; foreign agents debugging a failed publish can fingerprint on the code without parsing prose.
|
|
16
|
-
- **`kind = "npm"` `build` accepts an array of entries with consumer-defined platform-package name templates
|
|
16
|
+
- **`kind = "npm"` `build` accepts an array of entries with consumer-defined platform-package name templates.** For packages that ship both a napi-rs Node addon and a CLI binary from the same npm package (the `@swc/core` shape), declare `build = [{ mode = "napi", name = "@scope/lib-{triple}" }, { mode = "bundled-cli", name = "@scope/cli-{triple}" }]`. Each entry contributes its own per-platform package family; the main package's `optionalDependencies` spans both. Entries can be bare mode strings (`"napi"`, defaults to `{name}-{triple}` template) or `{ mode, name }` objects. Variables surfaced in `name` templates: `{name}`, `{scope}`, `{base}`, `{triple}`, `{mode}`. `{version}` is intentionally not surfaced. Single-mode string form (`build = "napi"`) preserved byte-for-byte — same artifact-name layout, same platform-package names, no migration pressure on existing consumers. See [README → Recipes → Multi-mode npm family](./README.md#multi-mode-npm-family) and [MIGRATIONS.md](./MIGRATIONS.md#npm-build-accepts-array-of-entries).
|
|
17
17
|
|
|
18
18
|
### Changed
|
|
19
19
|
|
|
@@ -82,7 +82,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
82
82
|
— which then ran `npm publish` from a fresh checkout and shipped
|
|
83
83
|
tarballs missing the compiled output. Any consumer whose
|
|
84
84
|
`package.json` declared `"files": ["dist", ...]` would publish a
|
|
85
|
-
broken artifact (caught in the wild
|
|
85
|
+
broken artifact (caught in the wild on a downstream consumer).
|
|
86
86
|
The publish job now mirrors what a developer running `npm publish`
|
|
87
87
|
locally would do: detect the lockfile, install deps, run `npm run
|
|
88
88
|
build --if-present` per npm package path. napi / bundled-cli
|
|
@@ -155,19 +155,19 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
155
155
|
[MIGRATIONS.md](./MIGRATIONS.md#scaffolded-releaseyml-now-forwards-github_token).
|
|
156
156
|
- **`/` in `[[package]].name` is now safe — planner encodes it for
|
|
157
157
|
`actions/upload-artifact@v4`** (#230). Polyglot-monorepo grouping
|
|
158
|
-
shapes (e.g. `name = "py/
|
|
158
|
+
shapes (e.g. `name = "py/foo"`, `"js/foo"`) used to
|
|
159
159
|
produce `artifact_name` values containing `/`, which
|
|
160
160
|
`actions/upload-artifact@v4` rejects with
|
|
161
161
|
`The artifact name is not valid: ... Contains the following character: Forward slash /`,
|
|
162
162
|
failing the build job before piot ever ran. The planner now encodes
|
|
163
|
-
each `/` to `__` in `artifact_name` (so `py/
|
|
164
|
-
`
|
|
163
|
+
each `/` to `__` in `artifact_name` (so `py/foo` →
|
|
164
|
+
`py__foo-sdist`) and config validation reserves `__` in
|
|
165
165
|
`pkg.name` so the round-trip stays unambiguous. Other
|
|
166
166
|
upload-artifact-forbidden characters (`\`, `:`, `<`, `>`, `|`,
|
|
167
167
|
`*`, `?`, `"`) are now rejected at config load. Read sites
|
|
168
168
|
(`publish`, `doctor`, `preflight`, `completeness`) consume
|
|
169
|
-
`artifact_name` verbatim and need no changes; consumers running
|
|
170
|
-
|
|
169
|
+
`artifact_name` verbatim and need no changes; consumers running a
|
|
170
|
+
prior `/`-encoding workaround should remove it once
|
|
171
171
|
they upgrade. See [MIGRATIONS.md](./MIGRATIONS.md#package-names-with--no-longer-need-an-encode-decode-workaround) and
|
|
172
172
|
[Artifact contract → notes](./notes/internals/artifact-contract.md#naming-convention-reference).
|
|
173
173
|
- **Documentation accuracy pass** (#231). A docs-vs-code audit caught
|
package/MIGRATIONS.md
CHANGED
|
@@ -109,7 +109,7 @@ of entries to publish multiple per-platform package families from a
|
|
|
109
109
|
single main package — for example, a napi-rs Node addon plus a CLI
|
|
110
110
|
binary, both selected via `optionalDependencies` on a shared top-level
|
|
111
111
|
package. Each entry has a `mode` (`napi` / `bundled-cli`) and an
|
|
112
|
-
optional `name` template (e.g. `"@
|
|
112
|
+
optional `name` template (e.g. `"@scope/lib-{triple}"`) that the
|
|
113
113
|
consumer fully controls. The previous single-mode string form is
|
|
114
114
|
preserved.
|
|
115
115
|
|
|
@@ -143,8 +143,8 @@ families separate:
|
|
|
143
143
|
|
|
144
144
|
```
|
|
145
145
|
artifacts/
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
my-cli-napi-linux-x64-gnu/ # napi family
|
|
147
|
+
my-cli-bundled-cli-linux-x64-gnu/ # bundled-cli family
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
The build job for a multi-mode row writes to
|
|
@@ -184,7 +184,7 @@ emitted `artifact_path: package.json` for noarch npm rows, so the
|
|
|
184
184
|
build job's compile output was never uploaded — and the publish job's
|
|
185
185
|
fresh checkout had no compiled files. `npm publish` doesn't validate
|
|
186
186
|
`files` content, so the broken artifact reached the registry. Caught
|
|
187
|
-
in the wild
|
|
187
|
+
in the wild on a downstream consumer. The publish job now installs
|
|
188
188
|
deps and runs `npm run build --if-present` per npm package path
|
|
189
189
|
before invoking the engine — the same logic the build job already
|
|
190
190
|
runs, just at the point where it actually matters.
|
|
@@ -707,7 +707,7 @@ reusable workflow internally pins:
|
|
|
707
707
|
- `actions/download-artifact@v4`
|
|
708
708
|
- `PyO3/maturin-action@v1`
|
|
709
709
|
|
|
710
|
-
If a consumer was running newer majors (e.g.
|
|
710
|
+
If a consumer was running newer majors (e.g. one consumer hit
|
|
711
711
|
`download-artifact@v8` defaults that broke the artifact-naming
|
|
712
712
|
contract), the reusable workflow standardises everyone on the
|
|
713
713
|
known-tested versions.
|
|
@@ -806,12 +806,12 @@ putitoutthere plan --json | jq '.[] | {name, artifact_name, artifact_path}'
|
|
|
806
806
|
Expect every `artifact_path` to be a plain directory (no `*`):
|
|
807
807
|
|
|
808
808
|
```json
|
|
809
|
-
{ "name": "py/
|
|
809
|
+
{ "name": "py/foo", "artifact_name": "py__foo-sdist", "artifact_path": "py/foo/dist" }
|
|
810
810
|
```
|
|
811
811
|
|
|
812
812
|
After the next release run, the `actions/upload-artifact@v4` step
|
|
813
|
-
uploads `py/
|
|
814
|
-
`artifacts/
|
|
813
|
+
uploads `py/foo/dist/` contents flat under
|
|
814
|
+
`artifacts/py__foo-sdist/` (no nested `packages/python/dist/`
|
|
815
815
|
prefix), and the publish step finds the sdist immediately.
|
|
816
816
|
|
|
817
817
|
### Scaffolded `release.yml` now forwards `GITHUB_TOKEN`
|
|
@@ -901,8 +901,7 @@ upstream.
|
|
|
901
901
|
|
|
902
902
|
- **None for repos with slash-free `pkg.name`** — `artifact_name`
|
|
903
903
|
is byte-identical to the previous version.
|
|
904
|
-
- **Repos that ran
|
|
905
|
-
encode/decode workaround should remove it.** The planner now
|
|
904
|
+
- **Repos that ran a prior `/`-encoding workaround should remove it.** The planner now
|
|
906
905
|
does the encoding natively; leaving the workaround in place
|
|
907
906
|
produces double-encoded names like `py____foo-sdist`, which the
|
|
908
907
|
publish-side reader will treat as a missing artifact.
|
|
@@ -950,15 +949,15 @@ putitoutthere plan --json | jq '.[].artifact_name'
|
|
|
950
949
|
|
|
951
950
|
Expect every emitted `artifact_name` to contain only ASCII letters,
|
|
952
951
|
digits, `-`, `_`, and `.` — no `/` and no other forbidden chars.
|
|
953
|
-
For a repo with `name = "py/
|
|
952
|
+
For a repo with `name = "py/foo"`:
|
|
954
953
|
|
|
955
954
|
```
|
|
956
|
-
"
|
|
957
|
-
"
|
|
955
|
+
"py__foo-sdist"
|
|
956
|
+
"py__foo-wheel-x86_64-unknown-linux-gnu"
|
|
958
957
|
```
|
|
959
958
|
|
|
960
959
|
After the next release, the build job's `actions/upload-artifact@v4`
|
|
961
|
-
step uploads under `
|
|
960
|
+
step uploads under `py__foo-sdist/` (a single flat directory
|
|
962
961
|
under `artifacts/`), and piot's publish-side reader consumes the
|
|
963
962
|
same path.
|
|
964
963
|
|
package/README.md
CHANGED
|
@@ -389,17 +389,17 @@ registration (a policy on `my-cli` does not cover
|
|
|
389
389
|
For a package that is both a napi-rs Node addon (a `.node` library) **and**
|
|
390
390
|
a CLI binary, declare `build` as an array. Each entry contributes its own
|
|
391
391
|
per-platform family; the main package's `optionalDependencies` spans both.
|
|
392
|
-
The `@swc/core`
|
|
392
|
+
The `@swc/core` distribution shape.
|
|
393
393
|
|
|
394
394
|
```toml
|
|
395
395
|
[[package]]
|
|
396
|
-
name = "
|
|
396
|
+
name = "my-cli"
|
|
397
397
|
kind = "npm"
|
|
398
398
|
path = "packages/ts"
|
|
399
|
-
globs = ["packages/ts/**", "crates/
|
|
399
|
+
globs = ["packages/ts/**", "crates/my-cli/**"]
|
|
400
400
|
build = [
|
|
401
|
-
{ mode = "napi", name = "@
|
|
402
|
-
{ mode = "bundled-cli", name = "@
|
|
401
|
+
{ mode = "napi", name = "@my-cli/lib-{triple}" },
|
|
402
|
+
{ mode = "bundled-cli", name = "@my-cli/cli-{triple}" },
|
|
403
403
|
]
|
|
404
404
|
targets = [
|
|
405
405
|
"linux-x64-gnu",
|
|
@@ -414,8 +414,8 @@ template** for its platform packages. Variables:
|
|
|
414
414
|
| Variable | Resolves to |
|
|
415
415
|
|-------------|-------------------------------------------------------------------|
|
|
416
416
|
| `{name}` | The main package's npm name (`pkg.npm` if set, else `pkg.name`). |
|
|
417
|
-
| `{scope}` | Scope without `@` for scoped names (e.g. `
|
|
418
|
-
| `{base}` | Name without scope (e.g. `core` for `@
|
|
417
|
+
| `{scope}` | Scope without `@` for scoped names (e.g. `myorg`); `""` if unscoped. |
|
|
418
|
+
| `{base}` | Name without scope (e.g. `core` for `@myorg/core`). |
|
|
419
419
|
| `{triple}` | Target triple as written in `targets` — required in the template. |
|
|
420
420
|
| `{mode}` | The entry's mode (`napi` / `bundled-cli`). |
|
|
421
421
|
|
|
@@ -437,11 +437,11 @@ only applies when `build` has more than one entry.
|
|
|
437
437
|
- All entries must produce distinct platform-package name templates.
|
|
438
438
|
|
|
439
439
|
Each platform package across **every** family needs its own npm
|
|
440
|
-
trusted-publisher registration. For the
|
|
441
|
-
`@
|
|
442
|
-
`@
|
|
443
|
-
`@
|
|
444
|
-
one per platform package, plus the top-level `
|
|
440
|
+
trusted-publisher registration. For the config above, that's
|
|
441
|
+
`@my-cli/lib-linux-x64-gnu`, `@my-cli/lib-darwin-arm64`,
|
|
442
|
+
`@my-cli/lib-win32-x64-msvc`, `@my-cli/cli-linux-x64-gnu`,
|
|
443
|
+
`@my-cli/cli-darwin-arm64`, `@my-cli/cli-win32-x64-msvc` — six total,
|
|
444
|
+
one per platform package, plus the top-level `my-cli`.
|
|
445
445
|
|
|
446
446
|
### Rust CLI inside a PyPI wheel
|
|
447
447
|
|