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: cleanup lockfiles #1541

Merged
merged 1 commit into from
Nov 9, 2019
Merged

Conversation

gabegorelick
Copy link
Contributor

@gabegorelick gabegorelick commented Nov 5, 2019

  • 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.
    image

  • 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.


install:
# ensure unexpected changes to yarn.lock break the build
- yarn install --frozen-lockfile --non-interactive
Copy link
Contributor Author

@gabegorelick gabegorelick Nov 5, 2019

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

@coveralls
Copy link

coveralls commented Nov 5, 2019

Coverage Status

Coverage increased (+0.04%) to 93.773% when pulling c4f167f on gabegorelick:lockfiles into f20e2f9 on OptimalBits:develop.

@@ -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
Copy link
Contributor Author

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.

@gabegorelick
Copy link
Contributor Author

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:
Copy link
Contributor Author

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.

Copy link
Member

@manast manast left a 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!.

@stansv
Copy link
Contributor

stansv commented Nov 8, 2019

@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`.
@gabegorelick
Copy link
Contributor Author

@stansv Updated. Ready to merge whenever.

@stansv stansv merged commit dbd85f3 into OptimalBits:develop Nov 9, 2019
@gabegorelick gabegorelick deleted the lockfiles branch November 11, 2019 16:14
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.

4 participants