Skip to content

Commit

Permalink
Revert "chore(deps): update nodejs (major) (#81798)" (#83527)
Browse files Browse the repository at this point in the history
This reverts commit 78ce7d2.
  • Loading branch information
noahtallen authored Oct 26, 2023
1 parent 007b101 commit 4b6b256
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 57 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ references:
defaults: &defaults
working_directory: ~/wp-calypso
docker:
- image: cimg/node:20.8.1
- image: cimg/node:18.17.1
environment:
CIRCLE_ARTIFACTS: /tmp/artifacts
CIRCLE_TEST_REPORTS: /tmp/test_results
Expand Down Expand Up @@ -143,7 +143,7 @@ commands:
jobs:
wp-desktop-assets:
docker:
- image: cimg/node:20.8.1-browsers
- image: cimg/node:18.17.1-browsers
<<: *desktop_defaults
environment:
VERSION: << pipeline.git.tag >>
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
docker:
# Important: the build fails on 18.13.0, so we pin it to a slightly older
# version to keep this one working for now.
- image: cimg/node:20.8.1-browsers
- image: cimg/node:18.17.1-browsers
<<: *desktop_defaults
shell: /bin/bash --login
environment:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.8.1
18.17.0
4 changes: 2 additions & 2 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#### This image is not pushed to any repository and it shouldn't be used as base image for any other docker build.
#### Its main goal is to create a `/calypso/.cache` that can be copied over other images that can benefit from a warm cache.
#### Note that yarn v3 cache lives in `/calypso/.yarn`
FROM node:20.8.1-bullseye-slim as cache
FROM node:18.17.1-bullseye-slim as cache
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG node_memory=8192
Expand All @@ -27,7 +27,7 @@ ENTRYPOINT [ "/bin/bash" ]

#### base image
#### This image can be used as a base image for other builds, or to test and build calypso.
FROM node:20.8.1-bullseye-slim as base
FROM node:18.17.1-bullseye-slim as base
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG node_memory=8192
Expand Down
2 changes: 1 addition & 1 deletion apps/editing-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"@tanstack/eslint-plugin-query": "^4.29.8",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@types/node": "^20.8.6",
"@types/node": "^18.17.3",
"@wordpress/eslint-plugin": "^17.1.0",
"@wordpress/readable-js-assets-webpack-plugin": "^2.21.0",
"babel-jest": "^29.6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const useCheckSyncStatus = ( siteId: number ) => {
const dispatch = useDispatch();
const translate = useTranslate();

const intervalIdRef = useRef< NodeJS.Timeout >();
const intervalIdRef = useRef< NodeJS.Timer >();
const syncStatus = useSelector( ( state ) => getSyncStatus( state, siteId ) );
const syncProgress = useSelector( ( state ) => getSyncProgress( state, siteId ) );
const isSyncInProgress = useSelector( ( state ) => getIsSyncingInProgress( state, siteId ) );
Expand Down
6 changes: 1 addition & 5 deletions client/server/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ export default function setup() {
app.use( userAgent.express() );
app.use( loggerMiddleware() );

// TODO: We disabled this middleware to unblock the Node v20 update because `v8-profiler-next` doesn't support Node.js >18
if ( process.env.USE_SERVER_PROFILER === 'true' ) {
// app.use( require( 'calypso/server/middleware/profiler' )() );
console.warn(
'Server profiling is temporarily disabled until `v8-profiler-next` adds support for Node.js >18!'
);
app.use( require( 'calypso/server/middleware/profiler' )() );
}

if ( 'development' === process.env.NODE_ENV ) {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
]
},
"engines": {
"node": "^v20.8.1",
"node": "^v18.17.0",
"yarn": "^3.1.1"
},
"scripts": {
Expand Down Expand Up @@ -159,7 +159,7 @@
"@types/fast-json-stable-stringify": "^2.0.0",
"@types/jest": "^29.5.5",
"@types/lodash": "^4.14.199",
"@types/node": "^20.8.6",
"@types/node": "^18.17.3",
"@types/page": "^1.11.5",
"@types/qs": "^6.9.7",
"@types/react": "^18.2.6",
Expand Down Expand Up @@ -284,6 +284,7 @@
"stylelint": "^14.16.1",
"tslib": "^2.3.0",
"typescript": "^5.2.2",
"v8-profiler-next": "^1.9.0",
"webpack": "^5.68.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/calypso-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@automattic/create-calypso-config": "workspace:^",
"@types/cookie": "^0.4.1",
"@types/node": "^20.8.6",
"@types/node": "^18.17.3",
"cookie": "^0.4.1",
"tslib": "^2.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/calypso-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@automattic/calypso-typescript-config": "workspace:^",
"@automattic/languages": "workspace:^",
"@jest/globals": "^29.5.0",
"@types/node": "^20.8.6",
"@types/node": "^18.17.3",
"@types/node-fetch": "^2.6.1",
"@wordpress/i18n": "^4.44.0",
"asana-phrase": "^0.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-wpcalypso/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lib/"
],
"engines": {
"node": ">=v20.8.1"
"node": ">=v14.21.3"
},
"peerDependencies": {
"@babel/core": ">=7.22.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-circus-allure-reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@automattic/calypso-eslint-overrides": "workspace:^",
"@automattic/calypso-typescript-config": "workspace:^",
"@types/node": "^20.8.6",
"@types/node": "^18.17.3",
"typescript": "^5.2.2"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/wp-babel-makepot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.8.1
FROM node:18.17.1

# /src is where we expect source javascript to run our babel config over
RUN mkdir /src
Expand Down
Loading

0 comments on commit 4b6b256

Please sign in to comment.