joist-core 2.4.0-next.51 → 2.4.0-next.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/serde/temporal.cjs +7 -12
- package/build/serde/temporal.cjs.map +1 -1
- package/build/serde/temporal.d.cts +1 -1
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +1 -1
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporal.js +7 -12
- package/build/serde/temporal.js.map +1 -1
- package/package.json +2 -2
package/build/serde/temporal.cjs
CHANGED
|
@@ -18,7 +18,7 @@ const Temporal = new Proxy({}, { get(_target, property, receiver) {
|
|
|
18
18
|
return Reflect.get(requireTemporal().Temporal, property, receiver);
|
|
19
19
|
} });
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Installs temporal-polyfill globally when native Temporal is unavailable.
|
|
22
22
|
*
|
|
23
23
|
* We want to avoid directly importing/requiring `temporal-polyfill` because
|
|
24
24
|
* it will introduce the dependency to all users of Joist.
|
|
@@ -26,22 +26,17 @@ const Temporal = new Proxy({}, { get(_target, property, receiver) {
|
|
|
26
26
|
function maybeRequireTemporal() {
|
|
27
27
|
if (temporal === false) return void 0;
|
|
28
28
|
if (temporal) return temporal;
|
|
29
|
-
if (
|
|
29
|
+
if (typeof globalThis.Temporal === "undefined") try {
|
|
30
|
+
runtimeRequire("temporal-polyfill/global");
|
|
31
|
+
} catch (e) {}
|
|
32
|
+
if (typeof globalThis.Temporal !== "undefined") {
|
|
30
33
|
temporal = {
|
|
31
|
-
Temporal:
|
|
34
|
+
Temporal: globalThis.Temporal,
|
|
32
35
|
toTemporalInstant: Date.prototype.toTemporalInstant,
|
|
33
|
-
Intl:
|
|
36
|
+
Intl: globalThis.Intl
|
|
34
37
|
};
|
|
35
38
|
return temporal;
|
|
36
39
|
}
|
|
37
|
-
try {
|
|
38
|
-
temporal = runtimeRequire("temporal-polyfill");
|
|
39
|
-
return temporal;
|
|
40
|
-
} catch (e) {}
|
|
41
|
-
try {
|
|
42
|
-
temporal = runtimeRequire("@js-temporal/polyfill");
|
|
43
|
-
return temporal;
|
|
44
|
-
} catch (e) {}
|
|
45
40
|
temporal = false;
|
|
46
41
|
}
|
|
47
42
|
function requireTemporal() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal.cjs","names":["createRequire"],"sources":["../../src/serde/temporal.ts"],"sourcesContent":["/// <reference types=\"temporal-spec/global\" preserve=\"true\" />\n\nimport { createRequire } from \"node:module\";\n\nconst runtimeRequire = createRequire(import.meta.url);\n\n// Native Temporal and
|
|
1
|
+
{"version":3,"file":"temporal.cjs","names":["createRequire"],"sources":["../../src/serde/temporal.ts"],"sourcesContent":["/// <reference types=\"temporal-spec/global\" preserve=\"true\" />\n\nimport { createRequire } from \"node:module\";\n\nconst runtimeRequire = createRequire(import.meta.url);\n\n// Native Temporal and temporal-polyfill expose this shape; use the shared spec types instead of duplicating it.\ntype TemporalModule = typeof import(\"temporal-spec\");\nlet temporal: TemporalModule | undefined | false;\n\n/**\n * Lazily exposes Joist's native-first / polyfill-fallback Temporal detection.\n *\n * This is useful while the joist-orm repo itself has both pre-Node 26, and post-Node 26\n * test coverage, b/c our CI test suite needs the same a) codegen output and b) test suites\n * to \"just work\" with either Node 24/25 or Node 26, which means they can't have an explicit\n * import to either `temporal-polyfill` or the `Temporal` global.\n *\n * This is exactly what Joist's internal temporal resolution was already working around, so\n * this just exposes an `import { Temporal } from joist-orm` that lets the codegen & tests\n * reuse the same abstraction.\n */\nexport const Temporal = new Proxy(\n {},\n {\n get(_target, property, receiver) {\n return Reflect.get(requireTemporal().Temporal, property, receiver);\n },\n },\n) as typeof globalThis.Temporal;\n\n/**\n * A type-only `Temporal` namespace that merges with the `const Temporal` above.\n *\n * The `const` is only a value, so using `Temporal.PlainDate` / `Temporal.ZonedDateTime` as a\n * type needs a namespace to resolve against. Node 26 has that as a global, but older Node\n * versions don't, so `temporal-spec/global` supplies the same global namespace as a fallback.\n */\nexport declare namespace Temporal {\n export type Instant = globalThis.Temporal.Instant;\n export type ZonedDateTime = globalThis.Temporal.ZonedDateTime;\n export type PlainDate = globalThis.Temporal.PlainDate;\n export type PlainTime = globalThis.Temporal.PlainTime;\n export type PlainDateTime = globalThis.Temporal.PlainDateTime;\n export type PlainYearMonth = globalThis.Temporal.PlainYearMonth;\n export type PlainMonthDay = globalThis.Temporal.PlainMonthDay;\n export type Duration = globalThis.Temporal.Duration;\n}\n\n/**\n * Installs temporal-polyfill globally when native Temporal is unavailable.\n *\n * We want to avoid directly importing/requiring `temporal-polyfill` because\n * it will introduce the dependency to all users of Joist.\n */\nexport function maybeRequireTemporal(): TemporalModule | undefined {\n // if we've already failed to find a temporal implementation before, early exit\n if (temporal === false) return undefined;\n // if we already required temporal, just return that\n if (temporal) return temporal;\n // Share one implementation with database clients that resolve Temporal from the global.\n if (typeof globalThis.Temporal === \"undefined\") {\n try {\n runtimeRequire(\"temporal-polyfill/global\");\n } catch (e) {}\n }\n // use built in temporal or the installed polyfill\n if (typeof globalThis.Temporal !== \"undefined\") {\n temporal = {\n Temporal: globalThis.Temporal,\n toTemporalInstant: Date.prototype.toTemporalInstant,\n Intl: globalThis.Intl,\n };\n return temporal;\n }\n // don't try to load temporal again\n temporal = false;\n return undefined;\n}\n\nexport function requireTemporal(): TemporalModule {\n const temporal = maybeRequireTemporal();\n if (!temporal) throw new Error(\"Unable to find a Temporal implementation\");\n return temporal;\n}\n"],"mappings":";;AAIA,MAAM,kBAAA,wBAAiBA,CAAAA,CAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B;AAIpD,IAAI;;;;;;;;;;;;;AAcJ,MAAa,WAAW,IAAI,MAC1B,CAAC,GACD,EACE,IAAI,SAAS,UAAU,UAAU;CAC/B,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,UAAU,UAAU,QAAQ;AACnE,EACF,CACF;;;;;;;AA0BA,SAAgB,uBAAmD;CAEjE,IAAI,aAAa,OAAO,OAAO,KAAA;CAE/B,IAAI,UAAU,OAAO;CAErB,IAAI,OAAO,WAAW,aAAa,aACjC,IAAI;EACF,eAAe,0BAA0B;CAC3C,SAAS,GAAG,CAAC;CAGf,IAAI,OAAO,WAAW,aAAa,aAAa;EAC9C,WAAW;GACT,UAAU,WAAW;GACrB,mBAAmB,KAAK,UAAU;GAClC,MAAM,WAAW;EACnB;EACA,OAAO;CACT;CAEA,WAAW;AAEb;AAEA,SAAgB,kBAAkC;CAChD,MAAM,WAAW,qBAAqB;CACtC,IAAI,CAAC,UAAU,MAAM,IAAI,MAAM,0CAA0C;CACzE,OAAO;AACT"}
|
|
@@ -32,7 +32,7 @@ export declare namespace Temporal {
|
|
|
32
32
|
type Duration = globalThis.Temporal.Duration;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Installs temporal-polyfill globally when native Temporal is unavailable.
|
|
36
36
|
*
|
|
37
37
|
* We want to avoid directly importing/requiring `temporal-polyfill` because
|
|
38
38
|
* it will introduce the dependency to all users of Joist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal.d.cts","names":[],"sources":["../../src/serde/temporal.ts"],"mappings":";;KAOK;;;;;;;;;;;;;qBAeQ,iBAOD,WAAW;;;;;;;;yBASE;OACX,UAAU,WAAW,SAAS;OAC9B,gBAAgB,WAAW,SAAS;OACpC,YAAY,WAAW,SAAS;OAChC,YAAY,WAAW,SAAS;OAChC,gBAAgB,WAAW,SAAS;OACpC,iBAAiB,WAAW,SAAS;OACrC,gBAAgB,WAAW,SAAS;OACpC,WAAW,WAAW,SAAS;;;;;;;;wBAS7B,wBAAwB;
|
|
1
|
+
{"version":3,"file":"temporal.d.cts","names":[],"sources":["../../src/serde/temporal.ts"],"mappings":";;KAOK;;;;;;;;;;;;;qBAeQ,iBAOD,WAAW;;;;;;;;yBASE;OACX,UAAU,WAAW,SAAS;OAC9B,gBAAgB,WAAW,SAAS;OACpC,YAAY,WAAW,SAAS;OAChC,YAAY,WAAW,SAAS;OAChC,gBAAgB,WAAW,SAAS;OACpC,iBAAiB,WAAW,SAAS;OACrC,gBAAgB,WAAW,SAAS;OACpC,WAAW,WAAW,SAAS;;;;;;;;wBAS7B,wBAAwB;wBAyBxB,mBAAmB"}
|
|
@@ -32,7 +32,7 @@ export declare namespace Temporal {
|
|
|
32
32
|
type Duration = globalThis.Temporal.Duration;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Installs temporal-polyfill globally when native Temporal is unavailable.
|
|
36
36
|
*
|
|
37
37
|
* We want to avoid directly importing/requiring `temporal-polyfill` because
|
|
38
38
|
* it will introduce the dependency to all users of Joist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal.d.mts","names":[],"sources":["../../src/serde/temporal.ts"],"mappings":";;KAOK;;;;;;;;;;;;;qBAeQ,iBAOD,WAAW;;;;;;;;yBASE;OACX,UAAU,WAAW,SAAS;OAC9B,gBAAgB,WAAW,SAAS;OACpC,YAAY,WAAW,SAAS;OAChC,YAAY,WAAW,SAAS;OAChC,gBAAgB,WAAW,SAAS;OACpC,iBAAiB,WAAW,SAAS;OACrC,gBAAgB,WAAW,SAAS;OACpC,WAAW,WAAW,SAAS;;;;;;;;wBAS7B,wBAAwB;
|
|
1
|
+
{"version":3,"file":"temporal.d.mts","names":[],"sources":["../../src/serde/temporal.ts"],"mappings":";;KAOK;;;;;;;;;;;;;qBAeQ,iBAOD,WAAW;;;;;;;;yBASE;OACX,UAAU,WAAW,SAAS;OAC9B,gBAAgB,WAAW,SAAS;OACpC,YAAY,WAAW,SAAS;OAChC,YAAY,WAAW,SAAS;OAChC,gBAAgB,WAAW,SAAS;OACpC,iBAAiB,WAAW,SAAS;OACrC,gBAAgB,WAAW,SAAS;OACpC,WAAW,WAAW,SAAS;;;;;;;;wBAS7B,wBAAwB;wBAyBxB,mBAAmB"}
|
package/build/serde/temporal.js
CHANGED
|
@@ -18,7 +18,7 @@ const Temporal = new Proxy({}, { get(_target, property, receiver) {
|
|
|
18
18
|
return Reflect.get(requireTemporal().Temporal, property, receiver);
|
|
19
19
|
} });
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Installs temporal-polyfill globally when native Temporal is unavailable.
|
|
22
22
|
*
|
|
23
23
|
* We want to avoid directly importing/requiring `temporal-polyfill` because
|
|
24
24
|
* it will introduce the dependency to all users of Joist.
|
|
@@ -26,22 +26,17 @@ const Temporal = new Proxy({}, { get(_target, property, receiver) {
|
|
|
26
26
|
function maybeRequireTemporal() {
|
|
27
27
|
if (temporal === false) return void 0;
|
|
28
28
|
if (temporal) return temporal;
|
|
29
|
-
if (
|
|
29
|
+
if (typeof globalThis.Temporal === "undefined") try {
|
|
30
|
+
runtimeRequire("temporal-polyfill/global");
|
|
31
|
+
} catch (e) {}
|
|
32
|
+
if (typeof globalThis.Temporal !== "undefined") {
|
|
30
33
|
temporal = {
|
|
31
|
-
Temporal:
|
|
34
|
+
Temporal: globalThis.Temporal,
|
|
32
35
|
toTemporalInstant: Date.prototype.toTemporalInstant,
|
|
33
|
-
Intl:
|
|
36
|
+
Intl: globalThis.Intl
|
|
34
37
|
};
|
|
35
38
|
return temporal;
|
|
36
39
|
}
|
|
37
|
-
try {
|
|
38
|
-
temporal = runtimeRequire("temporal-polyfill");
|
|
39
|
-
return temporal;
|
|
40
|
-
} catch (e) {}
|
|
41
|
-
try {
|
|
42
|
-
temporal = runtimeRequire("@js-temporal/polyfill");
|
|
43
|
-
return temporal;
|
|
44
|
-
} catch (e) {}
|
|
45
40
|
temporal = false;
|
|
46
41
|
}
|
|
47
42
|
function requireTemporal() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal.js","names":[],"sources":["../../src/serde/temporal.ts"],"sourcesContent":["/// <reference types=\"temporal-spec/global\" preserve=\"true\" />\n\nimport { createRequire } from \"node:module\";\n\nconst runtimeRequire = createRequire(import.meta.url);\n\n// Native Temporal and
|
|
1
|
+
{"version":3,"file":"temporal.js","names":[],"sources":["../../src/serde/temporal.ts"],"sourcesContent":["/// <reference types=\"temporal-spec/global\" preserve=\"true\" />\n\nimport { createRequire } from \"node:module\";\n\nconst runtimeRequire = createRequire(import.meta.url);\n\n// Native Temporal and temporal-polyfill expose this shape; use the shared spec types instead of duplicating it.\ntype TemporalModule = typeof import(\"temporal-spec\");\nlet temporal: TemporalModule | undefined | false;\n\n/**\n * Lazily exposes Joist's native-first / polyfill-fallback Temporal detection.\n *\n * This is useful while the joist-orm repo itself has both pre-Node 26, and post-Node 26\n * test coverage, b/c our CI test suite needs the same a) codegen output and b) test suites\n * to \"just work\" with either Node 24/25 or Node 26, which means they can't have an explicit\n * import to either `temporal-polyfill` or the `Temporal` global.\n *\n * This is exactly what Joist's internal temporal resolution was already working around, so\n * this just exposes an `import { Temporal } from joist-orm` that lets the codegen & tests\n * reuse the same abstraction.\n */\nexport const Temporal = new Proxy(\n {},\n {\n get(_target, property, receiver) {\n return Reflect.get(requireTemporal().Temporal, property, receiver);\n },\n },\n) as typeof globalThis.Temporal;\n\n/**\n * A type-only `Temporal` namespace that merges with the `const Temporal` above.\n *\n * The `const` is only a value, so using `Temporal.PlainDate` / `Temporal.ZonedDateTime` as a\n * type needs a namespace to resolve against. Node 26 has that as a global, but older Node\n * versions don't, so `temporal-spec/global` supplies the same global namespace as a fallback.\n */\nexport declare namespace Temporal {\n export type Instant = globalThis.Temporal.Instant;\n export type ZonedDateTime = globalThis.Temporal.ZonedDateTime;\n export type PlainDate = globalThis.Temporal.PlainDate;\n export type PlainTime = globalThis.Temporal.PlainTime;\n export type PlainDateTime = globalThis.Temporal.PlainDateTime;\n export type PlainYearMonth = globalThis.Temporal.PlainYearMonth;\n export type PlainMonthDay = globalThis.Temporal.PlainMonthDay;\n export type Duration = globalThis.Temporal.Duration;\n}\n\n/**\n * Installs temporal-polyfill globally when native Temporal is unavailable.\n *\n * We want to avoid directly importing/requiring `temporal-polyfill` because\n * it will introduce the dependency to all users of Joist.\n */\nexport function maybeRequireTemporal(): TemporalModule | undefined {\n // if we've already failed to find a temporal implementation before, early exit\n if (temporal === false) return undefined;\n // if we already required temporal, just return that\n if (temporal) return temporal;\n // Share one implementation with database clients that resolve Temporal from the global.\n if (typeof globalThis.Temporal === \"undefined\") {\n try {\n runtimeRequire(\"temporal-polyfill/global\");\n } catch (e) {}\n }\n // use built in temporal or the installed polyfill\n if (typeof globalThis.Temporal !== \"undefined\") {\n temporal = {\n Temporal: globalThis.Temporal,\n toTemporalInstant: Date.prototype.toTemporalInstant,\n Intl: globalThis.Intl,\n };\n return temporal;\n }\n // don't try to load temporal again\n temporal = false;\n return undefined;\n}\n\nexport function requireTemporal(): TemporalModule {\n const temporal = maybeRequireTemporal();\n if (!temporal) throw new Error(\"Unable to find a Temporal implementation\");\n return temporal;\n}\n"],"mappings":";;AAIA,MAAM,iBAAiB,cAAc,YAAY,GAAG;AAIpD,IAAI;;;;;;;;;;;;;AAcJ,MAAa,WAAW,IAAI,MAC1B,CAAC,GACD,EACE,IAAI,SAAS,UAAU,UAAU;CAC/B,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,UAAU,UAAU,QAAQ;AACnE,EACF,CACF;;;;;;;AA0BA,SAAgB,uBAAmD;CAEjE,IAAI,aAAa,OAAO,OAAO,KAAA;CAE/B,IAAI,UAAU,OAAO;CAErB,IAAI,OAAO,WAAW,aAAa,aACjC,IAAI;EACF,eAAe,0BAA0B;CAC3C,SAAS,GAAG,CAAC;CAGf,IAAI,OAAO,WAAW,aAAa,aAAa;EAC9C,WAAW;GACT,UAAU,WAAW;GACrB,mBAAmB,KAAK,UAAU;GAClC,MAAM,WAAW;EACnB;EACA,OAAO;CACT;CAEA,WAAW;AAEb;AAEA,SAAgB,kBAAkC;CAChD,MAAM,WAAW,qBAAqB;CACtC,IAAI,CAAC,UAAU,MAAM,IAAI,MAAM,0CAA0C;CACzE,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joist-core",
|
|
3
|
-
"version": "2.4.0-next.
|
|
3
|
+
"version": "2.4.0-next.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"build"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"joist-utils": "2.4.0-next.
|
|
45
|
+
"joist-utils": "2.4.0-next.52"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"ansis": "^4.4.0",
|