Skip to content

Commit

Permalink
V2: Run createPromiseClient -> createClient codemod on all v1 ver…
Browse files Browse the repository at this point in the history
…sions (#1243)

Signed-off-by: Sri Krishna Paritala <[email protected]>
  • Loading branch information
srikrsna-buf authored Sep 20, 2024
1 parent d42db7a commit 8356e5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/connect-migrate/src/migrations/v1.16.0.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ describe("migration", function () {
];
expect(v1_16_0.applicable(opt.scanned)).toBeTrue();
});
});
describe("should not be applicable", function () {
it("before 1.16.0", () => {
opt.scanned.packageFiles = [
{
Expand All @@ -94,8 +92,10 @@ describe("migration", function () {
},
},
];
expect(v1_16_0.applicable(opt.scanned)).toBeFalse();
expect(v1_16_0.applicable(opt.scanned)).toBeTrue();
});
});
describe("should not be applicable", function () {
it("from 2.0.0", () => {
opt.scanned.packageFiles = [
{
Expand Down
3 changes: 2 additions & 1 deletion packages/connect-migrate/src/migrations/v1.16.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function getMatchingPackages(packageFiles: Scanned["packageFiles"]) {
if (minVersion === null) {
return false;
}
return semver.satisfies(minVersion, "^1.16.0");
// v2 migration will run next so we update all v1 versions.
return semver.satisfies(minVersion, "^1.0.0");
})
) {
matched.push(packageFile);
Expand Down

0 comments on commit 8356e5a

Please sign in to comment.