diff --git a/changelog.md b/changelog.md index 5cdc0f0..72ed950 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,14 @@ --- +## [3.5.1] 2023-11-19 + +### Added + +- Added additional dependency ignoring property case: `ignoreDependencies` or `ignoredDependencies` can now be used; `ignoreDependencies` is preferred + +--- + ## [3.5.0] 2023-10-31 ### Added diff --git a/src/actions/autoinstall/node/get-lambda-deps.js b/src/actions/autoinstall/node/get-lambda-deps.js index 94224e3..c138c51 100644 --- a/src/actions/autoinstall/node/get-lambda-deps.js +++ b/src/actions/autoinstall/node/get-lambda-deps.js @@ -3,7 +3,7 @@ let { globSync } = require('glob') let { destroyPath, ignoreDeps } = require('../../../lib') let getRequires = require('./find-lambda-deps') -module.exports = function getDirDeps ({ dir, update, inventory, ignoredDependencies }) { +module.exports = function getDirDeps ({ dir, update, inventory, ignored }) { // Clean everything (except the root) out before we get going jic let isRoot = dir === inventory.inv._project.cwd if (!isRoot) { @@ -35,7 +35,7 @@ module.exports = function getDirDeps ({ dir, update, inventory, ignoredDependenc // However, due to SDK version differences between older vs. newer Node.js Lambda containers, that may not actually necessarily be the case, so flag them let awsSdkV2 = deps.some(d => d === 'aws-sdk') let awsSdkV3 = deps.some(d => d.startsWith('@aws-sdk')) - deps = deps.filter(d => d !== 'aws-sdk' && !d.startsWith('@aws-sdk') && !ignoredDependencies?.includes(d)) + deps = deps.filter(d => d !== 'aws-sdk' && !d.startsWith('@aws-sdk') && !ignored?.includes(d)) return { deps, failures, files, awsSdkV2, awsSdkV3 } } diff --git a/src/actions/autoinstall/node/index.js b/src/actions/autoinstall/node/index.js index a599791..be861c3 100644 --- a/src/actions/autoinstall/node/index.js +++ b/src/actions/autoinstall/node/index.js @@ -69,10 +69,11 @@ module.exports = function treeshakeNode (nodeDirs, params) { let lambda = inventory.inv.lambdasBySrcDir[dir] if (Array.isArray(lambda)) lambda = lambda[0] // Multi-tenant Lambda check let { config, name, pragma } = lambda - let { runtime, ignoredDependencies } = config + let { runtime } = config + let ignored = config.ignoreDependencies || config.ignoredDependencies try { - let result = getLambdaDeps({ dir, update, inventory, ignoredDependencies }) + let result = getLambdaDeps({ dir, update, inventory, ignored }) let { deps, files, awsSdkV2, awsSdkV3 } = result projectFiles += files.length failures = failures.concat(result.failures)