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

Commit

Permalink
Merge pull request #663 from Financial-Times/nori/upgrade-node
Browse files Browse the repository at this point in the history
Update to Node 18
  • Loading branch information
joelcarr authored Jul 7, 2023
2 parents 7614b5a + 0e75381 commit 398fc25
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 43 deletions.
56 changes: 22 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,57 @@

references:

container_config_node:
&container_config_node
container_config_node: &container_config_node
working_directory: ~/project/build
docker:
- image: cimg/node:<< parameters.node-version >>
parameters:
node-version:
default: "16.14"
default: "18.16"
type: string

workspace_root: &workspace_root ~/project

attach_workspace:
&attach_workspace
attach_workspace: &attach_workspace
attach_workspace:
at: *workspace_root

npm_cache_keys:
&npm_cache_keys
npm_cache_keys: &npm_cache_keys
keys:
- v10-dependency-npm-{{ checksum "package.json" }}-
- v10-dependency-npm-{{ checksum "package.json" }}
- v10-dependency-npm-

cache_npm_cache:
&cache_npm_cache
cache_npm_cache: &cache_npm_cache
save_cache:
key: v10-dependency-npm-{{ checksum "package.json" }}-{{ epoch }}
paths:
- ./node_modules/

restore_npm_cache:
&restore_npm_cache
restore_npm_cache: &restore_npm_cache
restore_cache:
<<: *npm_cache_keys

filters_only_main:
&filters_only_main
filters_only_main: &filters_only_main
branches:
only: main

filters_ignore_tags:
&filters_ignore_tags
filters_ignore_tags: &filters_ignore_tags
tags:
ignore: /.*/

filters_version_tag:
&filters_version_tag
filters_version_tag: &filters_version_tag
tags:
only:
- /^v?\d+\.\d+\.\d+(?:-beta\.\d+)?$/
branches:
ignore: /.*/

filters_only_renovate_nori:
&filters_only_renovate_nori
filters_only_renovate_nori: &filters_only_renovate_nori
branches:
only: /(^renovate-.*|^nori/.*)/

filters_ignore_tags_renovate_nori:
&filters_ignore_tags_renovate_nori
filters_ignore_tags_renovate_nori: &filters_ignore_tags_renovate_nori
tags:
ignore: /.*/
branches:
Expand All @@ -83,11 +73,9 @@ jobs:
- run:
name: Checkout next-ci-shared-helpers
command: git clone --depth 1
[email protected]:Financial-Times/next-ci-shared-helpers.git
.circleci/shared-helpers
[email protected]:Financial-Times/next-ci-shared-helpers.git --branch
unpin-heroku .circleci/shared-helpers
- *restore_npm_cache
- node/install-npm:
version: "7.20.2"
- run:
name: Install project dependencies
command: make install
Expand Down Expand Up @@ -150,14 +138,14 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]
- test:
requires:
- build-v<< matrix.node-version >>
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]

build-test-publish:
when:
Expand All @@ -172,7 +160,7 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]
- test:
filters:
<<: *filters_version_tag
Expand All @@ -181,13 +169,13 @@ workflows:
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]
- publish:
context: npm-publish-token
filters:
<<: *filters_version_tag
requires:
- test-v16.14
- test-v18.16

renovate-nori-build-test:
when:
Expand All @@ -206,14 +194,14 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]
- test:
requires:
- build-v<< matrix.node-version >>
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]

nightly:
when:
Expand All @@ -230,15 +218,15 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]
- test:
requires:
- build-v<< matrix.node-version >>
context: next-nightly-build
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "14.19" ]
node-version: [ "16.20", "18.16" ]

notify:
webhooks:
Expand Down
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@financial-times/n-heroku-tools",
"version": "0.0.0",
"engines": {
"node": "14.x || 16.x",
"npm": "7.x || 8.x"
"node": "16.x || 18.x",
"npm": "7.x || 8.x || 9.x"
},
"bin": {
"n-heroku-tools": "./bin/n-heroku-tools.js",
Expand Down Expand Up @@ -42,8 +42,7 @@
"snyk": "^1.167.2"
},
"scripts": {
"prepare": "npx snyk protect || npx snyk protect -d || true",
"preinstall": "[ \"$INIT_CWD\" != \"$PWD\" ] || npm_config_yes=true npx check-engine"
"prepare": "npx snyk protect || npx snyk protect -d || true"
},
"husky": {
"hooks": {
Expand All @@ -53,7 +52,6 @@
}
},
"volta": {
"node": "16.14.1",
"npm": "7.20.2"
"node": "18.16.0"
}
}

0 comments on commit 398fc25

Please sign in to comment.