Skip to content

Conversation

@zanminkian
Copy link

Fix #760

@aduh95 aduh95 force-pushed the fix/dont_check_version_format branch 2 times, most recently from 2f796d3 to e6b00b8 Compare November 8, 2025 11:18
@aduh95
Copy link
Contributor

aduh95 commented Nov 8, 2025

Could you try to re-use versions we already use in tests (i.e. [email protected], [email protected]) to limit the increase in size of the nock file?

@aduh95 aduh95 force-pushed the fix/dont_check_version_format branch from 093dc2a to e6b00b8 Compare November 8, 2025 12:37
@zanminkian
Copy link
Author

Could you try to re-use versions we already use in tests (i.e. [email protected], [email protected]) to limit the increase in size of the nock file?

Done.

@zanminkian
Copy link
Author

zanminkian commented Nov 10, 2025

We can ignore the timeouts (failed tests)? Because we can see timeouts frequently if we look through the git history.

Comment on lines +1726 to +1731
// When user specifies exact version, it should work despite range version in devEngines
await expect(runCli(cwd, [`[email protected]`, `--version`])).resolves.toMatchObject({
exitCode: 0,
stderr: ``,
stdout: `6.14.2\n`,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that what we want? This feels a bit odd

Copy link
Contributor

Choose a reason for hiding this comment

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

I think so; it's handy when you need to quickly test a command across different versions of the same tool.

Copy link
Contributor

@aduh95 aduh95 Nov 10, 2025

Choose a reason for hiding this comment

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

But if that version doesn't match the supported range, why would you need to test with it? Either the version is supported, and the range should include it; either it's not, and there's no point testing with it (and you can still use COREPACK_ENABLE_PROJECT_SPEC=0 if you don't want Corepack to enforce it)

stdout: `6.14.2\n`,
});

// Test with other package managers too
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it'd be better to split it, it would make debugging easier if the test ever starts failing for a specific package manager in the future

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.

feat: don't check version format if user specifys an exact version

4 participants