Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENHANCEMENT: Zipper is assuming all production dependencies needed; no dependency filter #2

Open
amp5208 opened this issue Apr 12, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@amp5208
Copy link

amp5208 commented Apr 12, 2019

Use Cases:
Precondition:

  • Nike-Inc/lambda-zipper dependency
  • A GitHub repository that looks like this:
.
  ├── ...
  ├── lambda1/
  │   └── ...
  │   └── package.json
  ├── lambda2/
  │   └── ...
  │   └── package.json
  ├── nodejsReactUI/
  │   └── ...
  │   └── package.json
  ├── package.json

GIVEN a lambda component and handler within a product sub-directory (e.g., lambda1
AND another NodeJS component within another product sub-directory (e.g., lambda2 or nodejsReactUI)
AND a root package.json and individual component package.json definitions
WHEN I package lambda1 using the Nike-Inc/lambda-zipper tool
AND provide a whitelisted filter in the following pattern: [:alpha:].+($YOUR_FILTER_TEXT)[:alpha:].+
THEN lambda1 component is packaged using only the filtered production NodeJS dependencies
AND the lambda2 and nodejsReactUI components can be packed separately, with different filters
Post-condition: lambda2 and nodejsReactUI components are packed with a different filter

Problem Statement: As a Dev/Ops engineer, I want to be able to have an easy way to package my AWS Lambda code with different dependencies than my other product modules, even if the product is wholly housed in a single repository. This provides me value so that CI automation tools do not have to be custom configured to perform separate NPM install actions within sub folders, and ensures that AWS Lambda packages remain small.

Note: Issue will be resolved by including pre-filtering on production NPM dependencies at effecting this line of code:

let npm = exec('npm ls --prod --parseable', { cwd: workingDir })

@kyeotic kyeotic added the enhancement New feature or request label Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants