Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1779 from iFixit/upgrade-to-node-18
Browse files Browse the repository at this point in the history
Upgrade to node 18
  • Loading branch information
danielbeardsley authored Jul 6, 2023
2 parents ee44200 + 54fb909 commit f9cc08e
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Start strapi server
run: cd backend && docker-compose up -d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stress_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Start strapi server
run: cd backend && docker-compose up -d
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Setup and cache pnpm
uses: ./.github/actions/pnpm-setup
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v18.x.x
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ New iFixit e-commerce site.

- npm v8
- pnpm v8
- node v16
- node v18
- yarn

Here's one way you can get all the right versions installed and setup:
Expand Down
6 changes: 2 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM node:16-alpine3.14
# Installing libvips for sharp compatibility
RUN apk --update-cache add vips-dev \
&& rm -rf /var/cache/apk/*
FROM node:18-alpine3.18
RUN apk update && apk add python3 build-base
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /opt/
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"uuid": "1507c704-0355-4721-86c7-ef3ac13332ab"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
"node": ">=14.x.x <=18.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/addons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
],
"engines": {
"node": ">=12.x.x <=16.x.x",
"node": ">=14.x.x <=18.x.x",
"npm": ">=6.0.0"
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ STRAPI_IMAGE_DOMAIN=ifixit-dev-strapi-uploads.s3.us-west-1.amazonaws.com
NEXT_PUBLIC_ALGOLIA_PRODUCT_INDEX_NAME=dev_product_group_en
NEXT_PUBLIC_DEFAULT_STORE_CODE=test
NEXT_PUBLIC_FLAG__PRODUCT_PAGE_ENABLED=true
NEXT_PUBLIC_MATOMO_URL=https://matomo.ubreakit.com
NEXT_PUBLIC_MATOMO_URL=https://matomo.ubreakit.com
NODE_OPTIONS="--dns-result-order ipv4first"
12 changes: 6 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"scripts": {
"dev": "concurrently -n \"Next,codegen\" -c \"blue,magenta\" \"pnpm run dev:next\" \"pnpm run dev:codegen\"",
"dev:next": "next dev",
"dev:next": "NODE_OPTIONS=\"--dns-result-order ipv4first\" next dev",
"dev:codegen": "pnpm run codegen:download-strapi-schema && pnpm run codegen:watch",
"codegen:watch": "cross-env DOTENV_CONFIG_PATH=./.env.development graphql-codegen -r dotenv/config --config codegen/config.ts --watch",
"codegen:download-strapi-schema": "cross-env DOTENV_CONFIG_PATH=./.env.development graphql-codegen -r dotenv/config --config codegen/strapi-schema-config.ts",
"codegen:download-shopify-storefront-schema": "node ./lib/shopify-storefront-sdk/generate-schema.js",
"build": "next build",
"start": "next start",
"codegen:watch": "cross-env NODE_OPTIONS=\"--dns-result-order ipv4first\" DOTENV_CONFIG_PATH=./.env.development graphql-codegen -r dotenv/config --config codegen/config.ts --watch",
"codegen:download-strapi-schema": "cross-env NODE_OPTIONS=\"--dns-result-order ipv4first\" DOTENV_CONFIG_PATH=./.env.development graphql-codegen -r dotenv/config --config codegen/strapi-schema-config.ts",
"codegen:download-shopify-storefront-schema": "NODE_OPTIONS=\"--dns-result-order ipv4first\" node ./lib/shopify-storefront-sdk/generate-schema.js",
"build": "NODE_OPTIONS=\"--dns-result-order ipv4first\" next build",
"start": "NODE_OPTIONS=\"--dns-result-order ipv4first\" next start",
"type-check": "tsc --pretty --noEmit",
"format": "prettier --write .",
"lint": "eslint . --ext ts --ext tsx --ext js",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"description": "Monorepo for iFixit e-commerce",
"main": "N/A",
"engines": {
"node": ">= 16.14.2",
"node": ">= 18.x.x",
"pnpm": ">= 8.5.0"
},
"scripts": {
"install:all": "export $(cat .env.local) && pnpm install && npm run install:backend",
"install:backend": "cd backend && yarn install:all",
"dev:backend": "cd backend && pnpm run dev",
"dev:frontend": "wait-on http://localhost:1337/_health && cd frontend && npm run dev",
"dev:frontend": "NODE_OPTIONS=\"--dns-result-order ipv4first\" wait-on http://localhost:1337/_health && cd frontend && npm run dev",
"dev": "cross-env FORCE_COLOR=1 npm-run-all -l -p dev:*",
"build:backend": "cd backend && pnpm run build",
"build:frontend": "cd frontend && pnpm run build",
Expand Down

2 comments on commit f9cc08e

@vercel
Copy link

@vercel vercel bot commented on f9cc08e Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-commerce-prod – ./frontend

react-commerce-prod-ifixit.vercel.app
react-commerce-prod.vercel.app
react-commerce-prod-git-main-ifixit.vercel.app

@vercel
Copy link

@vercel vercel bot commented on f9cc08e Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-commerce – ./frontend

react-commerce-git-main-ifixit.vercel.app
react-commerce.vercel.app
react-commerce-ifixit.vercel.app

Please sign in to comment.