Skip to content
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
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ updates:
- dependency-name: find-cache-dir
versions:
- '>= 4'
- dependency-name: form-data-encoder
versions:
- '>= 2'
- dependency-name: formdata-node
versions:
- '>= 5'
- dependency-name: get-stream
versions:
- '>= 7'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- run: npm ci
- run: npm run build
Expand All @@ -28,7 +28,6 @@ jobs:
strategy:
matrix:
node-version:
- 16
- 18
- 20

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- run: npm ci
- run: npm run build
Expand Down
129 changes: 52 additions & 77 deletions package-lock.json

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

9 changes: 3 additions & 6 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"author": "Jon Ursenbach <jon@readme.io>",
"license": "MIT",
"engines": {
"node": ">=16"
"node": ">=18"
},
"keywords": [
"api",
Expand All @@ -45,13 +45,10 @@
"commander": "^11.0.0",
"datauri": "^4.1.0",
"execa": "^5.1.1",
"fetch-har": "^8.1.5",
"fetch-har": "^10.0.0",
"figures": "^3.2.0",
"find-cache-dir": "^3.3.1",
"form-data-encoder": "^1.7.2",
"formdata-node": "^4.3.2",
"get-stream": "^6.0.1",
"isomorphic-fetch": "^3.0.0",
"js-yaml": "^4.1.0",
"json-schema-to-ts": "^2.9.2",
"json-schema-traverse": "^1.0.0",
Expand All @@ -61,7 +58,6 @@
"lodash.setwith": "^4.3.2",
"lodash.startcase": "^4.4.0",
"make-dir": "^3.1.0",
"node-abort-controller": "^3.1.1",
"oas": "^20.4.0",
"ora": "^5.4.1",
"prompts": "^2.4.2",
Expand All @@ -88,6 +84,7 @@
"@types/validate-npm-package-name": "^4.0.0",
"@vitest/coverage-v8": "^0.34.1",
"fetch-mock": "^9.11.0",
"formdata-to-string": "^1.0.0",
"oas-normalize": "^8.3.2",
"type-fest": "^4.3.1",
"typescript": "^5.2.2",
Expand Down
1 change: 0 additions & 1 deletion packages/api/src/.sink.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/api/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import os from 'os';
import path from 'path';

import findCacheDir from 'find-cache-dir';
import 'isomorphic-fetch';
import makeDir from 'make-dir';

import Fetcher from './fetcher';
Expand Down
7 changes: 0 additions & 7 deletions packages/api/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import type { HttpMethods } from 'oas/dist/rmoas.types';

import oasToHar from '@readme/oas-to-har';
import fetchHar from 'fetch-har';
import { FormDataEncoder } from 'form-data-encoder';
import 'isomorphic-fetch';
// `AbortController` was shipped in Node 15 so when Node 14 is EOL'd we can drop this dependency.
import { AbortController } from 'node-abort-controller';

import FetchError from './errors/fetchError';
import getJSONSchemaDefaults from './getJSONSchemaDefaults';
Expand Down Expand Up @@ -113,15 +109,12 @@ export default class APICore {
if (this.config.timeout) {
const controller = new AbortController();
timeoutSignal = setTimeout(() => controller.abort(), this.config.timeout);
// @todo Typing on `AbortController` coming out of `node-abort-controler` isn't right so when
// we eventually drop that dependency we can remove the `as any` here.
init.signal = controller.signal as any;
}

return fetchHar(har as any, {
files: data.files || {},
init,
multipartEncoder: FormDataEncoder,
userAgent: this.userAgent,
})
.then(async (res: Response) => {
Expand Down
1 change: 0 additions & 1 deletion packages/api/src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import fs from 'fs';
import path from 'path';

import OpenAPIParser from '@readme/openapi-parser';
import 'isomorphic-fetch';
import yaml from 'js-yaml';

export default class Fetcher {
Expand Down
Loading