mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
WIP
This commit is contained in:
parent
4e38fbd0a3
commit
c9b6438eda
5 changed files with 835 additions and 153 deletions
957
Cargo.lock
generated
957
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -157,8 +157,8 @@ percent-encoding = "2.3.0"
|
|||
phf = { version = "0.11", features = ["macros"] }
|
||||
pin-project = "1.0.11" # don't pin because they yank crates from cargo
|
||||
pretty_assertions = "=1.4.0"
|
||||
prost = "0.11"
|
||||
prost-build = "0.11"
|
||||
prost = "0.13.3"
|
||||
prost-build = "0.13.3"
|
||||
rand = "=0.8.5"
|
||||
regex = "^1.7.0"
|
||||
reqwest = { version = "=0.12.5", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli", "socks", "json", "http2"] } # pinned because of https://github.com/seanmonstar/reqwest/pull/1955
|
||||
|
@ -198,7 +198,7 @@ tower-lsp = { package = "deno_tower_lsp", version = "0.1.0", features = ["propos
|
|||
tower-service = "0.3.2"
|
||||
twox-hash = "=1.6.3"
|
||||
# Upgrading past 2.4.1 may cause WPT failures
|
||||
url = { version = "< 2.5.0", features = ["serde", "expose_internals"] }
|
||||
url = { version = "^2.5.0", features = ["serde"] }
|
||||
uuid = { version = "1.3.0", features = ["v4"] }
|
||||
webpki-root-certs = "0.26.5"
|
||||
webpki-roots = "0.26"
|
||||
|
|
|
@ -169,6 +169,8 @@ which.workspace = true
|
|||
zeromq.workspace = true
|
||||
zip = { version = "2.1.6", default-features = false, features = ["deflate-flate2"] }
|
||||
zstd.workspace = true
|
||||
oxc_linter = { path = "../../../github/oxc/crates/oxc_linter" }
|
||||
oxc = { path = "../../../github/oxc/crates/oxc", features = ["full"]}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
junction.workspace = true
|
||||
|
|
1
cli/npm/managed/cache/registry_info.rs
vendored
1
cli/npm/managed/cache/registry_info.rs
vendored
|
@ -199,6 +199,7 @@ impl RegistryInfoDownloader {
|
|||
return std::future::ready(Err(Arc::new(err))).boxed_local()
|
||||
}
|
||||
};
|
||||
eprintln!("load future: {:#?}", maybe_auth_header);
|
||||
let guard = self.progress_bar.update(package_url.as_str());
|
||||
let name = name.to_string();
|
||||
async move {
|
||||
|
|
|
@ -22,6 +22,11 @@ use deno_graph::ModuleGraph;
|
|||
use deno_lint::diagnostic::LintDiagnostic;
|
||||
use deno_lint::linter::LintConfig;
|
||||
use log::debug;
|
||||
use oxc::allocator::Allocator;
|
||||
use oxc::parser::Parser;
|
||||
use oxc::semantic::SemanticBuilder;
|
||||
use oxc_linter::FixKind;
|
||||
use oxc_linter::LinterBuilder;
|
||||
use reporters::create_reporter;
|
||||
use reporters::LintReporter;
|
||||
use serde::Serialize;
|
||||
|
@ -69,6 +74,23 @@ pub async fn lint(
|
|||
flags: Arc<Flags>,
|
||||
lint_flags: LintFlags,
|
||||
) -> Result<(), AnyError> {
|
||||
if true {
|
||||
let linter = oxc_linter::LinterBuilder::all().build();
|
||||
let allocator = Allocator::default();
|
||||
let ret = Parser::new(&allocator, source_text, source_type).parse();
|
||||
let path = Path::new("");
|
||||
let semantic_ret = SemanticBuilder::new()
|
||||
.with_build_jsdoc(true)
|
||||
.with_cfg(true)
|
||||
.build_module_record(path, &ret.program)
|
||||
.build(&ret.program);
|
||||
let linter = LinterBuilder::all().with_fix(FixKind::All).build();
|
||||
let semantic = Rc::new(semantic_ret.semantic);
|
||||
linter.run(&std::env::current_dir().unwrap(), semantic);
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if let Some(watch_flags) = &lint_flags.watch {
|
||||
if lint_flags.is_stdin() {
|
||||
return Err(generic_error(
|
||||
|
|
Loading…
Reference in a new issue