Skip to content

Commit 807ca8c

Browse files
authored
Merge pull request #50 from macalinao/igm/temporal-update
Update temporal spec to latest
2 parents 5a1ed5b + 63c80ec commit 807ca8c

File tree

15 files changed

+1055
-791
lines changed

15 files changed

+1055
-791
lines changed

.changeset/social-cougars-take.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"temporal-quarter-fns": minor
3+
"superjson-temporal": minor
4+
"interval-temporal": minor
5+
"format-temporal": minor
6+
"parse-temporal": minor
7+
"temporal-zod": minor
8+
---
9+
10+
Update temporal to 0.3.0

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"author": "Ian Macalinao <me@ianm.com>",
2121
"license": "Apache-2.0",
2222
"devDependencies": {
23-
"@changesets/cli": "^2.27.12",
23+
"@changesets/cli": "^2.28.1",
2424
"husky": "^9.1.7",
25-
"lint-staged": "^15.4.3",
26-
"prettier": "^3.5.1",
27-
"turbo": "^2.4.2",
28-
"typedoc": "^0.27.7",
29-
"typescript": "^5.7.3",
30-
"vitest": "^3.0.5"
25+
"lint-staged": "^15.5.0",
26+
"prettier": "^3.5.3",
27+
"turbo": "^2.4.4",
28+
"typedoc": "^0.28.1",
29+
"typescript": "^5.8.2",
30+
"vitest": "^3.0.9"
3131
},
3232
"packageManager": "pnpm@9.14.2",
3333
"engines": {

packages/format-temporal/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"tslib": "^2.8.1"
2525
},
2626
"devDependencies": {
27-
"@macalinao/eslint-config": "^4.1.6",
27+
"@macalinao/eslint-config": "^4.1.8",
2828
"@macalinao/tsconfig": "^3.1.0",
29-
"eslint": "^9.20.1",
30-
"temporal-polyfill": "^0.2.5",
31-
"temporal-spec": "^0.2.4",
32-
"typescript": "^5.7.3",
33-
"vitest": "^3.0.5"
29+
"eslint": "^9.23.0",
30+
"temporal-polyfill": "^0.3.0",
31+
"temporal-spec": "^0.3.0",
32+
"typescript": "^5.8.2",
33+
"vitest": "^3.0.9"
3434
},
3535
"main": "dist/index.js",
3636
"types": "dist/index.d.ts",
@@ -55,6 +55,6 @@
5555
"*.{md,json}": "prettier --write"
5656
},
5757
"peerDependencies": {
58-
"temporal-spec": "^0.2.4"
58+
"temporal-spec": "^0.3.0"
5959
}
6060
}

packages/format-temporal/src/formatTemporal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("formatTemporal", () => {
1111
month: "long",
1212
});
1313
const result = formatTemporal(plainYearMonth, formatter);
14-
expect(result).toBe("May 2023");
14+
expect(result).toBe("2023 May");
1515
});
1616

1717
it("should format Temporal.PlainDateTime correctly", () => {

packages/format-temporal/src/formatTemporal.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ export const formatTemporal = (
3232
switch (temporal[Symbol.toStringTag]) {
3333
case "Temporal.ZonedDateTime":
3434
return temporal.toLocaleString(undefined, {
35-
...(format.resolvedOptions() as Intl.DateTimeFormatOptions),
35+
...(format.resolvedOptions() as globalThis.Intl.DateTimeFormatOptions),
3636
timeZone: undefined,
3737
});
3838
case "Temporal.PlainYearMonth":
3939
return (temporal as Temporal.PlainYearMonth).toLocaleString(undefined, {
40-
...(format.resolvedOptions() as Intl.DateTimeFormatOptions),
40+
...(format.resolvedOptions() as globalThis.Intl.DateTimeFormatOptions),
4141
calendar: (temporal as Temporal.PlainYearMonth).calendarId,
4242
});
4343
case "Temporal.PlainMonthDay":
4444
return (temporal as Temporal.PlainMonthDay).toLocaleString(undefined, {
45-
...(format.resolvedOptions() as Intl.DateTimeFormatOptions),
45+
...(format.resolvedOptions() as globalThis.Intl.DateTimeFormatOptions),
4646
calendar: (temporal as Temporal.PlainMonthDay).calendarId,
4747
});
4848
default:

packages/interval-temporal/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"tslib": "^2.8.1"
2525
},
2626
"devDependencies": {
27-
"@macalinao/eslint-config": "^4.1.6",
27+
"@macalinao/eslint-config": "^4.1.8",
2828
"@macalinao/tsconfig": "^3.1.0",
29-
"eslint": "^9.20.1",
30-
"temporal-polyfill": "^0.2.5",
31-
"typescript": "^5.7.3",
32-
"vitest": "^3.0.5"
29+
"eslint": "^9.23.0",
30+
"temporal-polyfill": "^0.3.0",
31+
"typescript": "^5.8.2",
32+
"vitest": "^3.0.9"
3333
},
3434
"main": "dist/index.js",
3535
"types": "dist/index.d.ts",

packages/parse-temporal/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"tslib": "^2.8.1"
2525
},
2626
"devDependencies": {
27-
"@macalinao/eslint-config": "^4.1.6",
27+
"@macalinao/eslint-config": "^4.1.8",
2828
"@macalinao/tsconfig": "^3.1.0",
29-
"eslint": "^9.20.1",
30-
"temporal-polyfill": "^0.2.5",
31-
"temporal-spec": "^0.2.4",
32-
"typescript": "^5.7.3",
33-
"vitest": "^3.0.5"
29+
"eslint": "^9.23.0",
30+
"temporal-polyfill": "^0.3.0",
31+
"temporal-spec": "^0.3.0",
32+
"typescript": "^5.8.2",
33+
"vitest": "^3.0.9"
3434
},
3535
"main": "dist/index.js",
3636
"types": "dist/index.d.ts",
@@ -55,7 +55,7 @@
5555
"*.{md,json}": "prettier --write"
5656
},
5757
"peerDependencies": {
58-
"temporal-spec": "^0.2.4",
59-
"temporal-polyfill": "^0.2.5"
58+
"temporal-polyfill": "^0.2.5",
59+
"temporal-spec": "^0.3.0"
6060
}
6161
}

packages/superjson-temporal/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"temporal-polyfill": "^0.2.5"
2929
},
3030
"devDependencies": {
31-
"@macalinao/eslint-config": "^4.1.6",
31+
"@macalinao/eslint-config": "^4.1.8",
3232
"@macalinao/tsconfig": "^3.1.0",
33-
"eslint": "^9.20.1",
33+
"eslint": "^9.23.0",
3434
"superjson": "^2.2.2",
35-
"temporal-polyfill": "^0.2.5",
36-
"typescript": "^5.7.3",
37-
"vitest": "^3.0.5"
35+
"temporal-polyfill": "^0.3.0",
36+
"typescript": "^5.8.2",
37+
"vitest": "^3.0.9"
3838
},
3939
"main": "dist/index.js",
4040
"types": "dist/index.d.ts",

packages/superjson-temporal/src/registerSuperJSONTemporal.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ describe("registerSuperJSONTemporal", () => {
1515
zonedDateTime,
1616
plainDate: zonedDateTime.toPlainDate(),
1717
plainDateTime: zonedDateTime.toPlainDateTime(),
18-
plainMonthDay: zonedDateTime.toPlainMonthDay(),
19-
plainYearMonth: zonedDateTime.toPlainYearMonth(),
18+
plainMonthDay: zonedDateTime.toPlainDate().toPlainMonthDay(),
19+
plainYearMonth: zonedDateTime.toPlainDate().toPlainYearMonth(),
2020
plainTime: zonedDateTime.toPlainTime(),
2121
duration: zonedDateTime.toPlainDateTime().since({
2222
year: 2021,

0 commit comments

Comments
 (0)