From 957ef417c84ea755cea69b101e45c53871a2a2ad Mon Sep 17 00:00:00 2001 From: ronenk1 Date: Tue, 3 Feb 2026 09:54:21 +0200 Subject: [PATCH 1/2] fix: use parentPath instead of deprecated path property for Node.js 24 compatibility --- package-lock.json | 20 +++++++++++--------- package.json | 8 ++++---- scripts/build.mts | 6 +++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea81e3dd..0d6eeacb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@map-colonies/prettier-config": "^0.0.1", "@sinclair/typebox": "^0.34.15", "@types/json-pointer": "^1.0.34", - "@types/node": "^20.11.25", + "@types/node": "^25.2.0", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "camelcase": "^8.0.0", @@ -900,13 +900,14 @@ } }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "25.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.0.tgz", + "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.16.0" } }, "node_modules/ajv": { @@ -2302,10 +2303,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" }, "node_modules/unicorn-magic": { "version": "0.1.0", diff --git a/package.json b/package.json index a6373014..dcb9b013 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,12 @@ "@apideck/better-ajv-errors": "^0.3.6", "@apidevtools/json-schema-ref-parser": "^11.5.4", "@commitlint/cli": "^19.2.1", - "@map-colonies/infra-copilot-instructions": "^1.0.0", "@map-colonies/commitlint-config": "^1.1.0", + "@map-colonies/infra-copilot-instructions": "^1.0.0", "@map-colonies/prettier-config": "^0.0.1", "@sinclair/typebox": "^0.34.15", "@types/json-pointer": "^1.0.34", - "@types/node": "^20.11.25", + "@types/node": "^25.2.0", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "camelcase": "^8.0.0", @@ -45,7 +45,7 @@ "prettier": "^3.2.5", "pretty-quick": "^4.0.0", "tsx": "^4.19.2", - "zx": "^8.2.1", - "typescript": "5.4.3" + "typescript": "5.4.3", + "zx": "^8.2.1" } } diff --git a/scripts/build.mts b/scripts/build.mts index 717263d6..6d68b6ee 100644 --- a/scripts/build.mts +++ b/scripts/build.mts @@ -27,7 +27,7 @@ filesToDelete.push(symbolFilePath); // loop over all the files in the schemas directory and create the build files for await (const file of filesTreeGenerator(schemasFolder)) { - const directory = file.path; + const directory = file.parentPath; const fullPath = path.join(directory, file.name); const fileVersion = file.name.split('.')[0]; const schemaName = camelCase(directory.substring(schemasFolder.length).replaceAll(path.sep, '_') + '_' + fileVersion); @@ -87,10 +87,10 @@ ${stringifiedSchema.trimEnd().substring(1)} as const;\n`, // go over all the files in the schemas directory and create a dereferenced schema for json-schema-to-ts usage const parser = new $RefParser(); for await (const file of filesTreeGenerator(schemasFolder)) { - const fileDestPath = path.join(buildDir, file.path, path.basename(file.name, path.extname(file.name))); + const fileDestPath = path.join(buildDir, file.parentPath, path.basename(file.name, path.extname(file.name))); if (file.name.endsWith('.configs.json')) { - fs.cpSync(path.join(file.path, file.name), fileDestPath + '.json'); + fs.cpSync(path.join(file.parentPath, file.name), fileDestPath + '.json'); continue; } From 4329779725d5fff9233e63829060bfcba1de4db4 Mon Sep 17 00:00:00 2001 From: ronenk1 Date: Tue, 3 Feb 2026 10:23:50 +0200 Subject: [PATCH 2/2] deps: downgrade @types/node to 24.10.9 for compatibility with Node.js 24 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d6eeacb..441eeb71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@map-colonies/prettier-config": "^0.0.1", "@sinclair/typebox": "^0.34.15", "@types/json-pointer": "^1.0.34", - "@types/node": "^25.2.0", + "@types/node": "^24.10.9", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "camelcase": "^8.0.0", @@ -900,9 +900,9 @@ } }, "node_modules/@types/node": { - "version": "25.2.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.0.tgz", - "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==", + "version": "24.10.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.9.tgz", + "integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==", "dev": true, "license": "MIT", "peer": true, diff --git a/package.json b/package.json index dcb9b013..5a409352 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@map-colonies/prettier-config": "^0.0.1", "@sinclair/typebox": "^0.34.15", "@types/json-pointer": "^1.0.34", - "@types/node": "^25.2.0", + "@types/node": "^24.10.9", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "camelcase": "^8.0.0",