Skip to content

Commit

Permalink
Merge pull request #215 from Financial-Times/nori/upgrade-node
Browse files Browse the repository at this point in the history
CPP-1562: Update to Node 18
  • Loading branch information
joelcarr committed Jun 30, 2023
2 parents 690dbe5 + ec94009 commit a3f2992
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 41 deletions.
54 changes: 22 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,46 @@

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:
- v1-dependency-npm-{{ checksum "package.json" }}-
- v1-dependency-npm-{{ checksum "package.json" }}
- v1-dependency-npm-

cache_npm_cache:
&cache_npm_cache
cache_npm_cache: &cache_npm_cache
save_cache:
key: v1-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+)?$/
Expand All @@ -61,13 +53,11 @@ orbs:
node: circleci/node@4.6.0
slack: circleci/slack@3.4.2

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 @@ -93,8 +83,8 @@ jobs:
- run:
name: Checkout next-ci-shared-helpers
command: git clone --depth 1
git@github.com:Financial-Times/next-ci-shared-helpers.git
.circleci/shared-helpers
git@github.com:Financial-Times/next-ci-shared-helpers.git --branch
unpin-heroku .circleci/shared-helpers
- *restore_npm_cache
- node/install-npm:
version: "^7"
Expand Down Expand Up @@ -160,14 +150,14 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
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" ]
node-version: [ "16.20", "18.16" ]

build-test-publish:
when:
Expand All @@ -182,7 +172,7 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
node-version: [ "16.20", "18.16" ]
- test:
filters:
<<: *filters_version_tag
Expand All @@ -191,13 +181,13 @@ workflows:
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
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 @@ -216,14 +206,14 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
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" ]
node-version: [ "16.20", "18.16" ]

nightly:
when:
Expand All @@ -242,7 +232,7 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
node-version: [ "16.20", "18.16" ]
- test:
requires:
- build-v<< matrix.node-version >>
Expand All @@ -252,7 +242,7 @@ workflows:
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14" ]
node-version: [ "16.20", "18.16" ]

notify:
webhooks:
Expand Down
6 changes: 3 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 @@ -8,12 +8,11 @@
},
"scripts": {
"test": "make test",
"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"
},
"engines": {
"node": "16.x",
"npm": "7.x || 8.x"
"node": "16.x || 18.x",
"npm": "7.x || 8.x || 9.x"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -54,7 +53,6 @@
}
},
"volta": {
"node": "16.14.1",
"npm": "7.20.2"
"node": "18.16.0"
}
}

0 comments on commit a3f2992

Please sign in to comment.