chore: change assert to with for import attributes (#2231)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import FRESH_VERSIONS from "../versions.json" assert { type: "json" };
|
import FRESH_VERSIONS from "../versions.json" with { type: "json" };
|
||||||
|
|
||||||
type RawTableOfContents = Record<
|
type RawTableOfContents = Record<
|
||||||
string,
|
string,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ async function fetchLatestVersion() {
|
|||||||
|
|
||||||
async function readCurrentVersion() {
|
async function readCurrentVersion() {
|
||||||
const versions = (await import("../../versions.json", {
|
const versions = (await import("../../versions.json", {
|
||||||
"assert": { type: "json" },
|
with: { type: "json" },
|
||||||
})).default as string[];
|
})).default as string[];
|
||||||
return versions[0];
|
return versions[0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
assertNotEquals,
|
assertNotEquals,
|
||||||
assertNotMatch,
|
assertNotMatch,
|
||||||
} from "./deps.ts";
|
} from "./deps.ts";
|
||||||
import versions from "../versions.json" assert { type: "json" };
|
import versions from "../versions.json" with { type: "json" };
|
||||||
import { CheckFile } from "../src/dev/update_check.ts";
|
import { CheckFile } from "../src/dev/update_check.ts";
|
||||||
import { WEEK } from "../src/dev/deps.ts";
|
import { WEEK } from "../src/dev/deps.ts";
|
||||||
import { getStdOutput } from "../tests/test_utils.ts";
|
import { getStdOutput } from "../tests/test_utils.ts";
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { assertArrayIncludes, assertEquals } from "$std/assert/mod.ts";
|
import { assertArrayIncludes, assertEquals } from "$std/assert/mod.ts";
|
||||||
import { withPageName } from "../tests/test_utils.ts";
|
import { withPageName } from "../tests/test_utils.ts";
|
||||||
import { dirname, join } from "$std/path/mod.ts";
|
import { dirname, join } from "$std/path/mod.ts";
|
||||||
import VERSIONS from "../versions.json" assert { type: "json" };
|
import VERSIONS from "../versions.json" with { type: "json" };
|
||||||
import { createHandler } from "../server.ts";
|
import { createHandler } from "../server.ts";
|
||||||
import manifest from "./fresh.gen.ts";
|
import manifest from "./fresh.gen.ts";
|
||||||
import config from "./fresh.config.ts";
|
import config from "./fresh.config.ts";
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import { Handlers, PageProps } from "$fresh/server.ts";
|
|||||||
import Counter from "../islands/Counter.tsx";
|
import Counter from "../islands/Counter.tsx";
|
||||||
import LemonDrop from "../islands/LemonDrop.tsx";
|
import LemonDrop from "../islands/LemonDrop.tsx";
|
||||||
import Footer from "../components/Footer.tsx";
|
import Footer from "../components/Footer.tsx";
|
||||||
import VERSIONS from "../../versions.json" assert { type: "json" };
|
import VERSIONS from "../../versions.json" with { type: "json" };
|
||||||
import * as FeatureIcons from "../components/FeatureIcons.tsx";
|
import * as FeatureIcons from "../components/FeatureIcons.tsx";
|
||||||
import CopyArea from "../islands/CopyArea.tsx";
|
import CopyArea from "../islands/CopyArea.tsx";
|
||||||
import * as Icons from "../components/Icons.tsx";
|
import * as Icons from "../components/Icons.tsx";
|
||||||
import Projects from "../components/Projects.tsx";
|
import Projects from "../components/Projects.tsx";
|
||||||
import projects from "../data/showcase.json" assert { type: "json" };
|
import projects from "../data/showcase.json" with { type: "json" };
|
||||||
import Header from "../components/Header.tsx";
|
import Header from "../components/Header.tsx";
|
||||||
|
|
||||||
function isOpenGraphUA(header: string | null): boolean {
|
function isOpenGraphUA(header: string | null): boolean {
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { RouteConfig } from "$fresh/server.ts";
|
import { RouteConfig } from "$fresh/server.ts";
|
||||||
import { Handlers } from "$fresh/server.ts";
|
import { Handlers } from "$fresh/server.ts";
|
||||||
import { format, parse } from "$std/semver/mod.ts";
|
import { format, parse } from "$std/semver/mod.ts";
|
||||||
import VERSIONS from "../../versions.json" assert { type: "json" };
|
import VERSIONS from "../../versions.json" with { type: "json" };
|
||||||
import { extname } from "$std/path/mod.ts";
|
import { extname } from "$std/path/mod.ts";
|
||||||
|
|
||||||
const BASE_URL = "https://raw.githubusercontent.com/denoland/fresh/";
|
const BASE_URL = "https://raw.githubusercontent.com/denoland/fresh/";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { PageProps } from "$fresh/server.ts";
|
|||||||
import Projects, { Project } from "../components/Projects.tsx";
|
import Projects, { Project } from "../components/Projects.tsx";
|
||||||
import Header from "../components/Header.tsx";
|
import Header from "../components/Header.tsx";
|
||||||
import Footer from "../components/Footer.tsx";
|
import Footer from "../components/Footer.tsx";
|
||||||
import projects from "../data/showcase.json" assert { type: "json" };
|
import projects from "../data/showcase.json" with { type: "json" };
|
||||||
|
|
||||||
const TITLE = "Showcase | Fresh";
|
const TITLE = "Showcase | Fresh";
|
||||||
const DESCRIPTION = "Selection of projects that have been built with Fresh.";
|
const DESCRIPTION = "Selection of projects that have been built with Fresh.";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||||
import VERSIONS from "../../versions.json" assert { type: "json" };
|
import VERSIONS from "../../versions.json" with { type: "json" };
|
||||||
|
|
||||||
export const handler: Handlers = {
|
export const handler: Handlers = {
|
||||||
GET(req) {
|
GET(req) {
|
||||||
|
|||||||
Reference in New Issue
Block a user