Skip to content

Commit

Permalink
fix(vscode): check versions before sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Nov 25, 2024
1 parent 367376c commit c1b4d75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/addons/vscode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Addon } from '../types'
import semver from 'semver'

/**
* Sync VS Code engine with the version of `@types/vscode`
Expand All @@ -19,7 +20,7 @@ export const addonVSCode: Addon = {
return
}

if (version && pkg.raw.engines?.vscode !== version) {
if (version && semver.gt(version, pkg.raw.engines.vscode)) {
// eslint-disable-next-line no-console
console.log(`[taze addon] Updated VS Code engine field to ${version}`)
// If the version is not a range (fixed version), we prepend it with a caret
Expand Down

0 comments on commit c1b4d75

Please sign in to comment.