Age | Commit message (Collapse) | Author |
|
* Add `specifier_to_file_path` to support converting a ModuleSpecifier with a unix-style path to a PathBuf on Windows.
|
|
|
|
|
|
report (#12432)
|
|
|
|
Previously just a generic "error: No such file or directory (os error
2)" was printed. Now "`unzip` was not found on your PATH, please install
`unzip`" will be printed.
|
|
Closes #8440
|
|
includes or excludes are (#12700)
|
|
This avoids a bunch of duplicated code.
|
|
(#12644)
|
|
|
|
|
|
This commit changes formatting of elapsed time in test
runner output.
Instead of "XXXms", reporter outputs one of:
- "XXXms" for <1000ms
- "XXs" for <60s
- "XXXmYYs" for >=60s
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
(#12348)
This reverts commit d5b38a992933db5cb2d0221e9d82af191022dad5.
|
|
|
|
|
|
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.
|
|
|
|
|
|
Move Arc into struct
|
|
|
|
|
|
This commit fixes a problem where loading and executing multiple
modules leads to all of the having "import.meta.main" set to true.
Following Rust APIs were deprecated:
- deno_core::JsRuntime::load_module
- deno_runtime::Worker::execute_module
- deno_runtime::WebWorker::execute_module
Following Rust APIs were added:
- deno_core::JsRuntime::load_main_module
- deno_core::JsRuntime::load_side_module
- deno_runtime::Worker::execute_main_module
- deno_runtime::Worker::execute_side_module
- deno_runtime::WebWorker::execute_main_module
Trying to load multiple "main" modules into the runtime now results in an
error. If user needs to load additional "non-main" modules they should use
APIs for "side" module.
|
|
|
|
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"
}
}
}
|
|
|
|
Removes ImportMap implementation from "cli/" and instead
uses "import_map" crate
|
|
|
|
This commit updated "deno_lint" crate to 0.15.1 and refactors
"cli/tools/lint.rs" to create only a single vector of lint rules,
instead of creating a vector for each linted file.
|
|
Ref: #11874
|
|
|
|
|
|
|
|
This feeds console output to the reporter and handles silencing there
instead of in the JavaScript code.
|
|
This commit refactors "DenoSubcommand" enum in a way that variants
no longer contain anonymous structures but instead contain
dedicated structures for each subcommand, eg. "DenoSubcommand::Lint"
now contains "LintSubcommand".
|
|
This commit adds support for following flags in deno lint subcommand:
--config - allows to load configuration file and parses "lint" object
--rules-tags=<tags> - allows specifying which set of tagged rules should be run
--rules-include=<rules> - allow specifying which rules should be run
--rules-exclude=<rules> - allow specifying which rules should not be run
|
|
Co-authored-by: David Sherret <dsherret@gmail.com>
|
|
|
|
This commit merges the two vectors of specifiers into a single one introducing
the concept of a "TestMode" which is a tri-state enum specifying how a specifier
is to be tested (as documentation, as an executable module or as both).
This is determined during the collection phase and determines how a specifier
will be executed based on how the specifier was collected (directly or not) and
if it has an eligible media_type when fetched.
For example "deno test README.md" is marked as documentation because, while it
is a direct inclusion it is not an executable media type therefore will only
have the fenced code blocks that can be parsed from it tested.
|
|
|
|
Changes the type of the `fail_fast` flag from `Option<usize>` to
`Option<NonZeroUsize>` as an optional value of zero isn't sound.
|
|
|
|
Replaces the testing flag in create_main_worker with a more
general purpose hook to register additional ops.
|