Skip to content

Commit

Permalink
fix(swc-plugins): Fix a bug in importer (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Aug 27, 2024
1 parent 16f84b8 commit f16e38f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/swc-plugins/lib/api/compatRange/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export const compatRangeRouter = router({

for (const range of versions) {
if (
semver.gt(version, range.from) &&
(range.to === "*" || semver.lt(version, range.to))
semver.gte(version, range.from) &&
(range.to === "*" || semver.lte(version, range.to))
) {
return range;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/swc-plugins/scripts/import-runtime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const data = {

// For each tag, get the content of `${runtimeDir}/Cargo.lock`.
for (const tag of gitTags) {
let tagVersion = tag.replace("v", "");
let tagVersion = tag.replace("v", "").replace("@farmfe/core@", "");
if (!semver.valid(tagVersion)) {
console.log(`Skipping tag ${tag} because it is not a valid semver`);
continue;
Expand Down

0 comments on commit f16e38f

Please sign in to comment.