Skip to content

Commit

Permalink
chore(deps): npm up (#983)
Browse files Browse the repository at this point in the history
## 🧰 Changes

Before:

```
Package                          Current   Wanted   Latest  Location                                      Depended by
@commitlint/cli                   18.6.0   18.6.1   19.0.3  node_modules/@commitlint/cli                  rdme
@commitlint/config-conventional   18.6.0   18.6.2   19.0.3  node_modules/@commitlint/config-conventional  rdme
@readme/eslint-config             13.4.1   13.5.0   13.5.0  node_modules/@readme/eslint-config            rdme
@types/semver                      7.5.6    7.5.8    7.5.8  node_modules/@types/semver                    rdme
@types/validator                 13.11.8  13.11.9  13.11.9  node_modules/@types/validator                 rdme
@vitest/coverage-v8                1.2.2    1.3.1    1.3.1  node_modules/@vitest/coverage-v8              rdme
@vitest/expect                     1.2.2    1.3.1    1.3.1  node_modules/@vitest/expect                   rdme
eslint                            8.56.0   8.57.0   8.57.0  node_modules/eslint                           rdme
husky                             9.0.10   9.0.11   9.0.11  node_modules/husky                            rdme
knip                               4.3.0    4.6.0    5.0.2  node_modules/knip                             rdme
msw                                2.1.5    2.2.2    2.2.2  node_modules/msw                              rdme
nock                              13.5.1   13.5.4   13.5.4  node_modules/nock                             rdme
open                              10.0.3   10.0.4   10.0.4  node_modules/open                             rdme
ora                                6.3.1    6.3.1    8.0.1  node_modules/ora                              rdme
prettier                           3.2.4    3.2.5    3.2.5  node_modules/prettier                         rdme
rollup                             4.9.6   4.12.0   4.12.0  node_modules/rollup                           rdme
semver                             7.5.4    7.6.0    7.6.0  node_modules/semver                           rdme
type-fest                         4.10.2   4.10.3   4.10.3  node_modules/type-fest                        rdme
vitest                             1.2.2    1.3.1    1.3.1  node_modules/vitest                           rdme
```

After:

```
Package  Current  Wanted  Latest  Location          Depended by
ora        6.3.1   6.3.1   8.0.1  node_modules/ora  rdme
```

Also making changes to match the latest versions of our
eslint/prettier/knip configs.
  • Loading branch information
kanadgupta authored Mar 1, 2024
1 parent 2c35e18 commit 40f5636
Show file tree
Hide file tree
Showing 11 changed files with 1,441 additions and 1,718 deletions.
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
}
}

0 comments on commit 40f5636

Please sign in to comment.