-
Notifications
You must be signed in to change notification settings - Fork 522
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(builtin): yarn install use --frozen-lockfile as default #2327
feat(builtin): yarn install use --frozen-lockfile as default #2327
Conversation
38f1d43
to
555243e
Compare
d2254ea
to
59da753
Compare
59da753
to
e61ede6
Compare
880d3b4
to
4ac7bf3
Compare
examples/worker/WORKSPACE
Outdated
# builds and use the `--frozen-lockfile`. We have to disable this here as the @bazel | ||
# scoped packages are getting replaced in the package.json with a file url and the version | ||
# won't match with the one in the yarn.lock file then. | ||
frozen_lockfile = False, |
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.
adding these to the actual code isn't needed, it's a bunch of extra explanation for users, and when they cd
into this folder to run the example, frozen_lockfile
will work fine.
We have a plan to fix the integration test runner to use .tar
file urls which I think will work with frozen lockfile. Therefore the bug is local to the integration test runner, so the workaround should live there too.
Here's the spot where we already modify this file as we copy it into the test fixture
https://github.com/bazelbuild/rules_nodejs/blob/3.x/internal/bazel_integration_test/test_runner.js#L222
Can you just make the change to yarn_install
there? can be syntactically trivial edit like
yarn_install(\n
-> yarn_install(\n frozen_lockfile=False,\n
Then we shouldn't need to change any examples
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.
@alexeagle Thx for the hint – yea I prefer this a lot 👍 Change already applied ;)
To be more hermetic with the install of the dependencies use the frozen lockfile flag to install the exact version from the `yarn.lock` file. To update a dependency use the vendored yarn binary with `bazel run @nodejs//:yarn upgrade <dep-name>`. Fixes bazel-contrib#941
4ac7bf3
to
1a92287
Compare
To be more hermetic with the install of the dependencies use the frozen lockfile flag to install the exact version from the
yarn.lock
file.To update a dependency use the vendored yarn binary with
bazel run @nodejs//:yarn upgrade <dep-name>
.Fixes #941
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently the
yarn_install
rule will use theyarn install
command and installs the latest version that is possible in the range of thepackag.json
Issue Number: #941
What is the new behavior?
The new behaviour is using the frozen lock file option for yarn installs, this means that it will install the exact version from the
yarn.lock
fileDoes this PR introduce a breaking change?
Other information