Problem
preview.yml defaults its inputs to recursive globs:
publish:
default: "./packages/**"
template:
default: "./examples/**"
and passes them to pkg-pr-new:
pnpx pkg-pr-new publish --pnpm "$PUBLISH_GLOB" --template "$TEMPLATE_GLOB"
The ** matches recursively, including into each package's node_modules. pkg-pr-new then walks nested dependency package.json files and aborts on any that lack a name field — which is common for internal stub manifests such as vite's:
[error] "name" field in .../packages/clink/node_modules/vite/types/package.json should be defined
##[error]Process completed with exit code 1.
(Preceded by many Skipping .../node_modules/.../*.ts: not a directory or .tgz/.tar.gz file lines as it scans the dependency tree.)
Impact
Any repo whose packages depend on something that ships a nameless nested package.json (vite is a frequent one). The preview job fails at the publish step even though install and build succeed. Latent until the build step actually completes and pkg-pr-new runs.
Repro
Problem
preview.ymldefaults its inputs to recursive globs:and passes them to pkg-pr-new:
The
**matches recursively, including into each package'snode_modules. pkg-pr-new then walks nested dependencypackage.jsonfiles and aborts on any that lack anamefield — which is common for internal stub manifests such as vite's:(Preceded by many
Skipping .../node_modules/.../*.ts: not a directory or .tgz/.tar.gz filelines as it scans the dependency tree.)Impact
Any repo whose packages depend on something that ships a nameless nested
package.json(vite is a frequent one). The preview job fails at the publish step even though install and build succeed. Latent until the build step actually completes and pkg-pr-new runs.Repro
previewrun that reached the "Publish Preview" step:https://github.com/bombshell-dev/clink/actions/runs/30575154965