diff --git a/.changeset/dirty-bees-repair.md b/.changeset/dirty-bees-repair.md new file mode 100644 index 0000000000..98fc2f714e --- /dev/null +++ b/.changeset/dirty-bees-repair.md @@ -0,0 +1,5 @@ +--- +'@astrojs/upgrade': patch +--- + +Fixes an issue where `@astrojs/upgrade` announces integration updates for already up to date packages diff --git a/packages/upgrade/src/actions/install.ts b/packages/upgrade/src/actions/install.ts index f031729e41..6e593b976b 100644 --- a/packages/upgrade/src/actions/install.ts +++ b/packages/upgrade/src/actions/install.ts @@ -90,8 +90,8 @@ function filterPackages(ctx: Pick) { const devDependencies: PackageInfo[] = []; for (const packageInfo of ctx.packages) { const { currentVersion, targetVersion, isDevDependency } = packageInfo; - // Remove prefix from `currentVersion` before comparing - if (currentVersion.replace(/^\D+/, '') === targetVersion) { + // Remove prefix from version before comparing + if (currentVersion.replace(/^\D+/, '') === targetVersion.replace(/^\D+/, '')) { current.push(packageInfo); } else { const arr = isDevDependency ? devDependencies : dependencies;