From 169ad0cc034b68c7f6a6060b6f16ee7187551511 Mon Sep 17 00:00:00 2001 From: Victor Korzunin Date: Sun, 13 Dec 2020 12:17:48 +0100 Subject: [PATCH 1/2] revert: revert postinstall script fix #8 --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8153c2c..127dfff 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ ], "scripts": { "prepublishOnly": "npm run build", - "postinstall": "npm run build", "precommit": "npm run lint", "build": "npm run clean && tsc", "clean": "rm -rf ./dist", From e34480ce73d33680c9568d87fb30c989d3f53d98 Mon Sep 17 00:00:00 2001 From: Victor Korzunin Date: Sun, 13 Dec 2020 15:41:11 +0100 Subject: [PATCH 2/2] fix: let overwrite exclude option defauls fix #9 --- src/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/function.ts b/src/function.ts index 0201a8c..c5e9b67 100644 --- a/src/function.ts +++ b/src/function.ts @@ -30,7 +30,7 @@ export class NodejsFunction extends lambda.Function { const withDefaultOptions = mergeRight(DEFAULT_BUILD_OPTIONS); const buildOptions = withDefaultOptions(props.esbuildOptions ?? {}); - const exclude = union(props.exclude || [], ['aws-sdk']); + const exclude = props.exclude ?? ['aws-sdk']; const packager = props.packager ?? true; const handler = props.handler ?? 'index.handler'; const defaultRuntime = nodeMajorVersion() >= 12