summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
AgeCommit message (Collapse)Author
2023-03-27feat(core): initialize SQLite off-main-thread (#18401)Matt Mastracci
This gets SQLite off the flamegraph and reduces initialization time by somewhere between 0.2ms and 0.5ms. In addition, I took the opportunity to move all the cache management code to a single place and reduce duplication. While the PR has a net gain of lines, much of that is just being a bit more deliberate with how we're recovering from errors. The existing caches had various policies for dealing with cache corruption, so I've unified them and tried to isolate the decisions we make for recovery in a single place (see `open_connection` in `CacheDB`). The policy I chose was: 1. Retry twice to open on-disk caches 2. If that fails, try to delete the file and recreate it on-disk 3. If we fail to delete the file or re-create a new cache, use a fallback strategy that can be chosen per-cache: InMemory (temporary cache for the process run), BlackHole (ignore writes, return empty reads), or Error (fail on every operation). The caches all use the same general code now, and share the cache failure recovery policy. In addition, it cleans up a TODO in the `NodeAnalysisCache`.
2023-03-22feat(cli): --ext parameter for run, compile, and bundle (#17172)Cre3per
Adds `--ext` to `deno run`, closes #5088 Additionally - Adds `--ext` to `deno compile` and `deno bundle`
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-25feat(fmt): make semi-colon option a boolean (#17527)David Sherret
2023-01-24feat(fmt): add ability to configure semicolons (#17292)Bartek Iwańczuk
Allows to change behavior of `deno fmt` to use "ASI" setting for semicolons instead of always prefering them, this is done by "--options-semi=asi" flag or `"semi": "asi"` setting in the config file.
2023-01-16fix(cli/fmt): show filepath for InvalidData error (#17361)Leo Kettmeir
2023-01-13refactor(cli/tools): reduce cloning (#17309)Geert-Jan Zwiers
2023-01-07refactor(cli/tools): move flag and config logic to CliOptions (#17008)Geert-Jan Zwiers
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-09fix: respect the `--quiet` flag in more cases (#16998)David Sherret
2022-12-07feat: ignore `node_modules` and `.git` folders when collecting files ↵David Sherret
everywhere (#16862) We currently only do this for fmt. This makes it so they're excluded by default, but you can still opt into these directories by explicitly specifying them.
2022-11-28refactor: create util folder, move nap_sym to napi/sym, move http_cache to ↵David Sherret
cache folder (#16857)
2022-11-18chore: use Rust 1.65.0 (#16688)Aaron O'Mullan
2022-09-26chore: use Rust 1.64.0 (#16035)Mathias Lafeldt
2022-09-19refactor: move out test files from root testdata directory into sub ↵David Sherret
directories (#15949)
2022-08-30fix(fmt): add the file path to the panic messages when formatting is ↵David Sherret
unstable (#15693)
2022-07-12perf: use emit from swc instead of tsc (#15118)David Sherret
2022-06-29refactor: rename `RootConfig` to `CliOptions` (#15007)David Sherret
2022-06-28refactor: add `RootConfig` (#14985)David Sherret
2022-06-27refactor: create `args` folder (#14982)David Sherret
2022-06-23fix(fmt): ignore node_modules directory (#14943)Bartek Iwańczuk
2022-06-18fix(fmt): should fail `--check` on parse error (#14907)David Sherret
2022-06-09feat(fmt): support formatting cjs, cts, mjs, and mts files (#14837)David Sherret
2022-04-26chore: remove git.io link (#14402)Baoshuo Ren
All links on git.io will stop redirecting after April 29, 2022. - https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-19perf(fmt/lint): incremental formatting and linting (#14314)David Sherret
2022-03-29feat(cli/fmt): ignore .git folder when formatting files (#14138)TrickyPi
2022-03-29chore: upgrade dprint-core to 0.54.1 (#14146)David Sherret
2022-02-24chore: upgrade to Rust 1.59 (#13767)David Sherret
2022-02-11refactor: use `Arc` instead of making copies of `Flags` struct (#13610)Maxim
2022-01-31feat(cli): add "--no-clear-screen" flag (#13454)Zheyu Zhang
This commit adds "--no-clear-screen" flag which can be used with "--watch" flag to disable clearing of terminal screen on each file change.
2022-01-17feat: auto-discover config file (#13313)Ryan Dahl
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-04fix: upgrade swc_ecmascript to 0.103 (#13284)David Sherret
2021-12-09fix(watch): mitigate race condition between file write by other process and ↵David Sherret
watch read (#13038)
2021-12-07feat(cli): use deno fmt for lock and coverage files (#13018)WenheLI
2021-11-29refactor(cli): simplify lint/format resolver logic (#12898)Zheyu Zhang
2021-11-24fix(lsp): lsp should respect include/exclude files in format config (#12876)David Sherret
2021-11-23fix(cli): config file should resolve paths relative to the config file (#12867)David Sherret
* Add `specifier_to_file_path` to support converting a ModuleSpecifier with a unix-style path to a PathBuf on Windows.
2021-10-30fix(cli): linter/formater watches current directory without args (#12550)Zheyu Zhang
2021-10-30fix(cli): lint/format all discoverd files on each change (#12518)Zheyu Zhang
2021-10-21fix(lsp): formatting should error on certain additional swc diagnostics (#12491)David Sherret
2021-09-23feat(cli/fmt): support more markdown extensions (#12195)Satya Rohith
2021-09-13feat: add option flags to 'deno fmt' (#12060)Bartek Iwańczuk
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-07refactor(lsp): use deno_ast and cache swc ASTs (#11780)David Sherret
2021-09-05fix(doc): fix rustdoc bare_urls warning (#11921)Feng Yu
2021-08-16fix: parse error when transpiling code with BOM (#11688)Ryan Dahl
Co-authored-by: David Sherret <dsherret@gmail.com>
2021-07-30chore: upgrade Rust to 1.54.0 (#11554)Yusuke Tanaka
2021-06-06chore: upgrade crates (#10867)Bartek Iwańczuk
* deno_doc - 0.5.0 * deno_lint - 0.6.0 * dprint-plugin-typescript - 0.46.0 * dprint-plugin-markdown - 0.8.0 * dprint-plugin-json - 0.12.0 * swc_bundler - 0.37.4 * swc_ecmascript - 0.36.0