summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2023-08-08chore: rename some helpers on the Fs trait (#20097)Luca Casonato
Rename some of the helper methods on the Fs trait to be suffixed with `_sync` / `_async`, in preparation of the introduction of more async methods for some helpers. Also adds a `read_text_file_async` helper to complement the renamed `read_text_file_sync` helper.
2023-08-08refactor(cli): move `snapshot_from_lockfile` function to `deno_npm` (#20024)Yusuke Tanaka
This commit moves `snapshot_from_lockfile` function to [deno_npm crate](https://github.com/denoland/deno_npm). This allows this function to be called outside Deno CLI (in particular, Deno Deploy).
2023-08-08refactor: use deno_cache_dir crate (#20092)David Sherret
Uses https://github.com/denoland/deno_cache/pull/26
2023-08-08fix(fmt): do not insert expr stmt leading semi-colon in do while stmt body ↵David Sherret
(#20093) This is for when semiColons: false Closes #20089
2023-08-08build: remove redundant rerun-if-changed for compiler snapshot (#20094)Nayeem Rahman
Not sure why `40_testing.js` is there. The other two `00_typescript.js` and `99_main_compiler.js` should be covered by `files_loaded_during_snapshot` at the end. This helps with `__runtime_js_sources` wrt changing `40_testing.js`.
2023-08-06feat(unstable): rename `deno_modules` to `vendor` (#20065)David Sherret
Renames the unstable `deno_modules` directory and corresponding settings to `vendor` after feedback. Also causes the vendoring of the `node_modules` directory which can be disabled via `--node-modules-dir=false` or `"nodeModulesDir": false`.
2023-08-06fix(unstable): vendor cache should support adding files to hashed ↵David Sherret
directories (#20070) This changes the design of the manifest.json file to have a separate "folders" map for mapping hashed directories. This allows, for example, to add files in a folder like `http_localhost_8000/#testing_5de71/` and have them be resolved automatically as long as their remaining components are identity-mappable to the file system (not hashed). It also saves space in the manifest.json file by only including the hashed directory instead of each descendant file. ``` // manifest.json { "folders": { "https://localhost/NOT_MAPPABLE/": "localhost/#not_mappable_5cefgh" }, "modules": { "https://localhost/folder/file": { "headers": { "content-type": "application/javascript" } }, } } // folder structure localhost - folder - #file_2defn (note: I've made up the hashes in these examples) - #not_mappable_5cefgh - mod.ts - etc.ts - more_files.ts ```
2023-08-06build: allow disabling snapshots for dev (#20048)Nayeem Rahman
Closes #19399 (running without snapshots at all was suggested as an alternative solution). Adds a `__runtime_js_sources` pseudo-private feature to load extension JS sources at runtime for faster development, instead of building and loading snapshots or embedding sources in the binary. Will only work in a development environment obviously. Try running `cargo test --features __runtime_js_sources integration::node_unit_tests::os_test`. Then break some behaviour in `ext/node/polyfills/os.ts` e.g. make `function cpus() {}` return an empty array, and run it again. Fix and then run again. No more build time in between.
2023-08-05refactor: remove snapshot_module_load_cb (#20043)Nayeem Rahman
2023-08-05chore: use zlib-ng for flate2 (#20059)Matt Mastracci
Extracted from PR #16011
2023-08-05fix(unstable): vendor cache override should handle forbidden windows ↵David Sherret
directory names (#20069) Meant to do this earlier.
2023-08-04fix(test): make test runner work when global setTimeout is replaced (#20052)Yoshiya Hinosawa
2023-08-04fix(node): polyfill process.title (#20044)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19777
2023-08-04fix(node): repl._builtinLibs (#20046)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/19733
2023-08-04fix(test): use only a single timeout for op sanitizers (#20042)Bartek Iwańczuk
Chipping away at making tests faster. Appears we don't need double timeout before sanitizing ops. This should cut baseline cost of running a test by half.
2023-08-031.36.0 (#20036)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-08-03feat(permissions): add "--deny-*" flags (#19070)Asher Gomez
This commit adds new "--deny-*" permission flags. These are complimentary to "--allow-*" flags. These flags can be used to restrict access to certain resources, even if they were granted using "--allow-*" flags or the "--allow-all" ("-A") flag. Eg. specifying "--allow-read --deny-read" will result in a permission error, while "--allow-read --deny-read=/etc" will allow read access to all FS but the "/etc" directory. Runtime permissions APIs ("Deno.permissions") were adjusted as well, mainly by adding, a new "PermissionStatus.partial" field. This field denotes that while permission might be granted to requested resource, it's only partial (ie. a "--deny-*" flag was specified that excludes some of the requested resources). Eg. specifying "--allow-read=foo/ --deny-read=foo/bar" and then querying for permissions like "Deno.permissions.query({ name: "read", path: "foo/" })" will return "PermissionStatus { state: "granted", onchange: null, partial: true }", denoting that some of the subpaths don't have read access. Closes #18804. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-08-02refactor: use '--reporter' and '--junit-path' flags for 'deno test' (#20031)Bartek Iwańczuk
This commit adds "--reporter" and "--junit-path" flags to "deno test" subcommand instead of using "--dot" and "--junit" flags.
2023-08-02feat(unstable/lsp): support navigating to deno_modules folder (#20030)David Sherret
Closes #20015 Closes https://github.com/denoland/vscode_deno/issues/850 (only for deno_modules, but I don't think this will be possible for the global cache)
2023-08-02fix(repl): highlight from ident in import from or export from (#20023)await-ovo
2023-08-02feat(cli): Add dot test reporter (#19804)Bartek Iwańczuk
This commit adds a "dot" reporter to "deno test" subcommand, that can be activated using "--dot" flag. It provides a concise output using: - "." for passing test - "," for ignored test - "!" for failing test User output is silenced and not printed to the console. In non-TTY environments each result is printed on a separate line.
2023-08-02fix(node): node:test reports correct location (#20025)Bartek Iwańczuk
Also removed some noisy output that caused test flakiness.
2023-08-02fix(bench): iter/s calculation (#20016)Bartek Iwańczuk
Ref https://github.com/denoland/deno/pull/19994#discussion_r1281267606 Ref https://github.com/denoland/deno/pull/19994#discussion_r1281243602
2023-08-02fix: make "suggest.autoImports" to switch completions from external modules ↵Kyoh
(#19845)
2023-08-02fix: regression in workers using dynamic imports (#20006)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19903
2023-08-02feat(unstable): optional `deno_modules` directory (#19977)David Sherret
Closes #15633
2023-08-01feat(bench): print iter/s in the report (#19994)Bartek Iwańczuk
This commit adds "iter/s" column to the console report generated by "deno bench" subcommand.
2023-08-01fix(ext/node): fix import json using npm specifier (#19723)await-ovo
2023-08-02feat(node): add polyfill for node:test module (#20002)Bartek Iwańczuk
This commit provides basic polyfill for "node:test" module. Currently only top-level "test" function is polyfilled, all remaining functions from that module throw not implemented errors.
2023-08-01feat(npm): support running non-bin scripts in npm pkgs via `deno run` (#19975)David Sherret
Closes https://github.com/denoland/deno/issues/19967
2023-08-01refactor(runtime): use new fd methods from resource table (#20010)Matt Mastracci
Prereq for fast streams work. No longer need `#[cfg]` around `backing_fd`.
2023-08-01fix(test): request cloning should throw if body stream is locked (#19990)Felipe Baltor
Follow-up from #19869.
2023-08-01fix: deno diagnostic - clarify where to put triple-slash directive (#20009)David Sherret
Some people might not know what "entrypoint" means or where to put the triple-slash directive.
2023-08-01fix: retry module download once if server errored (#17252)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17251 Closes #19970 This commits adds logic to retry failed module downloads once. Both request and server errors are handled and the retry is done after 50 ms wait time.
2023-07-31chore: make LSP test less prone to changes (#20003)Bartek Iwańczuk
This test was getting changed often, I modified it a bit so it's less sensitive to changes in declaration files.
2023-07-31feat(node/os): implement getPriority, setPriority & userInfo (#19370)Leo Kettmeir
Takes #4202 over Closes #17850 --------- Co-authored-by: ecyrbe <ecyrbe@gmail.com>
2023-07-31perf: faster node globals access in cjs (#19997)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-31refactor: update core extension api usage (#19952)Nayeem Rahman
2023-07-31refactor: NodeCodeTranslator - optional source to translate_cjs_to_esm (#20000)David Sherret
2023-07-31chore(cli): Reduce port conflict in tests (#19988)Matt Mastracci
Ports are still occasionally causing CI flake -- allocate and separate ports further for fetch/http tests.
2023-07-31chore(cli): Fix test that locks up on some M2 macs (#19989)Matt Mastracci
I'm not sure why, but sending SIGABRT to Deno on my machine as part of this test causes it to lock up very badly, leaving it in an unkillable `UE+` state. This showed up after #19333, but was not caused by it.
2023-07-31feat(bench): add BenchContext::start() and BenchContext::end() (#18734)Nayeem Rahman
Closes #17589. ```ts Deno.bench("foo", async (t) => { const resource = setup(); // not included in measurement t.start(); measuredOperation(resource); t.end(); resource.close(); // not included in measurement }); ```
2023-07-30fix(Deno.serve): accessing .url on cloned request throws (#19869)Felipe Baltor
This PR fixes #19818. The problem was that the new InnerRequest class does not initialize the fields urlList and urlListProcessed that are used during a request clone. The solution aims to be straightforward by simply initializing the missing properties during the clone process. I also implemented a "cache" to the url getter of the new InnerRequest, avoiding the cost of calling op_http_get_request_method_and_url.
2023-07-29chore: remove println in DenoCompileBinaryWriter (#19976)David Sherret
2023-07-28feat(compile): Add `--no-terminal` to compile command (#17991)JasperVanEsveld
2023-07-28refactor(cli/tools): split bench into multiple modules (#19974)Bartek Iwańczuk
I was asked to add "iter/s" to the benchmark output, before attempting that I wanted to split this into multiple modules.
2023-07-28fix(npm): improve declaration resolution for filename with different ↵David Sherret
extensions (#19966) postcss was importing `./index.js` from `./index.d.mts` where there also existed a `./index.d.ts`. Closes #19575
2023-07-28chore: remove unused dependencies (#19962)Divy Srivastava
2023-07-28feat: Deno.createHttpClient allowHost (#19689)Leo Kettmeir
This adds an option to allow using the host header in a fetch call. Closes https://github.com/denoland/deno/issues/16840 Ref https://github.com/denoland/deno/issues/11017
2023-07-27fix: do not include jsx without `@ts-check` in tsc roots (#19964)David Sherret
Closes #19928