From 900fd59d98e0bb537a70dd8d81965602eac17021 Mon Sep 17 00:00:00 2001 From: ChangHun Yoon Date: Wed, 8 Nov 2023 12:14:21 +0900 Subject: [PATCH] fix: prevent error by running pnpm --- packages/pipeline/src/pdk-pipeline.ts | 2 +- .../__snapshots__/pdk-pipeline.test.ts.snap | 40 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/pipeline/src/pdk-pipeline.ts b/packages/pipeline/src/pdk-pipeline.ts index 882b7b892..c77c15d64 100644 --- a/packages/pipeline/src/pdk-pipeline.ts +++ b/packages/pipeline/src/pdk-pipeline.ts @@ -315,7 +315,7 @@ export class PDKPipeline extends Construct { BRANCH: branch, } : undefined, - installCommands: ["npm install -g aws-cdk", "npx projen install"], + installCommands: ["npm install -g aws-cdk pnpm", "npx projen install"], commands: commands && commands.length > 0 ? commands : ["npx projen build"], primaryOutputDirectory: props.primarySynthDirectory, diff --git a/packages/pipeline/test/__snapshots__/pdk-pipeline.test.ts.snap b/packages/pipeline/test/__snapshots__/pdk-pipeline.test.ts.snap index f73d86577..23c14cba3 100644 --- a/packages/pipeline/test/__snapshots__/pdk-pipeline.test.ts.snap +++ b/packages/pipeline/test/__snapshots__/pdk-pipeline.test.ts.snap @@ -1214,7 +1214,7 @@ exports[`PDK Pipeline Unit Tests CrossAccount - using AwsPrototyping NagPack 1`] "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -1724,7 +1724,7 @@ exports[`PDK Pipeline Unit Tests CrossAccount - using AwsPrototyping NagPack 1`] "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"b95c36f6eb9f5a26700f64ea5cf1304dc0d5410eb6bec52bc0186daa29e0935a"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"1743fe23e45e6f2b0fdc043d5f0f1105f88a2596949f76d42fb43084b867d9ae"}]", "ProjectName": { "Ref": "CrossAccountCodePipelineBuildSynthCdkBuildProject938B55FC", }, @@ -4769,7 +4769,7 @@ exports[`PDK Pipeline Unit Tests CrossAccount 1`] = ` "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -5279,7 +5279,7 @@ exports[`PDK Pipeline Unit Tests CrossAccount 1`] = ` "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"b95c36f6eb9f5a26700f64ea5cf1304dc0d5410eb6bec52bc0186daa29e0935a"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"1743fe23e45e6f2b0fdc043d5f0f1105f88a2596949f76d42fb43084b867d9ae"}]", "ProjectName": { "Ref": "CrossAccountCodePipelineBuildSynthCdkBuildProject938B55FC", }, @@ -8254,7 +8254,7 @@ exports[`PDK Pipeline Unit Tests Defaults - using AwsPrototyping NagPack 1`] = ` "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -8604,7 +8604,7 @@ exports[`PDK Pipeline Unit Tests Defaults - using AwsPrototyping NagPack 1`] = ` "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"b95c36f6eb9f5a26700f64ea5cf1304dc0d5410eb6bec52bc0186daa29e0935a"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"1743fe23e45e6f2b0fdc043d5f0f1105f88a2596949f76d42fb43084b867d9ae"}]", "ProjectName": { "Ref": "DefaultsCodePipelineBuildSynthCdkBuildProject81772484", }, @@ -11563,7 +11563,7 @@ exports[`PDK Pipeline Unit Tests Defaults 1`] = ` "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -11913,7 +11913,7 @@ exports[`PDK Pipeline Unit Tests Defaults 1`] = ` "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"b95c36f6eb9f5a26700f64ea5cf1304dc0d5410eb6bec52bc0186daa29e0935a"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"1743fe23e45e6f2b0fdc043d5f0f1105f88a2596949f76d42fb43084b867d9ae"}]", "ProjectName": { "Ref": "DefaultsCodePipelineBuildSynthCdkBuildProject81772484", }, @@ -15018,7 +15018,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - feature/new-feature_branch - "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"fc611c0bd04ae525000a320a634f88ca9159f13795ba25ded94e393e09e5ce4d"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"cda937ea5a32a46d627143d1e839157aea48872506d8f88c70823c2b4b18562c"}]", "ProjectName": { "Ref": "featurenewfeaturebranchFeatureBranchesCodePipelineBuildSynthCdkBuildProjectF14755B5", }, @@ -15303,7 +15303,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - feature/new-feature_branch - "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -17738,7 +17738,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - feature/new-feature_branch 1 "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"fc611c0bd04ae525000a320a634f88ca9159f13795ba25ded94e393e09e5ce4d"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"cda937ea5a32a46d627143d1e839157aea48872506d8f88c70823c2b4b18562c"}]", "ProjectName": { "Ref": "featurenewfeaturebranchFeatureBranchesCodePipelineBuildSynthCdkBuildProjectF14755B5", }, @@ -18023,7 +18023,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - feature/new-feature_branch 1 "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -20314,7 +20314,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - mainline - using AwsPrototyp "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -20664,7 +20664,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - mainline - using AwsPrototyp "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"16abd1d0ace14f5ae316c1392d6178562bdf17a2e8378181ba9b958cc37f07f2"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"134ecd927cb9331d34b9be2ddc861adce7834b79d0b5a94ba11f6fee3dd6036d"}]", "ProjectName": { "Ref": "FeatureBranchesCodePipelineBuildSynthCdkBuildProject09632D29", }, @@ -24213,7 +24213,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - mainline 1`] = ` "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -24563,7 +24563,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - mainline 1`] = ` "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"16abd1d0ace14f5ae316c1392d6178562bdf17a2e8378181ba9b958cc37f07f2"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"134ecd927cb9331d34b9be2ddc861adce7834b79d0b5a94ba11f6fee3dd6036d"}]", "ProjectName": { "Ref": "FeatureBranchesCodePipelineBuildSynthCdkBuildProject09632D29", }, @@ -28112,7 +28112,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - using AwsPrototyping NagPack "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -28462,7 +28462,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches - using AwsPrototyping NagPack "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"16abd1d0ace14f5ae316c1392d6178562bdf17a2e8378181ba9b958cc37f07f2"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"134ecd927cb9331d34b9be2ddc861adce7834b79d0b5a94ba11f6fee3dd6036d"}]", "ProjectName": { "Ref": "FeatureBranchesCodePipelineBuildSynthCdkBuildProject09632D29", }, @@ -32011,7 +32011,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches 1`] = ` "phases": { "install": { "commands": [ - "npm install -g aws-cdk", + "npm install -g aws-cdk pnpm", "npx projen install" ] }, @@ -32361,7 +32361,7 @@ exports[`PDK Pipeline Unit Tests Feature Branches 1`] = ` "Version": "1", }, "Configuration": { - "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"16abd1d0ace14f5ae316c1392d6178562bdf17a2e8378181ba9b958cc37f07f2"}]", + "EnvironmentVariables": "[{"name":"_PROJECT_CONFIG_HASH","type":"PLAINTEXT","value":"134ecd927cb9331d34b9be2ddc861adce7834b79d0b5a94ba11f6fee3dd6036d"}]", "ProjectName": { "Ref": "FeatureBranchesCodePipelineBuildSynthCdkBuildProject09632D29", },