-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: cleanup lockfiles #1541
chore: cleanup lockfiles #1541
Conversation
|
||
install: | ||
# ensure unexpected changes to yarn.lock break the build | ||
- yarn install --frozen-lockfile --non-interactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--frozen-lockfile
is generally recognized as the recommended way to install dependencies in a CI environment.
https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile
yarnpkg/yarn#4147
cypress-io/circleci-orb#72
@@ -11,6 +14,15 @@ node_js: | |||
services: | |||
- redis-server | |||
|
|||
before_install: | |||
# Use a specific version of yarn in CI. This ensures yarn.lock format doesn't change. | |||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.19.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so that, for example, the build doesn't fail once yarn v2 is released or when yarn 1.20.0 changes the yarn.lock file format ever so slightly. This does happen from time to time with yarn.
Test failure is from a flaky test that's failing on master. |
@@ -732,25 +748,25 @@ cosmiconfig@^5.0.7, cosmiconfig@^5.2.0: | |||
js-yaml "^3.13.1" | |||
parse-json "^4.0.0" | |||
|
|||
coveralls@^3.0.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f719247 didn't update yarn.lock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the nice CI improvements!.
@gabegorelick thanks for your contributions! Can we ask you also to update this branch so we can merge? |
- Delete package-lock.json. Bull currently has both yarn.lock and package-lock.json files. When both are present, TravisCI uses yarn, so in practice npm has not been used by CI. But the presence of a package-lock.json file meant that contributors were not sure which lock file, if any, needed to be updated. Yarn also logs a scary warning if it detects a package-lock.json file. - Cache yarn dependencies in TravisCI. This should make CI jobs somewhat faster. - Update yarn.lock file and ensure that it remains in sync with package.json changes by using `--frozen-lockfile`.
c4f167f
to
0376356
Compare
@stansv Updated. Ready to merge whenever. |
Delete package-lock.json. Bull currently has both yarn.lock and
package-lock.json files. When both are present, TravisCI uses yarn,
so in practice npm has not been used by CI. But the presence of a
package-lock.json file meant that contributors were not sure which
lock file, if any, needed to be updated. Yarn also logs a scary
warning if it detects a package-lock.json file.
Cache yarn dependencies in TravisCI. This should make CI jobs
somewhat faster.
Update yarn.lock file and ensure that it remains in sync with
package.json changes by using
--frozen-lockfile
.