fix: update dependency recommendations (#2320)
closes https://github.com/denoland/fresh/issues/2319 The issue is because `imports.ts` wasn't changed before releasing. I thought I would go through and bump some other versions as well. This handles everything except the esbuild stuff and `tests/`.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { SEP } from "./deps.ts";
|
||||
import { SEPARATOR } from "./deps.ts";
|
||||
import { ErrorHandler, FinalHandler, RouteResult, withBase } from "./router.ts";
|
||||
import {
|
||||
BaseRoute,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
export const ROOT_BASE_ROUTE = toBaseRoute("/");
|
||||
|
||||
export function toBaseRoute(input: string): BaseRoute {
|
||||
input = input.replaceAll(SEP, "/");
|
||||
input = input.replaceAll(SEPARATOR, "/");
|
||||
|
||||
if (input.endsWith("_layout")) {
|
||||
input = input.slice(0, -"_layout".length);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { contentType, extname, SEP, STATUS_CODE } from "./deps.ts";
|
||||
import { contentType, extname, SEPARATOR, STATUS_CODE } from "./deps.ts";
|
||||
import * as router from "./router.ts";
|
||||
import { FreshConfig, FreshContext, Manifest } from "./mod.ts";
|
||||
import {
|
||||
@@ -353,7 +353,7 @@ export class ServerContext {
|
||||
const { localUrl, path, size, contentType, etag } of this.#extractResult
|
||||
.staticFiles
|
||||
) {
|
||||
staticRoutes[path.replaceAll(SEP, "/")] = {
|
||||
staticRoutes[path.replaceAll(SEPARATOR, "/")] = {
|
||||
baseRoute: toBaseRoute(path),
|
||||
methods: {
|
||||
"HEAD": this.#staticFileHandler(
|
||||
|
||||
+13
-13
@@ -6,30 +6,30 @@ export {
|
||||
fromFileUrl,
|
||||
isAbsolute,
|
||||
join,
|
||||
SEP,
|
||||
SEPARATOR,
|
||||
toFileUrl,
|
||||
} from "https://deno.land/std@0.211.0/path/mod.ts";
|
||||
export { walk } from "https://deno.land/std@0.211.0/fs/walk.ts";
|
||||
export * as colors from "https://deno.land/std@0.211.0/fmt/colors.ts";
|
||||
} from "https://deno.land/std@0.216.0/path/mod.ts";
|
||||
export { walk } from "https://deno.land/std@0.216.0/fs/walk.ts";
|
||||
export * as colors from "https://deno.land/std@0.216.0/fmt/colors.ts";
|
||||
export {
|
||||
type Handler as ServeHandler,
|
||||
serve,
|
||||
} from "https://deno.land/std@0.211.0/http/server.ts";
|
||||
export { STATUS_CODE } from "https://deno.land/std@0.211.0/http/status.ts";
|
||||
} from "https://deno.land/std@0.216.0/http/server.ts";
|
||||
export { STATUS_CODE } from "https://deno.land/std@0.216.0/http/status.ts";
|
||||
export {
|
||||
contentType,
|
||||
} from "https://deno.land/std@0.211.0/media_types/content_type.ts";
|
||||
export { encodeHex } from "https://deno.land/std@0.211.0/encoding/hex.ts";
|
||||
export { escape } from "https://deno.land/std@0.211.0/regexp/escape.ts";
|
||||
export * as JSONC from "https://deno.land/std@0.211.0/jsonc/mod.ts";
|
||||
} from "https://deno.land/std@0.216.0/media_types/content_type.ts";
|
||||
export { encodeHex } from "https://deno.land/std@0.216.0/encoding/hex.ts";
|
||||
export { escape } from "https://deno.land/std@0.216.0/regexp/escape.ts";
|
||||
export * as JSONC from "https://deno.land/std@0.216.0/jsonc/mod.ts";
|
||||
export { renderToString } from "https://esm.sh/*preact-render-to-string@6.3.1";
|
||||
export {
|
||||
assertEquals,
|
||||
assertThrows,
|
||||
} from "https://deno.land/std@0.211.0/assert/mod.ts";
|
||||
} from "https://deno.land/std@0.216.0/assert/mod.ts";
|
||||
export {
|
||||
isIdentifierChar,
|
||||
isIdentifierStart,
|
||||
} from "https://esm.sh/@babel/helper-validator-identifier@7.22.20";
|
||||
export { normalize } from "https://deno.land/std@0.211.0/path/posix/mod.ts";
|
||||
export { assertSnapshot } from "https://deno.land/std@0.211.0/testing/snapshot.ts";
|
||||
export { normalize } from "https://deno.land/std@0.216.0/path/posix/mod.ts";
|
||||
export { assertSnapshot } from "https://deno.land/std@0.216.0/testing/snapshot.ts";
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
dirname,
|
||||
extname,
|
||||
join,
|
||||
SEP,
|
||||
SEPARATOR,
|
||||
toFileUrl,
|
||||
walk,
|
||||
} from "./deps.ts";
|
||||
@@ -111,7 +111,7 @@ export async function extractRoutes(
|
||||
const path = url.substring(baseUrl.length + "routes".length);
|
||||
let baseRoute = path.substring(1, path.length - extname(path).length);
|
||||
baseRoute = join(state.config.basePath.slice(1), baseRoute).replaceAll(
|
||||
SEP,
|
||||
SEPARATOR,
|
||||
"/",
|
||||
);
|
||||
const name = baseRoute.replace(/\//g, "-");
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "preact";
|
||||
import { assetHashingHook } from "../../runtime/utils.ts";
|
||||
import { Partial, PartialProps } from "../../runtime/Partial.tsx";
|
||||
import { join, renderToString, SEP } from "../deps.ts";
|
||||
import { join, renderToString, SEPARATOR } from "../deps.ts";
|
||||
import { RenderState } from "./state.ts";
|
||||
import { Island } from "../types.ts";
|
||||
import {
|
||||
@@ -238,7 +238,7 @@ options.vnode = (vnode) => {
|
||||
|
||||
if (url.startsWith("/") && current?.basePath) {
|
||||
const joinedPath = join("/", current.basePath, url).replaceAll(
|
||||
SEP,
|
||||
SEPARATOR,
|
||||
"/",
|
||||
);
|
||||
out.push(leading + joinedPath + trailing);
|
||||
|
||||
Reference in New Issue
Block a user