chore: explicitly version rts in deps.ts (#1684)
This commit is contained in:
Vendored
-1
@@ -8,7 +8,6 @@
|
||||
"twind/": "https://esm.sh/twind@0.16.19/",
|
||||
"preact": "https://esm.sh/preact@10.18.1",
|
||||
"preact/": "https://esm.sh/preact@10.18.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.1",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.5.0",
|
||||
"@preact/signals-core@1.2.3": "https://esm.sh/@preact/signals-core@1.2.3",
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"$fresh/": "../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -24,7 +24,6 @@ instead this one particular commit? Just make the following changes to your
|
||||
+ "$fresh/": "https://raw.githubusercontent.com/denoland/fresh/the-particular-commit-hash-here/",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0",
|
||||
```
|
||||
|
||||
### Forked Fresh
|
||||
@@ -42,7 +41,6 @@ been merged yet (at the time of writing this):
|
||||
+ "$fresh/": "https://raw.githubusercontent.com/deer/fresh/state_in_props/",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0",
|
||||
```
|
||||
|
||||
## Creating a new project
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export const RECOMMENDED_PREACT_VERSION = "10.18.1";
|
||||
export const RECOMMENDED_PREACT_RTS_VERSION = "6.2.2";
|
||||
export const RECOMMENDED_PREACT_SIGNALS_VERSION = "1.2.1";
|
||||
export const RECOMMENDED_PREACT_SIGNALS_CORE_VERSION = "1.5.0";
|
||||
export const RECOMMENDED_TWIND_VERSION = "0.16.19";
|
||||
@@ -9,8 +8,6 @@ export function freshImports(imports: Record<string, string>) {
|
||||
imports["$fresh/"] = new URL("../../", import.meta.url).href;
|
||||
imports["preact"] = `https://esm.sh/preact@${RECOMMENDED_PREACT_VERSION}`;
|
||||
imports["preact/"] = `https://esm.sh/preact@${RECOMMENDED_PREACT_VERSION}/`;
|
||||
imports["preact-render-to-string"] =
|
||||
`https://esm.sh/*preact-render-to-string@${RECOMMENDED_PREACT_RTS_VERSION}`;
|
||||
imports["@preact/signals"] =
|
||||
`https://esm.sh/*@preact/signals@${RECOMMENDED_PREACT_SIGNALS_VERSION}`;
|
||||
imports["@preact/signals-core"] =
|
||||
|
||||
@@ -20,3 +20,4 @@ export {
|
||||
export { toHashString } from "https://deno.land/std@0.193.0/crypto/to_hash_string.ts";
|
||||
export { escape } from "https://deno.land/std@0.193.0/regexp/escape.ts";
|
||||
export * as JSONC from "https://deno.land/std@0.193.0/jsonc/mod.ts";
|
||||
export { renderToString } from "https://esm.sh/*preact-render-to-string@6.2.2";
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "preact";
|
||||
import { assetHashingHook } from "../../runtime/utils.ts";
|
||||
import { Partial, PartialProps } from "../../runtime/Partial.tsx";
|
||||
import { renderToString } from "preact-render-to-string";
|
||||
import { renderToString } from "../deps.ts";
|
||||
import { RenderState } from "./state.ts";
|
||||
import { Island } from "../types.ts";
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RenderState } from "./state.ts";
|
||||
import { setRenderState } from "./preact_hooks.ts";
|
||||
import { renderToString } from "preact-render-to-string";
|
||||
import { renderToString } from "../deps.ts";
|
||||
import {
|
||||
ComponentType,
|
||||
Fragment,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.5",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.3.1"
|
||||
},
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.0",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.16.0",
|
||||
"preact/": "https://esm.sh/preact@10.16.0/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/preact-render-to-string@6.1.0?external=preact"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"lock": false,
|
||||
"tasks": {
|
||||
"start": "deno run -A --watch=static/,routes/ dev.ts"
|
||||
},
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.4",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env -S deno run -A --watch=static/,routes/
|
||||
|
||||
import dev from "$fresh/dev.ts";
|
||||
|
||||
await dev(import.meta.url, "./main.ts");
|
||||
@@ -1,11 +0,0 @@
|
||||
import { FreshConfig } from "$fresh/server.ts";
|
||||
|
||||
export default {
|
||||
async render(_ctx, render) {
|
||||
await new Promise<void>((r) => r());
|
||||
const body = render();
|
||||
if (typeof body !== "string") {
|
||||
throw new Error("body is missing");
|
||||
}
|
||||
},
|
||||
} as FreshConfig;
|
||||
@@ -1,18 +0,0 @@
|
||||
// DO NOT EDIT. This file is generated by Fresh.
|
||||
// This file SHOULD be checked into source version control.
|
||||
// This file is automatically updated during development when running `dev.ts`.
|
||||
|
||||
import * as $0 from "./routes/index.tsx";
|
||||
import * as $$0 from "./islands/Test.tsx";
|
||||
|
||||
const manifest = {
|
||||
routes: {
|
||||
"./routes/index.tsx": $0,
|
||||
},
|
||||
islands: {
|
||||
"./islands/Test.tsx": $$0,
|
||||
},
|
||||
baseUrl: import.meta.url,
|
||||
};
|
||||
|
||||
export default manifest;
|
||||
@@ -1,13 +0,0 @@
|
||||
import { useEffect } from "preact/hooks";
|
||||
|
||||
export default function Test() {
|
||||
useEffect(() => {
|
||||
document.getElementById("foo")!.textContent = "it works";
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<p id="foo">
|
||||
it doesn't work
|
||||
</p>
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="dom" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.asynciterable" />
|
||||
/// <reference lib="deno.ns" />
|
||||
|
||||
import { start } from "$fresh/server.ts";
|
||||
import manifest from "./fresh.gen.ts";
|
||||
import config from "./fresh.config.ts";
|
||||
|
||||
await start(manifest, config);
|
||||
@@ -1,14 +0,0 @@
|
||||
// Simulate Deno Deploy environment
|
||||
|
||||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="dom" />
|
||||
/// <reference lib="dom.iterable" />
|
||||
/// <reference lib="dom.asynciterable" />
|
||||
/// <reference lib="deno.ns" />
|
||||
|
||||
import "./polyfill_deno_deploy.ts";
|
||||
import { start } from "$fresh/server.ts";
|
||||
import manifest from "./fresh.gen.ts";
|
||||
import config from "./fresh.config.ts";
|
||||
|
||||
await start(manifest, config);
|
||||
@@ -1,5 +0,0 @@
|
||||
// Simulate Deno Deploy environment
|
||||
|
||||
//@ts-ignore: Remove Deno.run for simulating deno deploy env
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
delete Deno.run;
|
||||
@@ -1,9 +0,0 @@
|
||||
import Test from "../islands/Test.tsx";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
<Test />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -3,8 +3,7 @@
|
||||
"imports": {
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1"
|
||||
"preact/": "https://esm.sh/preact@10.15.1/"
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.2.3",
|
||||
"$std/": "https://deno.land/std@0.190.0/"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"twind/": "https://esm.sh/twind@0.16.19/",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"twind/": "https://esm.sh/twind@0.16.19/",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.11.0",
|
||||
"preact/": "https://esm.sh/preact@10.11.0/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
|
||||
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.0.1"
|
||||
},
|
||||
|
||||
@@ -156,18 +156,6 @@ Deno.test("island using `npm:` specifiers", async () => {
|
||||
});
|
||||
});
|
||||
|
||||
Deno.test("works with older preact-render-to-string v5", async () => {
|
||||
await withPageName(
|
||||
"./tests/fixture_preact_rts_v5/main.ts",
|
||||
async (page, address) => {
|
||||
await page.goto(address);
|
||||
await page.waitForSelector("#foo");
|
||||
await waitForText(page, "#foo", "it works");
|
||||
+await assertNoPageComments(page);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("pass single JSX child to island", async () => {
|
||||
await withPageName(
|
||||
"./tests/fixture_island_nesting/main.ts",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"twind/": "https://esm.sh/twind@0.16.19/",
|
||||
"preact": "https://esm.sh/preact@10.15.1",
|
||||
"preact/": "https://esm.sh/preact@10.15.1/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
|
||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.2.3",
|
||||
"$std/": "https://deno.land/std@0.193.0/",
|
||||
|
||||
Reference in New Issue
Block a user