Repository navigation
ci: stamp nightly versions before building the package - #12880
Merged
Merged
Conversation
Code Review by Qodo
1. Unsafe peer dependencies pass checks
|
|
|
alumni
approved these changes
Sep 18, 2026
gioboa
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



First of the follow-ups recorded when the pnpm workspace landed (#12854).
The problem
workspace:*is resolved at publish time against the linked package's manifest. Fortypeormthat link points atbuild/package, because the manifest setspublishConfig.directory. The nightly job rewrote the version inbuild/package/package.jsonafter the build, so from that point on the built manifest disagreed with its source and anyworkspace:*resolution picked up the nightly version.Nothing is broken today, because the only workspace dependency on
typeormis adevDependencyof a package CI does not publish. It stops being inert the moment that package is published from CI, or a package usesworkspace:*in a field consumers install from.The change
Stamp the nightly version on the source manifests before anything is built, instead of rewriting the built output afterwards. The built manifest is then correct from the moment it is produced, source and build agree for the rest of the job, and the substitution is no longer sensitive to step ordering.
This also removes the separate codemod stamping step, since both manifests are handled in one place.
The guard
Consistent ordering does not stop someone putting
workspace:*independenciesorpeerDependencieslater, which is the case that would actually reach users.scripts/check-publishable-manifests.mjsfails the build if a workspace specifier appears independencies,peerDependenciesoroptionalDependenciesof any non-private package.devDependenciesare left alone: they are metadata in a published package and nothing installs them.It runs in the
lintjob, so it fails on the pull request that introduces the problem rather than at 02:00 in a publish run.Verification
Both paths were simulated locally against a real build.
Nightly: source and built manifests both read
1.1.1-nightly.20260918, and packing@typeorm/legacy-naming-strategiessubstitutesdevDependencies.typeorm: 1.1.1-nightly.20260918, which is the exact version being published in the same run.Release, with no stamping:
1.1.1in the source manifest,1.1.1in the built manifest,1.1.1in the substitution.The guard was checked in both directions: it passes on the current tree, and planting
peerDependencies.typeorm: workspace:*in@typeorm/legacy-naming-strategiesfails it with the offending field named.Unrelated, but found while reading the publish logs
The scheduled publish has failed every day since at least 13 September, before this change and before #12854.
Publish typeormsucceeds.Publish @typeorm/codemodfails withENEEDAUTH, so Trusted Publishing appears to be configured fortypeormbut not for the scoped packages. npm agrees:typeormhasdev: 1.1.1-nightly.20260918,@typeorm/codemodhas onlylatest: 1.0.3and nodevtag at all.v0job fails earlier, atnpm install -g npm@latest: npm 12 requires node^22.22.2 || ^24.15.0 || >=26, and that matrix entry pins node 20.Neither is addressed here. The first needs configuration on npmjs.com rather than a repository change; the second is a fix on the
v0branch.