mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
Unstable methods should not appear in runtime or d.ts (denoland/deno#4957)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
This commit is contained in:
parent
26493ca172
commit
94e6c3d329
@ -9,7 +9,14 @@ const { test } = Deno;
|
||||
|
||||
async function startServer(): Promise<Deno.Process> {
|
||||
const server = Deno.run({
|
||||
cmd: [Deno.execPath(), "--allow-net", "--allow-read", "server.ts"],
|
||||
// TODO(lucacasonato): remove unstable once possible
|
||||
cmd: [
|
||||
Deno.execPath(),
|
||||
"--allow-net",
|
||||
"--allow-read",
|
||||
"--unstable",
|
||||
"server.ts",
|
||||
],
|
||||
cwd: "examples/chat",
|
||||
stdout: "piped",
|
||||
});
|
||||
|
@ -203,7 +203,8 @@ for (const s of scenes) {
|
||||
);
|
||||
|
||||
try {
|
||||
const args = [Deno.execPath(), "run"];
|
||||
// TODO(lucacasonato): remove unstable when stabilized
|
||||
const args = [Deno.execPath(), "run", "--unstable"];
|
||||
|
||||
if (s.read) {
|
||||
args.push("--allow-read");
|
||||
|
@ -112,7 +112,8 @@ for (const s of scenes) {
|
||||
let title = `test ${s.async ? "exists" : "existsSync"}("testdata/${s.file}")`;
|
||||
title += ` ${s.read ? "with" : "without"} --allow-read`;
|
||||
Deno.test(`[fs] existsPermission ${title}`, async function (): Promise<void> {
|
||||
const args = [Deno.execPath(), "run"];
|
||||
// TODO(lucacasonato): remove unstable when stabilized
|
||||
const args = [Deno.execPath(), "run", "--unstable"];
|
||||
|
||||
if (s.read) {
|
||||
args.push("--allow-read");
|
||||
|
@ -115,7 +115,7 @@ Deno.test("expandGlobIncludeDirs", async function (): Promise<void> {
|
||||
Deno.test("expandGlobPermError", async function (): Promise<void> {
|
||||
const exampleUrl = new URL("testdata/expand_wildcard.js", import.meta.url);
|
||||
const p = run({
|
||||
cmd: [execPath(), exampleUrl.toString()],
|
||||
cmd: [execPath(), "--unstable", exampleUrl.toString()],
|
||||
stdin: "null",
|
||||
stdout: "piped",
|
||||
stderr: "piped",
|
||||
|
@ -12,6 +12,7 @@ async function startFileServer(): Promise<void> {
|
||||
cmd: [
|
||||
Deno.execPath(),
|
||||
"run",
|
||||
"--unstable",
|
||||
"--allow-read",
|
||||
"--allow-net",
|
||||
"http/file_server.ts",
|
||||
@ -105,7 +106,14 @@ test("serveWithUnorthodoxFilename", async function (): Promise<void> {
|
||||
|
||||
test("servePermissionDenied", async function (): Promise<void> {
|
||||
const deniedServer = Deno.run({
|
||||
cmd: [Deno.execPath(), "run", "--allow-net", "http/file_server.ts"],
|
||||
// TODO(lucacasonato): remove unstable when stabilized
|
||||
cmd: [
|
||||
Deno.execPath(),
|
||||
"run",
|
||||
"--unstable",
|
||||
"--allow-net",
|
||||
"http/file_server.ts",
|
||||
],
|
||||
stdout: "piped",
|
||||
stderr: "piped",
|
||||
});
|
||||
@ -132,7 +140,14 @@ test("servePermissionDenied", async function (): Promise<void> {
|
||||
|
||||
test("printHelp", async function (): Promise<void> {
|
||||
const helpProcess = Deno.run({
|
||||
cmd: [Deno.execPath(), "run", "http/file_server.ts", "--help"],
|
||||
// TODO(lucacasonato): remove unstable when stabilized
|
||||
cmd: [
|
||||
Deno.execPath(),
|
||||
"run",
|
||||
"--unstable",
|
||||
"http/file_server.ts",
|
||||
"--help",
|
||||
],
|
||||
stdout: "piped",
|
||||
});
|
||||
assert(helpProcess.stdout != null);
|
||||
|
@ -6,7 +6,8 @@ const { connect, run, test } = Deno;
|
||||
let server: Deno.Process;
|
||||
async function startServer(): Promise<void> {
|
||||
server = run({
|
||||
cmd: [Deno.execPath(), "run", "-A", "http/racing_server.ts"],
|
||||
// TODO(lucacasonato): remove unstable when stabilized
|
||||
cmd: [Deno.execPath(), "run", "--unstable", "-A", "http/racing_server.ts"],
|
||||
stdout: "piped",
|
||||
});
|
||||
// Once racing server is ready it will write to its stdout.
|
||||
|
Loading…
Reference in New Issue
Block a user