Created
May 16, 2021 15:50
-
-
Save shinnoki/e66cdb69b5b0325878f4a8dee7dee064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/packExternalModules.js b/lib/packExternalModules.js | |
index f45f6a6827e55c0363d005ed0a2d012cc60b3d46..0dd66e50edb29ca4861749cb65ece7fef51f1969 100644 | |
--- a/lib/packExternalModules.js | |
+++ b/lib/packExternalModules.js | |
@@ -335,10 +335,13 @@ module.exports = { | |
// (1.a.1) Create a package.json | |
const compositePackage = _.defaults( | |
{ | |
- name: this.serverless.service.service, | |
+ name: `${this.serverless.service.service}-dependencies`, | |
version: '1.0.0', | |
description: `Packaged externals for ${this.serverless.service.service}`, | |
private: true, | |
+ installConfig: { | |
+ hoistingLimits: "workspaces" | |
+ }, | |
scripts: packageScripts | |
}, | |
packageSections | |
@@ -387,10 +390,13 @@ module.exports = { | |
const modulePackageJson = path.join(modulePath, 'package.json'); | |
const modulePackage = _.defaults( | |
{ | |
- name: this.serverless.service.service, | |
+ name: `${this.serverless.service.service}-service`, | |
version: '1.0.0', | |
description: `Packaged externals for ${this.serverless.service.service}`, | |
private: true, | |
+ installConfig: { | |
+ hoistingLimits: "workspaces" | |
+ }, | |
scripts: packageScripts, | |
dependencies: {} | |
}, | |
diff --git a/lib/packagers/yarn.js b/lib/packagers/yarn.js | |
index 20730eec3429ee3bd271782198502265de11f206..66b7cf96674c61eb969cccc575dfae5a81b02814 100644 | |
--- a/lib/packagers/yarn.js | |
+++ b/lib/packagers/yarn.js | |
@@ -119,18 +119,18 @@ class Yarn { | |
static install(cwd, packagerOptions) { | |
const command = /^win/.test(process.platform) ? 'yarn.cmd' : 'yarn'; | |
- const args = [ 'install', '--non-interactive' ]; | |
+ const args = [ 'install' ]; | |
// Convert supported packagerOptions | |
- if (!packagerOptions.noFrozenLockfile) { | |
- args.push('--frozen-lockfile'); | |
- } | |
- if (packagerOptions.ignoreScripts) { | |
- args.push('--ignore-scripts'); | |
- } | |
- if (packagerOptions.networkConcurrency) { | |
- args.push(`--network-concurrency ${packagerOptions.networkConcurrency}`); | |
- } | |
+ // if (!packagerOptions.noFrozenLockfile) { | |
+ // args.push('--frozen-lockfile'); | |
+ // } | |
+ // if (packagerOptions.ignoreScripts) { | |
+ // args.push('--ignore-scripts'); | |
+ // } | |
+ // if (packagerOptions.networkConcurrency) { | |
+ // args.push(`--network-concurrency ${packagerOptions.networkConcurrency}`); | |
+ // } | |
return Utils.spawnProcess(command, args, { cwd }).return(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment