Skip to content

docs: describe how an add-on pins npm versions - #6091

Closed
mshabarov wants to merge 2 commits into
mainfrom
docs/pin-npm-versions-from-jar
Closed

mshabarov wants to merge 2 commits into
mainfrom
docs/pin-npm-versions-from-jar

Conversation

@mshabarov

Copy link
Copy Markdown
Contributor

Documents vaadin/flow#25308

DX/docs · building-apps/components · add-on authors who depend on
npm packages

Pinned npm versions used to come from two files that only the platform
ships. Flow now reads every versions file it finds in
META-INF/VAADIN/versions/ on the classpath, so an add-on can pin the
npm versions its Java code needs. Nothing in the docs described the
folder, the file format, or what happens when two files disagree.

Risks:

  • ✅ Docs only. No behavior change, no code examples to compile.

  • Added a "Pinning npm Versions" section to Package a Component, with
    a since badge for the release that introduced the folder.

  • Described the file format: an object with npmName plus
    npmVersion or jsVersion is one pinned package, and the keys
    around it only group entries.

  • Described the merge rules: newest version wins when two files
    disagree, a package without a version is left unpinned, and an
    unreadable file is skipped on its own.

🤖 Generated with Claude Code

Vaadin reads every versions file in META-INF/VAADIN/versions/ on the
classpath, so any jar can pin the npm versions its Java code needs.
Nothing described the folder or the file format.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@peholmst peholmst added the target/v25.3 Automatically cherry-pick to the v25.3 branch label Sep 21, 2026
An entry can name the packages the pinned one replaces, and a version that
a scanned @NpmPackage annotation or the application's own package.json
declares wins over the pinned one.
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6091.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Built from de93975

@Artur-

Artur- commented Sep 22, 2026

Copy link
Copy Markdown
Member

This is for internal use, not for public consumption

@Artur- Artur- closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/v25.3 Automatically cherry-pick to the v25.3 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants