-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: lock versions with npm overrides #12635
Conversation
SonarQube analysis reported 7 issues
|
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java
Outdated
Show resolved
Hide resolved
flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunNpmInstallTest.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
Should the version validation be updated then? flow/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java Lines 113 to 114 in 5e19cb3
|
@Artur- did a change to upgrade to Node 17 + npm 8.3. Is that enough? |
It would be nice to let the users know that it will work better if you upgrade to npm 8.3+ if they are using an older globally installed node/npm. We cannot really require the latest version of npm though and we need to make sure that node 16 with its bundled npm works in a standard (i.e no addons) project |
So if I have an older |
Is it enough to mention this in the upgrade guide? For people relying on the pnpm locking and cannot upgrade to npm 8.3, they can keep using pnpm. Could also make it a warning message in the code. |
The place you would run into this is most of the time when you get a browser warning that a custom element has already been defined. This would be the best place to provide additional info on how the solve the problem but it feels like a separate issue/pr |
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Show resolved
Hide resolved
flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunNpmInstallTest.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdatePackages.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/com/vaadin/flow/server/frontend/NodeUpdatePackagesNpmVersionLockingTest.java
Outdated
Show resolved
Hide resolved
Also missing is cleaning of the override in |
Good catch, done |
flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java
Outdated
Show resolved
Hide resolved
flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java
Outdated
Show resolved
Hide resolved
flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Anton Platonov <anton@vaadin.com>
Co-authored-by: Anton Platonov <anton@vaadin.com>
Co-authored-by: Anton Platonov <anton@vaadin.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
As someone who fell in this thread almost by accident, when I saw the issue at pnpm/pnpm#4190, and I don't know much about this project, but I thought to give my two cents, that you could add some version specification in the package.json "engines": {
"npm": ">=8.3.0",
"pnpm": ">=5.10.1"
}
|
Description
How it works?
versions.json
also for npm modenpm
mode, create an"overrides"
section in thepackage.json
file if the file does not exist.version.json
file, add each dependency to the overrides section as @vaadin/xxx: $@vaadin/xxx if there is no @vaadin/xxx in the "overrides" section.Requires npm 8.3.0 or newer which has the "overrids" feature.
Fixes vaadin/hilla#164
Type of change
Checklist
Additional for
Feature
type of change