fix(release): omit optional dependencies from the packed install

The Landlock platform packages sit behind optionalDependencies, and npm fails
the install on their 404 rather than skipping them: they belong to the native
sequence, whose pack needs a musl toolchain and one build per architecture, so
this job cannot produce them and holds no credentials to fetch them. A consumer
that cannot install them must still start, which is what optional means here.

The release spec also gains block bodies where the lint rule rejects returning a
void expression from an arrow shorthand.
This commit is contained in:
imccyu
2026-08-11 01:39:01 +08:00
parent d9dcf5a484
commit 21db3220d6
5 changed files with 21 additions and 12 deletions
+6 -1
View File
@@ -92,7 +92,12 @@ function main(): void {
const environment = consumerEnvironment(consumerRoot)
console.log(`release verify-packed-install: installing ${String(packed.size)} tarball(s) into ${consumerRoot}`)
capture('npm', ['install', '--no-audit', '--no-fund', '--package-lock=false'], { cwd: consumerRoot, env: environment })
// Optional dependencies are omitted: the platform packages behind them
// belong to the native release sequence, this job holds no credentials for
// the private scope, and a consumer that cannot install them must still
// start — which is what optional means here.
capture('npm', ['install', '--no-audit', '--no-fund', '--package-lock=false', '--omit=optional'],
{ cwd: consumerRoot, env: environment })
const bin = join(consumerRoot, 'node_modules', ...entry.packageName.split('/'), entry.binPath)
const version = capture(process.execPath, [bin, '--version'], { cwd: consumerRoot, env: environment })