Skip to content

Commit ac90ddb

Browse files
robertsLandoclaude
andcommitted
e2e(claude-code): enable Zstd via pkg config; bump pkg → ~6.19.0
pkg v6.19.0 (yao-pkg/pkg#263, closes #262) landed config support for the CLI-only build flags, and ships the SEA-mode detector fix (yao-pkg/pkg#268) that caused the prior OOM at bytecode-compile time. - claude-code-smoke: add `compress: 'Zstd'` alongside `sea: true` in package.json#pkg; bump pkg-version input ~6.18.0 → ~6.19.0. - Default `pkg-version` input bumped ~6.16.0 → ~6.19.0 — the whole config-as-source-of-truth direction of this branch requires it. - Regenerated action.yml / packages/build/action.yml / docs/inputs.md. - STATUS.yaml: upstream-dependency RESOLVED; Zstd gap dropped; e2e-status lists claude-code-smoke; ci-status bumped to 227 tests. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 7162786 commit ac90ddb

7 files changed

Lines changed: 42 additions & 45 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,22 +253,18 @@ jobs:
253253
254254
# ──────────────────────────────────────────────────────────────────────
255255
# Real-world smoke: pull @anthropic-ai/claude-code from npm, build a
256-
# native binary per runner OS/arch in SEA mode, tar.gz archive, execute
257-
# the binary with --version, then verify the archive round-trips and
258-
# the sha256 sidecar matches the archive bytes.
256+
# native binary per runner OS/arch in SEA mode with Zstd-compressed
257+
# bundled sources, tar.gz archive, execute the binary with --version,
258+
# then verify the archive round-trips and the sha256 sidecar matches
259+
# the archive bytes.
259260
#
260261
# claude-code is ESM, so SEA mode is required (standard pkg can't
261-
# bytecode-compile ESM). SEA is expressed via `sea: true` in the pkg
262-
# config (package.json#pkg). Each matrix entry builds for the runner's
263-
# native target so the produced binary can be launched in-place,
264-
# giving real cross-OS + cross-arch coverage (x64 and arm64 on Linux,
265-
# arm64 on macOS, x64 on Windows).
266-
#
267-
# NOTE: Zstd bundled-binary compression (`--compress Zstd`) is a
268-
# CLI-only flag on @yao-pkg/pkg today; there is no pkg-config key for
269-
# it yet. Since this branch doesn't mirror CLI-only flags as action
270-
# inputs, the job can't exercise Zstd until the upstream pkg issue
271-
# lands config support. See docs/upstream-pkg-config-issue.md.
262+
# bytecode-compile ESM). Both `sea: true` and `compress: 'Zstd'` are
263+
# declared in the pkg config (package.json#pkg) — expressible in
264+
# config starting @yao-pkg/pkg v6.19.0 (yao-pkg/pkg#263). Each matrix
265+
# entry builds for the runner's native target so the produced binary
266+
# can be launched in-place, giving real cross-OS + cross-arch
267+
# coverage (x64 and arm64 on Linux, arm64 on macOS, x64 on Windows).
272268
claude-code-smoke:
273269
name: claude-code-smoke / ${{ matrix.os }} / ${{ matrix.target }}
274270
runs-on: ${{ matrix.os }}
@@ -338,13 +334,13 @@ jobs:
338334
const p = './package.json';
339335
const pkg = JSON.parse(fs.readFileSync(p, 'utf8'));
340336
pkg.bin = './' + process.argv[1];
341-
// SEA mode is expressible in pkg config (sea: true). Other pkg
342-
// build knobs (compress, fallbackToSource, …) are CLI-only
343-
// today — this branch waits on upstream config support rather
344-
// than mirror them as action inputs.
337+
// Full pkg-layer config lives here — no CLI-mirror inputs.
338+
// Requires @yao-pkg/pkg >= 6.19.0 for \`compress\` in config
339+
// (yao-pkg/pkg#263).
345340
pkg.pkg = {
346341
assets: ['node_modules/@anthropic-ai/claude-code/**/*'],
347342
sea: true,
343+
compress: 'Zstd',
348344
};
349345
fs.writeFileSync(p, JSON.stringify(pkg, null, 2));
350346
" "$entry"
@@ -361,10 +357,10 @@ jobs:
361357
with:
362358
config: ${{ steps.fix.outputs.fixture }}/package.json
363359
targets: ${{ matrix.target }}
364-
# Pin a recent pkg — 6.18 line is what main's e2e was validated
365-
# against. SEA (`sea: true`) is set in the package.json#pkg field,
366-
# not as an action input.
367-
pkg-version: ~6.18.0
360+
# 6.19.0+ is required for the `compress` key in pkg config.
361+
# SEA (`sea: true`) and Zstd (`compress: 'Zstd'`) live in the
362+
# package.json#pkg field, not as action inputs.
363+
pkg-version: ~6.19.0
368364
compress: tar.gz
369365
checksum: sha256
370366
filename: 'claude-{version}-{os}-{arch}'

STATUS.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
meta:
1111
repo: yao-pkg/pkg-action
1212
branch: main
13-
last-updated: '2026-04-23'
13+
last-updated: '2026-04-24'
1414
action-status: ALPHA — ready for early adopters to try in their own workflows
15-
ci-status: green (222 unit tests)
15+
ci-status: green (227 unit tests)
1616
e2e-status: |
17-
6 jobs after the scope cut — tiny-cjs (ubuntu/macos/windows), codegen-drift,
18-
matrix plan→fanout, multi-target-linux, windows-metadata. Signing e2e still
19-
deferred until live credentials are available.
17+
7 jobs after the scope cut — tiny-cjs (ubuntu/macos/windows), codegen-drift,
18+
matrix plan→fanout, multi-target-linux, windows-metadata, claude-code-smoke
19+
(SEA + Zstd, 4 OS/arch combos). Signing e2e still deferred until live
20+
credentials are available.
2021
2122
# ─── Scope decision (2026-04-23) ─────────────────────────────────────────
2223
#
@@ -68,16 +69,16 @@ input-surface-slim:
6869
- extra-args
6970
migration: 'Move each value into .pkgrc / pkg.config.{js,ts,json} or the `pkg` field of package.json. `buildPkgArgs` forwards the config path to pkg.'
7071
breaking: 'yes — users setting any dropped input will see the unknown-input warning and the value will be ignored. Release note required.'
72+
minimum-pkg-version: |
73+
@yao-pkg/pkg >= 6.19.0 is required for the full build-flag surface in
74+
pkg config. The default `pkg-version` input is pinned to `~6.19.0`.
7175
upstream-dependency: |
72-
@yao-pkg/pkg currently accepts only a subset of build flags in its config
73-
file (scripts, assets, ignore, targets, outputPath, patches, sea,
74-
seaConfig, deployAssets). The rest (--compress, --fallback-to-source,
75-
--public, --public-packages, --options, --no-bytecode, --no-dict,
76-
--debug, --signature) are CLI-only. Until pkg lands config support for
77-
those, users of this action lose access to them.
78-
Tracking upstream: https://github.com/yao-pkg/pkg/issues/262.
79-
known-gaps:
80-
- 'Zstd bundled-binary compression — unreachable without the --compress CLI flag. The claude-code-smoke e2e job exercises SEA + tar.gz only until upstream lands pkg-config `compress` support.'
76+
RESOLVED in @yao-pkg/pkg v6.19.0 (2026-04-24) via yao-pkg/pkg#263 —
77+
closes yao-pkg/pkg#262. All CLI-only build flags now have config
78+
equivalents: compress, fallbackToSource, public, publicPackages,
79+
options, bytecode (inverts --no-bytecode), nativeBuild (inverts
80+
--no-native-build), noDictionary (renamed from --no-dict), debug,
81+
signature.
8182
8283
# ─── Removed (2026-04-23) ────────────────────────────────────────────────
8384
# Distribution scope reset. Use dedicated downstream actions instead.

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ inputs:
1818
targets:
1919
description: 'Comma- or newline-separated pkg target triples, e.g. node22-linux-x64,node22-macos-arm64. Defaults to the host target.'
2020
pkg-version:
21-
description: 'npm version specifier for @yao-pkg/pkg (e.g. ~6.16.0). Bypassed when pkg-path is set.'
22-
default: '~6.16.0'
21+
description: 'npm version specifier for @yao-pkg/pkg (e.g. ~6.19.0). 6.19.0+ is required for the full build-flag surface in pkg config (compress, fallbackToSource, public, publicPackages, options, bytecode, nativeBuild, noDictionary, debug, signature). Bypassed when pkg-path is set.'
22+
default: '~6.19.0'
2323
pkg-path:
2424
description: 'Absolute path to a pre-installed pkg binary. Skips the implicit npm i -g.'
2525
strip:

docs/inputs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Every `pkg-action` input, grouped by category.
1212
| `config-inline` || no | no | Pkg config as a JSON string. Written to a temp file and passed to pkg via --config. Mutually exclusive with config. Do not embed secrets — this input is not masked. |
1313
| `entry` || no | no | Entry script when not specified in the config. |
1414
| `targets` || no | no | Comma- or newline-separated pkg target triples, e.g. node22-linux-x64,node22-macos-arm64. Defaults to the host target. |
15-
| `pkg-version` | `~6.16.0` | no | no | npm version specifier for @yao-pkg/pkg (e.g. ~6.16.0). Bypassed when pkg-path is set. |
15+
| `pkg-version` | `~6.19.0` | no | no | npm version specifier for @yao-pkg/pkg (e.g. ~6.19.0). 6.19.0+ is required for the full build-flag surface in pkg config (compress, fallbackToSource, public, publicPackages, options, bytecode, nativeBuild, noDictionary, debug, signature). Bypassed when pkg-path is set. |
1616
| `pkg-path` || no | no | Absolute path to a pre-installed pkg binary. Skips the implicit npm i -g. |
1717

1818
## Post-build

packages/build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ inputs:
1515
targets:
1616
description: 'Comma- or newline-separated pkg target triples, e.g. node22-linux-x64,node22-macos-arm64. Defaults to the host target.'
1717
pkg-version:
18-
description: 'npm version specifier for @yao-pkg/pkg (e.g. ~6.16.0). Bypassed when pkg-path is set.'
19-
default: '~6.16.0'
18+
description: 'npm version specifier for @yao-pkg/pkg (e.g. ~6.19.0). 6.19.0+ is required for the full build-flag surface in pkg config (compress, fallbackToSource, public, publicPackages, options, bytecode, nativeBuild, noDictionary, debug, signature). Bypassed when pkg-path is set.'
19+
default: '~6.19.0'
2020
pkg-path:
2121
description: 'Absolute path to a pre-installed pkg binary. Skips the implicit npm i -g.'
2222
strip:

packages/core/src/inputs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export const INPUT_SPECS: readonly InputSpec[] = [
5959
name: 'pkg-version',
6060
category: 'build',
6161
description:
62-
'npm version specifier for @yao-pkg/pkg (e.g. ~6.16.0). Bypassed when pkg-path is set.',
63-
default: '~6.16.0',
62+
'npm version specifier for @yao-pkg/pkg (e.g. ~6.19.0). 6.19.0+ is required for the full build-flag surface in pkg config (compress, fallbackToSource, public, publicPackages, options, bytecode, nativeBuild, noDictionary, debug, signature). Bypassed when pkg-path is set.',
63+
default: '~6.19.0',
6464
},
6565
{
6666
name: 'pkg-path',
@@ -494,7 +494,7 @@ export function parseInputs(opts: ParseInputsOptions = {}): ActionInputs {
494494
configInline,
495495
entry: readInput(env, 'entry'),
496496
targets,
497-
pkgVersion: readInput(env, 'pkg-version') ?? '~6.16.0',
497+
pkgVersion: readInput(env, 'pkg-version') ?? '~6.19.0',
498498
pkgPath: readInput(env, 'pkg-path'),
499499
};
500500

packages/core/test/unit/inputs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test('parseInputs with no env uses defaults', () => {
6464
strictEqual(inputs.build.config, undefined);
6565
strictEqual(inputs.build.configInline, undefined);
6666
strictEqual(inputs.build.entry, undefined);
67-
strictEqual(inputs.build.pkgVersion, '~6.16.0');
67+
strictEqual(inputs.build.pkgVersion, '~6.19.0');
6868
strictEqual(inputs.build.pkgPath, undefined);
6969

7070
strictEqual(inputs.postBuild.compress, 'none');

0 commit comments

Comments
 (0)