-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make deprecation warnings less verbose (#22128)
This commit makes deprecation warnings less verbose by default. Only a single warnings is issued per deprecated API use. `DENO_VERBOSE_WARNINGS` env var can be provided to enable more detailed logging for each use of API including a stack trace. https://github.com/denoland/deno/assets/13602871/9c036c84-0044-4cb6-9c8e-deb641f43712
- Loading branch information
1 parent
d2643fa
commit 69fe906
Showing
9 changed files
with
100 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
cli/tests/testdata/run/warn_on_deprecated_api/main.verbose.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Download http://localhost:4545/run/warn_on_deprecated_api/mod.ts | ||
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. | ||
|
||
Stack trace: | ||
at [WILDCARD]warn_on_deprecated_api/main.js:3:16 | ||
|
||
hint: Use "Deno.Command()" API instead. | ||
|
||
hello world | ||
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. | ||
|
||
Stack trace: | ||
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) | ||
at [WILDCARD]warn_on_deprecated_api/main.js:25:7 | ||
|
||
hint: Use "Deno.Command()" API instead. | ||
|
||
hello world | ||
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. | ||
|
||
Stack trace: | ||
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) | ||
at [WILDCARD]warn_on_deprecated_api/main.js:26:7 | ||
|
||
hint: Use "Deno.Command()" API instead. | ||
|
||
hello world | ||
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. | ||
|
||
Stack trace: | ||
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) | ||
at [WILDCARD]warn_on_deprecated_api/main.js:29:9 | ||
|
||
hint: Use "Deno.Command()" API instead. | ||
|
||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
hello world | ||
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. | ||
|
||
Stack trace: | ||
at runEcho (http://localhost:4545/run/warn_on_deprecated_api/mod.ts:2:18) | ||
at [WILDCARD]warn_on_deprecated_api/main.js:32:7 | ||
|
||
hint: Use "Deno.Command()" API instead. | ||
hint: It appears this API is used by a remote dependency. Try upgrading to the latest version of that dependency. | ||
|
||
hello world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters