-
Notifications
You must be signed in to change notification settings - Fork 5
chore(deps): upgrade to Yarn v2 #21
Conversation
f35b547
to
67caf91
Compare
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.
LGTM
.yarn/versions/fa277a70.yml
Outdated
@@ -0,0 +1,2 @@ | |||
releases: |
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.
Why do you need this file?
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 file is used by yarn to mark version upgrades. When you create a PR, you just use
yarn version major --deferred
to indicate this will be a major update (as I did for this PR). This info will be stored by yarn in this file.
When you eventually release a new version, you will run
yarn version apply
and it will combine all the version updates that are marked in this file.
This is a way to circumvent the need to check commit messages for
conventional commits, the intended update will be marked with the
commit itself for yarn to use later.
@@ -0,0 +1,20 @@ | |||
enableGlobalCache: 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.
You had a comment before about Eslint and link to the issue, unnecessary now?
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.
I still haven't solved the eslint issue, I was waiting if something would come along to fix this.
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.
yes, you had a comment above this line before about ESLint but you've removed it in the latest patch so I was wondering if it was intended
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.
Ah yes, this one: yarnpkg/berry#965 (yarnpkg/berry#706).
However, I don't want to configure it that way, keeping it closer to the original behaviour.
If and when we want to enable this, we will run into that anyway.
@@ -0,0 +1,31 @@ | |||
#!/usr/bin/env bash |
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.
- Would be great if this and next scripts were a separate npm package as I'm using them in
react-hooks-shareable
repo
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.
I wonder if we should add BREAKING CHANGES information as well when generating the changelog?
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.
I would just copy the scripts, they are tiny. If we do something (much) more fancy we might consider having a separate project.
sbin/release.sh
Outdated
@@ -0,0 +1,7 @@ | |||
#!/usr/bin/env bash | |||
|
|||
VERSION=$(cat package.json | jq .version) |
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.
- Seems like current we need to update
package.json
version before running the script. Would be great if we got a prompt for the version or the version is updated based on the conventional commits
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.
The idea is that version updates will be based on how a PR was "marked". With yarn v2 you can indicate the intended version upgrade. When you eventually do the upgrade, it will look at all those marks and find an appropriate new version number.
This script would then run after the yarn version apply
so that it gets the new version number.
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.
I've added some explanation now to the CONTRIBUTING.md file.
22dc616
to
27e0c29
Compare
Uses eslint-config-typescript-shareable to import linting rules from a shared config instead of specifying own rules. Temporary disabled global cache to avoid bug. The conventional-commit-... tools don't work with Yarn v2, so instead we generate the changelog with our own script.
No description provided.