Skip to content

Commit

Permalink
chore: bump oas and friends to get tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Sep 11, 2023
1 parent aa22557 commit b6eaa4c
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 46 deletions.
2 changes: 1 addition & 1 deletion __tests__/lib/analyzeOas.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OASDocument } from 'oas/dist/rmoas.types.js';
import type { OASDocument } from 'oas/rmoas.types';

import petstore from '@readme/oas-examples/3.0/json/petstore.json' assert { type: 'json' };
import { describe, it, expect } from 'vitest';
Expand Down
58 changes: 29 additions & 29 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"ignore": "^5.2.0",
"mime-types": "^2.1.35",
"node-fetch": "^2.6.1",
"oas": "^20.10.2",
"oas-normalize": "^8.4.1",
"oas": "^21.0.3",
"oas-normalize": "^9.0.0",
"open": "^8.2.1",
"ora": "^5.4.1",
"parse-link-header": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/cmds/openapi/convert.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CommandOptions } from '../../lib/baseCommand.js';
import type { OASDocument } from 'oas/dist/rmoas.types.js';
import type { OASDocument } from 'oas/rmoas.types';

import fs from 'node:fs';
import path from 'node:path';
Expand Down
2 changes: 1 addition & 1 deletion src/cmds/openapi/inspect.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Analysis, AnalyzedFeature } from '../../lib/analyzeOas.js';
import type { CommandOptions } from '../../lib/baseCommand.js';
import type { OASDocument } from 'oas/dist/rmoas.types.js';
import type { OASDocument } from 'oas/rmoas.types';

import chalk from 'chalk';
import config from 'config';
Expand Down
8 changes: 3 additions & 5 deletions src/cmds/openapi/reduce.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { CommandOptions } from '../../lib/baseCommand.js';
import type { OASDocument } from 'oas/dist/rmoas.types.js';
import type { OASDocument } from 'oas/rmoas.types';

import fs from 'node:fs';
import path from 'node:path';

import chalk from 'chalk';
import OasImport from 'oas';
import oasReducer from 'oas/dist/lib/reducer.js';
import Oas from 'oas';
import oasReducer from 'oas/lib/reducer';
import ora from 'ora';
import prompts from 'prompts';

Expand All @@ -16,8 +16,6 @@ import prepareOas from '../../lib/prepareOas.js';
import promptTerminal from '../../lib/promptWrapper.js';
import { validateFilePath } from '../../lib/validatePromptInput.js';

const Oas = OasImport.default;

interface Options {
method?: string[];
out?: string;
Expand Down
6 changes: 3 additions & 3 deletions src/lib/analyzeOas.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { OASAnalysis, OASAnalysisFeature } from 'oas/dist/analyzer';
import type { OASDocument } from 'oas/dist/rmoas.types.js';
import type { OASAnalysis, OASAnalysisFeature } from 'oas/analyzer';
import type { OASDocument } from 'oas/rmoas.types';

import analyzer from 'oas/dist/analyzer/index.js';
import analyzer from 'oas/analyzer';

export interface AnalyzedFeature extends OASAnalysisFeature {
description: string;
Expand Down
6 changes: 2 additions & 4 deletions src/lib/prepareOas.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import type { OpenAPI } from 'openapi-types';

import chalk from 'chalk';
import OASNormalizeImport, { getAPIDefinitionType } from 'oas-normalize';
import OASNormalize, { getAPIDefinitionType } from 'oas-normalize';
import ora from 'ora';

import isCI from './isCI.js';
import { debug, info, oraOptions } from './logger.js';
import promptTerminal from './promptWrapper.js';
import readdirRecursive from './readdirRecursive.js';

export type SpecFileType = OASNormalizeImport.default['type'];

const OASNormalize = OASNormalizeImport.default;
export type SpecFileType = OASNormalize.default['type'];

interface FoundSpecFile {
/** path to the spec file */
Expand Down

0 comments on commit b6eaa4c

Please sign in to comment.