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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CT: Fix semver syntax in dependencies.ts file when defining CT frameworks #27475

Closed
mike-plummer opened this issue Aug 7, 2023 · 3 comments
Closed
Labels
CT Issue related to component testing

Comments

@mike-plummer
Copy link
Contributor

File packages/scaffold-config/src/dependencies.ts uses improper syntax for many version ranges

^= is not technically valid and appears to work through a fluke of the library. Should just be ^ when defining compatible ranges. Update syntax and validate expected CT frameworks are still treated as supported.

@mike-plummer mike-plummer added the CT Issue related to component testing label Aug 7, 2023
@MikeMcC399
Copy link
Contributor

This is about packages/scaffold-config/src/dependencies.ts minVersion, for instance

minVersion: '^=4.0.0 || ^=5.0.0',

used in

const satisfied = Boolean(pkg.version && semver.satisfies(pkg.version, dependency.minVersion, {
includePrerelease: true,
}))

As mentioned in #27473 (comment)

node-semver > versions states

A leading "=" or "v" character is stripped off and ignored.

so the "=" does not belong in the syntax, however it does not appear to cause any harm (apart from possibly being confusing to the human reader🙂)! Nevertheless it should probably be cleaned up.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Contributor

@mike-plummer

There are no more occurrences of the incorrect syntax ^= in that source file, so this issue can be closed.

The issue should be mentioned in the CHANGELOG.md as being resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing
Projects
None yet
Development

No branches or pull requests

3 participants