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:
Reed von Redwitz
2024-02-19 10:33:04 +01:00
committed by GitHub
parent bf0e33eda1
commit 82c75f85e9
69 changed files with 198 additions and 186 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ export {
join,
relative,
toFileUrl,
} from "https://deno.land/std@0.211.0/path/mod.ts";
export { escape as regexpEscape } from "https://deno.land/std@0.211.0/regexp/escape.ts";
} from "https://deno.land/std@0.216.0/path/mod.ts";
export { escape as regexpEscape } from "https://deno.land/std@0.216.0/regexp/escape.ts";
export { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.8.5/mod.ts";
export { assertEquals } from "https://deno.land/std@0.211.0/assert/mod.ts";
export { assertEquals } from "https://deno.land/std@0.216.0/assert/mod.ts";
+14 -14
View File
@@ -7,26 +7,26 @@ export {
join,
relative,
resolve,
SEP,
SEPARATOR,
toFileUrl,
} from "https://deno.land/std@0.211.0/path/mod.ts";
export { normalize } from "https://deno.land/std@0.211.0/path/posix/mod.ts";
export { DAY, WEEK } from "https://deno.land/std@0.211.0/datetime/constants.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 { normalize } from "https://deno.land/std@0.216.0/path/posix/mod.ts";
export { DAY, WEEK } from "https://deno.land/std@0.216.0/datetime/constants.ts";
export * as colors from "https://deno.land/std@0.216.0/fmt/colors.ts";
export {
walk,
type WalkEntry,
WalkError,
} from "https://deno.land/std@0.211.0/fs/walk.ts";
export { parse } from "https://deno.land/std@0.211.0/flags/mod.ts";
} from "https://deno.land/std@0.216.0/fs/walk.ts";
export { parse } from "https://deno.land/std@0.216.0/flags/mod.ts";
export {
gte,
lt,
greaterOrEqual,
lessThan,
parse as semverParse,
} from "https://deno.land/std@0.211.0/semver/mod.ts";
export { emptyDir, existsSync } from "https://deno.land/std@0.211.0/fs/mod.ts";
export * as JSONC from "https://deno.land/std@0.211.0/jsonc/mod.ts";
export { assertEquals } from "https://deno.land/std@0.211.0/assert/mod.ts";
} from "https://deno.land/std@0.216.0/semver/mod.ts";
export { emptyDir, existsSync } from "https://deno.land/std@0.216.0/fs/mod.ts";
export * as JSONC from "https://deno.land/std@0.216.0/jsonc/mod.ts";
export { assertEquals } from "https://deno.land/std@0.216.0/assert/mod.ts";
// ts-morph
export { Node, Project } from "https://deno.land/x/ts_morph@20.0.0/mod.ts";
export { Node, Project } from "https://deno.land/x/ts_morph@21.0.1/mod.ts";
+4 -4
View File
@@ -1,10 +1,10 @@
export const RECOMMENDED_PREACT_VERSION = "10.19.2";
export const RECOMMENDED_PREACT_SIGNALS_VERSION = "1.2.1";
export const RECOMMENDED_PREACT_SIGNALS_CORE_VERSION = "1.5.0";
export const RECOMMENDED_PREACT_VERSION = "10.19.5";
export const RECOMMENDED_PREACT_SIGNALS_VERSION = "1.2.2";
export const RECOMMENDED_PREACT_SIGNALS_CORE_VERSION = "1.5.1";
export const RECOMMENDED_TWIND_CORE_VERSION = "1.1.3";
export const RECOMMENDED_TWIND_PRESET_AUTOPREFIX_VERSION = "1.0.7";
export const RECOMMENDED_TWIND_PRESET_TAILWIND_VERSION = "1.1.4";
export const RECOMMENDED_STD_VERSION = "0.211.0";
export const RECOMMENDED_STD_VERSION = "0.216.0";
export const RECOMMENDED_TAILIWIND_VERSION = "3.4.1";
export function freshImports(imports: Record<string, string>) {
+14 -2
View File
@@ -1,4 +1,11 @@
import { gte, join, relative, semverParse, walk, WalkEntry } from "./deps.ts";
import {
greaterOrEqual,
join,
relative,
semverParse,
walk,
WalkEntry,
} from "./deps.ts";
export { generate, type Manifest } from "./manifest.ts";
import { generate, type Manifest } from "./manifest.ts";
import { error } from "./error.ts";
@@ -7,7 +14,12 @@ const TEST_FILE_PATTERN = /[._]test\.(?:[tj]sx?|[mc][tj]s)$/;
export function ensureMinDenoVersion() {
// Check that the minimum supported Deno version is being used.
if (!gte(semverParse(Deno.version.deno), semverParse(MIN_DENO_VERSION))) {
if (
!greaterOrEqual(
semverParse(Deno.version.deno),
semverParse(MIN_DENO_VERSION),
)
) {
let message =
`Deno version ${MIN_DENO_VERSION} or higher is required. Please update Deno.\n\n`;
+2 -2
View File
@@ -1,4 +1,4 @@
import { colors, join, lt, semverParse } from "./deps.ts";
import { colors, join, lessThan, semverParse } from "./deps.ts";
export interface CheckFile {
last_checked: string;
@@ -118,7 +118,7 @@ export async function updateCheck(
if (
(!checkFile.last_shown ||
Date.now() >= new Date(checkFile.last_shown).getTime() + interval) &&
lt(currentVersion, latestVersion)
lessThan(currentVersion, latestVersion)
) {
checkFile.last_shown = new Date().toISOString();
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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
View File
@@ -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";
+2 -2
View File
@@ -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, "-");
+2 -2
View File
@@ -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);