1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-26 17:02:20 -05:00
denoland-deno/cli/tests/testdata
Bartek Iwańczuk 930ce20870
feat: deprecate window global (#22057)
This commit deprecates `window` global and adds deprecation
notice on each use of `window`.

We decided to proceed with removal of `window` global variable in Deno
2.0. There's a lot of code
in the wild that uses pattern like this:
```
if (typeof window !== "undefined) {
  ...
}
```
to check if the code is being run in browser. However, this check passes
fine in Deno and
most often libraries that do this check try to access some browser API
that is not available
in Deno, or use DOM APIs (which are also not available in Deno).

This situation has occurred multiple times already
and it's unfeasible to expect the whole ecosystem to migrate to new
check (and even if that
happened there's a ton of code that's already shipped and won't change).

The migration is straightfoward - replace all usages of `window` with
`globalThis` or `self`.
When Deno encounters use of `window` global it will now issue a warning,
steering users
towards required changes:

```
Warning
├ Use of deprecated "window" API.
│
├ This API will be removed in Deno 2.0. Make sure to upgrade to a stable API before then.
│
├ Suggestion: Use `globalThis` or `self` instead.
│
├ Suggestion: You can provide `window` in the current scope with: `const window = globalThis`.
│
└ Stack trace:
  └─ at file:///Users/ib/dev/deno/foo.js:7:1
```

Ref https://github.com/denoland/deno/issues/13367.
2024-01-24 14:20:51 +01:00
..
assets chore(core): fix flaky flock_test on windows (#19477) 2023-06-12 20:30:29 +00:00
bench fix(bench): added group banner to bench output. (#21551) 2023-12-17 22:57:14 +00:00
benches refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
bundle refactor: set removal version for deno bundle (#22062) 2024-01-24 02:36:51 +01:00
cache perf: more efficient deno cache and npm package info usage (#16592) 2022-11-11 11:33:57 -05:00
cert refactor: set removal version for Deno.ListenTlsOptions.certFile, Deno.ListenTlsOptions.keyFile and Deno.ConnectTlsOptions.certFile (#22026) 2024-01-23 17:35:23 +01:00
check fix: remove conditional unstable type-checking from other commands (#21991) 2024-01-21 22:47:46 +00:00
commonjs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
compile fix(compile): preserve granular unstable features (#21827) 2024-01-06 19:31:09 +05:30
coverage fix(coverage): error if no files found (#21615) 2023-12-18 11:43:27 +01:00
doc feat(cli): improved diagnostics printing (#22049) 2024-01-23 16:37:43 +01:00
dynamic_import feat(cli): don't check permissions for statically analyzable dynamic imports (#18713) 2023-04-26 16:23:28 -04:00
encoding
eval refactor: don't error when .env is not present (#21879) 2024-01-22 00:27:14 +01:00
file_extensions fix(cli): restore deno run - to handle stdin as typescript (#18391) 2023-03-23 12:45:43 -04:00
fmt feat(fmt): support formatting code blocks in Jupyter notebooks (#21310) 2023-11-27 10:32:12 -05:00
import_attributes chore: upgrade deno_core to 0.246.0 (#21904) 2024-01-14 18:28:46 -07:00
import_maps fix(lsp): resolve remote import maps (#20651) 2023-09-24 18:00:15 +01:00
info chore(tests): ability to pattern match unordered lines (#20488) 2023-09-14 16:21:57 +00:00
inspector feat: add --inspect-wait flag (#17001) 2022-12-12 15:33:30 +01:00
install feat: subcommands type-check only local files by default (#14623) 2022-05-17 23:53:42 +02:00
jsr feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-10 22:40:30 +00:00
jsx feat: precompile JSX (#20962) 2023-11-01 20:30:23 +00:00
jupyter feat(jupyter): don't require --unstable flag (#21963) 2024-01-18 23:16:14 +01:00
lint feat(cli): improved diagnostics printing (#22049) 2024-01-23 16:37:43 +01:00
lockfile feat: lockfile v3 (#20424) 2023-09-08 14:34:57 -04:00
lsp fix(lsp): remove quotes and period surrounding specifier in uncached messages (#19794) 2023-07-11 02:27:22 +00:00
malformed_config feat: auto-discover config file (#13313) 2022-01-17 20:10:17 -05:00
module_graph
node chore: deflake rejection_handled_web_process test (#22056) 2024-01-23 21:05:21 +00:00
npm feat: deprecate window global (#22057) 2024-01-24 14:20:51 +01:00
package_json chore(task): remove warning for npm "scripts" (#20880) 2023-10-12 07:33:59 +01:00
publish feat(cli): improved diagnostics printing (#22049) 2024-01-23 16:37:43 +01:00
repl refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
run feat: deprecate window global (#22057) 2024-01-24 14:20:51 +01:00
runtime refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
subdir fix(unstable): vendor cache should support adding files to hashed directories (#20070) 2023-08-06 12:25:48 -04:00
task fix(task): do not eagerly auto-install packages in package.json when "nodeModulesDir": false (#21858) 2024-01-08 19:30:36 -05:00
test refactor: set removal version for --jobs flag (#22028) 2024-01-23 02:19:12 +01:00
tls fix(ext/net): implement a graceful error on an invalid SSL certificate (#20157) 2023-08-15 00:11:12 +00:00
tsc
tsc2
type_definitions
types refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
vendor feat(vendor): support for npm specifiers (#19186) 2023-05-19 22:39:27 +00:00
webcrypto fix(ext/crypto): decode id-RSASSA-PSS with default params (#12147) 2021-10-01 11:14:16 +02:00
webgpu feat: bring back WebGPU (#20812) 2023-12-09 01:19:16 +01:00
workers chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
allow_run_allowlist_resolution.ts fix(runtime/permissions): Resolve executable specifiers in allowlists and queries (#14130) 2023-08-30 18:52:01 +01:00
allow_run_allowlist_resolution.ts.out fix(runtime/permissions): Resolve executable specifiers in allowlists and queries (#14130) 2023-08-30 18:52:01 +01:00
cat.ts chore: update std submodule and its imports (#17408) 2023-01-15 21:09:26 +01:00
echo.ts
echo_server.ts chore: update std submodule and its imports (#17408) 2023-01-15 21:09:26 +01:00
env feat(unstable): deno run --env (#20300) 2023-11-01 15:21:13 +00:00
error_cause_recursive_aggregate.ts feat(cli): show error cause recursion information (#16384) 2022-10-26 15:37:45 +02:00
error_cause_recursive_aggregate.ts.out chore: bump deno_core and update tests (#21467) 2023-12-06 17:02:52 -07:00
error_cause_recursive_tail.ts fix: add error cause in recursive cause tail (#16306) 2022-10-16 21:16:46 +02:00
error_cause_recursive_tail.ts.out chore: bump deno_core and update tests (#21467) 2023-12-06 17:02:52 -07:00
navigator_language.ts feat: introduce navigator.language (#12322) 2022-10-18 15:33:35 +02:00
navigator_languages.ts feat: introduce navigator.language (#12322) 2022-10-18 15:33:35 +02:00
spawn_kill_permissions.ts chore(cli): Don't assume deno is in path for spawn_kill_permissions (#19198) 2023-05-22 09:54:58 -06:00
symlink_to_subdir
welcome.ts chore: update std to 0.208.0 (#21318) 2023-12-02 03:20:06 +01:00