Skip to content

Commit a74bdea

Browse files
committed
docs: update README.md and project configuration for Yarn workspaces
1 parent 09ffb67 commit a74bdea

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

typescript/postgres-lambda/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!jest.config.js
33
*.d.ts
44
node_modules
5-
**/node_modules
5+
#**/node_modules
66

77
!lambda/*/*.js
88

typescript/postgres-lambda/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ SELECT validate_data('{"id": 789, "value": "valid data"}'::JSONB);
144144
├── test/ # Unit tests
145145
├── setup-postgres-lambda.sql # Reference SQL (now automated)
146146
├── test-lambda.sh # Lambda testing script
147+
├── .yarn/ # Yarn 2+ configuration
147148
└── README.md # This file
148149
```
149150

@@ -155,11 +156,11 @@ This project uses Yarn Workspaces to manage multiple packages in a monorepo stru
155156
# List all workspaces
156157
yarn workspaces list
157158

158-
# Run a command in all Lambda workspaces
159-
yarn workspaces foreach -v --include '@lambda/*' run <command>
159+
# Run a command in all workspaces
160+
yarn workspaces foreach -v -A run <command>
160161

161162
# Run a command in a specific workspace
162-
yarn workspace @lambda/lambda-to-postgres run <command>
163+
yarn workspace postgres-to-lambda run <command>
163164

164165
# Install dependencies for all workspaces
165166
yarn install
@@ -240,6 +241,12 @@ Before using in production:
240241
### Useful Commands
241242

242243
```bash
244+
# Build all packages
245+
yarn build
246+
247+
# Build only Lambda functions
248+
yarn build:lambda
249+
243250
# Build and watch for changes
244251
yarn watch
245252

typescript/postgres-lambda/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"build:lambda": "yarn workspaces foreach -v -A run build",
1313
"watch": "tsc -w",
1414
"test": "jest",
15-
"cdk": "cdk"
15+
"cdk": "cdk",
16+
"install-deps": "cd lambda/lambda-to-postgres && npm install --prefix ./deps && cd ../../lambda/postgres-to-lambda && npm install --prefix ./deps && cd ../../lambda/postgres-setup && npm install --prefix ./deps"
1617
},
1718
"devDependencies": {
1819
"@types/jest": "^29.5.14",
@@ -28,5 +29,6 @@
2829
"aws-cdk-lib": "^2.204.0",
2930
"constructs": "^10.4.2",
3031
"esbuild": "^0.25.6"
31-
}
32+
},
33+
"packageManager": "[email protected]"
3234
}

0 commit comments

Comments
 (0)