Skip to content

Add support for ignored config#371

Merged
emmatown merged 66 commits intochangesets:masterfrom
Feiyang1:fei-ignore
Jun 17, 2020
Merged

Add support for ignored config#371
emmatown merged 66 commits intochangesets:masterfrom
Feiyang1:fei-ignore

Conversation

@Feiyang1
Copy link
Contributor

Implements #242

@Andarist Can you please take a look? Need to add tests, but want to confirm that this approach looks reasonable to folks first.

@atlassian-cla-bot
Copy link

atlassian-cla-bot bot commented May 19, 2020

Hooray! All contributors have signed the CLA.

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2020

🦋 Changeset is good to go

Latest commit: 5b7b27a

We got this.

This PR includes changesets to release 5 packages
Name Type
@changesets/config Minor
@changesets/types Minor
@changesets/apply-release-plan Minor
@changesets/assemble-release-plan Minor
@changesets/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Andarist
Copy link
Member

Thanks for doing this! I will get to reviewing this soon.

Copy link
Member

@Andarist Andarist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall approach looks good and the implementation has required less code being changed than I would have anticipated. I've left some minor comments but they should be fairly easy to resolve, can't wait for tests being added and shipping this feature 🚀

Copy link
Contributor Author

@Feiyang1 Feiyang1 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 review! I have addressed all your comments. Please take a look!
I will probably add tests tomorrow when I will have sometime.

if (updatedPreState.mode === "exit") {
for (let pkg of packages.packages) {
if (preVersions.get(pkg.packageJson.name) !== -1) {
if (preVersions.get(pkg.packageJson.name)) {
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 change is unrelated to the ignored config, but I think !== -1 is a bug which gave me a version bump to an unchanged package in my test project. @Andarist, Can you please confirm?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this was a mistake as well - would you be able to share the repro case for the situation you have encountered? It would be great to add a test covering your fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this change to another PR? I want to have a deeper look into it and it's hard to do when combined with all these other changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. moved it to #382

@Feiyang1
Copy link
Contributor Author

Addressed all comments. I think the PR is ready to merge. Thanks @Andarist for your thorough review!

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!

if (updatedPreState.mode === "exit") {
for (let pkg of packages.packages) {
if (preVersions.get(pkg.packageJson.name) !== -1) {
if (preVersions.get(pkg.packageJson.name)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this change to another PR? I want to have a deeper look into it and it's hard to do when combined with all these other changes.

Feiyang1 and others added 8 commits June 1, 2020 09:53
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
@Andarist
Copy link
Member

Andarist commented Jun 8, 2020

@Feiyang1 could you resolve conflicts?

@Noviny @mitchellhamilton could you do a second round of reviews? It would be great to land this soon!

@Feiyang1
Copy link
Contributor Author

@mitchellhamilton gentle ping

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this!!

Could you fix the merge conflict?

@Noviny could you have a quick look at this? (mostly at the changesets to check that the feature looks fine to you)

@emmatown emmatown merged commit 9dcc364 into changesets:master Jun 17, 2020
@github-actions github-actions bot mentioned this pull request Jun 17, 2020
@Andarist
Copy link
Member

One slight problem I have found with this feature. Upgraded dependencies of ignored packages are being written to the ignored package's package.json - which is good, but when we don't ignore packages then "dependency release lines" are being appended at the end of patch release line. So this slight problem is that when we unignore a package those dependency release lines won't magically appear in the changelog so we'll have slightly different content than when not using this feature.

This, of course, is not a big deal - I don't quite care about those dependency release lines. It's just something I've noticed now.

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.

5 participants