summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeveloping <pawanakhil.dasari@gmail.com>2021-02-05 03:48:32 +0530
committerGitHub <noreply@github.com>2021-02-04 23:18:32 +0100
commit923214c53725651792f6d55c5401bf6b475622ea (patch)
tree56fe084e911c12673aa52ce127f17bafba9175d9
parentb77fcbc518428429e39f5ba94e41fcd0418ee7a0 (diff)
chore: use strict mode for internal runtime, core, and op_crates js (#9391)
-rw-r--r--core/core.js1
-rw-r--r--core/core_test.js1
-rw-r--r--core/encode_decode_test.js1
-rw-r--r--core/error.js1
-rw-r--r--op_crates/crypto/01_crypto.js1
-rw-r--r--op_crates/fetch/01_fetch_util.js1
-rw-r--r--op_crates/fetch/03_dom_iterable.js1
-rw-r--r--op_crates/fetch/11_streams.js1
-rw-r--r--op_crates/fetch/20_headers.js1
-rw-r--r--op_crates/fetch/21_file.js1
-rw-r--r--op_crates/fetch/26_fetch.js1
-rw-r--r--op_crates/web/00_dom_exception.js1
-rw-r--r--op_crates/web/01_event.js1
-rw-r--r--op_crates/web/02_abort_signal.js1
-rw-r--r--op_crates/web/03_global_interfaces.js1
-rw-r--r--op_crates/web/08_text_encoding.js1
-rw-r--r--op_crates/web/11_url.js1
-rw-r--r--op_crates/web/12_location.js1
-rw-r--r--op_crates/web/21_filereader.js1
-rw-r--r--op_crates/web/abort_controller_test.js1
-rw-r--r--op_crates/web/event_target_test.js1
-rw-r--r--op_crates/web/event_test.js1
-rw-r--r--op_crates/websocket/01_websocket.js1
-rw-r--r--runtime/js/00_bootstrap_namespace.js1
-rw-r--r--runtime/js/01_build.js1
-rw-r--r--runtime/js/01_colors.js1
-rw-r--r--runtime/js/01_errors.js1
-rw-r--r--runtime/js/01_internals.js1
-rw-r--r--runtime/js/01_version.js1
-rw-r--r--runtime/js/01_web_util.js1
-rw-r--r--runtime/js/02_console.js1
-rw-r--r--runtime/js/06_util.js1
-rw-r--r--runtime/js/10_dispatch_minimal.js1
-rw-r--r--runtime/js/11_timers.js1
-rw-r--r--runtime/js/11_workers.js1
-rw-r--r--runtime/js/12_io.js1
-rw-r--r--runtime/js/13_buffer.js1
-rw-r--r--runtime/js/30_files.js1
-rw-r--r--runtime/js/30_fs.js1
-rw-r--r--runtime/js/30_metrics.js1
-rw-r--r--runtime/js/30_net.js1
-rw-r--r--runtime/js/30_os.js1
-rw-r--r--runtime/js/40_compiler_api.js1
-rw-r--r--runtime/js/40_diagnostics.js1
-rw-r--r--runtime/js/40_error_stack.js1
-rw-r--r--runtime/js/40_fs_events.js1
-rw-r--r--runtime/js/40_net_unstable.js1
-rw-r--r--runtime/js/40_performance.js1
-rw-r--r--runtime/js/40_permissions.js1
-rw-r--r--runtime/js/40_plugins.js1
-rw-r--r--runtime/js/40_process.js1
-rw-r--r--runtime/js/40_read_file.js1
-rw-r--r--runtime/js/40_signals.js1
-rw-r--r--runtime/js/40_testing.js1
-rw-r--r--runtime/js/40_tls.js1
-rw-r--r--runtime/js/40_tty.js1
-rw-r--r--runtime/js/40_write_file.js1
-rw-r--r--runtime/js/41_prompt.js1
-rw-r--r--runtime/js/90_deno_ns.js1
-rw-r--r--runtime/js/99_main.js1
60 files changed, 60 insertions, 0 deletions
diff --git a/core/core.js b/core/core.js
index 5a15aff8c..57eb8b07e 100644
--- a/core/core.js
+++ b/core/core.js
@@ -15,6 +15,7 @@ SharedQueue Binary Layout
| RECORDS (*MAX_RECORDS) ...
+---------------------------------------------------------------+
*/
+"use strict";
((window) => {
const MAX_RECORDS = 100;
diff --git a/core/core_test.js b/core/core_test.js
index 58dff73ac..89385a0aa 100644
--- a/core/core_test.js
+++ b/core/core_test.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
function assert(cond) {
if (!cond) {
diff --git a/core/encode_decode_test.js b/core/encode_decode_test.js
index dcdb82d8e..85f787fdc 100644
--- a/core/encode_decode_test.js
+++ b/core/encode_decode_test.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
function assert(cond) {
if (!cond) {
throw Error("assert");
diff --git a/core/error.js b/core/error.js
index 300599666..b47e5d881 100644
--- a/core/error.js
+++ b/core/error.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
// Some of the code here is adapted directly from V8 and licensed under a BSD
diff --git a/op_crates/crypto/01_crypto.js b/op_crates/crypto/01_crypto.js
index 594fc81b0..ce13dc74c 100644
--- a/op_crates/crypto/01_crypto.js
+++ b/op_crates/crypto/01_crypto.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/op_crates/fetch/01_fetch_util.js b/op_crates/fetch/01_fetch_util.js
index b747037bd..ff76421a1 100644
--- a/op_crates/fetch/01_fetch_util.js
+++ b/op_crates/fetch/01_fetch_util.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
function requiredArguments(
diff --git a/op_crates/fetch/03_dom_iterable.js b/op_crates/fetch/03_dom_iterable.js
index 54e1c9227..2e9f6d3ea 100644
--- a/op_crates/fetch/03_dom_iterable.js
+++ b/op_crates/fetch/03_dom_iterable.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { requiredArguments } = window.__bootstrap.fetchUtil;
diff --git a/op_crates/fetch/11_streams.js b/op_crates/fetch/11_streams.js
index b7a9acca0..af9cc321f 100644
--- a/op_crates/fetch/11_streams.js
+++ b/op_crates/fetch/11_streams.js
@@ -4,6 +4,7 @@
/// <reference path="./11_streams_types.d.ts" />
/// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" />
+"use strict";
((window) => {
const customInspect = Symbol.for("Deno.customInspect");
diff --git a/op_crates/fetch/20_headers.js b/op_crates/fetch/20_headers.js
index 27626018a..df11d40b6 100644
--- a/op_crates/fetch/20_headers.js
+++ b/op_crates/fetch/20_headers.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { DomIterableMixin } = window.__bootstrap.domIterable;
diff --git a/op_crates/fetch/21_file.js b/op_crates/fetch/21_file.js
index d5160ece2..4a052576c 100644
--- a/op_crates/fetch/21_file.js
+++ b/op_crates/fetch/21_file.js
@@ -8,6 +8,7 @@
/// <reference path="./internal.d.ts" />
/// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" />
+"use strict";
((window) => {
// TODO(lucacasonato): this needs to not be hardcoded and instead depend on
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js
index 58e2cab85..d4b2680ec 100644
--- a/op_crates/fetch/26_fetch.js
+++ b/op_crates/fetch/26_fetch.js
@@ -8,6 +8,7 @@
/// <reference path="./internal.d.ts" />
/// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" />
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/op_crates/web/00_dom_exception.js b/op_crates/web/00_dom_exception.js
index 8ea979f1f..22fd842fe 100644
--- a/op_crates/web/00_dom_exception.js
+++ b/op_crates/web/00_dom_exception.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { defineProperty } = Object;
diff --git a/op_crates/web/01_event.js b/op_crates/web/01_event.js
index 578f771f6..3fd4841a8 100644
--- a/op_crates/web/01_event.js
+++ b/op_crates/web/01_event.js
@@ -4,6 +4,7 @@
// Many parts of the DOM are not implemented in Deno, but the logic for those
// parts still exists. This means you will observe a lot of strange structures
// and impossible logic branches based on what Deno currently supports.
+"use strict";
((window) => {
const eventData = new WeakMap();
diff --git a/op_crates/web/02_abort_signal.js b/op_crates/web/02_abort_signal.js
index 1bad13be3..3090513eb 100644
--- a/op_crates/web/02_abort_signal.js
+++ b/op_crates/web/02_abort_signal.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { setIsTrusted } = window.__bootstrap.event;
diff --git a/op_crates/web/03_global_interfaces.js b/op_crates/web/03_global_interfaces.js
index 21a44eb8e..74697a42e 100644
--- a/op_crates/web/03_global_interfaces.js
+++ b/op_crates/web/03_global_interfaces.js
@@ -1,3 +1,4 @@
+"use strict";
((window) => {
const { EventTarget } = window;
diff --git a/op_crates/web/08_text_encoding.js b/op_crates/web/08_text_encoding.js
index b4ae947e4..c9d708740 100644
--- a/op_crates/web/08_text_encoding.js
+++ b/op_crates/web/08_text_encoding.js
@@ -23,6 +23,7 @@
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
+"use strict";
((window) => {
const core = Deno.core;
diff --git a/op_crates/web/11_url.js b/op_crates/web/11_url.js
index 5723201b3..d5474727b 100644
--- a/op_crates/web/11_url.js
+++ b/op_crates/web/11_url.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/op_crates/web/12_location.js b/op_crates/web/12_location.js
index f2409e82a..add2e0e38 100644
--- a/op_crates/web/12_location.js
+++ b/op_crates/web/12_location.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { URL } = window.__bootstrap.url;
diff --git a/op_crates/web/21_filereader.js b/op_crates/web/21_filereader.js
index eee96e9d8..30fff33d8 100644
--- a/op_crates/web/21_filereader.js
+++ b/op_crates/web/21_filereader.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const base64 = window.__bootstrap.base64;
diff --git a/op_crates/web/abort_controller_test.js b/op_crates/web/abort_controller_test.js
index 3f1cf18fd..26f58dccb 100644
--- a/op_crates/web/abort_controller_test.js
+++ b/op_crates/web/abort_controller_test.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
function assert(cond) {
if (!cond) {
throw Error("assert");
diff --git a/op_crates/web/event_target_test.js b/op_crates/web/event_target_test.js
index 67e323571..acb75cc19 100644
--- a/op_crates/web/event_target_test.js
+++ b/op_crates/web/event_target_test.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
function assert(cond) {
if (!cond) {
throw Error("assert");
diff --git a/op_crates/web/event_test.js b/op_crates/web/event_test.js
index 6e57e0e8d..fa92a3e07 100644
--- a/op_crates/web/event_test.js
+++ b/op_crates/web/event_test.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
function assert(cond) {
if (!cond) {
throw Error("assert");
diff --git a/op_crates/websocket/01_websocket.js b/op_crates/websocket/01_websocket.js
index ac7c96b2a..e12f08fe6 100644
--- a/op_crates/websocket/01_websocket.js
+++ b/op_crates/websocket/01_websocket.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/00_bootstrap_namespace.js b/runtime/js/00_bootstrap_namespace.js
index 935d059c5..d10360974 100644
--- a/runtime/js/00_bootstrap_namespace.js
+++ b/runtime/js/00_bootstrap_namespace.js
@@ -5,5 +5,6 @@
// the files.
// This namespace is removed during runtime bootstrapping process.
+"use strict";
globalThis.__bootstrap = globalThis.__bootstrap || {};
diff --git a/runtime/js/01_build.js b/runtime/js/01_build.js
index 73fbe70e9..3663d2878 100644
--- a/runtime/js/01_build.js
+++ b/runtime/js/01_build.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const build = {
diff --git a/runtime/js/01_colors.js b/runtime/js/01_colors.js
index 7d6320fd3..62a2b711f 100644
--- a/runtime/js/01_colors.js
+++ b/runtime/js/01_colors.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
function code(open, close) {
diff --git a/runtime/js/01_errors.js b/runtime/js/01_errors.js
index 063572231..a46a0a149 100644
--- a/runtime/js/01_errors.js
+++ b/runtime/js/01_errors.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
class NotFound extends Error {
diff --git a/runtime/js/01_internals.js b/runtime/js/01_internals.js
index a8c54ec48..4843bf3da 100644
--- a/runtime/js/01_internals.js
+++ b/runtime/js/01_internals.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const internalSymbol = Symbol("Deno.internal");
diff --git a/runtime/js/01_version.js b/runtime/js/01_version.js
index 639db45c4..80264f954 100644
--- a/runtime/js/01_version.js
+++ b/runtime/js/01_version.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const version = {
diff --git a/runtime/js/01_web_util.js b/runtime/js/01_web_util.js
index 763385e29..ea8ea4873 100644
--- a/runtime/js/01_web_util.js
+++ b/runtime/js/01_web_util.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const illegalConstructorKey = Symbol("illegalConstructorKey");
diff --git a/runtime/js/02_console.js b/runtime/js/02_console.js
index 595bf5006..fb659e342 100644
--- a/runtime/js/02_console.js
+++ b/runtime/js/02_console.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js
index fb4178d21..7ceb41102 100644
--- a/runtime/js/06_util.js
+++ b/runtime/js/06_util.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { build } = window.__bootstrap.build;
diff --git a/runtime/js/10_dispatch_minimal.js b/runtime/js/10_dispatch_minimal.js
index bfb410a98..4d6af6fc3 100644
--- a/runtime/js/10_dispatch_minimal.js
+++ b/runtime/js/10_dispatch_minimal.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/11_timers.js b/runtime/js/11_timers.js
index 4db73afb6..4c693aa4a 100644
--- a/runtime/js/11_timers.js
+++ b/runtime/js/11_timers.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const assert = window.__bootstrap.util.assert;
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js
index c78eee833..6797307d9 100644
--- a/runtime/js/11_workers.js
+++ b/runtime/js/11_workers.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/12_io.js b/runtime/js/12_io.js
index 68b4a7eda..3818069c1 100644
--- a/runtime/js/12_io.js
+++ b/runtime/js/12_io.js
@@ -3,6 +3,7 @@
// Interfaces 100% copied from Go.
// Documentation liberally lifted from them too.
// Thank you! We love Go! <3
+"use strict";
((window) => {
const DEFAULT_BUFFER_SIZE = 32 * 1024;
diff --git a/runtime/js/13_buffer.js b/runtime/js/13_buffer.js
index 59997254b..fcb656c0f 100644
--- a/runtime/js/13_buffer.js
+++ b/runtime/js/13_buffer.js
@@ -3,6 +3,7 @@
// This code has been ported almost directly from Go's src/bytes/buffer.go
// Copyright 2009 The Go Authors. All rights reserved. BSD license.
// https://github.com/golang/go/blob/master/LICENSE
+"use strict";
((window) => {
const { assert } = window.__bootstrap.util;
diff --git a/runtime/js/30_files.js b/runtime/js/30_files.js
index 33d929aff..f9898c5d8 100644
--- a/runtime/js/30_files.js
+++ b/runtime/js/30_files.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js
index f2a6cf8cb..f150c38b6 100644
--- a/runtime/js/30_fs.js
+++ b/runtime/js/30_fs.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/30_metrics.js b/runtime/js/30_metrics.js
index e9e6603a7..30fa7cf80 100644
--- a/runtime/js/30_metrics.js
+++ b/runtime/js/30_metrics.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/30_net.js b/runtime/js/30_net.js
index 7a2ac6c18..9081d0ef1 100644
--- a/runtime/js/30_net.js
+++ b/runtime/js/30_net.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js
index 5a3c990b0..236131432 100644
--- a/runtime/js/30_os.js
+++ b/runtime/js/30_os.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_compiler_api.js b/runtime/js/40_compiler_api.js
index 0d3600101..cce12f2f8 100644
--- a/runtime/js/40_compiler_api.js
+++ b/runtime/js/40_compiler_api.js
@@ -4,6 +4,7 @@
// This file contains the runtime APIs which will dispatch work to the internal
// compiler within Deno.
+"use strict";
((window) => {
const core = window.Deno.core;
const util = window.__bootstrap.util;
diff --git a/runtime/js/40_diagnostics.js b/runtime/js/40_diagnostics.js
index 04389e25c..f4ab67689 100644
--- a/runtime/js/40_diagnostics.js
+++ b/runtime/js/40_diagnostics.js
@@ -3,6 +3,7 @@
// Diagnostic provides an abstraction for advice/errors received from a
// compiler, which is strongly influenced by the format of TypeScript
// diagnostics.
+"use strict";
((window) => {
const DiagnosticCategory = {
diff --git a/runtime/js/40_error_stack.js b/runtime/js/40_error_stack.js
index 05c823cec..9bc6567a0 100644
--- a/runtime/js/40_error_stack.js
+++ b/runtime/js/40_error_stack.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js
index ae769c84d..c48d410f1 100644
--- a/runtime/js/40_fs_events.js
+++ b/runtime/js/40_fs_events.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_net_unstable.js b/runtime/js/40_net_unstable.js
index cff5f4dea..ca265bfaa 100644
--- a/runtime/js/40_net_unstable.js
+++ b/runtime/js/40_net_unstable.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const net = window.__bootstrap.net;
diff --git a/runtime/js/40_performance.js b/runtime/js/40_performance.js
index f8f9ad769..24c35b5c0 100644
--- a/runtime/js/40_performance.js
+++ b/runtime/js/40_performance.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { opNow } = window.__bootstrap.timers;
diff --git a/runtime/js/40_permissions.js b/runtime/js/40_permissions.js
index b41c780aa..2b4acb595 100644
--- a/runtime/js/40_permissions.js
+++ b/runtime/js/40_permissions.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_plugins.js b/runtime/js/40_plugins.js
index 51a37c9dc..fd037b81f 100644
--- a/runtime/js/40_plugins.js
+++ b/runtime/js/40_plugins.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js
index 1ba32ff67..01f554b36 100644
--- a/runtime/js/40_process.js
+++ b/runtime/js/40_process.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_read_file.js b/runtime/js/40_read_file.js
index 95fcfa2b9..63b05b877 100644
--- a/runtime/js/40_read_file.js
+++ b/runtime/js/40_read_file.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { open, openSync } = window.__bootstrap.files;
diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js
index d90c54767..2a70986f8 100644
--- a/runtime/js/40_signals.js
+++ b/runtime/js/40_signals.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index f4f55e9a1..15545fc49 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_tls.js b/runtime/js/40_tls.js
index a3893a298..e9f683376 100644
--- a/runtime/js/40_tls.js
+++ b/runtime/js/40_tls.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js
index e090121d9..2e98a4f5a 100644
--- a/runtime/js/40_tty.js
+++ b/runtime/js/40_tty.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const core = window.Deno.core;
diff --git a/runtime/js/40_write_file.js b/runtime/js/40_write_file.js
index 79b8e6806..5964dec5f 100644
--- a/runtime/js/40_write_file.js
+++ b/runtime/js/40_write_file.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { stat, statSync, chmod, chmodSync } = window.__bootstrap.fs;
const { open, openSync } = window.__bootstrap.files;
diff --git a/runtime/js/41_prompt.js b/runtime/js/41_prompt.js
index cafd0f31e..d74a937aa 100644
--- a/runtime/js/41_prompt.js
+++ b/runtime/js/41_prompt.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const { stdin } = window.__bootstrap.files;
const { isatty } = window.__bootstrap.tty;
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index bafa1a1b5..84c084062 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -1,4 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
((window) => {
const __bootstrap = window.__bootstrap;
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index c6cc99dd2..485080812 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -2,6 +2,7 @@
// Removes the `__proto__` for security reasons. This intentionally makes
// Deno non compliant with ECMA-262 Annex B.2.2.1
//
+"use strict";
delete Object.prototype.__proto__;
((window) => {