New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serverless-webpack

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-webpack - npm Package Compare versions

Comparing version 5.3.2 to 5.3.3

.eslintrc.yml

8

lib/packagers/yarn.js

@@ -65,3 +65,9 @@ 'use strict';

.then(processOutput => processOutput.stdout)
.then(depJson => BbPromise.try(() => JSON.parse(depJson)))
.then(stdout =>
BbPromise.try(() => {
const lines = Utils.splitLines(stdout);
const parsedLines = _.map(lines, Utils.safeJsonParse);
return _.find(parsedLines, line => line && line.type === 'tree');
})
)
.then(parsedTree => {

@@ -68,0 +74,0 @@ const convertTrees = trees =>

35

lib/packExternalModules.js

@@ -97,10 +97,28 @@ 'use strict';

this.options.verbose && this.serverless.cli.log(`Adding explicit peers for dependency ${module.external}`);
const peerModules = getProdModules.call(
this,
_.map(peerDependencies, (value, key) => ({ external: key })),
packagePath,
dependencyGraph,
forceExcludes
);
Array.prototype.push.apply(prodModules, peerModules);
const peerDependenciesMeta = require(modulePackagePath).peerDependenciesMeta;
if (!_.isEmpty(peerDependenciesMeta)) {
_.forEach(peerDependencies, (value, key) => {
if (peerDependenciesMeta[key] && peerDependenciesMeta[key].optional === true) {
this.options.verbose &&
this.serverless.cli.log(
`Skipping peers dependency ${key} for dependency ${module.external} because it's optional`
);
_.unset(peerDependencies, key);
}
});
}
if (!_.isEmpty(peerDependencies)) {
const peerModules = getProdModules.call(
this,
_.map(peerDependencies, (value, key) => ({ external: key })),
packagePath,
dependencyGraph,
forceExcludes
);
Array.prototype.push.apply(prodModules, peerModules);
}
}

@@ -428,1 +446,2 @@ } catch (e) {

};

@@ -99,2 +99,14 @@ 'use strict';

function safeJsonParse(str) {
try {
return JSON.parse(str);
} catch (e) {
return null;
}
}
function splitLines(str) {
return _.split(str, /\r?\n/);
}
module.exports = {

@@ -105,3 +117,5 @@ guid,

SpawnError,
spawnProcess
spawnProcess,
safeJsonParse,
splitLines
};

@@ -99,4 +99,8 @@ 'use strict';

_.forEach(functions, (func, index) => {
const entry = getEntryForFunction.call(this, functions[index], this.serverless.service.getFunction(func));
_.merge(entries, entry);
const loadedFunc = this.serverless.service.getFunction(func);
const runtime = loadedFunc.runtime || this.serverless.service.provider.runtime;
if (runtime.match(/^node/)) {
const entry = getEntryForFunction.call(this, functions[index], loadedFunc);
_.merge(entries, entry);
}
});

@@ -149,2 +153,7 @@ }

}
// Default node
if (!this.webpackConfig.node || _.isEmpty(this.webpackConfig.node)) {
this.webpackConfig.node = false;
}

@@ -151,0 +160,0 @@ // Custom output path

{
"name": "serverless-webpack",
"version": "5.3.2",
"version": "5.3.3",
"description": "Serverless plugin to bundle your javascript with Webpack",

@@ -56,3 +56,3 @@ "main": "index.js",

"is-builtin-module": "^3.0.0",
"lodash": "^4.17.15",
"lodash": "^4.17.19",
"semver": "^6.2.0",

@@ -59,0 +59,0 @@ "ts-node": "^8.3.0"

@@ -759,135 +759,4 @@ # Serverless Webpack

* 5.3.1
* Fixed bug that prevented to use handlers using import [#505][link-505]
* Do not print empty lines in webpack stats [#499][link-499]
* Added git hooks to improved code quality and developer experience [#496][link-496]
See [CHANGELOG.md](./CHANGELOG.md)
* 5.3.0
* Restore compatibility with TypeScript [#449][link-449] [#465][link-465]
* Allow glob for excludeFiles [#471][link-471]
* Support Webpack 5 [#472][link-472]
* Use colored output depending on tty [#480][link-480]
* Allow to keep webpack folder [#453][link-453] [#467][link-467]
* Add ability to exclude files from handler lookup [#433][link-433]
* Documentation fixes [#429][link-429]
* 5.2.0
* Show info message in verbose mode if aws-sdk has been excluded automatically [#393][link-393]
* Added support for asynchronous webpack configuration [#412][link-412]
* Better error message if handlers are not found [#418][link-418]
* 5.1.5
* Re-publish of 5.1.4 without yarn.lock
* 5.1.4
* Fix support for Yarn resolutions definitions [#379][link-379]
* Better debugging for "Unable to import module ..." errors: Detect runtime dependencies that are only declared as devDependencies [#384][link-384]
* Documentation updates [#382][link-382]
* 5.1.3
* Fixed issue with Yarn and file references as dependencies [#370][link-370]
* 5.1.2
* Fixed issue that leads to `Unexpected end of JSON` in projects with lots of dependencies [#309][link-309][#373][link-373]
* Update webpack-4 example with VSCode debugging configuration [#365][link-365]
* 5.1.1
* Fixed local invoke watch mode not executing changed files [#349][link-349]
* Added Webpack 4 example [#355][link-355]
* Documentation updates [#354][link-354]
* 5.1.0
* Support Yarn [#286][link-286]
* Allow local invoke to use existing compiled output [#341][link-341] [#275][link-275]
* Support custom packager scripts [#343][link-343] [#342][link-342]
* 5.0.0
* Support Webpack 4 [#331][link-331] [#328][link-328]
* BREAKING: Drop support for Webpack 2
* Allow to check for local invocation in the webpack configuration [#232][link-232]
* New centralized configuration with fallback to the old one [#336][link-336]
* Improved unit tests and actual coverage calculation [#337][link-337]
* 4.4.0
* Support serverless-step-functions-offline [#313][link-313]
* Fixed webpack documentation links [#326][link-326]
* Abstracted packager interface [#329][link-329]
* 4.3.0
* Add new `webpack:compile:watch:compile` event [#315][link-315]
* Added note to README about using yarn [#316][link-316]
* Made babel dynamic example the default babel example [#253][link-253]
* Documentation fixes [#317][link-317] [#321][link-321]
* 4.2.0
* Support local file references in package.json [#263][link-263]
* Updated used tools (dev dependencies)
* 4.1.0
* Prohibit manual entry configuration with individual packaging [#272][link-272]
* Fixed bug with stats in webpack config for individual packaging [#278][link-278]
* Fixed bug with startup order in combination with serverless-offline [#279][link-279]
* Default target to "node" if not set [#276][link-276]
* Support `serverless run` including watch mode [#269][link-269]
* 4.0.0
* BREAKING: Expose lifecycle events for plugin authors [#254][link-254]
* Fixed deprecated hook warning [#126][link-126]
* Support forceExclude option for external modules [#247][link-247]
* Support stats output configuration in webpack config [#260][link-260]
* Google: Only integrate package.json but not node modules into artifact [#264][link-264]
* Documentation fixes and updates [#265][link-265]
* Updated examples [#250][link-250]
* 3.1.2
* Fix issue where dependencies with dots in their names would not be installed [#251][link-251]
* 3.1.1
* Fix issue where locked dependencies (package-lock.json) were ignored [#245][link-245]
* 3.1.0
* Allow filesystem polling in watch mode (`--webpack-use-polling`) [#215][link-215]
* Allow forced include of not referenced modules [#217][link-217]
* Automatically include peer dependencies of used modules [#223][link-223]
* Show explicit message if the provided webpack config can not be loaded [#234][link-234]
* Improve examples [#227][link-227]
* Update 3rd party provider compatibility table [#221][link-221]
* Added automatic Travis and Coveralls builds to increase stability
* 3.0.0
* Integrate with `serverless invoke local` [#151][link-151]
* Support watch mode with `serverless invoke local --watch`
* Stabilized and improved the bundling of node modules [#116][link-116], [#117][link-117]
* Improved interoperability with Serverless and 3rd party plugins [#173][link-173]
* Support individual packaging of the functions in a service [#120][link-120]
* Allow setting stdio max buffers for NPM operations [#185][link-185]
* Support bundling of node modules via node-externals whitelist [#186][link-186]
* Removed the `webpack serve` command in favor of [`serverless-offline`][link-serverless-offline] [#152][link-152]
* Updated examples [#179][link-179]
* Added missing unit tests to improve code stability
* Fixed unit tests to run on Windows [#145][link-145]
* 2.2.2
* Reverted breaking change introduced in default output config [#202][link-202]
* 2.2.1
* Restore functionality for Google provider [#193][link-193]
* 2.2.0
* Allow full dynamic configurations [#158][link-158]
* Fix a bug that prevented the entries lib export to work with TypeScript [#165][link-165]
* 2.1.0
* Added support for webpack configuration in TypeScript format [#129][link-129]
* Fixed bug with serverless-offline exec [#154][link-154]
* Added unit tests for cleanup. Updated test framework [#11][link-11]
* Support single function deploy and packaging [#107][link-107]
* Fixed path exception bug with individual packaging and SLS 1.18 [#159][link-159]
* 2.0.0
* Support arbitrary Webpack versions as peer dependency [#83][link-83]
* Support `serverless offline start` invocation [#131][link-131]
* Documentation updates [#88][link-88], [#132][link-132], [#140][link-140], [#141][link-141], [#144][link-144]
* Print Webpack stats on recompile [#127][link-127]
[ico-serverless]: http://public.serverless.com/badges/v3.svg

@@ -894,0 +763,0 @@ [ico-license]: https://img.shields.io/github/license/serverless-heaven/serverless-webpack.svg

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc