Skip to content

fix(constraints): use JSON.stringify in workspace_field#3284

Merged
arcanis merged 2 commits intomasterfrom
paul/fix/constraints-json
Aug 17, 2021
Merged

fix(constraints): use JSON.stringify in workspace_field#3284
arcanis merged 2 commits intomasterfrom
paul/fix/constraints-json

Conversation

@paul-soporan
Copy link
Copy Markdown
Member

What's the problem this PR addresses?

workspace_field uses String(...) instead of JSON.stringify(...).

Fixes #3282.

How did you fix it?

Made it use JSON.stringify.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit b56c6ef into master Aug 17, 2021
@arcanis arcanis deleted the paul/fix/constraints-json branch August 17, 2021 09:52
@nicolo-ribaudo
Copy link
Copy Markdown
Contributor

I think that this is a breaking change. To reproduce:

  • Clone https://github.com/babel/babel
  • Verify that yarn constraints passes
  • Update the plugin to 3.1.0-rc.10: yarn plugin import https://github.com/yarnpkg/berry/raw/@yarnpkg/cli/3.1.0-rc.10/packages/plugin-constraints/bin/%40yarnpkg/plugin-constraints.js
  • yarn constraints reports a ton of failures

@paul-soporan
Copy link
Copy Markdown
Member Author

I created #3584 so that I don't forget about it.

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.

[Bug?]: Constraints plugin does not stringify expected object value

3 participants