sveltekit-temporal 0.5.0 → 0.6.0

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/README.md CHANGED
@@ -1,15 +1,13 @@
1
1
  # sveltekit-temporal
2
2
 
3
- Think about it, temporal may be supported in big 3 browsers soon, but your users may not update for some time.
3
+ Temporal may soon be supported in big 3 browsers, but your users may not update for some time.
4
4
 
5
- This One-shot CLI that wires the Temporal API polyfill into a SvelteKit project, with conditional loading so browsers that ship Temporal natively (Chrome 144+, Firefox 139+) and server runtimes that do too (Node.js 26+) pay zero bytes.
5
+ This one-shot CLI wires the Temporal API polyfill into a SvelteKit project, with conditional loading so browsers that ship Temporal natively (Chrome 144+, Firefox 139+) and server runtimes that do too (Node.js 26+) pay zero bytes.
6
6
 
7
7
 
8
8
  ## Usage
9
9
 
10
- ## Using with the Svelte CLI (`sv add`)
11
-
12
- This package also works as an `sv` add-on:
10
+ ## Using with the Svelte CLI
13
11
 
14
12
  ```bash
15
13
  # When creating a new project
@@ -33,7 +31,6 @@ Run it inside a SvelteKit project. It will:
33
31
  5. Create / update the following files:
34
32
  - `src/lib/temporal.{ts,js}` — the conditional bootstrap module.
35
33
  - `src/routes/+layout.{ts,js}` — prepends `import '$lib/temporal'` (preserves existing content).
36
- - `src/hooks.server.{ts,js}` — add commented out example import for server-side.
37
34
  - `src/app.d.ts` — adds global `Temporal` type and `Date.toTemporalInstant()` augmentation (TypeScript only).
38
35
 
39
36
  ## Idempotency
@@ -61,9 +58,8 @@ After running, reference `Temporal` directly anywhere — no imports needed and
61
58
 
62
59
  If you use Temporal inside `hooks.server.ts` or `+server.ts` endpoints that might run before any layout, uncomment the import there as well:
63
60
 
64
- `src/hooks.server.ts`:
65
61
  ```ts
66
- // import '$lib/temporal';
62
+ import '$lib/temporal';
67
63
 
68
64
  export async function handle({ event, resolve }) {
69
65
  return resolve(event);
package/dist/addon.js CHANGED
@@ -111,11 +111,6 @@ var addon_default = defineAddon({
111
111
  sv.file(
112
112
  `${directory.kitRoutes}/+layout.${ext}`,
113
113
  (content) => content.includes("import '$lib/temporal'") ? false : `import '$lib/temporal';
114
- ${content}`
115
- );
116
- sv.file(
117
- `${directory.src}/hooks.server.${ext}`,
118
- (content) => content.includes("import '$lib/temporal'") ? false : `// import '$lib/temporal';
119
114
  ${content}`
120
115
  );
121
116
  if (isTs) {
package/dist/index.js CHANGED
@@ -805,8 +805,6 @@ async function run() {
805
805
  writeManaged(bootstrapPath, bootstrapContents, { created, updated, skipped });
806
806
  const layoutPath = join(cwd, "src", "routes", `+layout.${ext}`);
807
807
  ensureImportInFile(layoutPath, "import '$lib/temporal';", { created, updated, skipped });
808
- const hooksPath = join(cwd, "src", `hooks.server.${ext}`);
809
- ensureImportInFile(hooksPath, "// import '$lib/temporal';", { created, updated, skipped });
810
808
  if (isTypeScript) {
811
809
  const dtsPath = join(cwd, "src", "app.d.ts");
812
810
  updateAppDts(dtsPath, polyfill.pkg, { created, updated, skipped });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sveltekit-temporal",
3
3
  "author": "Scott Rhamy",
4
- "version": "0.5.0",
4
+ "version": "0.6.0",
5
5
  "description": "Set up the Temporal API polyfill in a SvelteKit project with conditional loading on client and server.",
6
6
  "type": "module",
7
7
  "exports": {