Skip to content

Commit 44f96db

Browse files
authored
feat: upgrading oas-normalize to pull in its new TS typings (#564)
1 parent 243c8b0 commit 44f96db

File tree

5 files changed

+19
-22
lines changed

5 files changed

+19
-22
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"isemail": "^3.1.3",
5151
"mime-types": "^2.1.35",
5252
"node-fetch": "^2.6.1",
53-
"oas-normalize": "^6.0.0",
53+
"oas-normalize": "^7.0.0",
5454
"open": "^8.2.1",
5555
"ora": "^5.4.1",
5656
"parse-link-header": "^2.0.0",

src/.sink.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// These packages don't have any TS types so we need to declare a module in order to use them.
22
declare module '@npmcli/ci-detect';
33
declare module 'editor';
4-
declare module 'oas-normalize';

src/lib/prepareOas.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import fs from 'fs';
22

33
import chalk from 'chalk';
4-
import ora from 'ora';
5-
64
import OASNormalize from 'oas-normalize';
5+
import ora from 'ora';
76

87
import { debug, info, oraOptions } from './logger';
98

@@ -69,7 +68,7 @@ export default async function prepareOas(path: string, command: 'openapi' | 'val
6968
let bundledSpec = '';
7069

7170
if (command === 'openapi') {
72-
bundledSpec = await oas.bundle().then((res: Record<string, unknown>) => {
71+
bundledSpec = await oas.bundle().then(res => {
7372
return JSON.stringify(res);
7473
});
7574

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"outDir": "dist/",
1010
"paths": {
1111
"@npmcli/ci-detect": [".sink.d.ts"],
12-
"editor": [".sink.d.ts"],
13-
"oas-normalize": [".sink.d.ts"]
12+
"editor": [".sink.d.ts"]
1413
},
1514
"resolveJsonModule": true,
1615
"target": "ES5"

0 commit comments

Comments
 (0)