Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValidationError for changeset status with glob in linked package config #505

Closed
timbonicus opened this issue Dec 3, 2020 · 4 comments
Closed

Comments

@timbonicus
Copy link

Affected Packages

config

Problem

Since #458 glob expressions are allowed in linked and ignored packages. Trying to use changeset status with a glob expression in linked produces a ValidationError:

$ yarn changeset status
馃  error ValidationError: Some errors occurred when validating the changesets config:
馃  error The package "*" is specified in the `linked` option but it is not found in the project. You may have misspelled the package name.
馃  error     at parse (/Source/backstage/node_modules/@changesets/config/dist/config.cjs.dev.js:173:11)
馃  error     at Object.read (/Source/backstage/node_modules/@changesets/config/dist/config.cjs.dev.js:64:10)
馃  error     at async getReleasePlan (/Source/backstage/node_modules/@changesets/get-release-plan/dist/get-release-plan.cjs.dev.js:21:22)
馃  error     at async getStatus (/Source/backstage/node_modules/@changesets/cli/dist/cli.cjs.dev.js:877:23)
馃  error     at async run$1 (/Source/backstage/node_modules/@changesets/cli/dist/cli.cjs.dev.js:1121:11) {
馃  error   _error: Error
馃  error       at new ExtendableError (/Source/backstage/node_modules/extendable-error/bld/index.js:23:24)
馃  error       at new ValidationError (/Source/backstage/node_modules/@changesets/errors/dist/errors.cjs.dev.js:16:1)
馃  error       at parse (/Source/backstage/node_modules/@changesets/config/dist/config.cjs.dev.js:173:11)
馃  error       at Object.read (/Source/backstage/node_modules/@changesets/config/dist/config.cjs.dev.js:64:10)
馃  error       at async getReleasePlan (/Source/backstage/node_modules/@changesets/get-release-plan/dist/get-release-plan.cjs.dev.js:21:22)
馃  error       at async getStatus (/Source/backstage/node_modules/@changesets/cli/dist/cli.cjs.dev.js:877:23)
馃  error       at async run$1 (/Source/backstage/node_modules/@changesets/cli/dist/cli.cjs.dev.js:1121:11)
馃  error }
error Command failed with exit code 1.

I am encountering this with backstage/backstage which has the linked configuration:

"linked": [["*"]],

Proposed solution

@Andarist
Copy link
Member

Andarist commented Dec 4, 2020

Could you take a look at this PR #504 ? Given what it is changing it will solve your problem as well, right?

@timbonicus
Copy link
Author

#504 doesn't seem related, that just appears to limit the packages checked rather than changing anything about the config validation?

@Andarist
Copy link
Member

Andarist commented Dec 4, 2020

Oh, okay - in a hurry I've assumed that your issue was related to something else and that this could have helped you.

From what I've noticed this call stack was not using the latest @changesets/config in your repository and this is a very probable cause that would result in this validation error. So I've prepared a quick PR for you here: backstage/backstage#3577

@timbonicus
Copy link
Author

Thank you so much, that does the trick! Sorry for the noise, I should have checked the versions in yarn.lock 馃槄

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

No branches or pull requests

2 participants