Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): npm up #983

Merged
merged 5 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions __tests__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"noEmit": true,
"skipLibCheck": true,
"strict": false,
"strict": false
},
"include": ["*.ts", "**/*"],
"include": ["*.ts", "**/*"]
}
2 changes: 0 additions & 2 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { KnipConfig } from 'knip';
const config: KnipConfig = {
ignore: ['bin/*.js'],
ignoreBinaries: ['semantic-release'],
// used in husky commit hooks
ignoreDependencies: ['@commitlint/cli'],
};

export default config;
3,117 changes: 1,421 additions & 1,696 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"validator": "^13.7.0"
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@readme/better-ajv-errors": "^1.5.0",
"@readme/eslint-config": "^13.4.0",
"@readme/oas-examples": "^5.10.0",
Expand Down Expand Up @@ -94,7 +94,7 @@
"eslint": "^8.47.0",
"husky": "^9.0.10",
"js-yaml": "^4.1.0",
"knip": "^4.3.0",
"knip": "^5.0.2",
"msw": "^2.0.3",
"nock": "^13.2.7",
"openapi-types": "^12.1.3",
Expand Down
8 changes: 4 additions & 4 deletions src/cmds/versions/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export interface Options extends CommonOptions {
}

export interface CommonOptions {
beta?: 'true' | 'false';
beta?: 'false' | 'true';
codename?: string;
deprecated?: 'true' | 'false';
hidden?: 'true' | 'false';
main?: 'true' | 'false';
deprecated?: 'false' | 'true';
hidden?: 'false' | 'true';
main?: 'false' | 'true';
}

export default class CreateVersionCommand extends Command {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function rdme(rawProcessArgv: NodeJS.Process['argv']) {
}

try {
let cmdArgv: CommandOptions | CommandLineOptions;
let cmdArgv: CommandLineOptions | CommandOptions;
let bin: Command;

// Handling for `rdme help` and `rdme help <command>` cases.
Expand Down
4 changes: 2 additions & 2 deletions src/lib/apiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export interface APIErrorResponse {
export default class APIError extends Error {
code: string;

constructor(res: string | APIErrorResponse | { error: APIErrorResponse }) {
let err: string | APIErrorResponse;
constructor(res: APIErrorResponse | string | { error: APIErrorResponse }) {
let err: APIErrorResponse | string;

// Special handling to for fetch `res` arguments where `res.error` will contain our API error
// response.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/baseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import isCI from './isCI.js';
import { debug, info, warn } from './logger.js';
import loginFlow from './loginFlow.js';

export type CommandOptions<T = {}> = ZeroAuthCommandOptions<T> | AuthenticatedCommandOptions<T>;
export type CommandOptions<T = {}> = AuthenticatedCommandOptions<T> | ZeroAuthCommandOptions<T>;

export type AuthenticatedCommandOptions<T = {}> = Omit<ZeroAuthCommandOptions<T>, 'key'> & {
key: string;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/castStringOptToBool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Options as UpdateOptions } from '../cmds/versions/update.js';
* and casts it to a boolean.
*/
export default function castStringOptToBool(
opt: 'true' | 'false' | undefined,
opt: 'false' | 'true' | undefined,
optName: keyof CreateOptions | keyof UpdateOptions,
) {
if (!opt) {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/prepareOas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import readdirRecursive from './readdirRecursive.js';

export type SpecFileType = OASNormalize['type'];

type SpecType = 'OpenAPI' | 'Swagger' | 'Postman';
type SpecType = 'OpenAPI' | 'Postman' | 'Swagger';

interface FoundSpecFile {
/** path to the spec file */
Expand All @@ -30,7 +30,7 @@ interface FileSelection {
}

// source: https://stackoverflow.com/a/58110124
type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T;
type Truthy<T> = T extends '' | 0 | false | null | undefined ? never : T;

function truthy<T>(value: T): value is Truthy<T> {
return !!value;
Expand All @@ -49,7 +49,7 @@ const capitalizeSpecType = (type: string) =>
*/
export default async function prepareOas(
path: string | undefined,
command: 'openapi' | 'openapi:convert' | 'openapi:inspect' | 'openapi:reduce' | 'openapi:validate',
command: 'openapi:convert' | 'openapi:inspect' | 'openapi:reduce' | 'openapi:validate' | 'openapi',
opts: {
/**
* Optionally convert the supplied or discovered API definition to the latest OpenAPI release.
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"skipLibCheck": true,
"strict": true,
"target": "ES2022",
"useUnknownInCatchVariables": false,
"useUnknownInCatchVariables": false
},
"include": ["./src/**/*"],
"ts-node": {
"esm": true,
},
"esm": true
}
}