Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ updates:
interval: 'monthly'
ignore:
- dependency-name: '@elastic/elasticsearch'
# Needs Node >= 20.15, update when we get there.
- dependency-name: '@types/node'
- dependency-name: 'lint-staged'
groups:
all:
patterns: ['*']
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
# However, it is recommended to always specify Node.js version and don't rely on the system one.
uses: actions/setup-node@v6
with:
node-version: 20
node-version: 24
- name: yarn tsc
run: yarn install && yarn tsc
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.15.0
v24.13.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Content API

These are the services that back our [Content API](https://developers.wellcomecollection.org/api/content). The Content API exposes our non-catalogue content: at the moment, that's just articles, but in the future it might include endpoints for events, exhibitions, and functional content.
These are the services that back our [Content API](https://developers.wellcomecollection.org/api/content). The Content API exposes our non-catalogue content. There are endpoints for `articles`, `events`, and `all` (where `all` includes articles, books, events, exhibitions, exhibition texts, exhibition highlight tours (BSL), exhibition highlight tours (audio), pages, projects, seasons, and visual stories).
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This README change is not related to the PR title (“Node 24”) and the PR description doesn’t mention documentation updates. Consider moving this README update to a separate docs PR, or update the PR description/title to reflect that it also changes the documented API surface.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a change we did (rightly) but reverted when we reverted to Node 22, so readding it.


![Architecture diagram](https://github.com/wellcomecollection/content-api/assets/4429247/b29a6bf5-f5af-426c-b827-550b84c5541c)

Expand Down
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build this with the repo root as the build context
FROM public.ecr.aws/docker/library/node:24
FROM public.ecr.aws/docker/library/node:24.13.0

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/jest": "^30.0.0",
"@types/luxon": "^3.7.1",
"@types/morgan": "^1.9.10",
"@types/node": "^24.1.0",
"@types/node": "^24.10.13",
"@types/supertest": "^6.0.3",
"jest": "^30.2.0",
"jest-extended": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"extends": "@tsconfig/node24/tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"moduleResolution": "node",
Expand Down
117 changes: 58 additions & 59 deletions infrastructure/.terraform.lock.hcl

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

3 changes: 2 additions & 1 deletion infrastructure/pipeline_stack/elastic_cluster.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
locals {
elastic_cloud_region = data.aws_region.current.name
# Use 'id' instead of deprecated 'name' for aws_region data source (id returns the region name, e.g., 'eu-west-1')
elastic_cloud_region = data.aws_region.current.id
cluster_id = ec_deployment.content_cluster.elasticsearch[0].resource_id
cluster_alias = ec_deployment.content_cluster.alias
cluster_public_host = "${local.cluster_alias}.es.${local.elastic_cloud_region}.aws.found.io"
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/pipeline_stack/pipeline_lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "pipeline_lambda" {
source = "git@github.com:wellcomecollection/terraform-aws-lambda?ref=v1.2.0"

name = local.pipeline_lambda_name
runtime = "nodejs20.x"
runtime = "nodejs24.x"
handler = "lambda.handler"

filename = data.archive_file.empty_zip.output_path
Expand Down
11 changes: 7 additions & 4 deletions infrastructure/pipeline_stack/scheduled_window_event.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ resource "aws_scheduler_schedule" "windows" {
resource "aws_iam_role" "scheduler" {
name = "concept-pipeline-windows-${var.pipeline_date}"
assume_role_policy = data.aws_iam_policy_document.scheduler_assume_role.json
}

inline_policy {
name = "invoke-lambda"
policy = data.aws_iam_policy_document.scheduler_invoke_lambda.json
}
# aws_iam_role_policy is used instead of the deprecated inline_policy block above.
# This is the recommended way to attach policies to roles in Terraform 1.x and later.
resource "aws_iam_role_policy" "scheduler_invoke_lambda" {
name = "invoke-lambda"
role = aws_iam_role.scheduler.id
policy = data.aws_iam_policy_document.scheduler_invoke_lambda.json
}

data "aws_iam_policy_document" "scheduler_assume_role" {
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/pipeline_stack/unpublisher_lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module "unpublisher_lambda" {

name = local.unpublisher_lambda_name
description = "Handle any documents which are 'unpublished' (deleted) in Prismic"
runtime = "nodejs20.x"
runtime = "nodejs24.x"
handler = "lambda.handler"

filename = data.archive_file.empty_zip.output_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_lambda_function" "prismic_backup_download" {
function_name = local.lambda_backup_download_name
role = aws_iam_role.prismic_backup_download_lambda_role.arn
handler = "index.handler"
runtime = "nodejs20.x"
runtime = "nodejs24.x"
timeout = 900 # 15 minutes
memory_size = 1024

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_lambda_function" "prismic_backup_trigger" {
function_name = local.lambda_backup_trigger_name
role = aws_iam_role.prismic_backup_trigger_lambda_role.arn
handler = "index.handler"
runtime = "nodejs20.x"
runtime = "nodejs24.x"
timeout = 900 # 15 minutes
memory_size = 1024

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/prismic-snapshots/lambda_snapshot.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_lambda_function" "prismic_snapshot" {
function_name = local.lambda_snapshot_name
role = aws_iam_role.prismic_snapshot_lambda_role.arn
handler = "index.handler"
runtime = "nodejs20.x"
runtime = "nodejs24.x"
timeout = 900 # 15 minutes
memory_size = 1024

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.58.0"
version = ">= 5.31.0"
}
ec = {
source = "elastic/ec"
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/webhook_stack/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module "webhook_lambda" {
source = "git@github.com:wellcomecollection/terraform-aws-lambda?ref=v1.2.0"

name = local.lambda_name
runtime = "nodejs20.x"
runtime = "nodejs24.x"
handler = "lambda.handler"

filename = data.archive_file.empty_zip.output_path
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"devDependencies": {
"@babel/eslint-parser": "^7.28.6",
"@eslint/js": "^9.39.2",
"@tsconfig/node20": "20.1.8",
"@tsconfig/node24": "24.0.4",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
Expand Down
2 changes: 1 addition & 1 deletion pipeline/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build this with the repo root as the build context
FROM public.ecr.aws/docker/library/node:20
FROM public.ecr.aws/docker/library/node:24.13.0

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions pipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"rxjs": "^7.8.0"
},
"devDependencies": {
"@tsconfig/node20": "20.1.8",
"@tsconfig/node24": "24.0.4",
"@types/aws-lambda": "^8.10.160",
"@types/jest": "^30.0.0",
"@types/node": "^20.16.5",
"@types/node": "^24.10.13",
"esbuild": "^0.27.2",
"jest": "^30.2.0",
"jest-extended": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion pipeline/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail
yarn run esbuild ./src/lambda.js \
--bundle \
--platform=node \
--target=node20 \
--target=node24 \
--sourcemap=external \
--outdir=dist

Expand Down
2 changes: 1 addition & 1 deletion tooling.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/node:20
FROM public.ecr.aws/docker/library/node:24.13.0

# Install Terraform (for formatting)
ARG TERRAFORM_VERSION=1.4.0
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"extends": "@tsconfig/node24/tsconfig.json",
"compilerOptions": {
"noEmit": true,
"moduleResolution": "node",
Expand Down
2 changes: 1 addition & 1 deletion unpublisher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build this with the repo root as the build context
FROM public.ecr.aws/docker/library/node:20
FROM public.ecr.aws/docker/library/node:24.13.0

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions unpublisher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@tsconfig/node20": "20.1.8",
"@tsconfig/node24": "24.0.4",
"@types/aws-lambda": "^8.10.160",
"@types/jest": "^30.0.0",
"@types/node": "^20.16.5",
"@types/node": "^24.10.13",
"dotenv": "^17.2.3",
"esbuild": "^0.27.2",
"jest": "^30.2.0",
Expand Down
2 changes: 1 addition & 1 deletion unpublisher/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail
yarn run esbuild ./src/lambda.js \
--bundle \
--platform=node \
--target=node20 \
--target=node24 \
--sourcemap=external \
--outdir=dist

Expand Down
2 changes: 1 addition & 1 deletion webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build this with the repo root as the build context
FROM public.ecr.aws/docker/library/node:20
FROM public.ecr.aws/docker/library/node:24.13.0

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@weco/content-common": "*"
},
"devDependencies": {
"@tsconfig/node20": "20.1.8",
"@tsconfig/node24": "24.0.4",
"@types/aws-lambda": "^8.10.160",
"@types/jest": "^30.0.0",
"@types/node": "^20.16.5",
"@types/node": "^24.10.13",
"esbuild": "^0.27.2",
"jest": "^30.2.0",
"ts-jest": "^29.4.6",
Expand Down
2 changes: 1 addition & 1 deletion webhook/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail
yarn run esbuild ./src/lambda.js \
--bundle \
--platform=node \
--target=node20 \
--target=node24 \
--sourcemap=external \
--outdir=dist

Expand Down
Loading