Skip to content

Instantly share code, notes, and snippets.

View valentinbeggi's full-sized avatar

Valentin Beggi valentinbeggi

View GitHub Profile
// UTILS
export const getPaddingFromPrecision = (
floatingPointPrecision: number,
): number => {
return Math.ceil(Math.log2(360 * floatingPointPrecision));
};
export const convertToBinary = (
num: number,
@valentinbeggi
valentinbeggi / serverless-esbuild.patch
Created February 10, 2023 15:47
serverless-esbuild-patch
diff --git a/dist/pack.js b/dist/pack.js
index 4582cb1ad12e8eb67843e8268674680d886feaa5..394fb9d743777d1003d4e8f53b765807cd729cfe 100644
--- a/dist/pack.js
+++ b/dist/pack.js
@@ -65,10 +65,10 @@ const filterFilesForZipPackage = ({ files, functionAlias, includedFiles, exclude
// if no externals is set or if the provider is google, we do not need any files from node_modules
if (!hasExternals || isGoogleProvider)
return false;
- if (
- // this is needed for dependencies that maps to a path (like scoped ones)