From 63bbe2a2e041388ec167d67c73f497ea7b8590c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 02:03:29 +0200 Subject: [PATCH] ci: bump to v0.15.0 (denoland/deno_std#556) Original: https://github.com/denoland/deno_std/commit/f3ddb4f26b81b4fbed86f4b54db7b3e7e3b7fe4e --- .ci/template.common.yml | 4 ++-- .ci/template.linux.yml | 2 +- .ci/template.mac.yml | 2 +- .ci/template.windows.yml | 2 +- azure-pipelines.yml | 2 +- examples/test.ts | 2 +- format.ts | 6 ++++-- http/file_server_test.ts | 2 +- http/racing_server_test.ts | 2 +- http/server_test.ts | 2 +- installer/mod.ts | 2 +- installer/test.ts | 2 +- prettier/main_test.ts | 6 +++--- 13 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 76c98c639a..37813cd4e7 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -2,5 +2,5 @@ parameters: exe_suffix: "" steps: - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read format.ts --check - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-net --allow-write --allow-read --allow-env --config=tsconfig.test.json test.ts \ No newline at end of file + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env ./format.ts --check + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-net --allow-write --allow-read --allow-env --config=tsconfig.test.json ./test.ts \ No newline at end of file diff --git a/.ci/template.linux.yml b/.ci/template.linux.yml index a6bab17871..7dd12819da 100644 --- a/.ci/template.linux.yml +++ b/.ci/template.linux.yml @@ -1,5 +1,5 @@ steps: - - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier + - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@1.13.0 @typescript-eslint/parser@1.13.0 eslint-config-prettier - template: ./template.unix.yml - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml diff --git a/.ci/template.mac.yml b/.ci/template.mac.yml index 45ebc01719..1f0481a9ea 100644 --- a/.ci/template.mac.yml +++ b/.ci/template.mac.yml @@ -1,6 +1,6 @@ steps: - bash: npm install -g functional-red-black-tree - - bash: npm -g install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier + - bash: npm -g install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@1.13.0 @typescript-eslint/parser@1.13.0 eslint-config-prettier - template: ./template.unix.yml - bash: eslint **/*.ts --max-warnings=0 - template: ./template.common.yml diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 818294e145..fe5cc85a4e 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,5 +1,5 @@ steps: - - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier + - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@1.13.0 @typescript-eslint/parser@1.13.0 eslint-config-prettier - powershell: iwr https://deno.land/x/install/install.ps1 -out install.ps1; .\install.ps1 $(DENO_VERSION) - bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin" - bash: npx eslint **/*.ts --max-warnings=0 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 206b443799..4cf2828636 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ variables: - DENO_VERSION: "v0.12.0" + DENO_VERSION: "v0.15.0" TS_VERSION: "3.4.5" # TODO Try to get eslint to run under Deno, like prettier diff --git a/examples/test.ts b/examples/test.ts index 542a191bf8..9887b1267a 100644 --- a/examples/test.ts +++ b/examples/test.ts @@ -16,7 +16,7 @@ test(function t2(): void { test(async function catSmoke(): Promise { const p = run({ args: [ - Deno.execPath, + Deno.execPath(), "run", "--allow-read", "examples/cat.ts", diff --git a/format.ts b/format.ts index ca56485538..08d1aaed9f 100755 --- a/format.ts +++ b/format.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S deno run --allow-run --allow-write --allow-read +#!/usr/bin/env -S deno run --allow-run --allow-write --allow-read --allow-env // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. const { exit, args, execPath } = Deno; import { parse } from "./flags/mod.ts"; @@ -6,7 +6,7 @@ import { xrun } from "./prettier/util.ts"; async function main(opts): Promise { const args = [ - execPath, + execPath(), "run", "--allow-write", "--allow-read", @@ -24,6 +24,8 @@ async function main(opts): Promise { args.push("--check"); } + args.push("."); + exit((await xrun({ args }).status()).code); } diff --git a/http/file_server_test.ts b/http/file_server_test.ts index bac82e8254..6623406d09 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -11,7 +11,7 @@ let fileServer: Deno.Process; async function startFileServer(): Promise { fileServer = run({ args: [ - Deno.execPath, + Deno.execPath(), "run", "--allow-read", "--allow-net", diff --git a/http/racing_server_test.ts b/http/racing_server_test.ts index a34f915d5e..6d1ed02773 100644 --- a/http/racing_server_test.ts +++ b/http/racing_server_test.ts @@ -8,7 +8,7 @@ import { TextProtoReader } from "../textproto/mod.ts"; let server: Deno.Process; async function startServer(): Promise { server = run({ - args: [Deno.execPath, "run", "-A", "http/racing_server.ts"], + args: [Deno.execPath(), "run", "-A", "http/racing_server.ts"], stdout: "piped" }); // Once racing server is ready it will write to its stdout. diff --git a/http/server_test.ts b/http/server_test.ts index f16293f77b..4a904a6f79 100644 --- a/http/server_test.ts +++ b/http/server_test.ts @@ -493,7 +493,7 @@ test({ async fn(): Promise { // Runs a simple server as another process const p = Deno.run({ - args: [Deno.execPath, "http/testdata/simple_server.ts", "--allow-net"], + args: [Deno.execPath(), "http/testdata/simple_server.ts", "--allow-net"], stdout: "piped" }); diff --git a/installer/mod.ts b/installer/mod.ts index c38f1dbd40..d6ebedbd45 100644 --- a/installer/mod.ts +++ b/installer/mod.ts @@ -227,7 +227,7 @@ export async function install( // ensure script that is being installed exists const ps = run({ - args: [Deno.execPath, "fetch", "--reload", moduleUrl], + args: [Deno.execPath(), "fetch", "--reload", moduleUrl], stdout: "inherit", stderr: "inherit" }); diff --git a/installer/test.ts b/installer/test.ts index 2309be4437..2fd36e91e7 100644 --- a/installer/test.ts +++ b/installer/test.ts @@ -16,7 +16,7 @@ const isWindows = Deno.platform.os === "win"; async function startFileServer(): Promise { fileServer = run({ args: [ - Deno.execPath, + Deno.execPath(), "run", "--allow-read", "--allow-net", diff --git a/prettier/main_test.ts b/prettier/main_test.ts index cb23079d2c..c255ed7da7 100644 --- a/prettier/main_test.ts +++ b/prettier/main_test.ts @@ -21,7 +21,7 @@ async function run( } const cmd = [ - execPath, + execPath(), "run", "--allow-run", "--allow-write", @@ -254,13 +254,13 @@ test(async function testPrettierReadFromStdin(): Promise { ): Promise { const inputCode = stdin; const p1 = Deno.run({ - args: [execPath, "./prettier/testdata/echox.ts", `${inputCode}`], + args: [execPath(), "./prettier/testdata/echox.ts", `${inputCode}`], stdout: "piped" }); const p2 = Deno.run({ args: [ - execPath, + execPath(), "run", "./prettier/main.ts", "--stdin",