From 39caba14f1448a7af64190748dbc15de738a6ba8 Mon Sep 17 00:00:00 2001 From: Steffen Neubauer Date: Thu, 9 Nov 2023 11:23:15 +0100 Subject: [PATCH] fix: clean up unwanted log messages in the release binary --- garden-sea/src/node.rs | 2 ++ rollup.config.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/garden-sea/src/node.rs b/garden-sea/src/node.rs index 257fd9f9f7..0e6785141a 100644 --- a/garden-sea/src/node.rs +++ b/garden-sea/src/node.rs @@ -40,6 +40,8 @@ where // TODO: consider what happens when users also set the NODE_OPTIONS env var format!("--max-semi-space-size={}", max_semi_space_size).into(), format!("--max-old-space-size={}", max_old_space_size).into(), + // Disable deprecation warnings; We still see deprecation warnings during development, but in release binaries we want to hide them. + "--no-deprecation".into(), // execute garden.mjs path.join("rollup").join("garden.mjs").into(), ]; diff --git a/rollup.config.js b/rollup.config.js index 0ab3a81386..28e575a59d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -29,6 +29,14 @@ export default { chunkFileNames: "[name]-[hash].mjs", }, plugins: [ + // Remove unwanted console.log in node-pty-prebuilt-multiarch package + replace({ + include: [/node-pty-prebuilt-multiarch.*prebuild-file-path\.js$/], + values: { + "console.log('prebuild-file-path:', pathToBuild);": "// Removed console.log in rollup.config.js)", + }, + delimiters: ["", ""], + }), // Rewrite require calls to use the global require to import native modules. { name: "rewrite-native-require",