summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/testdata/npm/compare_globals/main.out1
-rw-r--r--cli/tests/testdata/run/webstorage/logger.ts2
-rw-r--r--cli/tests/testdata/run/webstorage/serialization.ts6
-rw-r--r--cli/tests/testdata/run/webstorage/setter.ts2
-rw-r--r--runtime/js/98_global_scope_window.js12
-rw-r--r--runtime/js/99_main.js1
6 files changed, 8 insertions, 16 deletions
diff --git a/cli/tests/testdata/npm/compare_globals/main.out b/cli/tests/testdata/npm/compare_globals/main.out
index c59800eb4..0e366fae7 100644
--- a/cli/tests/testdata/npm/compare_globals/main.out
+++ b/cli/tests/testdata/npm/compare_globals/main.out
@@ -20,7 +20,6 @@ false
true
true
true
-[WILDCARD]
true
false
false
diff --git a/cli/tests/testdata/run/webstorage/logger.ts b/cli/tests/testdata/run/webstorage/logger.ts
index feadd39eb..3898c4445 100644
--- a/cli/tests/testdata/run/webstorage/logger.ts
+++ b/cli/tests/testdata/run/webstorage/logger.ts
@@ -1 +1 @@
-console.log(globalThis.localStorage);
+console.log(window.localStorage);
diff --git a/cli/tests/testdata/run/webstorage/serialization.ts b/cli/tests/testdata/run/webstorage/serialization.ts
index f125331bb..f3791d355 100644
--- a/cli/tests/testdata/run/webstorage/serialization.ts
+++ b/cli/tests/testdata/run/webstorage/serialization.ts
@@ -1,4 +1,4 @@
-globalThis.sessionStorage.setItem("hello", "deno");
+window.sessionStorage.setItem("hello", "deno");
-console.log(globalThis.localStorage);
-console.log(globalThis.sessionStorage);
+console.log(window.localStorage);
+console.log(window.sessionStorage);
diff --git a/cli/tests/testdata/run/webstorage/setter.ts b/cli/tests/testdata/run/webstorage/setter.ts
index cf5a7bfaf..ec6d474f5 100644
--- a/cli/tests/testdata/run/webstorage/setter.ts
+++ b/cli/tests/testdata/run/webstorage/setter.ts
@@ -1 +1 @@
-globalThis.localStorage.setItem("hello", "deno");
+window.localStorage.setItem("hello", "deno");
diff --git a/runtime/js/98_global_scope_window.js b/runtime/js/98_global_scope_window.js
index 3188c4b4c..63b346dd5 100644
--- a/runtime/js/98_global_scope_window.js
+++ b/runtime/js/98_global_scope_window.js
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { core, internals, primordials } from "ext:core/mod.js";
+import { core, primordials } from "ext:core/mod.js";
const {
op_bootstrap_language,
op_bootstrap_numcpus,
@@ -108,15 +108,7 @@ const mainRuntimeGlobalProperties = {
Location: location.locationConstructorDescriptor,
location: location.locationDescriptor,
Window: globalInterfaces.windowConstructorDescriptor,
- window: util.getterOnly(() => {
- internals.warnOnDeprecatedApi(
- "window",
- new Error().stack,
- "Use `globalThis` or `self` instead.",
- "You can provide `window` in the current scope with: `const window = globalThis`.",
- );
- return globalThis;
- }),
+ window: util.getterOnly(() => globalThis),
self: util.getterOnly(() => globalThis),
Navigator: util.nonEnumerable(Navigator),
navigator: util.getterOnly(() => navigator),
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 0cfcafbd2..c03ed2f8c 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -164,6 +164,7 @@ function warnOnDeprecatedApi(apiName, stack, ...suggestions) {
"font-weight: bold;",
);
}
+
if (isFromRemoteDependency) {
console.error(
`%chint: It appears this API is used by a remote dependency. Try upgrading to the latest version of that dependency.`,