Skip to content

Commit d69a364

Browse files
authored
chore: bump deps, tsconfig updates, openapi updates (#1323)
## 🧰 Changes - bumps openapi file - updates `tsconfig.json` as a result of typescript 5.9 updates - various lint fixes - bumps deps (see below for before/after) **before** ``` Package Current Wanted Latest Location Depended by @biomejs/biome 2.1.2 2.1.3 2.1.3 node_modules/@biomejs/biome rdme @oclif/core 4.5.1 4.5.2 4.5.2 node_modules/@oclif/core rdme @oclif/plugin-autocomplete 3.2.33 3.2.34 3.2.34 node_modules/@oclif/plugin-autocomplete rdme @oclif/plugin-help 6.2.31 6.2.32 6.2.32 node_modules/@oclif/plugin-help rdme @oclif/plugin-plugins 5.4.44 5.4.46 5.4.46 node_modules/@oclif/plugin-plugins rdme @oclif/plugin-warn-if-update-available 3.1.44 3.1.46 3.1.46 node_modules/@oclif/plugin-warn-if-update-available rdme @readme/oas-examples 6.1.2 6.1.4 6.1.4 node_modules/@readme/oas-examples rdme @readme/standards 1.0.0 1.2.0 1.2.0 node_modules/@readme/standards rdme knip 5.61.3 5.62.0 5.62.0 node_modules/knip rdme nock 14.0.5 14.0.8 14.0.8 node_modules/nock rdme oas 27.2.1 27.2.1 28.0.0 node_modules/oas rdme oas-normalize 14.1.2 14.1.2 15.0.0 node_modules/oas-normalize rdme oclif 4.20.6 4.22.5 4.22.5 node_modules/oclif rdme rollup 4.45.0 4.46.2 4.46.2 node_modules/rollup rdme typescript 5.8.3 5.9.2 5.9.2 node_modules/typescript rdme undici 5.29.0 5.29.0 7.13.0 node_modules/undici rdme ``` **after** ``` Package Current Wanted Latest Location Depended by undici 5.29.0 5.29.0 7.13.0 node_modules/undici rdme ``` ## 🧬 QA & Testing Provide as much information as you can on how to test what you've done.
1 parent ca85230 commit d69a364

File tree

10 files changed

+1149
-849
lines changed

10 files changed

+1149
-849
lines changed

package-lock.json

Lines changed: 716 additions & 716 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"js-yaml": "^4.1.0",
6464
"json-schema-to-ts": "^3.1.1",
6565
"mime-types": "^3.0.1",
66-
"oas": "^27.2.1",
67-
"oas-normalize": "^14.1.2",
66+
"oas": "^28.0.0",
67+
"oas-normalize": "^15.0.0",
6868
"ora": "^8.1.1",
6969
"prompts": "^2.4.2",
7070
"semver": "^7.5.3",

src/commands/openapi/resolve.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ export default class OpenAPIResolveCommand extends BaseCommand<typeof OpenAPIRes
305305
);
306306
this.replaceCircularRefs(schemas, remainingCircularRefs);
307307

308+
// biome-ignore lint/nursery/noAwaitInLoop: Awaiting here is necessary to ensure we get all of the remaining circular references
308309
remainingCircularRefs = await this.getCircularRefs(spec);
309310
iterationCount += 1;
310311
}
@@ -324,6 +325,7 @@ export default class OpenAPIResolveCommand extends BaseCommand<typeof OpenAPIRes
324325
);
325326
this.replaceAllRefsWithObject(schemas, remainingCircularRefs);
326327

328+
// biome-ignore lint/nursery/noAwaitInLoop: Awaiting here is necessary to ensure we get all of the remaining circular references
327329
remainingCircularRefs = await this.getCircularRefs(spec);
328330
this.debug(
329331
`After iteration ${objectReplacementIterationCount + 1}, remaining circular references: ${remainingCircularRefs.length}`,

src/commands/openapi/upload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export default class OpenAPIUploadCommand extends BaseCommand<typeof OpenAPIUplo
100100
let status: APIUploadStatus = 'pending';
101101

102102
while (this.isStatusPending(status) && count < 10) {
103+
// biome-ignore lint/nursery/noAwaitInLoop: We need to wait between requests to avoid hitting rate limits.
103104
await new Promise(resolve => {
104105
// exponential backoff — wait 1s, 2s, 4s, 8s, 16s, 32s, 30s, 30s, 30s, 30s, etc.
105106
setTimeout(resolve, Math.min(isTest() ? 1 : 1000 * 2 ** count, 30000));

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/** biome-ignore-all lint/performance/noBarrelFile: this barrel file is being exported for use in oclif + plugins */
2+
13
import type { ValueOf } from 'type-fest';
24

35
import ChangelogUploadCommand from './commands/changelog/upload.js';

src/lib/createGHA/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ export default async function createGHA(
215215

216216
let output = yamlBase;
217217

218-
Object.keys(data).forEach(key => {
219-
output = output.replace(new RegExp(`{{${key}}}`, 'g'), data[key as keyof typeof data]);
218+
Object.keys(data).forEach(attr => {
219+
output = output.replace(new RegExp(`{{${attr}}}`, 'g'), data[attr as keyof typeof data]);
220220
});
221221

222222
if (!fs.existsSync(GITHUB_WORKFLOW_DIR)) {

src/lib/getPkg.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const registryUrl = 'https://registry.npmjs.com/rdme';
1010
/**
1111
* @see {@link https://docs.npmjs.com/adding-dist-tags-to-packages}
1212
*/
13-
type npmDistTag = 'latest';
13+
type NPMDistTag = 'latest';
1414

1515
/**
1616
* Return the major Node.js version specified in our `package.json` config.
@@ -54,7 +54,7 @@ export async function getPkgVersionFromNPM(
5454
* The `npm` dist tag to retrieve. If this value is omitted,
5555
* the version from the `package.json` is returned.
5656
*/
57-
npmDistTag?: npmDistTag,
57+
npmDistTag?: NPMDistTag,
5858
): Promise<string> {
5959
if (npmDistTag) {
6060
return fetch(registryUrl)
@@ -74,6 +74,6 @@ export async function getPkgVersionFromNPM(
7474
* @example 8
7575
*/
7676
// biome-ignore lint/suspicious/noConfusingVoidType: This function can be invoked with `.call()`.
77-
export async function getMajorPkgVersion(this: Hook.Context | void, npmDistTag?: npmDistTag): Promise<number> {
77+
export async function getMajorPkgVersion(this: Hook.Context | void, npmDistTag?: NPMDistTag): Promise<number> {
7878
return semver.major(await getPkgVersionFromNPM.call(this, npmDistTag));
7979
}

src/lib/types/openapiDoc.ts

Lines changed: 419 additions & 123 deletions
Large diffs are not rendered by default.

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** biome-ignore-all lint/performance/noBarrelFile: this barrel file is being exported for use in plugins */
12
import BaseCommand from './lib/baseCommand.js';
23
import readdirRecursive from './lib/readdirRecursive.js';
34

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
"allowJs": true,
44
"declaration": true,
55
"erasableSyntaxOnly": true,
6-
"lib": ["ES2022"],
7-
"module": "Node18",
6+
"module": "node20",
87
"outDir": "dist/",
9-
"resolveJsonModule": true,
108
"rootDir": "src",
119
"skipLibCheck": true,
1210
"strict": true,

0 commit comments

Comments
 (0)