From a8d472f88e79703b1890bfdc87d7a3bb20b21428 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 26 Jun 2023 21:53:17 +0200 Subject: feat(lock): skip saving declaration files in the lockfile (#19447) This is also a performance improvement because declaration file hashes don't need to be stored in the lockfile. Closes #19444 --- cli/graph_util.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/graph_util.rs') diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 0d3548205..1653052e5 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -144,6 +144,7 @@ pub fn graph_valid( pub fn graph_lock_or_exit(graph: &ModuleGraph, lockfile: &mut Lockfile) { for module in graph.modules() { let source = match module { + Module::Esm(module) if module.media_type.is_declaration() => continue, // skip declaration files Module::Esm(module) => &module.source, Module::Json(module) => &module.source, Module::Node(_) | Module::Npm(_) | Module::External(_) => continue, -- cgit v1.2.3