Skip to content

Commit

Permalink
fix(TypeScript): npm peer dependency install conflicts in user applic…
Browse files Browse the repository at this point in the history
…ations

As pointed out in npm/cli#7719, npm struggles with resolving peer dependencies when running `npm install` and applying new peer dependency requirements that do not align with previously installed versions. In many cases it produces an unexpected error for the user instead of updating installed peer dependency packages.

As a (temporary?) workaround, let us avoid using strict peer dependency requirements for our packages.

This changes the `package.json` to use regular dependency version spec even though the expectation is that the install is “flat”, i. e., the packages are is installed on the top-level of `node_modules/` in the user application.
  • Loading branch information
platosha committed Sep 4, 2024
1 parent 1503513 commit e495329
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 29 deletions.
4 changes: 1 addition & 3 deletions packages/ts/generator-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@
"bin": {
"tsgen": "bin/index.js"
},
"peerDependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"get-stdin": "^9.0.0",
"meow": "^12.1.1"
Expand Down
6 changes: 2 additions & 4 deletions packages/ts/generator-plugin-backbone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"fast-deep-equal": "^3.1.3",
"openapi-types": "^12.1.3",
Expand Down
6 changes: 2 additions & 4 deletions packages/ts/generator-plugin-barrel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"typescript": "5.5.2"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/ts/generator-plugin-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"typescript": "5.5.2"
},
Expand Down
6 changes: 2 additions & 4 deletions packages/ts/generator-plugin-model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha12",
"@vaadin/hilla-lit-form": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"@vaadin/hilla-lit-form": "24.5.0-alpha12",
"fast-deep-equal": "^3.1.3",
"openapi-types": "^12.1.3",
"typescript": "5.5.2"
Expand Down
6 changes: 2 additions & 4 deletions packages/ts/generator-plugin-push/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"fast-deep-equal": "^3.1.3",
"openapi-types": "^12.1.3",
Expand Down
4 changes: 1 addition & 3 deletions packages/ts/generator-plugin-signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"fast-deep-equal": "^3.1.3",
"iterator-helpers-polyfill": "^3.0.1",
Expand Down
6 changes: 2 additions & 4 deletions packages/ts/generator-plugin-subtypes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"dependencies": {
"@vaadin/hilla-generator-core": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-client": "24.5.0-alpha12",
"@vaadin/hilla-generator-plugin-model": "24.5.0-alpha12"
},
"dependencies": {
"@vaadin/hilla-generator-plugin-model": "24.5.0-alpha12",
"@vaadin/hilla-generator-utils": "24.5.0-alpha12",
"fast-deep-equal": "^3.1.3",
"openapi-types": "^12.1.3",
Expand Down

0 comments on commit e495329

Please sign in to comment.