-
Notifications
You must be signed in to change notification settings - Fork 177
fix #648 #709
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 #648 #709
Changes from 3 commits
310d2cd
1f5c532
acafafb
d6cb381
8be865c
8e31e84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@opennextjs/aws": patch | ||
| --- | ||
|
|
||
| use correct version for applying stableIncrementalCache (It failed for next 14.0.4) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,7 +290,7 @@ export function compareSemver(v1: string, v2: string): number { | |
|
|
||
| if (major1 !== major2) return major1 - major2; | ||
| if (minor1 !== minor2) return minor1 - minor2; | ||
| return patch1 - patch2; | ||
| return (patch1 ?? 0) - (patch2 ?? 0); | ||
|
||
| } | ||
|
|
||
| export function copyOpenNextConfig( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { compareSemver } from "@opennextjs/aws/build/helper.js"; | ||
|
|
||
| // We don't need to test canary versions, they are stripped out | ||
| describe("compareSemver", () => { | ||
| it("should return 0 when versions are equal", () => { | ||
| expect(compareSemver("1.0.0", "1.0.0")).toBe(0); | ||
| }); | ||
|
|
||
| it("should return 1 when first version is greater", () => { | ||
| expect(compareSemver("1.0.1", "1.0.0")).toBe(1); | ||
| }); | ||
|
|
||
| it("should return -1 when first version is smaller", () => { | ||
| expect(compareSemver("1.0.0", "1.0.1")).toBe(-1); | ||
| }); | ||
|
|
||
| it("should work with latest", () => { | ||
| expect(compareSemver("latest", "1.0.0")).toBe(1); | ||
| }); | ||
|
|
||
| it("should work with incomplete version", () => { | ||
| expect(compareSemver("14.1.0", "14.1")).toBe(0); | ||
| expect(compareSemver("14.1", "14.1.0")).toBe(0); | ||
| }); | ||
| }); |
Uh oh!
There was an error while loading. Please reload this page.