Skip to content

Commit

Permalink
feat: upgrading oas-normalize to pull in its new TS typings (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion authored Aug 10, 2022
1 parent 243c8b0 commit 44f96db
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"isemail": "^3.1.3",
"mime-types": "^2.1.35",
"node-fetch": "^2.6.1",
"oas-normalize": "^6.0.0",
"oas-normalize": "^7.0.0",
"open": "^8.2.1",
"ora": "^5.4.1",
"parse-link-header": "^2.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/.sink.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// These packages don't have any TS types so we need to declare a module in order to use them.
declare module '@npmcli/ci-detect';
declare module 'editor';
declare module 'oas-normalize';
5 changes: 2 additions & 3 deletions src/lib/prepareOas.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import fs from 'fs';

import chalk from 'chalk';
import ora from 'ora';

import OASNormalize from 'oas-normalize';
import ora from 'ora';

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

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

if (command === 'openapi') {
bundledSpec = await oas.bundle().then((res: Record<string, unknown>) => {
bundledSpec = await oas.bundle().then(res => {
return JSON.stringify(res);
});

Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"outDir": "dist/",
"paths": {
"@npmcli/ci-detect": [".sink.d.ts"],
"editor": [".sink.d.ts"],
"oas-normalize": [".sink.d.ts"]
"editor": [".sink.d.ts"]
},
"resolveJsonModule": true,
"target": "ES5"
Expand Down

0 comments on commit 44f96db

Please sign in to comment.