Skip to content

Commit

Permalink
Revert changes in dependencies due to node 6 restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
crash7 committed Aug 25, 2020
1 parent e297d82 commit c605024
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/plugins/package/lib/packageService.js
Expand Up @@ -4,7 +4,7 @@ const BbPromise = require('bluebird');
const path = require('path');
const globby = require('globby');
const _ = require('lodash');
const micromatch = require('micromatch');
const nanomatch = require('nanomatch');
const serverlessConfigFileUtils = require('../../../../lib/utils/getServerlessConfigFile');

module.exports = {
Expand Down Expand Up @@ -247,7 +247,7 @@ module.exports = {
// NOTE: please keep this order of concatenating the include params
// rather than doing it the other way round!
// see https://github.com/serverless/serverless/pull/5825 for more information
return globby(['**'].concat(params.include), {
return globby(['**/*'].concat(params.include), {
cwd: path.join(this.serverless.config.servicePath, prefix || ''),
dot: true,
silent: true,
Expand All @@ -257,14 +257,14 @@ module.exports = {
}).then(allFilePaths => {
const filePathStates = allFilePaths.reduce((p, c) => Object.assign(p, { [c]: true }), {});
patterns
// micromatch only does / style path delimiters, so convert them if on windows
// nanomatch only does / style path delimiters, so convert them if on windows
.map(p => {
return process.platform === 'win32' ? p.replace(/\\/g, '/') : p;
})
.forEach(p => {
const exclude = p.startsWith('!');
const pattern = exclude ? p.slice(1) : p;
micromatch(allFilePaths, [pattern], { dot: true }).forEach(key => {
nanomatch(allFilePaths, [pattern], { dot: true }).forEach(key => {
filePathStates[key] = !exclude;
});
});
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/package/lib/packageService.test.js
Expand Up @@ -624,7 +624,7 @@ describe('#packageService()', () => {

it('should exclude all and include function/handler.js', () => {
const params = {
exclude: ['**'],
exclude: ['**/*'],
include: [handlerFile],
};
serverless.config.servicePath = servicePath;
Expand All @@ -636,7 +636,7 @@ describe('#packageService()', () => {

it('should include file specified with `!` in exclude params', () => {
const params = {
exclude: ['**', `!${utilsFile}`],
exclude: ['**/*', `!${utilsFile}`],
include: [handlerFile],
};
serverless.config.servicePath = servicePath;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -47,7 +47,7 @@
"filesize": "^3.6.1",
"fs-extra": "^8.1.0",
"get-stdin": "^6.0.0",
"globby": "^11.0.1",
"globby": "^9.2.0",
"graceful-fs": "^4.2.4",
"https-proxy-agent": "^5.0.0",
"is-docker": "^1.1.0",
Expand All @@ -58,8 +58,8 @@
"jwt-decode": "^2.2.0",
"lodash": "^4.17.20",
"memoizee": "^0.4.14",
"micromatch": "^4.0.2",
"mkdirp": "^0.5.4",
"nanomatch": "^1.2.13",
"ncjsm": "^4.1.0",
"node-fetch": "^2.6.0",
"object-hash": "^2.0.3",
Expand Down

0 comments on commit c605024

Please sign in to comment.