mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
fix(check): should bust check cache when json module or npm resolution changes (#19941)
A small part of #19928.
This commit is contained in:
parent
53e077133f
commit
cf16df00d9
17 changed files with 223 additions and 58 deletions
|
@ -28,6 +28,7 @@ use deno_core::ModuleSpecifier;
|
|||
use deno_core::OpState;
|
||||
use deno_core::RuntimeOptions;
|
||||
use deno_core::Snapshot;
|
||||
use deno_graph::GraphKind;
|
||||
use deno_graph::Module;
|
||||
use deno_graph::ModuleGraph;
|
||||
use deno_graph::ResolutionResolved;
|
||||
|
@ -319,7 +320,7 @@ pub struct Response {
|
|||
pub stats: Stats,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug)]
|
||||
struct State {
|
||||
hash_data: u64,
|
||||
graph: Arc<ModuleGraph>,
|
||||
|
@ -331,6 +332,21 @@ struct State {
|
|||
current_dir: PathBuf,
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
hash_data: Default::default(),
|
||||
graph: Arc::new(ModuleGraph::new(GraphKind::All)),
|
||||
maybe_tsbuildinfo: Default::default(),
|
||||
maybe_response: Default::default(),
|
||||
maybe_node_resolver: Default::default(),
|
||||
remapped_specifiers: Default::default(),
|
||||
root_map: Default::default(),
|
||||
current_dir: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl State {
|
||||
pub fn new(
|
||||
graph: Arc<ModuleGraph>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue