Conversation
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>
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.
Contributor
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-6091.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from de93975 |
Member
|
This is for internal use, not for public consumption |
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.
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 thenpm 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
npmNameplusnpmVersionorjsVersionis one pinned package, and the keysaround 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