From 85c52d12144b35d8068e942c298c95fc4f84948b Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 24 May 2022 12:59:21 -0230 Subject: [PATCH] Remove module paths from bundle (#14763) A patch has been added to ensure lavapack no longer includes the path for each module as part of each serialized module. This path was originally added for debugging purposes, and is not used for anything at runtime. The module path was an absolute path, not a relative one, so it was an obstacle to having reproducible builds between environments. --- patches/@lavamoat+lavapack+3.1.0.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/@lavamoat+lavapack+3.1.0.patch diff --git a/patches/@lavamoat+lavapack+3.1.0.patch b/patches/@lavamoat+lavapack+3.1.0.patch new file mode 100644 index 000000000..bdce11c01 --- /dev/null +++ b/patches/@lavamoat+lavapack+3.1.0.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/@lavamoat/lavapack/src/pack.js b/node_modules/@lavamoat/lavapack/src/pack.js +index eb41a0a..3f891ea 100644 +--- a/node_modules/@lavamoat/lavapack/src/pack.js ++++ b/node_modules/@lavamoat/lavapack/src/pack.js +@@ -203,7 +203,9 @@ function createPacker({ + const jsonSerializeableData = { + // id, + package: packageName, +- file, ++ // Omit this absolute filename from bundle so that builds are reproducible between environments ++ // TODO: update lavapack with an option to omit this, and/or make this filepath relative to the current working directory ++ // file, + // deps, + // source: sourceMeta.code + }