Skip to content

Add support for ignored config - #371

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

emmatown merged 66 commits into
changesets:masterfrom
Feiyang1:fei-ignore

Conversation

@Feiyang1

Copy link
Copy Markdown
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

atlassian-cla-bot Bot commented May 19, 2020 •

Copy link
Copy Markdown

Hooray! All contributors have signed the CLA.

@changeset-bot

changeset-bot Bot commented May 19, 2020 •

Copy link
Copy Markdown

🦋 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
Copy Markdown
Member

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

Comment thread packages/types/src/index.ts Resolved
Comment thread packages/config/src/index.ts Resolved

@Andarist Andarist left a comment

Copy link
Copy Markdown
Member

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 🚀

@Feiyang1 Feiyang1 left a comment •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❤️

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread packages/config/src/index.ts Resolved
Comment thread packages/types/src/index.ts Resolved
Comment thread packages/cli/src/index.ts Resolved
Comment thread packages/cli/src/index.ts Resolved
@Feiyang1

Copy link
Copy Markdown
Contributor Author

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

@emmatown emmatown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great stuff!

Comment thread packages/config/src/index.ts Resolved
Comment thread proud-tips-allow.md Resolved
Comment thread packages/config/src/index.ts Resolved
Comment thread .changeset/rich-melons-press.md Resolved
Comment thread packages/cli/src/run.ts Resolved
Comment thread .changeset/proud-tips-allow.md Resolved
Comment thread packages/cli/src/run.ts Resolved
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
Copy Markdown
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

Andarist commented Jun 8, 2020

Copy link
Copy Markdown
Member

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

@mitchellhamilton gentle ping

@emmatown emmatown left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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