Skip to content

Commit 9bacc3e

Browse files
authored
Merge branch 'main' into vite-8-compat
2 parents aaa5c51 + 6c83886 commit 9bacc3e

12 files changed

Lines changed: 35 additions & 15 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/start": patch
3+
---
4+
5+
Sanitize Location header value in streaming redirect script

.changeset/slick-badgers-wear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/start": patch
3+
---
4+
5+
update seroval to 1.5.4

packages/start/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"exports": {
1313
".": "./src/index.tsx",
14-
"./config": "./src/config/index.ts",
14+
"./config": "./dist/config/index.js",
1515
"./server": "./src/server/index.tsx",
1616
"./client": "./src/client/index.tsx",
1717
"./router": "./src/router.tsx",
@@ -55,7 +55,7 @@
5555
"path-to-regexp": "^8.3.0",
5656
"pathe": "^2.0.3",
5757
"radix3": "^1.1.2",
58-
"seroval": "^1.5.1",
58+
"seroval": "^1.5.4",
5959
"seroval-plugins": "^1.5.1",
6060
"shiki": "^1.29.2",
6161
"solid-js": "^1.9.11",

packages/start/src/config/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const VIRTUAL_MODULES = {
77
getClientManifest: "solid-start:get-client-manifest",
88
getManifest: "solid-start:get-manifest",
99
middleware: "solid-start:middleware",
10-
serverFnManifest: "solidstart:server-fn-manifest",
10+
serverFnManifest: "solid-start:server-fn-manifest",
1111
clientEntry: "solid-start:client-entry",
1212
serverEntry: "solid-start:server-entry",
1313
app: "solid-start:app",

packages/start/src/config/fs-routes/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { init, parse } from "es-module-lexer";
22
import esbuild from "esbuild";
33
import fg from "fast-glob";
4-
import fs from "fs";
4+
import fs from "node:fs";
55
import micromatch from "micromatch";
6-
import { posix } from "path";
6+
import { posix } from "node:path";
77
import { pathToRegexp } from "path-to-regexp";
88

99
import { normalizePath } from "vite";

packages/start/src/config/lazy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { PluginItem } from "@babel/core";
22
import babel from "@babel/core";
33
import * as t from "@babel/types";
4-
import { sep as osSep } from "path";
5-
import { basename, relative, sep } from "path/posix";
4+
import { sep as osSep } from "node:path";
5+
import { basename, relative, sep } from "node:path/posix";
66
import type { PluginOption } from "vite";
77
import { VITE_ENVIRONMENTS } from "./constants.ts";
88

packages/start/src/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file contains global type definitions that are internal to SolidStart and are not exported
22

3-
declare module "solidstart:server-fn-manifest" {
3+
declare module "solid-start:server-fn-manifest" {
44
type ServerFn = (...args: Array<any>) => Promise<any>;
55
export function getServerFnById(id: string): Promise<ServerFn>;
66
}

packages/start/src/server/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function handleStreamCompleteRedirect(context: PageEvent) {
213213
return ({ write }: { write: (html: string) => void }) => {
214214
context.complete = true;
215215
const to = context.response && context.response.headers.get("Location");
216-
to && write(`<script>window.location="${to}"</script>`);
216+
to && write(`<script>window.location=${JSON.stringify(to).replace(/</g, "\\u003c")}</script>`);
217217
};
218218
}
219219

packages/start/src/server/server-functions-handler.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ vi.mock("solid-js/web", () => ({
1111
provideRequestEvent: vi.fn((_event, fn) => fn()),
1212
}));
1313

14-
vi.mock("solidstart:server-fn-manifest", () => ({
14+
vi.mock("solid-start:server-fn-manifest", () => ({
1515
getServerFnById: vi.fn(),
1616
}));
1717

packages/start/src/server/server-functions-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
extractBody,
1818
getHeadersAndBody,
1919
} from "./server-functions-shared.ts";
20-
import "solidstart:server-fn-manifest";
20+
import "solid-start:server-fn-manifest";
2121

2222
import { getServerFunction } from "./server-fns.ts";
2323
import type { FetchEvent, PageEvent } from "./types.ts";

0 commit comments

Comments
 (0)