35 Commits

Author SHA1 Message Date
Frank Schmid b379de95f8 Utils unit tests
Enhance error message

Removed deprecated option from README

Convert all outstanding changes (yarn and package)

Adjusted NPM unit tests

Use spawn in any npm commands

Use spawn instead of exec

Fix unit test description

Do not swallow errors in case npm ls fails without a proper stdout
2018-04-25 18:05:37 +02:00
Frank Schmid dc98de4b14 Fixed ESLint after eslint plugin update 2018-03-21 10:45:04 +01:00
Frank Schmid d8a5f8da41 Allow to configure package scripts 2018-03-12 11:41:07 +01:00
Frank Schmid bcd8dd65e6 Yarn support
Unit tests

Added unit tests for copy modules packager flag

npm must copy modules

Fixed unit tests

Yarn does not need to copy modules to be fast

Install/prune unit tests. Fixed typo.

Copy lock file only if it can be read. AAdjust unit tests.

Copy lock file into function directories

Only stringify JSON or YML lock files

Fixed unit tests

Add basic Yarn functionality
2018-03-09 11:25:58 +01:00
Frank Schmid d7c5f8a6e3 Drop unnecessary prefix for includeModules setting 2018-03-07 19:17:38 +01:00
Frank Schmid 8f355dae72 Added unit tests. Count all files for coverage. 2018-03-07 12:12:48 +01:00
Frank Schmid e195cb0b44 Unify configuration. 2018-03-07 12:12:08 +01:00
Frank Schmid 891a6b3883 Merge remote-tracking branch 'remotes/upstream/master' into v5 2018-03-02 14:16:58 +01:00
Frank Schmid fee494763f Abstract packager into own interface
Extended pack external unit tests

Added unit tests for npm packager

Adapted unit tests

Exclude test.js files from nyc statistics

Added unit test for packager factory

Extract optional lock file adaption

Fixed ESLint

ESLint fixes

Moved npm to a separate packager class.
2018-03-01 15:30:33 +01:00
Janic Duplessis 0c465e2703 Use chunk.forEachModules instead of deprecated chunk.modules 2018-02-26 04:50:51 -05:00
Francisco GuimarĂ£es c0c12d2b06 Fix npm file references package lock (#304)
* Rebase package-lock

* Fix rebasePackageLock call

* Adding tests for package-lock file rewrite

* Fix comment
2017-12-18 16:52:03 +01:00
Frank Schmid 697be1e869 Do not rebase on absolute file references 2017-11-18 11:38:04 +01:00
Frank Schmid 3404001db0 Rebase file references 2017-11-17 11:47:58 +01:00
Frank Schmid e5efb8fb31 Changed to early exit semantics in packaging for google 2017-10-31 14:58:54 +01:00
Debanjan Basu 8ede2a738e update to support google cloud functions 2017-10-30 11:17:05 +11:00
Debanjan Basu 66311c8add upgraded some stuff 2017-10-30 10:48:22 +11:00
Joseph Lee Hunsaker 5c9f14d53f Make serverless-webpack more extensible (#254)
* Make serverless-webpack more extensible

Use PluginManager to make serverless-webpack more extensible 

Following the advice from serverless blog on Advanced Plugin Development. https://serverless.com/blog/advanced-plugin-development-extending-the-core-lifecycle/

* use sublifecycle with webpack command

* Use new lifecycles and adapt unit tests

* Fixed unit test after merge

* Use new events everywhere

* Added section to README
2017-10-23 15:29:17 +02:00
Frank Schmid c2a368b1f4 Support forceExclude to exclude dependencies (#248)
* Support forceExclude to exclude dependencies

* Added unit test

* Added documentation
2017-10-19 11:03:52 +02:00
Frank Schmid c85d044f1f Do not let lodash parse module names as path elements 2017-10-11 01:51:19 +02:00
Frank Schmid 85b60bfde5 Use package-lock.json to install packages if there is one available. (#246)
* Use package-lock.json to install packages if there is one available.

* Pre-create composite package.json to use lock accordingly

* Fixed unit tests

* Increase coverage
2017-10-03 15:36:27 +02:00
Frank Schmid 68104f6aa5 Add and include peer dependencies (#231)
* Add and include 2nd level peer dependencies

* Only inspect peers for direct dependencies

* Added unit tests for peer dependencies
2017-09-21 11:58:53 +02:00
Frank Schmid 60680f4fd5 Added forceInclude setting to add dynamically required modules explicitly (#226)
* Added forceInclude setting to add dynamically required modules explicitly

* Added unit tests for forced includes

* Document forceInclude in README
2017-09-19 12:47:56 +02:00
Frank Schmid 29da13b305 Ignore irrelevant NPM problems when building the dependency graph 2017-09-07 13:42:50 +02:00
Frank Schmid 269609e731 Support transient dependencies when bundling (whitelisting) node modules 2017-08-09 18:12:59 +02:00
Matt Hodgson 8062264b4b Allow setting of maxBuffer for packing external modules (v3) (#185)
* Update packExternalModules.js

* Update package.json
2017-08-09 15:23:24 +02:00