From 55ed31529bc6235019ac511484ca4dc456bc5f39 Mon Sep 17 00:00:00 2001 From: Stivenjs Date: Thu, 5 Jun 2025 10:17:44 -0500 Subject: [PATCH 1/2] chore(amplify): update npm install command and Node version compatibility This commit modifies the npm command in amplify.yml from npm ci to npm install for improved dependency management. Additionally, it updates the Node version requirement in package.json to allow versions greater than or equal to 20.0.0, ensuring compatibility with newer Node.js releases. Furthermore, it updates the AWS Amplify backend dependencies to their latest versions, enhancing the overall build process. --- amplify.yml | 15 +++++++++++++-- package.json | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/amplify.yml b/amplify.yml index e69489b5..22832d25 100644 --- a/amplify.yml +++ b/amplify.yml @@ -1,12 +1,22 @@ version: 1 backend: phases: + preBuild: + commands: + - nvm install 22 + - nvm use 22 build: commands: - npm ci --cache .npm --prefer-offline - - npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID + - npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID + frontend: phases: + preBuild: + commands: + - nvm use 22 + - npm ci + build: commands: - npm run build @@ -18,4 +28,5 @@ frontend: paths: - .next/cache/**/* - .npm/**/* - - node_modules/**/* \ No newline at end of file + - node_modules/**/* + diff --git a/package.json b/package.json index 49f69fc1..10673831 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test:coverage": "jest --coverage" }, "engines": { - "node": "22.12.0" + "node": ">=22" }, "lint-staged": { "*.{js,jsx,ts,tsx,json,css,scss,md}": [ @@ -83,8 +83,8 @@ "zustand": "^5.0.3" }, "devDependencies": { - "@aws-amplify/backend": "^1.13.0", - "@aws-amplify/backend-cli": "^1.4.6", + "@aws-amplify/backend": "^1.16.1", + "@aws-amplify/backend-cli": "^1.7.2", "@aws-lambda-powertools/logger": "^2.13.0", "@aws-sdk/client-cognito-identity-provider": "^3.732.0", "@tanstack/react-query-devtools": "^5.67.2", From 617b94543957370b9e8ef09560420c83d0dfad9c Mon Sep 17 00:00:00 2001 From: Stivenjs Date: Thu, 5 Jun 2025 10:20:40 -0500 Subject: [PATCH 2/2] chore(package): remove Node version specification from package.json This commit removes the Node version requirement from package.json, allowing for greater flexibility in Node.js version compatibility. Additionally, it maintains the existing lint-staged configuration for code formatting. --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 10673831..30beb648 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,7 @@ "test:watch": "jest --watch", "test:coverage": "jest --coverage" }, - "engines": { - "node": ">=22" - }, + "lint-staged": { "*.{js,jsx,ts,tsx,json,css,scss,md}": [ "prettier --write"