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

fix(vscode): with lock version #135

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Conversation

Simon-He95
Copy link
Contributor

close: ##134

@@ -16,7 +16,7 @@ export const addonVSCode: Addon = {
if (version && pkg.raw.engines?.vscode !== version) {
// eslint-disable-next-line no-console
console.log(`[addon] Updated VS Code engine field to ${version}`)
pkg.raw.engines.vscode = version
pkg.raw.engines.vscode = version.startsWith('^') ? version : `^${version}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pkg.raw.engines.vscode = version.startsWith('^') ? version : `^${version}`
pkg.raw.engines.vscode = version.match(/[^><]/) ? version : `^${version}`

Maybe like this to allow ranges like >=1.1.1?

Co-authored-by: Anthony Fu <github@antfu.me>
@Simon-He95 Simon-He95 marked this pull request as draft August 13, 2024 06:45
@Simon-He95 Simon-He95 marked this pull request as ready for review August 13, 2024 06:48
@antfu antfu merged commit c94cb17 into antfu-collective:main Aug 14, 2024
5 checks passed
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.

2 participants