Skip to content
Merged
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
2 changes: 0 additions & 2 deletions portals/developer-portal/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ replay_pid*

.vscode

eslint.config.mjs

.prettierrc

config*.json
Expand Down
1 change: 1 addition & 0 deletions portals/developer-portal/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
6 changes: 3 additions & 3 deletions portals/developer-portal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# --------------------------------------------------------------------

# Developer Portal Dockerfile
# Uses node:23-slim (Debian/glibc) so better-sqlite3 can compile its native binding.
# Uses node:24-slim (Debian/glibc, current LTS) so better-sqlite3 can compile its native binding.
# Build tools (python3, make, g++) are installed only in the builder stage and are not
# carried into the runtime image.

# Build stage — installs production dependencies (including native build of better-sqlite3)
FROM node:23-slim AS builder
FROM node:24-slim AS builder
WORKDIR /app
# Install native build tools required by better-sqlite3's node-gyp compilation.
# python3 is needed by node-gyp; make and g++ compile the C++ binding.
Expand All @@ -31,7 +31,7 @@ COPY package*.json ./
RUN npm ci --omit=dev

# Runtime stage
FROM node:23-slim
FROM node:24-slim

# Install runtime utilities needed by the entrypoint (openssl for cert generation)
RUN apt-get update && apt-get install -y --no-install-recommends openssl curl && rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion portals/developer-portal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ version-set: ## Set developer portal version and update artifacts
exit 1; \
fi
@echo "$(VERSION)" > VERSION
@sed -i.bak 's/"version": ".*"/"version": "$(VERSION)"/' package.json && rm -f package.json.bak
@npm version $(VERSION) --no-git-tag-version --allow-same-version >/dev/null
@(cd ../.. && bash scripts/update-docker-compose.sh developer-portal $(VERSION))
@echo "✓ Set developer portal version to $(VERSION)"

Expand Down
2 changes: 1 addition & 1 deletion portals/developer-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For end-user documentation, see [docs/](docs/).

## Prerequisites

- **Node.js** v23 (or v22+)
- **Node.js** v24 (LTS)
- **Make**
- **Docker + Docker Compose** (for the Docker-based workflow)

Expand Down
78 changes: 78 additions & 0 deletions portals/developer-portal/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import js from '@eslint/js';
import globals from 'globals';

export default [
{
// Not application source — generated output, vendored libs (which carry
// their own eslint config), samples, and non-JS asset directories.
ignores: [
'node_modules/**',
'target/**',
'coverage/**',
'libs/**',
'samples/**',
'distribution/**',
'production/**',
'resources/**',
'docs/**',
'database/**',
'bin/**',
],
},
js.configs.recommended,
{
// Server-side application code and build tooling (Node.js, CommonJS).
files: ['src/**/*.js', 'tools/**/*.js'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'commonjs',
globals: { ...globals.node },
},
rules: {
'no-unused-vars': ['warn', { args: 'none', caughtErrors: 'none', varsIgnorePattern: '^_' }],
'no-empty': ['error', { allowEmptyCatch: true }],
},
},
{
// Integration tests: Cypress + Jest-style globals on top of Node.
files: ['it/**/*.js'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.jest,
...globals.mocha,
cy: 'readonly',
Cypress: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { args: 'none', caughtErrors: 'none', varsIgnorePattern: '^_' }],
'no-empty': ['error', { allowEmptyCatch: true }],
},
},
{
// Cypress support files are authored as ES modules.
files: ['it/ui/**/support/**/*.js'],
languageOptions: { sourceType: 'module' },
},
{
// Browser-side scripts served to the client. Their top-level functions
// are invoked from Handlebars templates via inline handlers (onclick,
// etc.), so they legitimately look "unused"; they also reference page
// globals defined by sibling scripts and CDN libs (bootstrap, marked),
// which the linter cannot resolve statically.
files: ['src/scripts/**/*.js'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'script',
globals: { ...globals.browser },
},
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ services:
command: ["cypress", "run", "--headless", "--browser", "electron"]

rest-api-tests:
image: node:22-alpine
image: node:24-alpine
depends_on:
devportal:
condition: service_healthy
Expand Down
4 changes: 2 additions & 2 deletions portals/developer-portal/it/docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ services:
command: ["cypress", "run", "--headless", "--browser", "electron"]

rest-api-tests:
image: node:22-alpine
image: node:24-alpine
depends_on:
devportal:
condition: service_healthy
Expand Down Expand Up @@ -128,7 +128,7 @@ services:
- sqlite-data:/shared-db:ro
networks:
- it-devportal-network
# better-sqlite3 compiles from source on node:22-alpine (no prebuilt binary
# better-sqlite3 compiles from source on node:24-alpine (no prebuilt binary
# for this platform) — needs python3/make/g++ for node-gyp.
command: ["sh", "-c", "apk add --no-cache python3 make g++ >/dev/null && npm install --no-audit --no-fund && npm test"]

Expand Down
46 changes: 26 additions & 20 deletions portals/developer-portal/it/rest-api/package-lock.json

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

14 changes: 7 additions & 7 deletions portals/developer-portal/it/rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"test:watch": "jest --watch"
},
"devDependencies": {
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"supertest": "^7.0.0",
"cookiejar": "^2.1.4",
"nock": "^13.5.5",
"pg": "^8.14.0"
"cookiejar": "2.1.4",
"jest": "29.7.0",
"jest-junit": "17.0.0",
"nock": "13.5.6",
"pg": "8.22.0",
"supertest": "7.2.2"
},
"optionalDependencies": {
"better-sqlite3": "^11.3.0"
"better-sqlite3": "12.11.1"
}
}
2 changes: 1 addition & 1 deletion portals/developer-portal/it/rest-api/support/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const MINIMAL_OPENAPI_DEFINITION = JSON.stringify({
// (file) — see docs/devportal-openapi-spec-v0.9.yaml ApiMetadataMultipartBody.
// `publisher` holds the API-management scopes; pass `role` to override.
async function createApi(overrides = {}) {
const { definition, definitionFileName: _definitionFileName, role = 'publisher', ...metadataOverrides } = overrides;
const { definition: _definition, definitionFileName: _definitionFileName, role = 'publisher', ...metadataOverrides } = overrides;
const id = overrides.id || uniqueHandle('api');
const metadata = {
id,
Expand Down
Loading
Loading