mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
This reverts commit 930ce20870
.
This is producing false-positives that are not actionable to users.
We're gonna address this in another release.
This commit is contained in:
parent
300eeb343e
commit
8e67bf829a
6 changed files with 8 additions and 16 deletions
|
@ -20,7 +20,6 @@ false
|
|||
true
|
||||
true
|
||||
true
|
||||
[WILDCARD]
|
||||
true
|
||||
false
|
||||
false
|
||||
|
|
2
cli/tests/testdata/run/webstorage/logger.ts
vendored
2
cli/tests/testdata/run/webstorage/logger.ts
vendored
|
@ -1 +1 @@
|
|||
console.log(globalThis.localStorage);
|
||||
console.log(window.localStorage);
|
||||
|
|
|
@ -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);
|
||||
|
|
2
cli/tests/testdata/run/webstorage/setter.ts
vendored
2
cli/tests/testdata/run/webstorage/setter.ts
vendored
|
@ -1 +1 @@
|
|||
globalThis.localStorage.setItem("hello", "deno");
|
||||
window.localStorage.setItem("hello", "deno");
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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.`,
|
||||
|
|
Loading…
Add table
Reference in a new issue