Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(protractor): optional Serenity/JS modules are marked as peerDepen…
…dencies to avoid NPM installing them by default

While this change might result in NPM warning the user that there is an "unmet peer dependency"
when installing @serenity-js/protractor or @serenity-js/cucumber modules, it seems like a better
option than the default NPM behaviour of installing all the "optional" dependencies by default,
forcing the user to download more dependencies than they want or need.

More details about the npm issue:
- npm/npm#3066
- https://npm.community/t/npm-install-no-optional-not-actually-filtering-optionals-in-cli-6-0-1-or-6-1-0/257
  • Loading branch information
jan-molak committed Feb 22, 2021
1 parent df6c145 commit 433afa1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cucumber/package.json
Expand Up @@ -50,7 +50,7 @@
"gherkin": "5.1.0",
"tiny-types": "^1.16.1"
},
"optionalDependencies": {
"peerDependencies": {
"@cucumber/cucumber": "^7.0.0",
"cucumber": "^1.3.3 || ^2.3.1 || ^3.2.2 || ^4.2.1 || ^5.0.0 || ^6.0.0"
},
Expand Down
6 changes: 2 additions & 4 deletions packages/protractor/package.json
Expand Up @@ -54,12 +54,10 @@
"is-plain-object": "^5.0.0",
"tiny-types": "^1.16.1"
},
"optionalDependencies": {
"peerDependencies": {
"@serenity-js/cucumber": "2.23.1",
"@serenity-js/jasmine": "2.23.1",
"@serenity-js/mocha": "2.23.1"
},
"peerDependencies": {
"@serenity-js/mocha": "2.23.1",
"protractor": "^5.0.0 || ^7.0.0",
"selenium-webdriver": "^3.6.0"
},
Expand Down

0 comments on commit 433afa1

Please sign in to comment.