Skip to content
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: use peerDeps for LWC #386

Closed
wants to merge 2 commits into from
Closed

feat: use peerDeps for LWC #386

wants to merge 2 commits into from

Conversation

nolanlawson
Copy link
Contributor

BREAKING CHANGE: All @lwc/* and @lwc/jest-* dependencies are now peerDependencies rather than regular dependencies, so they must be installed alongside @salesforce/sfdx-lwc-jest by consumers of this package.

To upgrade, you can do:

npm install --save-dev @lwc/engine-dom @lwc/jest-preset

Fixes #349

"@lwc/synthetic-shadow": "7.1.2",
"@lwc/wire-service": "7.1.2",
"@salesforce/wire-service-jest-util": "4.1.4",
"@salesforce/wire-service-jest-util": "^4.1.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a caret to avoid the need to keep bumping this project when the other one changes.

"eslint": "^8.57.0",
"husky": "^9.0.11",
"isbinaryfile": "^5.0.2",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5"
},
"peerDependencies": {
"@lwc/engine-dom": ">= 5",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching the current peerDep for @lwc/jest-preset on @lwc/engine-dom.

@nolanlawson
Copy link
Contributor Author

Now that I'm looking at this, this is a lot to ask of people, since you have to install ~5 packages alongside this one. Maybe we are better off just leaving it as deps for now.

@nolanlawson nolanlawson closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using peerDependencies for LWC
1 participant