Skip to content

Centralize NPM dependencies for website builds#506

Open
ppkarwasz wants to merge 3 commits into
gha/v0from
feat/gha/npm-central-deps
Open

Centralize NPM dependencies for website builds#506
ppkarwasz wants to merge 3 commits into
gha/v0from
feat/gha/npm-central-deps

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

This is a second attempt at #367, which locked the Antora dependencies with npm-shrinkwrap.json, but had to be rolled back in #409: it installed the dependencies differently in logging-parent (npm install .) than in the other repositories (npm install github:apache/logging-parent#rel/x.y.z).

Now that the gha/v0 branch exists solely for version pinning, the canonical package.json and package-lock.json can live here instead:

  • Website deployments pass the new npm-dependencies-ref input to deploy-site-reusable, which downloads both files (from this branch, or from any Git repository via npm-dependencies-repository) before building the website, so all deployed websites use the exact same dependency tree. Release website staging omits the input and uses the package.json committed in each repository.
  • Dependabot updates the NPM dependencies on this branch only (see the companion PR against main for the dependabot.yaml change).
  • The Node.js cache is keyed on the hash of both files.
  • Unlike Lock Antora dependencies #367, the lock file keeps its standard name: npm 12 removed all support for npm-shrinkwrap.json (feat!: drop npm-shrinkwrap.json support npm/cli#9262), and a shrinkwrap was never honored for Git dependencies anyway ([BUG] npm does not respect shrinkwrap files when _hasShrinkwrap is undefined npm/cli#4583).

Making website builds from released source archives reproducible will be addressed separately.

🤖 Generated with Claude Code

Add the canonical `package.json` and `package-lock.json` that
determine the NPM dependencies of all Apache Logging websites.

Website deployments pass the new `npm-dependencies-ref` input to
`deploy-site-reusable`, which downloads both files before building the
website, so all deployed websites use the exact same dependency tree.
Dependabot keeps the files up-to-date on this branch only.

The lock file uses its standard name, since npm 12 removed all support
for `npm-shrinkwrap.json` (npm/cli#9262).

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Assisted-By: Claude Fable 5 <noreply@anthropic.com>
The site generation is currently duplicated between `build-reusable`
(PR gate) and `deploy-site-reusable` (deployment), so both need the
same `npm-dependencies-ref` input. Also key the Node.js cache on the
manifests, since the previous key hashed files absent at restore time.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
ppkarwasz added a commit that referenced this pull request Jul 25, 2026
Prove that the centralized NPM dependencies work before #506 is merged.
Revert this commit once the manifests are available on `gha/v0`.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant