From 41568ab95f19dc07b37e7724d9d5c7989f6315a9 Mon Sep 17 00:00:00 2001 From: ayame113 <40050810+ayame113@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:09:39 +0900 Subject: [PATCH] fix ci!!!!!!!!!!!!!!!!!!!!!!! --- deno.json | 3 ++- mod.ts | 2 +- oak_test.ts | 1 + src/file_server.ts | 8 ++++---- src/oak.ts | 4 ++-- test/a.jsx | 1 + test/a.tsx | 1 + utils/transpile_response.ts | 4 ++-- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/deno.json b/deno.json index 6776731..2786f4f 100644 --- a/deno.json +++ b/deno.json @@ -15,6 +15,7 @@ "@std/http": "jsr:@std/http@^1.0.12", "@std/media-types": "jsr:@std/media-types@^1.1.0", "@std/testing": "jsr:@std/testing@^1.0.6", - "@ayame113/ts-serve": "./" + "@ayame113/ts-serve": "./mod.ts", + "@ayame113/ts-serve/": "./" } } diff --git a/mod.ts b/mod.ts index bbe5dfe..9617b31 100644 --- a/mod.ts +++ b/mod.ts @@ -9,7 +9,7 @@ import { MediaType, transpile } from "./utils/transpile.ts"; * However, performance can be an issue on the server as loading the wasm file takes time. * In that case, calling this function in advance can speed up later calls to the transpile function. * - * ```ts + * ```ts ignore * import { serveDirWithTs, forceInstantiateWasm } from "@ayame113/ts-serve"; * * // load the wasm file in the background when the server starts. diff --git a/oak_test.ts b/oak_test.ts index 8a5187e..5430ea0 100644 --- a/oak_test.ts +++ b/oak_test.ts @@ -35,6 +35,7 @@ async function startServer() { app.addEventListener("listen", (e) => { listener.resolve(e); }); + // deno-lint-ignore no-unused-vars const server = app.listen({ port, signal: killSignal.signal }); await listener.promise; diff --git a/src/file_server.ts b/src/file_server.ts index d00b487..f4c197c 100644 --- a/src/file_server.ts +++ b/src/file_server.ts @@ -6,12 +6,12 @@ import { } from "@std/http/file-server"; import { transpileResponse } from "../utils/transpile_response.ts"; -import { TranspileOptions } from "../utils/transpile.ts"; +import type { TranspileOptions } from "../utils/transpile.ts"; /** * This can be used in the same way as the [serveFile](https://jsr.io/@std/http/doc/~/serveFile) function of the standard library, but if the file is TypeScript, it will be rewritten to JavaScript. * - * ```ts + * ```ts ignore * import { serveFileWithTs, forceInstantiateWasm } from "@ayame113/ts-serve"; * * forceInstantiateWasm(); @@ -36,7 +36,7 @@ export async function serveFileWithTs( /** * This can be used in the same way as the [serveDir](https://jsr.io/@std/http/doc/~/serveDir) function of the standard library, but if the file is TypeScript, it will be rewritten to JavaScript. * - * ```ts + * ```ts ignore * import { serveDirWithTs, forceInstantiateWasm } from "@ayame113/ts-serve"; * * forceInstantiateWasm(); @@ -57,4 +57,4 @@ export async function serveDirWithTs( ); } -export { type ServeDirOptions, type ServeFileOptions, type TranspileOptions }; +export type { ServeDirOptions, ServeFileOptions, TranspileOptions }; diff --git a/src/oak.ts b/src/oak.ts index 5153d98..ae0aa0d 100644 --- a/src/oak.ts +++ b/src/oak.ts @@ -16,7 +16,7 @@ const jsxType = new Set(["jsx", ".jsx", "text/jsx"]); /** * Oak middleware that rewrites TypeScript response to JavaScript response (with transpile config). * - * ```ts + * ```ts ignore * import { Application } from "@oak/oak"; * import { createTsMiddleware, forceInstantiateWasm } from "@ayame113/ts-serve"; * @@ -109,7 +109,7 @@ export function createTsMiddleware( /** * Oak middleware that rewrites TypeScript response to JavaScript response. * - * ```ts + * ```ts ignore * import { Application } from "@oak/oak"; * import { tsMiddleware, forceInstantiateWasm } from "@ayame113/ts-serve"; * diff --git a/test/a.jsx b/test/a.jsx index 0a4ea2a..5560837 100644 --- a/test/a.jsx +++ b/test/a.jsx @@ -1 +1,2 @@ +// deno-lint-ignore no-unused-vars const a = hello; diff --git a/test/a.tsx b/test/a.tsx index 0a4ea2a..5560837 100644 --- a/test/a.tsx +++ b/test/a.tsx @@ -1 +1,2 @@ +// deno-lint-ignore no-unused-vars const a = hello; diff --git a/utils/transpile_response.ts b/utils/transpile_response.ts index ed4c514..f28f287 100644 --- a/utils/transpile_response.ts +++ b/utils/transpile_response.ts @@ -1,12 +1,12 @@ import { contentType } from "@std/media-types"; -import { MediaType, transpile, TranspileOptions } from "./transpile.ts"; +import { MediaType, transpile, type TranspileOptions } from "./transpile.ts"; const jsContentType = contentType(".js"); /** * Transpile the body of the response and return a new response. * - * ```ts + * ```ts ignore * import { serveFile } from "@std/http/file-server"; * * import { transpileResponse } from "@ayame113/ts-serve/utils/transpile_response.ts"