From 387f6d95dd2ef8a15da08798c7efe296c61914f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 16:06:10 +0200 Subject: [PATCH 01/18] bump Deno --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 206b443799d3..4137866c09fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ variables: - DENO_VERSION: "v0.12.0" + DENO_VERSION: "v0.14.0" TS_VERSION: "3.4.5" # TODO Try to get eslint to run under Deno, like prettier From d3f139376fe89a0bb2f57b9082300acce826496c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 16:08:57 +0200 Subject: [PATCH 02/18] update for Deno v0.14.0 --- examples/test.ts | 2 +- format.ts | 4 ++-- 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 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/test.ts b/examples/test.ts index 542a191bf861..9887b1267a98 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 ca5648553886..328716ea35a3 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", diff --git a/http/file_server_test.ts b/http/file_server_test.ts index bac82e82548b..6623406d09d6 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 a34f915d5efd..6d1ed0277320 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 f16293f77b6a..4a904a6f7969 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 c38f1dbd4099..d6ebedbd453e 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 2309be4437cd..2fd36e91e7b5 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 cb23079d2ceb..c255ed7da74c 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", From 6ec19fd3848bce8924ed381624bf700ccc60bad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 16:28:41 +0200 Subject: [PATCH 03/18] add perm --- .ci/template.common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 76c98c639ab2..f426f55b8a25 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-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 From 279dcf8b81b333406684a0ecdf7154fca7d94d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 16:37:47 +0200 Subject: [PATCH 04/18] debug --- .ci/template.common.yml | 4 +++- format.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index f426f55b8a25..0c7c0effb4d4 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -2,5 +2,7 @@ parameters: exe_suffix: "" steps: - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check + - bash: ls flags + - bash: ls testing + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; ls testing - 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/format.ts b/format.ts index 328716ea35a3..08d1aaed9fa5 100755 --- a/format.ts +++ b/format.ts @@ -24,6 +24,8 @@ async function main(opts): Promise { args.push("--check"); } + args.push("."); + exit((await xrun({ args }).status()).code); } From 15c8910d5f8cfa6695b64708d0023f1ddf7ee237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 18:21:44 +0200 Subject: [PATCH 05/18] add DENO_DIR env variable to CI config --- .ci/template.common.yml | 4 +--- azure-pipelines.yml | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 0c7c0effb4d4..f426f55b8a25 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -2,7 +2,5 @@ parameters: exe_suffix: "" steps: - - bash: ls flags - - bash: ls testing - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; ls testing + - 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/azure-pipelines.yml b/azure-pipelines.yml index 4137866c09fb..659a76cd9dd2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,7 @@ variables: DENO_VERSION: "v0.14.0" TS_VERSION: "3.4.5" + DENO_DIR: ~/deno_dir/ # TODO Try to get eslint to run under Deno, like prettier jobs: From f607d980068e3bd80cd1817a53896feabc0646f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 9 Aug 2019 18:31:28 +0200 Subject: [PATCH 06/18] try setting DENO_DIR --- .ci/template.linux.yml | 2 ++ .ci/template.mac.yml | 2 ++ .ci/template.windows.yml | 2 ++ azure-pipelines.yml | 1 - 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci/template.linux.yml b/.ci/template.linux.yml index a6bab178719a..e2673062c842 100644 --- a/.ci/template.linux.yml +++ b/.ci/template.linux.yml @@ -3,3 +3,5 @@ steps: - template: ./template.unix.yml - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml + env: + DENO_DIR: ~/deno_dir/ \ No newline at end of file diff --git a/.ci/template.mac.yml b/.ci/template.mac.yml index 45ebc01719b4..7d6872a265b0 100644 --- a/.ci/template.mac.yml +++ b/.ci/template.mac.yml @@ -4,3 +4,5 @@ steps: - template: ./template.unix.yml - bash: eslint **/*.ts --max-warnings=0 - template: ./template.common.yml + env: + DENO_DIR: ~/deno_dir/ \ No newline at end of file diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 818294e145d6..619cff5b0811 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -4,5 +4,7 @@ steps: - bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin" - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml + env: + DENO_DIR: C:\Users\VssAdministrator\deno-dir parameters: exe_suffix: ".exe" \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 659a76cd9dd2..4137866c09fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,6 @@ variables: DENO_VERSION: "v0.14.0" TS_VERSION: "3.4.5" - DENO_DIR: ~/deno_dir/ # TODO Try to get eslint to run under Deno, like prettier jobs: From 89f878ae47d91c3a10f705f69accb89f822d0655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 10 Aug 2019 00:14:06 +0200 Subject: [PATCH 07/18] more debug --- .ci/template.common.yml | 2 +- .ci/template.linux.yml | 4 +--- .ci/template.mac.yml | 2 -- .ci/template.windows.yml | 2 -- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index f426f55b8a25..72b86a964b21 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 --allow-env format.ts --check + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; ls -lah; ls -lah testing; ls -lah ~/.deno/; ls -lah ~/.deno/gen/; - 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 e2673062c842..b00277be3965 100644 --- a/.ci/template.linux.yml +++ b/.ci/template.linux.yml @@ -2,6 +2,4 @@ steps: - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier - template: ./template.unix.yml - bash: npx eslint **/*.ts --max-warnings=0 - - template: ./template.common.yml - env: - DENO_DIR: ~/deno_dir/ \ No newline at end of file + - template: ./template.common.yml \ No newline at end of file diff --git a/.ci/template.mac.yml b/.ci/template.mac.yml index 7d6872a265b0..45ebc01719b4 100644 --- a/.ci/template.mac.yml +++ b/.ci/template.mac.yml @@ -4,5 +4,3 @@ steps: - template: ./template.unix.yml - bash: eslint **/*.ts --max-warnings=0 - template: ./template.common.yml - env: - DENO_DIR: ~/deno_dir/ \ No newline at end of file diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 619cff5b0811..818294e145d6 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -4,7 +4,5 @@ steps: - bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin" - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml - env: - DENO_DIR: C:\Users\VssAdministrator\deno-dir parameters: exe_suffix: ".exe" \ No newline at end of file From c6ec23f69025ed65e10ae7f8b145abadf99d3d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 10 Aug 2019 11:49:55 +0200 Subject: [PATCH 08/18] more debug --- .ci/template.common.yml | 2 +- .ci/template.unix.yml | 2 +- .ci/template.windows.yml | 2 +- azure-pipelines.yml | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 72b86a964b21..a101ec3dc8cb 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 --allow-env format.ts --check; ls -lah; ls -lah testing; ls -lah ~/.deno/; ls -lah ~/.deno/gen/; + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; ls -lah; ls -lah testing; ls -lah ~/deno_dir/; ls -lah ~/deno_dir/gen/; - 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.unix.yml b/.ci/template.unix.yml index aea4e509d894..e2e7d13dcf3b 100644 --- a/.ci/template.unix.yml +++ b/.ci/template.unix.yml @@ -1,3 +1,3 @@ steps: - bash: curl -L https://deno.land/x/install/install.sh | sh -s $(DENO_VERSION) - - bash: echo '##vso[task.prependpath]$(HOME)/.deno/bin/' + - bash: echo '##vso[task.prependpath]$(HOME)/deno_dir/bin/' diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 818294e145d6..04a41ed910d1 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,7 +1,7 @@ steps: - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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: echo "##vso[task.prependpath]C:\Users\VssAdministrator\deno_dir\\bin" - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml parameters: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4137866c09fb..f7a3d548470c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,7 @@ variables: DENO_VERSION: "v0.14.0" TS_VERSION: "3.4.5" + DENO_DIR: $(HOME)/deno_dir/ # TODO Try to get eslint to run under Deno, like prettier jobs: From 18ec806d00aa9c59e6d5045541efd129e3dfe05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 10 Aug 2019 11:53:59 +0200 Subject: [PATCH 09/18] revert changes to .ci/ --- .ci/template.common.yml | 2 +- .ci/template.linux.yml | 2 +- .ci/template.unix.yml | 2 +- .ci/template.windows.yml | 2 +- azure-pipelines.yml | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index a101ec3dc8cb..1fc845f3931c 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 --allow-env format.ts --check; ls -lah; ls -lah testing; ls -lah ~/deno_dir/; ls -lah ~/deno_dir/gen/; + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; find . -name '*.js' -print - 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 b00277be3965..a6bab178719a 100644 --- a/.ci/template.linux.yml +++ b/.ci/template.linux.yml @@ -2,4 +2,4 @@ steps: - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier - template: ./template.unix.yml - bash: npx eslint **/*.ts --max-warnings=0 - - template: ./template.common.yml \ No newline at end of file + - template: ./template.common.yml diff --git a/.ci/template.unix.yml b/.ci/template.unix.yml index e2e7d13dcf3b..aea4e509d894 100644 --- a/.ci/template.unix.yml +++ b/.ci/template.unix.yml @@ -1,3 +1,3 @@ steps: - bash: curl -L https://deno.land/x/install/install.sh | sh -s $(DENO_VERSION) - - bash: echo '##vso[task.prependpath]$(HOME)/deno_dir/bin/' + - bash: echo '##vso[task.prependpath]$(HOME)/.deno/bin/' diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 04a41ed910d1..818294e145d6 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,7 +1,7 @@ steps: - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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_dir\\bin" + - bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin" - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml parameters: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7a3d548470c..4137866c09fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,6 @@ variables: DENO_VERSION: "v0.14.0" TS_VERSION: "3.4.5" - DENO_DIR: $(HOME)/deno_dir/ # TODO Try to get eslint to run under Deno, like prettier jobs: From e8065c2797695b80546f1f221ede15f63d29ef67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 10 Aug 2019 12:12:09 +0200 Subject: [PATCH 10/18] try settings DENO_DIR --- .ci/template.common.yml | 6 ++++-- .ci/template.unix.yml | 2 ++ .ci/template.windows.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 1fc845f3931c..ae2d16aa6d65 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -2,5 +2,7 @@ parameters: exe_suffix: "" steps: - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env format.ts --check; find . -name '*.js' -print - - 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: ls -ahl .; echo $PWD; echo $DENO_DIR; ls -ahl $(DENO_DIR); + - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env ./format.ts --check || ls -ahl $(DENO_DIR) || ls -ahl $(DENO_DIR)gen; + - bash: deno${{ parameters.exe_suffix }} ./format.ts + - 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.unix.yml b/.ci/template.unix.yml index aea4e509d894..6565465966c1 100644 --- a/.ci/template.unix.yml +++ b/.ci/template.unix.yml @@ -1,3 +1,5 @@ steps: - bash: curl -L https://deno.land/x/install/install.sh | sh -s $(DENO_VERSION) - bash: echo '##vso[task.prependpath]$(HOME)/.deno/bin/' + - bash: echo '##vso[task.setvariable variable=DENO_DIR;]$(HOME)/deno_dir/' + - bash: mkdir -p $(DENO_DIR) diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index 818294e145d6..71e2bbedfb2f 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,7 +1,9 @@ steps: - bash: npm install eslint@5.16.0 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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: echo '##vso[task.prependpath]C:/Users/VssAdministrator/.deno/bin' + - bash: echo '##vso[task.setvariable variable=DENO_DIR;] C:/Users/VssAdministrator/deno_dir/' + - bash: mkdir -p $(DENO_DIR) - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml parameters: From ec56f4d864000f6a4d54b60039bb803064906a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 10 Aug 2019 13:37:47 +0200 Subject: [PATCH 11/18] reset CI --- .ci/template.common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index ae2d16aa6d65..7fa12b2b1b7e 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -4,5 +4,5 @@ parameters: steps: - bash: ls -ahl .; echo $PWD; echo $DENO_DIR; ls -ahl $(DENO_DIR); - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env ./format.ts --check || ls -ahl $(DENO_DIR) || ls -ahl $(DENO_DIR)gen; - - bash: deno${{ parameters.exe_suffix }} ./format.ts + - bash: deno${{ parameters.exe_suffix }} info ./format.ts - 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 From 36f443452773c074e91f92ddf4d95905814d5dfc Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 13 Aug 2019 19:33:13 -0400 Subject: [PATCH 12/18] use v0.15.0 --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4137866c09fb..4cf282863678 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ variables: - DENO_VERSION: "v0.14.0" + DENO_VERSION: "v0.15.0" TS_VERSION: "3.4.5" # TODO Try to get eslint to run under Deno, like prettier From 53a9faf9febfd223fedff9ec273dbf96a7878334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:41:00 +0200 Subject: [PATCH 13/18] bump eslint --- .ci/template.linux.yml | 2 +- .ci/template.mac.yml | 2 +- .ci/template.windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/template.linux.yml b/.ci/template.linux.yml index a6bab178719a..8e935a9c84f0 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 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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 45ebc01719b4..81ea6fb357e5 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 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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 71e2bbedfb2f..d12226aca82b 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 typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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: echo '##vso[task.setvariable variable=DENO_DIR;] C:/Users/VssAdministrator/deno_dir/' From 7d5ac2b4339b03190e91d5b6dbd004b8a437237d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:42:17 +0200 Subject: [PATCH 14/18] revert CI files --- .ci/template.common.yml | 4 +--- .ci/template.unix.yml | 2 -- .ci/template.windows.yml | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.ci/template.common.yml b/.ci/template.common.yml index 7fa12b2b1b7e..37813cd4e7c0 100644 --- a/.ci/template.common.yml +++ b/.ci/template.common.yml @@ -2,7 +2,5 @@ parameters: exe_suffix: "" steps: - - bash: ls -ahl .; echo $PWD; echo $DENO_DIR; ls -ahl $(DENO_DIR); - - bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env ./format.ts --check || ls -ahl $(DENO_DIR) || ls -ahl $(DENO_DIR)gen; - - bash: deno${{ parameters.exe_suffix }} info ./format.ts + - 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.unix.yml b/.ci/template.unix.yml index 6565465966c1..aea4e509d894 100644 --- a/.ci/template.unix.yml +++ b/.ci/template.unix.yml @@ -1,5 +1,3 @@ steps: - bash: curl -L https://deno.land/x/install/install.sh | sh -s $(DENO_VERSION) - bash: echo '##vso[task.prependpath]$(HOME)/.deno/bin/' - - bash: echo '##vso[task.setvariable variable=DENO_DIR;]$(HOME)/deno_dir/' - - bash: mkdir -p $(DENO_DIR) diff --git a/.ci/template.windows.yml b/.ci/template.windows.yml index d12226aca82b..f2228993dc7d 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,9 +1,7 @@ steps: - bash: npm install eslint typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin @typescript-eslint/parser 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: echo '##vso[task.setvariable variable=DENO_DIR;] C:/Users/VssAdministrator/deno_dir/' - - bash: mkdir -p $(DENO_DIR) + - bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin" - bash: npx eslint **/*.ts --max-warnings=0 - template: ./template.common.yml parameters: From 81d1e26a94d6147e5e2002e254cdb4ee055b76f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:44:22 +0200 Subject: [PATCH 15/18] update eslint rule --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 90775af9d96a..d615aaa082c7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,7 @@ "prettier/@typescript-eslint" ], "rules": { - "@typescript-eslint/array-type": ["error", "array-simple"], + "@typescript-eslint/array-type": {"default": "array-simple"}, "@typescript-eslint/explicit-member-accessibility": ["off"], "@typescript-eslint/no-non-null-assertion": ["off"], "@typescript-eslint/no-parameter-properties": ["off"], From c5387c3130cacdf8aadcba22a4f470d0136c6a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:51:59 +0200 Subject: [PATCH 16/18] pin eslint and plugin --- .ci/template.linux.yml | 2 +- .ci/template.mac.yml | 2 +- .ci/template.windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/template.linux.yml b/.ci/template.linux.yml index 8e935a9c84f0..2bdfba51a3d0 100644 --- a/.ci/template.linux.yml +++ b/.ci/template.linux.yml @@ -1,5 +1,5 @@ steps: - - bash: npm install eslint 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 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 81ea6fb357e5..436279e5ec3f 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 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 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 f2228993dc7d..a5488375ae94 100644 --- a/.ci/template.windows.yml +++ b/.ci/template.windows.yml @@ -1,5 +1,5 @@ steps: - - bash: npm install eslint 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 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 From 7bcbcae549546f61175178da5b8347f7c5389cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:53:13 +0200 Subject: [PATCH 17/18] pin parser --- .ci/template.linux.yml | 2 +- .ci/template.mac.yml | 2 +- .ci/template.windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/template.linux.yml b/.ci/template.linux.yml index 2bdfba51a3d0..7dd12819daad 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@1.13.0 @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 436279e5ec3f..1f0481a9eaed 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@1.13.0 @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 a5488375ae94..fe5cc85a4ed7 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@1.13.0 @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 From 7243e5013f829d521fda7705ad2e72ca3071a9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 14 Aug 2019 01:54:21 +0200 Subject: [PATCH 18/18] revert .eslintrc.json --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index d615aaa082c7..90775af9d96a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,7 @@ "prettier/@typescript-eslint" ], "rules": { - "@typescript-eslint/array-type": {"default": "array-simple"}, + "@typescript-eslint/array-type": ["error", "array-simple"], "@typescript-eslint/explicit-member-accessibility": ["off"], "@typescript-eslint/no-non-null-assertion": ["off"], "@typescript-eslint/no-parameter-properties": ["off"],