Skip to content

Commit dd7b423

Browse files
committed
exclude pnpm on windows
1 parent 9f7c58e commit dd7b423

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/poc-e2e-flow-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
os: [ubuntu-latest, macos-latest, windows-latest]
4343
pkg-manager: [npm, yarn-classic, yarn-modern, pnpm]
4444
node-version: [20]
45+
exclude:
46+
- os: windows-latest
47+
pkg-manager: pnpm
4548
env:
4649
PACKAGE_MANAGER: ${{ matrix.pkg-manager }}
4750
runs-on: ${{ matrix.os }}

packages/create-amplify/src/package-manager-controller/yarn_modern_package_manager_controller.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as _path from 'path';
55
import { logger } from '../logger.js';
66
import { executeWithDebugLogger as _executeWithDebugLogger } from '../execute_with_logger.js';
77
import { PackageManagerController } from './package_manager_controller.js';
8+
import { DependencyType } from './package_manager_controller_factory.js';
89

910
/**
1011
* YarnModernPackageManagerController is an abstraction around yarn modern (yarn v2+) commands that are needed to initialize a project and install dependencies
@@ -35,6 +36,14 @@ export class YarnModernPackageManagerController extends PackageManagerController
3536
);
3637
}
3738

39+
installDependencies: (
40+
packageNames: string[],
41+
type: DependencyType
42+
) => Promise<void> = async () => {
43+
await this.addDependencies(this.projectRoot);
44+
await super.installDependencies([], 'dev');
45+
};
46+
3847
initializeTsConfig = async (targetDir: string) => {
3948
await this.addLockFile(targetDir);
4049
await this.addTypescript(targetDir);
@@ -67,4 +76,13 @@ export class YarnModernPackageManagerController extends PackageManagerController
6776
this.execa
6877
);
6978
};
79+
80+
private addDependencies = async (targetDir: string) => {
81+
await this.executeWithDebugLogger(
82+
targetDir,
83+
'yarn',
84+
['add', '-D', 'tsx', 'esbuild'],
85+
this.execa
86+
);
87+
};
7088
}

0 commit comments

Comments
 (0)