Skip to content

Commit 27c6e83

Browse files
authored
fix: update dependencies (#1706)
1 parent ae3b1fa commit 27c6e83

38 files changed

Lines changed: 6006 additions & 11134 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Install NPM
2+
description: >
3+
Installs the NPM version required by the `engines.npm` directive in
4+
package.json, which is required for the project to build correctly.
5+
6+
runs:
7+
using: composite
8+
steps:
9+
- name: Install NPM
10+
shell: bash
11+
run: |
12+
npmVersion="$(node -p 'require(`${process.env.GITHUB_WORKSPACE}/package.json`).engines.npm')"
13+
echo "Installing npm@${npmVersion}"
14+
npm install -g "npm@${npmVersion}"

.github/workflows/cleanup.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ jobs:
3333

3434
- uses: actions/setup-node@v5
3535
with:
36-
node-version: "22.x"
36+
node-version: ">=24.19.0 <25"
3737
cache: "npm"
3838

39+
- name: Install NPM version specified in package.json
40+
uses: ./.github/actions/install-npm
41+
3942
- name: Install dependencies
4043
run: npm ci --no-audit
4144

@@ -80,9 +83,15 @@ jobs:
8083

8184
- uses: actions/setup-node@v5
8285
with:
83-
node-version: "22.x"
86+
node-version: ">=24.19.0 <25"
8487
cache: "npm"
8588

89+
- name: Install NPM version specified in package.json
90+
uses: ./.github/actions/install-npm
91+
92+
- name: Install dependencies
93+
run: npm ci --no-audit
94+
8695
- name: Configure AWS credentials
8796
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
8897
with:
@@ -94,5 +103,7 @@ jobs:
94103
aws-region: ${{ vars.AWS_REGION_CI }}
95104

96105
- name: Delete HTTP API mock
106+
env:
107+
NODE_OPTIONS: --experimental-transform-types --no-warnings
97108
run: |
98-
npx @bifravst/http-api-mock destroy ${{ inputs.http_api_mock_stack_name }}
109+
node node_modules/@bifravst/http-api-mock/dist/cdk/http-api-mock.js --destroy --stack-name ${{ inputs.http_api_mock_stack_name }}

.github/workflows/deploy.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,12 @@ jobs:
129129
130130
- uses: actions/setup-node@v5
131131
with:
132-
node-version: "22.x"
132+
node-version: ">=24.19.0 <25"
133133
cache: "npm"
134134

135+
- name: Install NPM version specified in package.json
136+
uses: ./.github/actions/install-npm
137+
135138
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
136139
with:
137140
go-version: "^1.21.6"

.github/workflows/test-and-release.yaml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ jobs:
3131

3232
- uses: actions/setup-node@v5
3333
with:
34-
node-version: "22.x"
34+
node-version: ">=24.19.0 <25"
3535
cache: "npm"
3636

37+
- name: Install NPM version specified in package.json
38+
uses: ./.github/actions/install-npm
39+
3740
- name: Install dependencies
3841
run: npm ci --no-audit
3942

@@ -67,9 +70,12 @@ jobs:
6770

6871
- uses: actions/setup-node@v5
6972
with:
70-
node-version: "22.x"
73+
node-version: ">=24.19.0 <25"
7174
cache: "npm"
7275

76+
- name: Install NPM version specified in package.json
77+
uses: ./.github/actions/install-npm
78+
7379
- name: Install dependencies
7480
run: npm ci --no-audit
7581

@@ -85,8 +91,10 @@ jobs:
8591

8692
- name: Create HTTP API mock
8793
id: create
94+
env:
95+
NODE_OPTIONS: --experimental-transform-types --no-warnings
8896
run: |
89-
npx @bifravst/http-api-mock > http-api-mock.json
97+
node node_modules/@bifravst/http-api-mock/dist/cdk/http-api-mock.js > http-api-mock.json
9098
echo "stackName=`jq -r '.stackName' http-api-mock.json`" >> $GITHUB_OUTPUT
9199
echo "responsesTableName=`jq -r '.responsesTableName' http-api-mock.json`" >> $GITHUB_OUTPUT
92100
echo "apiURL=`jq -r '.apiURL' http-api-mock.json`" >> $GITHUB_OUTPUT
@@ -129,9 +137,12 @@ jobs:
129137

130138
- uses: actions/setup-node@v5
131139
with:
132-
node-version: "22.x"
140+
node-version: ">=24.19.0 <25"
133141
cache: "npm"
134142

143+
- name: Install NPM version specified in package.json
144+
uses: ./.github/actions/install-npm
145+
135146
- name: Install dependencies
136147
run: npm ci --no-audit
137148

@@ -189,9 +200,12 @@ jobs:
189200

190201
- uses: actions/setup-node@v5
191202
with:
192-
node-version: "22.x"
203+
node-version: ">=24.19.0 <25"
193204
cache: "npm"
194205

206+
- name: Install NPM version specified in package.json
207+
uses: ./.github/actions/install-npm
208+
195209
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
196210
with:
197211
go-version: "^1.21.6"
@@ -240,10 +254,11 @@ jobs:
240254

241255
- name: Print failed End-to-End tests
242256
if: failure()
257+
env:
258+
NODE_OPTIONS: --experimental-transform-types --no-warnings
243259
run:
244-
cat e2e-test-result.json | node --experimental-transform-types
245-
--no-warnings ./feature-runner/console-reporter.ts --only-failed
246-
--with-timestamps
260+
cat e2e-test-result.json | node
261+
./feature-runner/console-reporter.ts --only-failed --with-timestamps
247262

248263
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
249264
if: failure()
@@ -257,9 +272,11 @@ jobs:
257272

258273
- name: Get all logs
259274
if: failure()
275+
env:
276+
NODE_OPTIONS: --experimental-transform-types --no-warnings
260277
run: |
261-
node --experimental-transform-types ./aws/export-logs.ts ${{ env.STACK_NAME }}
262-
node --experimental-transform-types ./aws/export-logs.ts ${{ needs.http-api-mock.outputs.stackName }}
278+
node ./aws/export-logs.ts ${{ env.STACK_NAME }}
279+
node ./aws/export-logs.ts ${{ needs.http-api-mock.outputs.stackName }}
263280
264281
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
265282
if: failure()
@@ -296,9 +313,12 @@ jobs:
296313

297314
- uses: actions/setup-node@v5
298315
with:
299-
node-version: "22.x"
316+
node-version: ">=24.19.0 <25"
300317
cache: "npm"
301318

319+
- name: Install NPM version specified in package.json
320+
uses: ./.github/actions/install-npm
321+
302322
- name: Install dependencies
303323
run: npm ci --no-audit
304324

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2023-2025, Nordic Semiconductor ASA | nordicsemi.no
3+
Copyright (c) 2023-2026, Nordic Semiconductor ASA | nordicsemi.no
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

Memfault/MemfaultReboots.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { validateWithTypeBox } from '@hello.nrfcloud.com/proto'
22
import assert from 'node:assert'
33
import { describe, it } from 'node:test'
44
import { MemfaultReboots } from './MemfaultReboots.ts'
5-
import res from './reboots.json' assert { type: 'json' }
5+
import res from './reboots.json' with { type: 'json' }
66

77
void describe('MemfaultReboots()', () => {
88
void it('should validate a response', () => {

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,23 @@ developed using [AWS CDK](https://aws.amazon.com/cdk) in
2323
npm ci
2424
```
2525

26+
#### Node & NPM
27+
28+
This project requires Node.js `>=24.19.0 <25` and npm `>=12.0.2 <13` (enforced
29+
via `check-node-version` on `npm install` and `npm ci`). The check is skipped
30+
during `npm publish` and `npm pack`, so it does not interfere with
31+
`semantic-release`, which runs its own dependency installation as part of the
32+
release process.
33+
2634
The CoAP simulator is written in Golang, which needs to be
2735
[present on the local system](https://go.dev/dl/).
2836

37+
## TypeScript 6 and 7
38+
39+
This repo
40+
[runs TypeScript 6 and 7 side by side](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0),
41+
[so that eslint works](https://github.com/typescript-eslint/typescript-eslint/issues/10940#issuecomment-4922812181).
42+
2943
### Run once
3044

3145
To setup MQTT bridge, you have to run the below command to generate a

cdk/BackendStack.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class BackendStack extends Stack {
9898
hash: baseLayer.hash,
9999
}).code,
100100
compatibleArchitectures: [Lambda.Architecture.ARM_64],
101-
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
101+
compatibleRuntimes: [Lambda.Runtime.NODEJS_24_X],
102102
})
103103

104104
const jwtLayerVersion = new Lambda.LayerVersion(this, 'jwtLayer', {
@@ -109,7 +109,7 @@ export class BackendStack extends Stack {
109109
hash: jwtLayer.hash,
110110
}).code,
111111
compatibleArchitectures: [Lambda.Architecture.ARM_64],
112-
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
112+
compatibleRuntimes: [Lambda.Runtime.NODEJS_24_X],
113113
})
114114

115115
const healthCheckLayerVersion = new Lambda.LayerVersion(
@@ -122,7 +122,7 @@ export class BackendStack extends Stack {
122122
hash: healthCheckLayer.hash,
123123
}).code,
124124
compatibleArchitectures: [Lambda.Architecture.ARM_64],
125-
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
125+
compatibleRuntimes: [Lambda.Runtime.NODEJS_24_X],
126126
},
127127
)
128128

@@ -179,7 +179,7 @@ export class BackendStack extends Stack {
179179
hash: cdkLayer.hash,
180180
}).code,
181181
compatibleArchitectures: [Lambda.Architecture.ARM_64],
182-
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
182+
compatibleRuntimes: [Lambda.Runtime.NODEJS_24_X],
183183
})
184184
const domain = new APICustomDomain(this, {
185185
api,

cdk/backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { ensureCA } from '../bridge/ensureCA.ts'
1616
import { ensureMQTTBridgeCredentials } from '../bridge/ensureMQTTBridgeCredentials.ts'
1717
import { mqttBridgeCertificateLocation } from '../bridge/mqttBridgeCertificateLocation.ts'
1818
import { debug, type logFn } from '../cli/log.ts'
19-
import pJSON from '../package.json' assert { type: 'json' }
19+
import pJSON from '../package.json' with { type: 'json' }
2020
import { ScopeContexts, type ScopeContext } from '../settings/scope.ts'
2121
import { BackendApp } from './BackendApp.ts'
2222
import { restoreCertificateFromSSM } from './helpers/certificates/restoreCertificateFromSSM.ts'

cdk/layers/baseLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
packLayer,
33
type PackedLayer,
44
} from '@bifravst/aws-cdk-lambda-helpers/layer'
5-
import pJson from '../../package.json' assert { type: 'json' }
5+
import pJson from '../../package.json' with { type: 'json' }
66

77
const dependencies: Array<keyof (typeof pJson)['dependencies']> = [
88
'@bifravst/from-env',

0 commit comments

Comments
 (0)