summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
AgeCommit message (Collapse)Author
2021-10-28feat(compat): integrate import map and classic resolutions in ESM resolution ↵Bartek Iwańczuk
(#12549) This commit integrates import map and "classic" resolutions in the "--compat" mode when using ES modules; in effect "http:", "https:" and "blob:" imports now work in compat mode. The algorithm works as follows: 1. If there's an import map, try to resolve using it and if succeeded return the specifier 2. Try to resolve using "Node ESM resolution", and if succeeded return the specifier 3. Fall back to regular ESM resolution
2021-10-28feat(cli): enable `useUnknownInCatchVariables` by default (#12547)Kitson Kelly
Closes #11826 **BREAKING CHANGE** this behaviour was disable when introduced in Deno 1.14/TypeScript 4.4. It will highlight code that unsafely handles variables that are caught, and will cause type errors in unsafe code.
2021-10-27fix(cli): no-check respects inlineSources compiler option (#12559)Kitson Kelly
Fixes #12064
2021-10-27feat(ext/webstorage): use implied origin when --location not set (#12548)Kitson Kelly
Closes #11882 BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
2021-10-26fix(cli): do not cache emit when diagnostics present (#12541)Kitson Kelly
Fixes #12471
2021-10-19fix(core/bindings): use is_instance_of_error() instead of is_native_error() ↵Nayeem Rahman
(#12479)
2021-10-18feat(unstable): Node CJS and ESM resolvers for compat mode (#12424)Bartek Iwańczuk
This commit adds CJS and ESM Node resolvers to the "--compat" mode. The functionality is spread across "cli/compat" module and Node compatibility layer in "deno_std/node"; this stems from the fact that ES module resolution can only be implemented in Rust as it needs to directly integrated with "deno_core"; however "deno_std/node" already provided CJS module resolution. Currently this resolution is only active when running a files using "deno run --compat --unstable <filename>", and is not available in other subcommands, which will be changed in follow up commits.
2021-10-18fix(cli/fmt_errors): don't panic on source line formatting errors (#12449)Nayeem Rahman
Returns empty values in case of errors, source lines are non-essential anyway. These errors can happen e.g. when source files change at runtime. A warning is also printed to help us track when it happens in unexpected cases besides this.
2021-10-14fix(cli): re-enable allowSyntheticDefaultImports for tsc (#12435)Kitson Kelly
Fixes #12434
2021-10-14fix(cli/tests): move worker test assertions out of message handlers (#12439)Nayeem Rahman
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-13chore: test for bundling export specifier with alias (#12421)David Sherret
2021-10-13chore: fix flaky steps_invalid_usage tests (#12422)David Sherret
2021-10-12fix(lsp): lint diagnostics respect config file (#12338)Bartek Iwańczuk
This commit fixes problem with LSP where diagnostics coming from "deno lint" don't respect configuration file. LSP was changed to store "Option<ConfigFile>", "Option<LintConfig>" and "Option<FmtConfig>" on "Inner"; as well as storing "Option<LintConfig>" and "Option<FmtConfig>" on "StateSnapshot". Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-10-11fix(runtime): Declare `Window.self` and `DedicatedWorkerGlobalScope.name` ↵Andreu Botella
with `util.writable()` (#12378) `Window`'s `self` property and `DedicatedWorkerGlobalScope`'s `name` property are defined as Web IDL read-only attributes with the `[Replaceable]` extended attribute, meaning that their setter will redefine the property as a data property with the set value, rather than changing some internal state. Deno currently defines them as read-only data properties instead. Given that Web IDL requires all attributes to be accessor properties rather than data properties, but Deno exposes almost all of those properties as either read-only or writable data properties, it makes sense to expose `[Replaceable]` properties as writable as well – as is already the case with `WindowOrWorkerGlobalScope`'s `performance` property.
2021-10-11feat: provide ops details for ops sanitizer failures (#12188)Casper Beyer
2021-10-11feat(unstable/test): imperative test steps API (#12190)David Sherret
2021-10-11refactor: integrate deno_graph into CLI (#12369)Kitson Kelly
2021-10-10feat: Show the URL of streaming WASM modules in stack traces (#12268)Andreu Botella
WebAssembly modules compiled through `WebAssembly.compile()` and similar non-streaming APIs don't have a URL associated to them, because they have been compiled from a buffer source. In stack traces, V8 will use a URL such as `wasm://wasm/d1c677ea`, with a hash of the module. However, wasm modules compiled through streaming APIs, like `WebAssembly.compileStreaming()`, do have a known URL, which can be obtained from the `Response` object passed into the streaming APIs. And as per the developer-facing display conventions in the WebAssembly Web API spec, this URL should be used in stack traces. This change implements that.
2021-10-10feat(ext/net): relevant errors for resolveDns (#12370)Satya Rohith
2021-10-07tests: make worker test deterministic (#12361)Nayeem Rahman
2021-10-06Revert "fix(cli): ensure empty lines don't count towards coverage (#11957)" ↵Bartek Iwańczuk
(#12348) This reverts commit d5b38a992933db5cb2d0221e9d82af191022dad5.
2021-10-06feat(compat): inject Node globals (#12342)Bartek Iwańczuk
This commit adds automatic injection of Node globals when "--compat" flag is present. This is done by executing "https://deno.land/std/node/global.ts" as a "side module", before main module is executed. This commit makes "--compat" required to be used with "--unstable" flag, as some of Node globals require unstable Deno APIs.
2021-10-06fix(cli): ensure empty lines don't count towards coverage (#11957)Casper Beyer
2021-10-06feat(compat): add support for node: prefixed built-ins (#12337)Bartek Iwańczuk
Adds support for "node:" prefix for Node built-ins in "--compat" mode. As per https://nodejs.org/api/esm.html#esm_node_imports
2021-10-05feat(lint): add support for --watch flag (#11983)CGQAQ
2021-10-05feat: add --compat flag to provide built-in Node modules (#12293)Bartek Iwańczuk
This commit adds "--compat" flag. When the flag is passed a set of mappings for built-in Node modules is injected into the import map. If user doesn't explicitly provide an import map (using "--import-map" flag) then a map is created on the fly. If there are already existing mappings in import map that would clash with built-in Node modules a set of diagnostics is printed to the terminal with suggestions how to proceed.
2021-10-04test: refactor lint tests into directories (#12317)Bartek Iwańczuk
Just reorganizing lint tests in such a way that adding new file in a directory doesn't change result of other tests.
2021-10-01fix(runtime/js/workers): throw errors instead of using an op (#12249)Nayeem Rahman
2021-10-01fix(ext/crypto): decode id-RSASSA-PSS with default params (#12147)Divy Srivastava
2021-09-30fix(runtime/testing): format aggregate errors (#12183)Casper Beyer
2021-09-30fix: worker environment permissions should accept an array (#12250)David Sherret
2021-09-30fix: Don't panic when a worker is closed in the reactions to a wasm ↵Andreu Botella
operation. (#12270)
2021-09-26fix(ext/http): include port number in h2 urls (#12181)Ben Noordhuis
2021-09-25perf(ext/fetch): Use the WebIDL conversion to DOMString rather than ↵Luis Malheiro
USVString for Response constructor (#12201)
2021-09-24chore(workers): Test that closing a worker closes any child workers (#12215)Andreu Botella
Before #12156, closing a worker which had children would cause a panic (https://github.com/denoland/deno/issues/11342#issuecomment-918327693). After that PR, closing a worker will also close any child workers.
2021-09-23feat(cli/fmt): support more markdown extensions (#12195)Satya Rohith
2021-09-22fix(workers): Don't panic when a worker's parent thread stops running (#12156)Andreu Botella
This panic could happen in the following cases: - A non-fatal error being thrown from a worker, that doesn't terminate the worker's execution, but propagates to the main thread without being handled, and makes the main thread terminate. - A nested worker being alive while its parent worker gets terminated. - A race condition if the main event loop terminates the worker as part of its last task, but the worker doesn't fully terminate before the main event loop stops running. This panic happens because a worker's event loop should have pending ops as long as the worker isn't closed or terminated – but if an event loop finishes running while it has living workers, its associated `WorkerThread` structs will be dropped, closing the channels that keep those ops pending. This change adds a `Drop` implementation to `WorkerThread`, which terminates the worker without waiting for a response. This fixes the panic, and makes it so nested workers are automatically terminated once any of their ancestors is closed or terminated. This change also refactors a worker's termination code into a `WorkerThread::terminate()` method. Closes #11342. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-09-18fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)Nayeem Rahman
Co-authored-by: Mike White <mike.white@auctane.com>
2021-09-17fix(cli): don't ignore diagnostics about for await (#12116)Kitson Kelly
Fixes #12115
2021-09-14feat(ext/crypto): import RSA pkcs#8 keys (#11891)Divy Srivastava
2021-09-14fix(lsp): correctly parse registry patterns (#12063)Kitson Kelly
2021-09-14feat(lsp): ignore specific lint for entire file (#12023)Satya Rohith
2021-09-13feat(fmt): add support for configuration file (#11944)Bartek Iwańczuk
This commit adds support for configuration file for "deno fmt" subcommand. It is also respected by LSP when formatting files. Example configuration: { "fmt": { "files": { "include": ["src/"], "exclude": ["src/testdata/"] }, "options": { "useTabs": true, "lineWidth": 80, "indentWidth": 4, "singleQuote": true, "textWrap": "preserve" } } }
2021-09-13fix: worker_message_before_close was flaky (#12019)Andreu Botella
2021-09-13fix(lsp): support data urls in `deno.importMap` option (#11397)Satya Rohith
2021-09-09fix: permission prompt stuffing (#11931)Ryan Dahl
Fixes #9750
2021-09-08fix(ext/web): Preserve stack traces for DOMExceptions (#11959)Nayeem Rahman
2021-09-07refactor(lsp): use deno_ast and cache swc ASTs (#11780)David Sherret
2021-09-06fix(ext/web): Format terminal DOMExceptions properly (#11834)Nayeem Rahman