Skip to content

Commit 116d02a

Browse files
authored
Merge pull request #43 from digitalmaas/bugfix/graceful-again
Bugfix/graceful again
2 parents fd2a8a5 + 35bcd56 commit 116d02a

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

.releaserc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ const preset = 'conventionalcommits'
1010
module.exports = {
1111
branches: [
1212
{
13-
name: 'master',
14-
prerelease: false,
15-
channel: 'stable'
13+
name: 'master'
1614
},
1715
{
1816
name: 'next',

lib/bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function bundle (functionName) {
3434
}
3535
return Bb.bind(this).return(data).then(zipIt).then(clean)
3636
})
37+
.catch(err => (err instanceof errors.SkipFunctionError ? {} : Promise.reject(err)))
3738
}
3839

3940
function bootstrap (functionName) {

lib/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ class BrowserifierPlugin {
3434
// handles `sls invoke local`
3535
'before:invoke:local:invoke': this.prepareAndBundleFunction.bind(this, true)
3636
}
37+
this._s.configSchemaHandler.defineFunctionProperties('browserify', {
38+
type: 'object',
39+
minProperties: 1,
40+
additionalProperties: true,
41+
properties: {
42+
disable: { type: 'boolean' }
43+
}
44+
})
3745
}
3846

3947
initialise () {

lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
},
1818

1919
_validateFunction (data) {
20-
if (get(data, 'functionBrowserifyConfig.disable', this._b.isDisabled)) {
20+
if (get(data, 'functionObject.browserify.disable', this._b.isDisabled)) {
2121
throw new errors.SkipFunctionError(data.functionName, 'bundling disabled')
2222
}
2323
const node = this._b.runtimeIsNode ? 'nodejs' : ''

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"filesize": "^3.6.1",
1616
"fs-extra": "^8.1.0",
1717
"globby": "^9.2.0",
18-
"graceful-fs": "^4.2.6",
18+
"graceful-fs": "4.2.6",
1919
"lodash": "^4.17.21",
2020
"semver": "^6.3.0"
2121
},

0 commit comments

Comments
 (0)