refactor(http): move unstable APIs (header, method, signed-cookie) (#5938)

This commit is contained in:
Yoshiya Hinosawa 2024-09-11 20:23:59 +09:00 committed by GitHub
parent 95d4c19c5d
commit 8d7e184943
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 11 additions and 14 deletions

View File

@ -6,12 +6,12 @@
"./cookie": "./cookie.ts",
"./etag": "./etag.ts",
"./file-server": "./file_server.ts",
"./header": "./header.ts",
"./method": "./method.ts",
"./unstable-header": "./unstable_header.ts",
"./unstable-method": "./unstable_method.ts",
"./negotiation": "./negotiation.ts",
"./server-sent-event-stream": "./server_sent_event_stream.ts",
"./status": "./status.ts",
"./signed-cookie": "./signed_cookie.ts",
"./unstable-signed-cookie": "./unstable_signed_cookie.ts",
"./user-agent": "./user_agent.ts",
"./route": "./route.ts"
}

View File

@ -52,8 +52,8 @@ import { parseArgs } from "@std/cli/parse-args";
import denoConfig from "./deno.json" with { type: "json" };
import { format as formatBytes } from "@std/fmt/bytes";
import { getNetworkAddress } from "@std/net/get-network-address";
import { HEADER } from "./header.ts";
import { METHOD } from "./method.ts";
import { HEADER } from "./unstable_header.ts";
import { METHOD } from "./unstable_method.ts";
interface EntryInfo {
mode: string;

View File

@ -96,10 +96,7 @@ export * from "./cookie.ts";
export * from "./etag.ts";
export * from "./status.ts";
export * from "./negotiation.ts";
export * from "./signed_cookie.ts";
export * from "./server_sent_event_stream.ts";
export * from "./user_agent.ts";
export * from "./file_server.ts";
export * from "./route.ts";
export * from "./header.ts";
export * from "./method.ts";

View File

@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { HEADER } from "./header.ts";
import { HEADER } from "./unstable_header.ts";
import { assertEquals } from "@std/assert";
Deno.test({

View File

@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { METHOD } from "./method.ts";
import { METHOD } from "./unstable_method.ts";
import { assertEquals } from "@std/assert";
Deno.test({

View File

@ -19,7 +19,7 @@ function splitByLast(value: string, separator: string): [string, string] {
*
* @example Usage
* ```ts no-eval no-assert
* import { signCookie } from "@std/http/signed-cookie";
* import { signCookie } from "@std/http/unstable-signed-cookie";
* import { setCookie } from "@std/http/cookie";
*
* const key = await crypto.subtle.generateKey(
@ -59,7 +59,7 @@ export async function signCookie(
*
* @example Usage
* ```ts no-eval no-assert
* import { verifySignedCookie } from "@std/http/signed-cookie";
* import { verifySignedCookie } from "@std/http/unstable-signed-cookie";
* import { getCookies } from "@std/http/cookie";
*
* const key = await crypto.subtle.generateKey(
@ -102,7 +102,7 @@ export async function verifySignedCookie(
*
* @example Usage
* ```ts no-eval no-assert
* import { verifySignedCookie, parseSignedCookie } from "@std/http/signed-cookie";
* import { verifySignedCookie, parseSignedCookie } from "@std/http/unstable-signed-cookie";
* import { getCookies } from "@std/http/cookie";
*
* const key = await crypto.subtle.generateKey(

View File

@ -3,7 +3,7 @@ import {
parseSignedCookie,
signCookie,
verifySignedCookie,
} from "./signed_cookie.ts";
} from "./unstable_signed_cookie.ts";
import { assertEquals } from "@std/assert";
Deno.test("signCookie() and verifySignedCookie() work circularly", async () => {