chore: update Node.js and pnpm versions in Dockerfiles and package.json

- Updated base image in Dockerfile.docs and Dockerfile.website to Node.js 24.4-alpine.
- Updated package manager version in package.json to pnpm 10.22.0.
- Adjusted Node.js engine requirement in package.json to ^24.4.0.
- Added new script to fix API path references in MDX files for documentation.
- Updated build command in apps/docs/package.json to include the new script.
This commit is contained in:
Mauricio Siu
2026-02-27 02:52:18 -06:00
parent 5d103d6d63
commit a85fb76a95
6 changed files with 45 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
FROM node:20.9-alpine AS base FROM node:24.4-alpine AS base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN corepack enable

View File

@@ -1,4 +1,4 @@
FROM node:20.9-alpine AS base FROM node:24.4-alpine AS base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN corepack enable

View File

@@ -10,7 +10,7 @@
"postinstall": "fumadocs-mdx", "postinstall": "fumadocs-mdx",
"fix-openapi": "node scripts/fix-openapi.mjs", "fix-openapi": "node scripts/fix-openapi.mjs",
"generate-templates": "node scripts/generate-templates.mjs", "generate-templates": "node scripts/generate-templates.mjs",
"build:docs": "npm run fix-openapi && npm run generate-templates && node generate-docs.mjs" "build:docs": "npm run fix-openapi && npm run generate-templates && node generate-docs.mjs && node scripts/fix-api-paths.mjs"
}, },
"dependencies": { "dependencies": {
"@next/third-parties": "16.0.7", "@next/third-parties": "16.0.7",

View File

@@ -0,0 +1,27 @@
/**
* Normalizes OpenAPI path references in API docs MDX files.
* Converts dot notation (/tag.operation) to slash notation (/tag/operation)
* to match the OpenAPI schema paths.
*/
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";
const API_DOCS_DIR = join(process.cwd(), "content", "docs", "api");
let totalFixed = 0;
for (const name of readdirSync(API_DOCS_DIR)) {
if (!name.endsWith(".mdx")) continue;
const file = join(API_DOCS_DIR, name);
const content = readFileSync(file, "utf8");
const newContent = content.replace(/"path":"(\/[^"]+)"/g, (_, path) => {
if (path.includes(".")) {
totalFixed++;
return `"path":"${path.replace(/\./g, "/")}"`;
}
return `"path":"${path}"`;
});
if (newContent !== content) writeFileSync(file, newContent);
}
if (totalFixed > 0) {
console.log(`✓ Normalized ${totalFixed} API path(s) in MDX (dot → slash)`);
}

View File

@@ -23,10 +23,10 @@
"@types/node": "^20.9.0", "@types/node": "^20.9.0",
"lint-staged": "^15.2.7" "lint-staged": "^15.2.7"
}, },
"packageManager": "pnpm@9.5.0", "packageManager": "pnpm@10.22.0",
"engines": { "engines": {
"node": "^20.9.0", "node": "^24.4.0",
"pnpm": ">=9.5.0" "pnpm": ">=10.22.0"
}, },
"lint-staged": { "lint-staged": {
"*": [ "*": [

24
pnpm-lock.yaml generated
View File

@@ -2309,8 +2309,9 @@ packages:
resolution: {integrity: sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==} resolution: {integrity: sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
baseline-browser-mapping@2.9.19: baseline-browser-mapping@2.10.0:
resolution: {integrity: sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==} resolution: {integrity: sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==}
engines: {node: '>=6.0.0'}
hasBin: true hasBin: true
binary-extensions@2.3.0: binary-extensions@2.3.0:
@@ -4683,7 +4684,7 @@ snapshots:
'@commitlint/is-ignored@19.2.2': '@commitlint/is-ignored@19.2.2':
dependencies: dependencies:
'@commitlint/types': 19.0.3 '@commitlint/types': 19.0.3
semver: 7.6.3 semver: 7.7.3
'@commitlint/lint@19.2.2': '@commitlint/lint@19.2.2':
dependencies: dependencies:
@@ -6407,7 +6408,7 @@ snapshots:
base64-js@0.0.8: {} base64-js@0.0.8: {}
baseline-browser-mapping@2.9.19: {} baseline-browser-mapping@2.10.0: {}
binary-extensions@2.3.0: {} binary-extensions@2.3.0: {}
@@ -6421,7 +6422,7 @@ snapshots:
browserslist@4.23.2: browserslist@4.23.2:
dependencies: dependencies:
caniuse-lite: 1.0.30001679 caniuse-lite: 1.0.30001643
electron-to-chromium: 1.5.2 electron-to-chromium: 1.5.2
node-releases: 2.0.18 node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.2) update-browserslist-db: 1.1.0(browserslist@4.23.2)
@@ -7948,7 +7949,7 @@ snapshots:
dependencies: dependencies:
'@next/env': 16.1.5 '@next/env': 16.1.5
'@swc/helpers': 0.5.15 '@swc/helpers': 0.5.15
baseline-browser-mapping: 2.9.19 baseline-browser-mapping: 2.10.0
caniuse-lite: 1.0.30001679 caniuse-lite: 1.0.30001679
postcss: 8.4.31 postcss: 8.4.31
react: 19.2.1 react: 19.2.1
@@ -8185,7 +8186,7 @@ snapshots:
dependencies: dependencies:
react: 19.2.1 react: 19.2.1
react-style-singleton: 2.2.1(@types/react@19.2.2)(react@19.2.1) react-style-singleton: 2.2.1(@types/react@19.2.2)(react@19.2.1)
tslib: 2.8.1 tslib: 2.6.3
optionalDependencies: optionalDependencies:
'@types/react': 19.2.2 '@types/react': 19.2.2
@@ -8224,7 +8225,7 @@ snapshots:
get-nonce: 1.0.1 get-nonce: 1.0.1
invariant: 2.2.4 invariant: 2.2.4
react: 19.2.1 react: 19.2.1
tslib: 2.8.1 tslib: 2.6.3
optionalDependencies: optionalDependencies:
'@types/react': 19.2.2 '@types/react': 19.2.2
@@ -8426,8 +8427,7 @@ snapshots:
semver@7.6.3: {} semver@7.6.3: {}
semver@7.7.3: semver@7.7.3: {}
optional: true
sharp@0.33.5: sharp@0.33.5:
dependencies: dependencies:
@@ -8787,7 +8787,7 @@ snapshots:
use-callback-ref@1.3.2(@types/react@19.2.2)(react@19.2.1): use-callback-ref@1.3.2(@types/react@19.2.2)(react@19.2.1):
dependencies: dependencies:
react: 19.2.1 react: 19.2.1
tslib: 2.8.1 tslib: 2.6.3
optionalDependencies: optionalDependencies:
'@types/react': 19.2.2 '@types/react': 19.2.2
@@ -8802,7 +8802,7 @@ snapshots:
dependencies: dependencies:
detect-node-es: 1.1.0 detect-node-es: 1.1.0
react: 19.2.1 react: 19.2.1
tslib: 2.8.1 tslib: 2.6.3
optionalDependencies: optionalDependencies:
'@types/react': 19.2.2 '@types/react': 19.2.2