From 684c357136fd44f9d5a1b8bb4402400ed1354677 Mon Sep 17 00:00:00 2001 From: Andy Hayden Date: Fri, 30 Apr 2021 12:51:48 -0700 Subject: Rename crate_ops to extensions (#10431) --- cli/dts/lib.deno.window.d.ts | 4 ++-- cli/dts/lib.deno.worker.d.ts | 4 ++-- cli/tests/error_009_extensions_error.js | 2 ++ cli/tests/error_009_extensions_error.js.out | 6 ++++++ cli/tests/error_009_op_crates_error.js | 2 -- cli/tests/error_009_op_crates_error.js.out | 6 ------ cli/tests/integration_tests.rs | 6 +++--- cli/tests/unit/metrics_test.ts | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 cli/tests/error_009_extensions_error.js create mode 100644 cli/tests/error_009_extensions_error.js.out delete mode 100644 cli/tests/error_009_op_crates_error.js delete mode 100644 cli/tests/error_009_op_crates_error.js.out (limited to 'cli') diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts index 3eebab677..b7eca1e24 100644 --- a/cli/dts/lib.deno.window.d.ts +++ b/cli/dts/lib.deno.window.d.ts @@ -62,7 +62,7 @@ declare function confirm(message?: string): boolean; */ declare function prompt(message?: string, defaultValue?: string): string | null; -// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is. +// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is. // The types there must first be split into window, worker and global types. /** The location (URL) of the object it is linked to. Changes done on it are * reflected on the object it relates to. Accessible via @@ -130,6 +130,6 @@ declare class Location { replace(url: string): void; } -// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is. +// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is. // The types there must first be split into window, worker and global types. declare var location: Location; diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts index 653a8931b..1d1b08a5f 100644 --- a/cli/dts/lib.deno.worker.d.ts +++ b/cli/dts/lib.deno.worker.d.ts @@ -71,7 +71,7 @@ declare var close: () => void; declare var name: string; declare var postMessage: (message: any) => void; -// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is. +// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is. // The types there must first be split into window, worker and global types. /** The absolute location of the script executed by the Worker. Such an object * is initialized for each worker and is available via the @@ -90,6 +90,6 @@ declare class WorkerLocation { readonly search: string; } -// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is. +// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is. // The types there must first be split into window, worker and global types. declare var location: WorkerLocation; diff --git a/cli/tests/error_009_extensions_error.js b/cli/tests/error_009_extensions_error.js new file mode 100644 index 000000000..01b97ea38 --- /dev/null +++ b/cli/tests/error_009_extensions_error.js @@ -0,0 +1,2 @@ +// Missing arg. +new Event(); diff --git a/cli/tests/error_009_extensions_error.js.out b/cli/tests/error_009_extensions_error.js.out new file mode 100644 index 000000000..96ffb2829 --- /dev/null +++ b/cli/tests/error_009_extensions_error.js.out @@ -0,0 +1,6 @@ +[WILDCARD]error: Uncaught TypeError: Failed to construct 'Event': 1 argument required, but only 0 present. +new Event(); +^ + at [WILDCARD] + at new Event (deno:extensions/web/[WILDCARD]) + at [WILDCARD] diff --git a/cli/tests/error_009_op_crates_error.js b/cli/tests/error_009_op_crates_error.js deleted file mode 100644 index 01b97ea38..000000000 --- a/cli/tests/error_009_op_crates_error.js +++ /dev/null @@ -1,2 +0,0 @@ -// Missing arg. -new Event(); diff --git a/cli/tests/error_009_op_crates_error.js.out b/cli/tests/error_009_op_crates_error.js.out deleted file mode 100644 index 229a0ff1f..000000000 --- a/cli/tests/error_009_op_crates_error.js.out +++ /dev/null @@ -1,6 +0,0 @@ -[WILDCARD]error: Uncaught TypeError: Failed to construct 'Event': 1 argument required, but only 0 present. -new Event(); -^ - at [WILDCARD] - at new Event (deno:op_crates/web/[WILDCARD]) - at [WILDCARD] diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 9c56396b4..0b7b85ac8 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3109,9 +3109,9 @@ console.log("finish"); output: "error_008_checkjs.js.out", }); - itest!(error_009_op_crates_error { - args: "run error_009_op_crates_error.js", - output: "error_009_op_crates_error.js.out", + itest!(error_009_extensions_error { + args: "run error_009_extensions_error.js", + output: "error_009_extensions_error.js.out", exit_code: 1, }); diff --git a/cli/tests/unit/metrics_test.ts b/cli/tests/unit/metrics_test.ts index 25c63dbc1..a1936cb1d 100644 --- a/cli/tests/unit/metrics_test.ts +++ b/cli/tests/unit/metrics_test.ts @@ -70,7 +70,7 @@ unitTest( }, ); -// Test that ops from op_crates have metrics (via OpMiddleware) +// Test that ops from extensions have metrics (via OpMiddleware) unitTest(function metricsForOpCrates(): void { const _ = new URL("https://deno.land"); -- cgit v1.2.3