diff --git a/.eslintrc b/.eslintrc index b7d1e9292..26ed767bf 100644 --- a/.eslintrc +++ b/.eslintrc @@ -66,6 +66,9 @@ } ] } - ] + ], + + // This rule is only really applicable for OSS libraries and doesn't apply to rdme's case. + "readme/no-dual-exports": "off" } } diff --git a/__tests__/lib/analyzeOas.test.ts b/__tests__/lib/analyzeOas.test.ts index 53ffd08f8..408cffe91 100644 --- a/__tests__/lib/analyzeOas.test.ts +++ b/__tests__/lib/analyzeOas.test.ts @@ -1,4 +1,4 @@ -import type { OASDocument } from 'oas/rmoas.types'; +import type { OASDocument } from 'oas/types'; import petstore from '@readme/oas-examples/3.0/json/petstore.json' assert { type: 'json' }; import { describe, it, expect } from 'vitest'; diff --git a/package-lock.json b/package-lock.json index ca2cd528f..dbb4c5f77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,8 +21,8 @@ "ignore": "^5.2.0", "mime-types": "^2.1.35", "node-fetch": "^3.3.2", - "oas": "^22.0.0", - "oas-normalize": "^11.0.0", + "oas": "^24.0.0", + "oas-normalize": "^11.0.1", "open": "^9.1.0", "ora": "^6.3.1", "parse-link-header": "^2.0.0", @@ -43,7 +43,7 @@ "@commitlint/cli": "^17.6.6", "@commitlint/config-conventional": "^17.6.6", "@readme/better-ajv-errors": "^1.5.0", - "@readme/eslint-config": "^13.1.0", + "@readme/eslint-config": "^13.4.0", "@readme/oas-examples": "^5.10.0", "@rollup/plugin-commonjs": "^25.0.4", "@rollup/plugin-json": "^6.0.0", @@ -1749,9 +1749,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/@readme/eslint-config": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-13.1.0.tgz", - "integrity": "sha512-SEUQMbhwBxnxST+D0gFVCK0vHCJJQlEYhfrMN4VSyXRDiQo6/NHGpqAiEi9Bjvzjgothw/ArO9ytV6myZMA6qA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-13.4.0.tgz", + "integrity": "sha512-3F7weIbzzVY6Eb8gKDABKHM32vAlVTczHuRwkJV5+PdVHtBkIoHdzCr/KoHlJ3KFWj25UMW/8Z8fRIq1q4/l+g==", "dev": true, "dependencies": { "@typescript-eslint/eslint-plugin": "^6.2.1", @@ -1769,6 +1769,7 @@ "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.33.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-readme": "^1.2.1", "eslint-plugin-require-extensions": "^0.1.3", "eslint-plugin-testing-library": "^6.0.1", "eslint-plugin-typescript-sort-keys": "^3.0.0", @@ -5839,6 +5840,18 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-readme": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-readme/-/eslint-plugin-readme-1.2.1.tgz", + "integrity": "sha512-k2fZco46go81FI+7K7f6XEoMjXDBEWbfc8HsgaM3Vz6H1oxZWcdox9zubDH1HGsnTcREd5pLr1nRDzbgsCkPGw==", + "dev": true, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^8.0.0" + } + }, "node_modules/eslint-plugin-require-extensions": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/eslint-plugin-require-extensions/-/eslint-plugin-require-extensions-0.1.3.tgz", @@ -11322,9 +11335,9 @@ } }, "node_modules/oas": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/oas/-/oas-22.0.0.tgz", - "integrity": "sha512-/amjB0O1qy8frcQdnoEmClGVuc7ibxvxG1DkTr8Uh7utxsuziZTWiJQNk9MA7abg8AQbsEhj3nBVoHapi+ABag==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/oas/-/oas-24.0.0.tgz", + "integrity": "sha512-x3sXx8LOzNKqgdzWYe3hmM3swFc3TocSvWX0yzgNXWdKkhGIYMW0UUp/HJ0nsC4o9lnA1QcSYVjdCeAQ+Z4JVg==", "dependencies": { "@readme/json-schema-ref-parser": "^1.2.0", "@types/json-schema": "^7.0.11", @@ -11332,10 +11345,10 @@ "jsonpath-plus": "^7.2.0", "jsonpointer": "^5.0.0", "memoizee": "^0.4.14", - "oas-normalize": "^11.0.0", + "oas-normalize": "^11.0.1", "openapi-types": "^12.1.1", "path-to-regexp": "^6.2.0", - "remove-undefined-objects": "^4.0.2" + "remove-undefined-objects": "^5.0.0" }, "engines": { "node": ">=18" @@ -11363,9 +11376,9 @@ } }, "node_modules/oas-normalize": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/oas-normalize/-/oas-normalize-11.0.0.tgz", - "integrity": "sha512-AUxoheSKJEMrF2YK7Qz8BpR0Gz8JDuOSpAOqeTW7N1StfMbxcBxCTkWoQuQoNlS7RuZh7D+0BtZO/yYF3r6olg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/oas-normalize/-/oas-normalize-11.0.1.tgz", + "integrity": "sha512-y+tM2XhLys9o2MNnQBtcRgi6u86jjqTXR2MCMX3rf379t7uVdTqfJPhUD/ruxNSIxSIf+jtO3tPCwCKFScyJCg==", "dependencies": { "@readme/openapi-parser": "^2.5.0", "@readme/postman-to-openapi": "^4.1.0", @@ -13150,11 +13163,11 @@ } }, "node_modules/remove-undefined-objects": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/remove-undefined-objects/-/remove-undefined-objects-4.0.2.tgz", - "integrity": "sha512-6Nh52HADM60lhewwWU30ujMzTjYJk4M5q/LhRYLAacP0hTbzjVWiBVlV84U5RsQA4wDKLwkL0r0qJvti2hRLeQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remove-undefined-objects/-/remove-undefined-objects-5.0.0.tgz", + "integrity": "sha512-DE8C17uIWeHaY4SqIkpQpHXm0MIdYHtIqjieWuh0I2PG8YcZRxFE6pqeEhnRetsrQ7Lu9uvSNQkDbg95NLpvnQ==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/require-directory": { diff --git a/package.json b/package.json index 4acfec828..a54c8376b 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "ignore": "^5.2.0", "mime-types": "^2.1.35", "node-fetch": "^3.3.2", - "oas": "^22.0.0", - "oas-normalize": "^11.0.0", + "oas": "^24.0.0", + "oas-normalize": "^11.0.1", "open": "^9.1.0", "ora": "^6.3.1", "parse-link-header": "^2.0.0", @@ -67,7 +67,7 @@ "@commitlint/cli": "^17.6.6", "@commitlint/config-conventional": "^17.6.6", "@readme/better-ajv-errors": "^1.5.0", - "@readme/eslint-config": "^13.1.0", + "@readme/eslint-config": "^13.4.0", "@readme/oas-examples": "^5.10.0", "@rollup/plugin-commonjs": "^25.0.4", "@rollup/plugin-json": "^6.0.0", diff --git a/src/cmds/openapi/convert.ts b/src/cmds/openapi/convert.ts index d5d2f14ca..1dfb3f6d3 100644 --- a/src/cmds/openapi/convert.ts +++ b/src/cmds/openapi/convert.ts @@ -1,5 +1,5 @@ import type { ZeroAuthCommandOptions } from '../../lib/baseCommand.js'; -import type { OASDocument } from 'oas/rmoas.types'; +import type { OASDocument } from 'oas/types'; import fs from 'node:fs'; import path from 'node:path'; diff --git a/src/cmds/openapi/inspect.ts b/src/cmds/openapi/inspect.ts index b2b6b63a2..1f3e31c56 100644 --- a/src/cmds/openapi/inspect.ts +++ b/src/cmds/openapi/inspect.ts @@ -1,6 +1,6 @@ import type { Analysis, AnalyzedFeature } from '../../lib/analyzeOas.js'; import type { ZeroAuthCommandOptions } from '../../lib/baseCommand.js'; -import type { OASDocument } from 'oas/rmoas.types'; +import type { OASDocument } from 'oas/types'; import chalk from 'chalk'; import ora from 'ora'; diff --git a/src/cmds/openapi/reduce.ts b/src/cmds/openapi/reduce.ts index 7a7a8718c..a35c760ec 100644 --- a/src/cmds/openapi/reduce.ts +++ b/src/cmds/openapi/reduce.ts @@ -1,12 +1,12 @@ import type { ZeroAuthCommandOptions } from '../../lib/baseCommand.js'; -import type { OASDocument } from 'oas/rmoas.types'; +import type { OASDocument } from 'oas/types'; import fs from 'node:fs'; import path from 'node:path'; import chalk from 'chalk'; import Oas from 'oas'; -import oasReducer from 'oas/lib/reducer'; +import oasReducer from 'oas/reducer'; import ora from 'ora'; import prompts from 'prompts'; diff --git a/src/lib/analyzeOas.ts b/src/lib/analyzeOas.ts index 81b6bde36..45fde0334 100644 --- a/src/lib/analyzeOas.ts +++ b/src/lib/analyzeOas.ts @@ -1,5 +1,5 @@ -import type { OASAnalysis, OASAnalysisFeature } from 'oas/analyzer'; -import type { OASDocument } from 'oas/rmoas.types'; +import type { OASAnalysis, OASAnalysisFeature } from 'oas/analyzer/types'; +import type { OASDocument } from 'oas/types'; import analyzer from 'oas/analyzer';