Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '24'
- run: yarn install
- run: yarn lint
unit:
Expand All @@ -16,6 +16,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '24'
- run: yarn install
- run: yarn unit
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.19.0
v24.11.0
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ AWS credentials needs to be configured before you can run any CDK commands, do t
2. run `yarn install`

# Commands
| Command | Result |
| ----------- | ----------- |
| Command | Result |
| --------------- | -------------------------------------------------------- |
| yarn test | runs all linting and unit tests |
| yarn bootstrap | anytime you update aws-cdk you must boostrap the project |
| yarn synth | synthesizes stack to check for errors before deploying |
| yarn deploy | deploys couldformation stack to AWS |
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
"deploy": "cdk deploy --all"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "3.946.0",
"@aws-sdk/lib-dynamodb": "3.946.0",
"constructs": "10.4.3",
"@aws-sdk/client-dynamodb": "3.1024.0",
"@aws-sdk/lib-dynamodb": "3.1024.0",
"constructs": "10.6.0",
"source-map-support": "0.5.21"
},
"devDependencies": {
"@troyblank/eslint-config-troyblank": "2.4.0",
"@types/chance": "1.1.7",
"@types/aws-lambda": "8.10.159",
"@types/aws-lambda": "8.10.161",
"@types/jest": "30.0.0",
"@types/node": "24.10.1",
"aws-cdk": "2.1031.0",
"aws-cdk-lib": "2.221.0",
"@types/node": "25.5.2",
"aws-cdk": "2.1117.0",
"aws-cdk-lib": "2.248.0",
"aws-lambda": "1.0.7",
"chance": "1.1.13",
"esbuild": "0.27.1",
"jest": "30.2.0",
"ts-jest": "29.4.6",
"typescript": "5.9.3"
"esbuild": "0.28.0",
"jest": "30.3.0",
"ts-jest": "29.4.9",
"typescript": "6.0.2"
},
"author": "Troy Blank",
"license": "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion src/types/lambdas/foodHow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export type ShoppingListItem = {
amount: number,
name: string,
store: ShoppingItemStore,
recipe?: string,
purpose?: string,
type: ShoppingItemType,
}
4 changes: 2 additions & 2 deletions src/utils/foodHow/shoppingListItem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Shopping List util', () => {
expect(isAShoppingListItem(mockShoppingListItem())).toBe(true)
expect(isAShoppingListItem({
...mockShoppingListItem(),
recipe: chance.word(),
purpose: chance.word(),
})).toBe(true)
expect(isAShoppingListItem(undefined)).toBe(false)
expect(isAShoppingListItem({
Expand All @@ -41,7 +41,7 @@ describe('Shopping List util', () => {
})).toBe(false)
expect(isAShoppingListItem({
...mockShoppingListItem(),
recipe: chance.integer(),
purpose: chance.integer(),
})).toBe(false)
expect(isAShoppingListItem({
...mockShoppingListItem(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/foodHow/shoppingListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ export const isAShoppingItemStore = (shoppingItemStore: any): boolean => {
}

export const isAShoppingListItem = (shoppingListItem: any): boolean => {
const { amount, name, recipe, type, store } = shoppingListItem || {}
const { amount, name, purpose, type, store } = shoppingListItem || {}

return (
typeof amount === 'number' &&
typeof name === 'string' && name.length > 0 &&
(recipe === undefined || typeof recipe === 'string') &&
(purpose === undefined || typeof purpose === 'string') &&
isAShoppingItemType(type) &&
isAShoppingItemStore(store)
)
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./node_modules/@types"
"types": [
"node",
"jest",
"aws-lambda"
]
},
"exclude": [
Expand Down
Loading
Loading