diff --git a/package.json b/package.json index 8f67cbf9e..bfc2c36fd 100644 --- a/package.json +++ b/package.json @@ -149,16 +149,25 @@ ".": "npm:-@0.0.1" } }, + "@swagger-api/apidom-json-pointer": { + "@types/ramda": { + ".": "npm:-@0.0.1" + } + }, "@swagger-api/apidom-ns-json-schema-draft-4": { "@types/ramda": { ".": "npm:-@0.0.1" } }, "@swagger-api/apidom-ns-openapi-3-0": { - "@types/ramda": "npm:-@0.0.1" + "@types/ramda": { + ".": "npm:-@0.0.1" + } }, "@swagger-api/apidom-ns-openapi-3-1": { - "@types/ramda": "npm:-@0.0.1" + "@types/ramda": { + ".": "npm:-@0.0.1" + } }, "@swagger-api/apidom-reference": { "@swagger-api/apidom-ns-asyncapi-2": { diff --git a/scripts/overrides.js b/scripts/overrides.js index 887779fcb..6f251d392 100644 --- a/scripts/overrides.js +++ b/scripts/overrides.js @@ -3,12 +3,22 @@ * unnecessary dependencies of ApiDOM from npm bundling. * The mechanism is fully idempotent. * - * Dependencies are only removed when using following override notation: + * Dependencies are removed when using following override notation: * * ``` - * "dep": { - * ".": "dep-override" - * } + * "overrides": { + * "dep": { + * ".": "dep-override" + * } + * } + * ``` + * + * Dependencies are overridden when using following override notation: + * + * ``` + * "overrides": { + * "dep": "dep-override" + * } * ``` */ const fs = require('node:fs'); @@ -38,6 +48,8 @@ const removeDeps = (pckgName, overrides) => { Object.entries(overrides).forEach(([dep, override]) => { if (typeof override === 'object') { delete pckgJSON?.dependencies[dep]; + } else { + pckgJSON.dependencies[dep] = override; } });