summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2024-01-27Revert "refactor(cli): use new sanitizer for resources (#22125)" (#22153)Bartek Iwańczuk
2024-01-27feat(unstable): implement `navigator.gpu.getPreferredCanvasFormat()` (#22149)Divy Srivastava
2024-01-26refactor(cli): use new sanitizer for resources (#22125)Matt Mastracci
Step 1 of the Rustification of sanitizers, which unblocks the faster timers. This replaces the resource sanitizer with a Rust one, using the new APIs in deno_core.
2024-01-26fix: make deprecation warnings less verbose (#22128)Bartek Iwańczuk
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
2024-01-26fix(ext/http): smarter handling of Accept-Encoding (#22130)Matt Mastracci
2024-01-26feat(lsp): complete parameters as tab stops and placeholders (#22126)Nayeem Rahman
2024-01-26fix(node): remove deprecation warnings (#22120)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22116
2024-01-25fix(fs): instanceof check for Deno.FsFile (#22121)Bartek Iwańczuk
Regression caused by https://github.com/denoland/deno/pull/22072. I added a relevant test so we don't regress again. Fixes https://github.com/denoland/deno/issues/22115
2024-01-25fix(lsp): disable experimentalDecorators by default (#22101)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/22040. By mistake I forgot to disable "experimental decorators" in the LSP.
2024-01-25Revert "chore: bump rustls-tokio-stream and rustls (#21955)" (#22097)Bartek Iwańczuk
This reverts commit 971eb0e5e836cdeaaefc25b2bab4c6a6a9f8e213. To unblock v1.40 release.
2024-01-24feat: Expand 'imports' section of deno.json (#22087)Bartek Iwańczuk
This commit adds automatic expansion of "imports" field in "deno.json" file. If "npm:" or "jsr:" imports are encountered we automatically try to add a "directory" remapping. Previously users had to specify entries for both `foo` and `foo/` to be able to import like `import { symbol1 } from "foo";` and `import { symbol2 } from "foo/some_file.js"`: ``` { "imports": { "foo": "npm:@foo/bar", "foo/": "npm:/@foo/bar/", } ``` With this change users can only add entry for `foo`: ``` { "imports": { "foo": "npm:@foo/bar", } ``` The entry for `foo/` will be provided automatically. Similarly if user provides "directory" remapping explicitly, we will not overwrite it.
2024-01-24revert: Remove deprecations of file sync APIs (#22085)Bartek Iwańczuk
- `Deno.FsFile.dataSync` -> `Deno.FsFile.syncData` - `Deno.FsFile.dataSyncSync` -> `Deno.FsFile.syncDataSync` Also marks these APIs as unstable
2024-01-24feat(publish): error on invalid external imports (#22088)Luca Casonato
2024-01-24feat(publish): give diagnostic on invalid package files (#22082)Luca Casonato
2024-01-24feat: deprecate `Deno.{Conn,TcpConn,TlsConn,UnixConn}.rid` (#22077)Asher Gomez
For removal in Deno v2. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24feat(publish): exclude and include (#22055)Luca Casonato
2024-01-24Revert "feat: deprecate `window` global (#22057)" (#22084)Bartek Iwańczuk
This reverts commit 930ce2087051b4e45b2026ce7a77c14360a6993f. This is producing false-positives that are not actionable to users. We're gonna address this in another release.
2024-01-24feat: deprecate `Deno.fstat()` and `Deno.fstatSync()` (#22068)Asher Gomez
For removal in Deno v2.
2024-01-24feat: `Deno.FsFile.{utime,utimeSync}()` and deprecate ↵Asher Gomez
`Deno.{futime,futimeSync}` (#22070) For removal in Deno v2. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24chore: fix `Deno.UnsafeWindowSurface` typings (#22081)Dean Srebnik
- changed `Deno.UnsafeWindowSurface` typings from accepting `Deno.UnsafePointerView` to `Deno.PointerValue` - added width and height to `GPUCanvasConfiguration`
2024-01-24feat: deprecate `Deno.write()` and `Deno.writeSync()` (#22064)Asher Gomez
For removal in Deno v2.
2024-01-24feat: Change deprecation warning formatting (#22080)Bartek Iwańczuk
Removes weird "frame like" characters and simplifies the output: ``` warning: Use of deprecated "Deno.isatty()" API. This API will be removed in Deno 2. Stack trace: at file:///Users/ib/dev/deno/foo.js:2:8 hint: Use `stdStream.isTerminal()` instead. warning: Use of deprecated "Deno.isatty()" API. This API will be removed in Deno 2. Stack trace: at file:///Users/ib/dev/deno/foo.js:7:8 hint: Use `stdStream.isTerminal()` instead. ``` https://github.com/denoland/deno/assets/13602871/7a6e24bf-44ec-4dbf-ac96-2af1db9f2ab9
2024-01-24feat: deprecate `Deno.close()` (#22066)Asher Gomez
For removal in Deno v2. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24feat: deprecate `Deno.ftruncate()` and `Deno.ftruncateSync()` (#22069)Asher Gomez
For removal in Deno 2.0.
2024-01-24chore: improve unanalyzable dynamic import diagnostic (#22051)Luca Casonato
2024-01-24feat: deprecate `window` global (#22057)Bartek Iwańczuk
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-24feat: TC39 decorator proposal support (#22040)Bartek Iwańczuk
This commit adds support for [TC39 Decorator Proposal](https://github.com/tc39/proposal-decorators). These decorators are only available in transpiled sources - ie. non-JavaScript files (because of lack of support in V8). This entails that "experimental TypeScript decorators" are not available by default and require to be configured, with a configuration like this: ``` { "compilerOptions": { "experimentalDecorators": true } } ``` Closes https://github.com/denoland/deno/issues/19160 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-24feat: deprecate `Deno.read()` and `Deno.readSync()` (#22063)Asher Gomez
For removal in Deno v2.
2024-01-24refactor: set removal version for `deno bundle` (#22062)Asher Gomez
This change sets the removal version for the `deno bundle` sub-command for Deno v2. The warnings appear when `deno bundle` is run and in the `--help` menu.
2024-01-24fix(ext/cron): automatically override unspecified values (#22042)Igor Zinkovsky
Fixes #22041
2024-01-24feat: `FsFile.sync()` and `FsFile.syncSync()` (#22017)Asher Gomez
This change: 1. Implements `Deno.FsFile.sync()` and `Deno.FsFile.syncSync()`. 2. Deprecates `Deno.fsync()` and `Deno.fsyncSync()` for removal in Deno v2, in favour of the above corresponding methods. Related #21995 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24feat: `Deno.FsFile.dataSync()` and `Deno.FsFile.dataSyncSync()` (#22019)Asher Gomez
This change: 1. Implements `Deno.FsFile.dataSync()` and `Deno.FsFile.dataSyncSync()`. 2. Deprecates `Deno.fdatasync()` and `Deno.fdatasyncSync()` for removal in Deno v2, in favour of the above corresponding methods. 3. Replaces use of `Deno.fdatasync()` and `Deno.fdatasyncSync()` with the above instance methods. Related #21995
2024-01-24feat: deprecate `Deno.resources()` (#22059)Asher Gomez
Most uses of `Deno.resources()` within tests, as they previously checked for leaked resources. This is not needed as the test runner does this automatically. Other internal uses of this API have been replaced with the internal `Deno[Deno.internal].core.resources()`.
2024-01-24feat: `Deno.{stdin,stdout,stderr}.isTerminal()`, deprecate `Deno.isatty()` ↵Asher Gomez
(#22011) This change: 1. Implements `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()` and `Deno.stderr.isTerminal()`. 2. Deprecates `Deno.isatty()` for removal in Deno v2, in favour of the above instance methods. 3. Replaces use of `Deno.isatty()` with the above instance methods. Related #21995 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-23feat: import.meta.filename and import.meta.dirname (#22061)Bartek Iwańczuk
This commit adds `import.meta.filename` and `import.meta.dirname` APIs. These APIs return string representation of filename and containing dirname. They are only defined for local modules (modules that have `file:///` scheme). Example: ```ts console.log(import.meta.filename, import.meta.dirname) ``` Unix: ``` $ deno run /dev/my_module.ts /dev/my_module.ts /dev/ ``` Windows: ``` $ deno run C:\dev\my_module.ts C:\dev\my_module.ts C:\ ```
2024-01-23chore: deflake rejection_handled_web_process test (#22056)Bartek Iwańczuk
2024-01-23fix(BREAKING): remove dead `--prompt` flag (#22038)Asher Gomez
It appears the `--prompt` flag has done nothing for some time. Perhaps, since #13650. Classifying this as a dead functionality removal for this reason. Did this while working on #22021.
2024-01-23refactor: set removal version for `Deno.ListenTlsOptions.certFile`, ↵Asher Gomez
`Deno.ListenTlsOptions.keyFile` and `Deno.ConnectTlsOptions.certFile` (#22026) This change: 1. Sets the removal version for `Deno.ListenTlsOptions.certFile`, `Deno.ListenTlsOptions.keyFile` and `Deno.ConnectTlsOptions.certFile` for Deno v2, in favour of the `cert`, `key` and `caCerts` options, respectively. 2. Replaces use of the deprecated options with the new recommended options. Towards #22021
2024-01-23feat(cli): improved diagnostics printing (#22049)Luca Casonato
This initially uses the new diagnostic printer in `deno lint`, `deno doc` and `deno publish`. In the limit we should also update `deno check` to use this printer.
2024-01-23feat: warn when using --unstable, prefer granular flags (#21452)Bartek Iwańczuk
This commit deprecates "--unstable" flag. When "--unstable" flag is encountered a warning like this is printed: ``` The `--unstable` flag is deprecated, use granular `--unstable-*` flags instead. Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags ``` When "--unstable" flag is used and an unstable API is called an additional warning like this is printed for each API call: ``` The `Deno.dlopen` API was used with `--unstable` flag. The `--unstable` flag is deprecated, use granular `--unstable-ffi` instead. Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags ``` When no "--unstable-*" flag is provided and an unstable API is called following warning is issued before exiting: ``` Unstable API 'Deno.dlopen'. The `--unstable-ffi` flag must be provided. ``` --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com> Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-23chore: use ensureFastOps in 02_surface.js (#22045)Divy Srivastava
2024-01-23BREAKING(unstable): remove `Deno.cron()` overload (#22035)Asher Gomez
This change removes the currently deprecated `Deno.cron()` overload with `options` as a potential last argument. This might be fine to do now, in a major release, as `Deno.cron()` is an unstable API. I thought of doing this while working on #22021. If this is not ready to remove, I can instead set the removal version of this overload for Deno v2. Note: this overload was deprecated in Deno v1.38.2 (#21225). So it's been deprecated for over 2 months.
2024-01-23chore: update deno_ast and deno_graph (#22033)Bartek Iwańczuk
This upgrade unblocks support for ES decorator proposal. Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-01-23feat(lsp): include scope uri in "deno/didChangeDenoConfiguration" (#22002)Nayeem Rahman
2024-01-23fix(ext/node): fix no arg call of fs.promises.readFile (#22030)Yoshiya Hinosawa
2024-01-23refactor: set removal version for `Deno.Server` (#22024)Asher Gomez
This change sets the removal version for the deprecated `Deno.Server` interface for Deno 2.0. Towards #22021
2024-01-23refactor: set removal version for `--jobs` flag (#22028)Asher Gomez
For removal in Deno v2. I'm uncertain of the output format but used #21452 as a guide. Towards #22021
2024-01-22feat(unstable): remove Deno.upgradeHttp API (#21856)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/21828. This API is a huge footgun. And given that "Deno.serveHttp" is a deprecated API that is discouraged to use (use "Deno.serve()" instead); it makes no sense to keep this API around. This is a step towards fully migrating to Hyper 1.
2024-01-22feat(lockfile): track JSR and npm dependencies in config file (#22004)David Sherret
See overview in https://github.com/denoland/deno_lockfile/pull/13
2024-01-22feat(web): ImageBitmap (#21898)Leo Kettmeir