Skip to content

Commit

Permalink
Merge pull request #202 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 committed Jun 30, 2023
2 parents 0a3b3d1 + eabb5ce commit 2da4f1a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 32 deletions.
47 changes: 18 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

references:

container_config_node:
&container_config_node
container_config_node: &container_config_node
working_directory: ~/project/build
docker:
- image: cimg/node:<< parameters.node-version >>-browsers
Expand All @@ -15,47 +14,39 @@ references:

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

cache_npm_cache:
&cache_npm_cache
cache_npm_cache: &cache_npm_cache
save_cache:
key: v3-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_main:
&filters_ignore_main
filters_ignore_main: &filters_ignore_main
branches:
ignore: 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 @@ -76,11 +67,9 @@ 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.20.2"
- run:
name: Install project dependencies
command: make install
Expand Down Expand Up @@ -143,14 +132,14 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "18.16" ]
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", "18.16" ]
node-version: [ "16.20", "18.16" ]

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

nightly:
when:
Expand All @@ -197,12 +186,12 @@ workflows:
name: build-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "16.14", "18.16" ]
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", "18.16" ]
node-version: [ "16.20", "18.16" ]
1 change: 0 additions & 1 deletion package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
},
"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"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 2da4f1a

Please sign in to comment.