summaryrefslogtreecommitdiff
path: root/tests/specs
AgeCommit message (Collapse)Author
2024-05-01chore: fix flaky module graph cache tests (#23623)David Sherret
2024-04-30feat(cli): add support for jsxImportSourceTypes (#23419)Luca Casonato
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-04-29FUTURE: remove import assertions support for JavaScript (#23541)Kenta Moriuchi
Ref #17944, https://github.com/swc-project/swc/issues/8893 TypeScript removes the `assert` keywords in the transpile, so this PR only works for JavaScript files
2024-04-29fix: handle specifying an import map in an ancestor dir of deno.json (#23602)David Sherret
* https://github.com/denoland/deno_config/pull/51 Closes https://github.com/denoland/deno/issues/21440
2024-04-29chore: add tests for moduleGraph2 (#23603)David Sherret
Also did some renames from underscores to hyphens
2024-04-29chore: migrate bench, publish, and more itests to spec tests (#23584)David Sherret
2024-04-29fix(ext/node): support NODE_DEBUG env (#23583)Satya Rohith
2024-04-29fix(ext/node): add support for MessagePort.removeListener/off (#23598)Satya Rohith
Closes https://github.com/denoland/deno/issues/23564
2024-04-27fix(compile): certain jsr specifiers sometimes can't load (#23567)David Sherret
When returning a jsr specifier for resolve it seems like deno core does not work properly and hangs. Closes https://github.com/denoland/deno/issues/23551 Closes https://github.com/denoland/deno/issues/23139
2024-04-25fix: unref stdin read (#23534)Bartek Iwańczuk
Closes https://github.com/denoland/deno_core/issues/648 Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-24feat(jsr): support importing from jsr via HTTPS specifiers (except for type ↵David Sherret
checking) (#23513) Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24feat: Add `deno serve` subcommand (#23511)Matt Mastracci
By default, `deno serve` will assign port 8000 (like `Deno.serve`). Users may choose a different port using `--port`. `deno serve /tmp/file.ts` `server.ts`: ```ts export default { fetch(req) { return new Response("hello world!\n"); }, }; ```
2024-04-24fix(publish): --dry-publish should error for gitignored excluded files (#23540)David Sherret
Files that were gitignored only were not included in the diagnostic.
2024-04-23fix(cli): Don't panic on invalid emit options (#23463)Nathan Whitaker
Fixes #23456.
2024-04-23fix(workspace): provide workspace members as 'imports' in import map (#23492)Bartek Iwańczuk
This commit changes the workspace support to provide all workspace members to be available as imports based on their names and versions. Closes https://github.com/denoland/deno/issues/23343
2024-04-21FUTURE(ext/net): remove ↵Asher Gomez
`Deno.ConnectTlsOptions.(certFile|certChain|privateKey)` (#23270) Towards #23089 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-21FUTURE(ext/net): remove `Deno.ListenTlsOptions.(keyFile|certFile)` (#23271)Asher Gomez
Towards #23089 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-20feat(task): support running npm binary commands in deno.json (#23478)David Sherret
npm binary commands like `vite` from a `node_modules/.bin` folder will now execute when defined in a deno.json Closes https://github.com/denoland/deno/issues/23477
2024-04-20chore: auto-complete for __spec__.jsonc file (#23476)David Sherret
This makes writing these tests a little easier.
2024-04-19FUTURE: remove `Deno.customInspect` (#23453)Asher Gomez
2024-04-19refactor: move redirect handling into deno_graph (#23444)David Sherret
2024-04-17test(publish): check specifiers outside fast check module graph (#23369)Asher Gomez
Closes #23023
2024-04-16fix(cli): Identify and fix a test deadlock (#23411)Matt Mastracci
If a worker tried to flush large amounts of data right as the test was ending, it could cause the flush sync marker to get lost.
2024-04-16feat(check): allow using side effect imports with unknown module kinds (ex. ↵David Sherret
css modules) (#23392) This allows people to use imports like: ```ts import "./app.css"; ``` ...with `deno check` in systems where there's a bundle step (ex. Vite). This will still error when using it with `deno run` or if the referenced file does not exist. See test cases for behaviour.
2024-04-15test: add test for running in V8 jitless mode (#23054)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/22453 This is fixed due to upgrade of deno_core, just adding a test here.
2024-04-15fix(lsp): improved cjs tracking (#23374)David Sherret
Our cjs tracking was a bit broken. It was marking stuff as esm that was actually cjs leading to type checking errors.
2024-04-12chore(test): use file_test_runner for spec tests (#23348)David Sherret
Extracted out this code to https://github.com/denoland/file_test_runner and added parallelism. This makes these tests run 6 seconds faster on my machine and allows re-using this code in other crates like deno_graph, deno_doc, etc (ex. https://github.com/denoland/deno_graph/pull/437).
2024-04-11fix(publish): do not warn about excluded external modules in node_modules ↵David Sherret
directory (#23173)
2024-04-11fix(npm): local nodeModulesDir was sometimes resolving duplicates of same ↵David Sherret
package (#23320)
2024-04-08FUTURE(ext/net): remove ↵Asher Gomez
`Deno.(Conn|TlsConn|Listener|TlsListener|UnixConn).prototype.rid` (#23219) Towards #23089 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-07FUTURE(ext/fs): remove `Deno.FsWatcher.prototype.rid` (#23234)Asher Gomez
2024-04-07FUTURE(ext/fs): make `Deno.FsFile` constructor illegal (#23235)Asher Gomez
I'm unsure whether we're planning to make the `Deno.FsFile` constructor illegal or remove `FsFile` from the `Deno.*` namspace in Deno 2. Either way, this PR works towards the former. I'll create a superceding PR if the latter is planned instead. Towards #23089
2024-04-05FUTURE: override byonm with nodeModulesDir setting (#23222)David Sherret
Makes the `"nodeModulesDir"` setting take precedence over byonm when using `DENO_FUTURE`.
2024-04-05FUTURE: remove deprecated APIs within workers (#23220)Asher Gomez
2024-04-01chore(specs): add jsr and npm env vars to tests by default (#23171)David Sherret
2024-04-01fix: prevent cache db errors when deno_dir not exists (#23168)David Sherret
Closes #20202
2024-04-01fix(node): handle empty 'main' entry in pkg json (#23155)David Sherret
2024-03-31fix(check): ignore certain diagnostics in remote modules and when publishing ↵David Sherret
(#23119) Unused locals and parameters don't make sense to surface in remote modules. Additionally, fast check can cause these kind of diagnostics when publishing, so they should be ignored. Closes #22959
2024-03-27feat(task): Task description in the form of comments (#23101)Nathan Whitaker
Closes #22786. TLDR; ```jsonc { "tasks": { // Some comment // // describing what the task does "dev": "deno run -A --watch main.ts" } } ``` ```bash deno task ``` ![Screenshot 2024-03-27 at 1 43 49 PM](https://github.com/denoland/deno/assets/17734409/7a14da8c-8e63-45ba-9bfb-590d250b56a9)
2024-03-27fix(check): do not suggest running with `--unstable` (#23092)David Sherret
Closes #23079
2024-03-27FUTURE(ext/fs): remove `Deno.FsFile.rid` (#23087)Asher Gomez
Continues work from #23075. Towards #23089.
2024-03-27FUTURE: remove `Deno.resources()` (#23095)Asher Gomez
2024-03-26feat: TypeScript 5.4 (#23086)David Sherret
Fork PR: https://github.com/denoland/TypeScript/pull/10 Closes #23080
2024-03-26fix(bench): Fix group header printing logic + don't filter out the warmup ↵Nathan Whitaker
benchmark (#23083) Fixes #23053. Two small bugs here: - the existing condition for printing out the group header was broken. it worked in the reproducer (in the issue above) without filtering only by accident, due to setting `self.has_ungrouped = true` once we see the warmup bench. Knowing that we sort benchmarks to put ungrouped benches first, there are only two cases: 1) we are starting the first group 2) we are ending the previous group and starting a new group - when you passed `--filter` we were applying that filter to the warmup bench (which is not visible to users), so we suffered from jit bias if you were filtering (unless your filter was `<warmup>`) TLDR; Running ```bash deno bench main.js --filter="G" ``` ```js // main.js Deno.bench({ group: "G1", name: "G1-A", fn() {}, }); Deno.bench({ group: "G1", name: "G1-B", fn() {}, }); ``` Before this PR: ``` benchmark time (avg) iter/s (min … max) p75 p99 p995 --------------------------------------------------------------- ----------------------------- G1-A 303.52 ps/iter3,294,726,102.1 (254.2 ps … 7.8 ns) 287.5 ps 391.7 ps 437.5 ps G1-B 3.8 ns/iter 263,360,635.9 (2.24 ns … 8.36 ns) 3.84 ns 4.73 ns 4.94 ns summary G1-A 12.51x faster than G1-B ``` After this PR: ``` benchmark time (avg) iter/s (min … max) p75 p99 p995 --------------------------------------------------------------- ----------------------------- group G1 G1-A 3.85 ns/iter 259,822,096.0 (2.42 ns … 9.03 ns) 3.83 ns 4.62 ns 4.83 ns G1-B 3.84 ns/iter 260,458,274.5 (3.55 ns … 7.05 ns) 3.83 ns 4.45 ns 4.7 ns summary G1-B 1x faster than G1-A ```
2024-03-26feat: remove deprecated methods from namespace with `DENO_FUTURE=1` (#23075)Asher Gomez
This change removes deprecated methods from the `Deno.*` namespace when the `DENO_FUTURE=1` environment variable is used. Note: this does not address deprecated class properties and methods. E.g. `Deno.Conn.rid`.
2024-03-25feat(lint): automatically opt-in packages to `jsr` lint tag (#23072)David Sherret
This automatically opts packages (deno.json's with a name, version, and exports field) into the "jsr" lint tag.
2024-03-25test: add test for DENO_FUTURE=1 runtime API (#23065)Bartek Iwańczuk
Add a test that asserts that certain symbols are no longer available if running with `DENO_FUTURE=1` env var. Currently only checks `window` global.
2024-03-24fix: don't panic in test and bench if ops not available (#23055)Bartek Iwańczuk
Fixes regression introduced in https://github.com/denoland/deno/pull/22112 that removed checks if `Deno.test` or `Deno.bench` are not used in respective subcommands. Closes https://github.com/denoland/deno/issues/23041
2024-03-21feat(unstable/publish): error when a package's module is excluded from ↵David Sherret
publishing (#22948) Closes #22657
2024-03-21feat(lint): `deno lint --fix` and lsp quick fixes (#22615)David Sherret
Adds a `--fix` option to deno lint. This currently doesn't work for basically any rules, but we can add them over time to deno lint.