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

chore: upgrade to latest lwc and @lwc/jest-preset #35

Merged
merged 6 commits into from
Jan 28, 2021

Conversation

jodarove
Copy link
Contributor

@jodarove jodarove commented Jan 21, 2021

This PR introduces a breaking change

Drops support for lwc versions < 1.5.0
Update all lwc related packages to the latest.

@jodarove jodarove force-pushed the jodarove/upgrade-lwc-and-jest-preset branch from 8db03c4 to dce9e4f Compare January 21, 2021 23:56
@jodarove jodarove force-pushed the jodarove/upgrade-lwc-and-jest-preset branch from b70d7d5 to 404e048 Compare January 22, 2021 00:33
@@ -12,6 +12,8 @@ jobs:
- v1-dependencies-{{ checksum "yarn.lock" }}
- v1-dependencies-

- run: rm -rf node_modules/
Copy link
Contributor Author

@jodarove jodarove Jan 22, 2021

Choose a reason for hiding this comment

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

I noticed this with trim-right dependency (failing CI): in previous versions of @lwc/template-compiler is including @babel/generators (< 7.5, using trim-right) under its node_module dependencies; with the new version, that's not the case, but it was still resolving the old @babel/generators code under the @lwc/template-compiler node_modules.

Copy link
Member

Choose a reason for hiding this comment

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

Removing the node_modules defeats the purpose of using cache. I would instead bump the cache version to v2-dependencies-{{ checksum "yarn.lock" }} and v2-dependencies.

"lwc": "^1.3.2",
"@lwc/wire-service": "^1.3.2",
"@lwc/compiler": "^1.11.3",
"@lwc/engine": "^1.11.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -12,6 +12,8 @@ jobs:
- v1-dependencies-{{ checksum "yarn.lock" }}
- v1-dependencies-

- run: rm -rf node_modules/
Copy link
Member

Choose a reason for hiding this comment

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

Removing the node_modules defeats the purpose of using cache. I would instead bump the cache version to v2-dependencies-{{ checksum "yarn.lock" }} and v2-dependencies.

"@lwc/jest-preset": "^4.5.1",
"lwc": "^1.3.2",
"@lwc/wire-service": "^1.3.2",
"@lwc/compiler": "^1.11.3",
Copy link
Member

Choose a reason for hiding this comment

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

If we drop support for @lwc/engine < 1.5, I would recommend adding a peer dependency restriction. This would print a warning on installation if the condition is not met.

@jodarove jodarove force-pushed the jodarove/upgrade-lwc-and-jest-preset branch from bb83333 to 943b00d Compare January 22, 2021 18:56
@ravijayaramappa
Copy link
Contributor

LGTM, agree with PM's comment about warning via peer dependency if we drop support for @lwc/engine@1.5

@jodarove jodarove merged commit 8770495 into master Jan 28, 2021
@jodarove jodarove deleted the jodarove/upgrade-lwc-and-jest-preset branch January 28, 2021 17:52
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.

3 participants