-
Notifications
You must be signed in to change notification settings - Fork 2
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: upgrade to yarn v4 #666
Conversation
cb56150
to
7101975
Compare
Upgrades to using yarn v3. Relies on getoutreach/devbase#666
7101975
to
e1f36d9
Compare
Upgrades to `yarn` v3. Changes the installation method from `npm` to `corepack`, which is the recommended way to install yarn[^1]. Migrates `devbase` to use v3 of `yarn`, a follow up PR to stencil-base will change the `package.json` and `.gitignore`. [^1]: https://yarnpkg.com/getting-started/install
e1f36d9
to
a864af5
Compare
Upgrades to using yarn v3. Relies on getoutreach/devbase#666
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Checks the global npm registry for `yarn`, if it exists we uninstall it.
This comment was marked as outdated.
This comment was marked as outdated.
Not sure if I like the asdf versions display I added in this PR, I'll probably make it so it only runs on the setup environment step. Otherwise, it seems like it could pollute CI in other places (see logs) |
7403ccc
to
21b017a
Compare
21b017a
to
0e7b492
Compare
@@ -18,5 +18,5 @@ validate-orb: build-orb | |||
|
|||
.PHONY: publish-orb | |||
publish-orb: validate-orb | |||
circleci orb publish orb.yml getoutreach/shared@dev:first | |||
circleci orb publish orb.yml getoutreach/shared@dev:jaredallard-feat-yarn-v3 |
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.
Reset before merge.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Updates cache paths to have better uniformity as well as use `yarn.lock` to handle lockfile-only changes.
140d3d5
to
af40bf0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Upgrades the node client to use `yarn` v3. Depends on the following PRs: * getoutreach/devbase#666 * getoutreach/stencil-base#139
@@ -2,7 +2,7 @@ | |||
# syntax, such as anchors, will be fixed automatically. | |||
version: 2.1 | |||
orbs: | |||
shared: getoutreach/shared@2.19.2 | |||
shared: getoutreach/shared@dev:jaredallard-feat-yarn-v3 |
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.
Change back to dev:first
before merging (publish to dev:first
before merging locally)
@@ -3,4 +3,4 @@ steps: | |||
- run: | |||
name: Build Node Client | |||
working_directory: api/clients/node/ | |||
command: yarn --frozen-lockfile build |
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
isn't required when running scripts now.
- run: | ||
name: Install semantic-release Dependencies | ||
command: yarn --frozen-lockfile | ||
command: yarn --immutable |
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
was replaced by --immutable
@@ -7,15 +7,6 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../lib/she | |||
yarn_install_if_needed() { | |||
local stateFile="node_modules/devbase.lock" | |||
|
|||
if ! yarn -v >/dev/null 2>&1; then |
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.
Duplicative code, we do this as part of setup_environment
, which calls ensure_asdf
, which is ran on local machines and CI.
@@ -15,12 +15,18 @@ if [[ -z $asdf_plugins_list ]]; then | |||
asdf_plugins_list_regenerate | |||
fi | |||
|
|||
# asdf_find_tool_versions returns all .tool-version files that could | |||
# be used in the current repository. | |||
asdf_find_tool_versions() { |
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.
Split out to enable asdf_display_versions
@@ -11,13 +11,13 @@ extensions=(yaml yml json md ts) | |||
|
|||
prettier_linter() { | |||
yarn_install_if_needed >/dev/null | |||
find_files_with_extensions "${extensions[@]}" | xargs -n40 "node_modules/.bin/prettier" -l --loglevel log |
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.
node_modules/.bin
isn't a thing in pnpm
linking. yarn run <script>
has always supported doing this for us, so this is more clean this way anyways.
Link to code coverage report (posted by coverbot 🤖) |
Upgrades the node client to use `yarn` v4. Depends on the following PRs: * getoutreach/devbase#666 * getoutreach/stencil-base#139
Link to code coverage report (posted by coverbot 🤖) |
Upgrades to using yarn v4. Relies on getoutreach/devbase#666
Upgrades to using yarn v4. Relies on getoutreach/devbase#666
Upgrades to
yarn
v4. Changes the installation method fromnpm
tocorepack
, which is the recommended way to install yarn1.Migrates
devbase
to use v4 ofyarn
, changes some templates toenable this:
Added a
asdf_display_versions
function tolib/asdf.sh
that shows thecurrent tools and their relevant versions in use. This is displayed during
the
setup_environment
step of CI.Footnotes
https://yarnpkg.com/getting-started/install ↩