-
Notifications
You must be signed in to change notification settings - Fork 43
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
v9 roadmap #801
Comments
Maybe we also migrate to ESM? 😬 |
fwiw, iirc last time i looked into that you still needed to pass the |
maybe we also drop Node 16 support also when that is EOL in a few weeks. we'll want to bump the version here (in addition to everywhere else): Line 1 in 9756d95
|
Now that we've got |
@erunion ah yeah good callout — definitely down to add a deprecation notice but i don't think we should remove those until we're using the new |
For dumping diff --git a/src/lib/streamSpecToRegistry.ts b/src/lib/streamSpecToRegistry.ts
index a73445f..9d4f68a 100644
--- a/src/lib/streamSpecToRegistry.ts
+++ b/src/lib/streamSpecToRegistry.ts
@@ -1,8 +1,4 @@
-import fs from 'node:fs';
-
-import { FormData } from 'formdata-node';
import ora from 'ora';
-import { file as tmpFile } from 'tmp-promise';
import { debug, oraOptions } from './logger.js';
import readmeAPIFetch, { handleRes } from './readmeAPIFetch.js';
@@ -15,23 +11,15 @@ import readmeAPIFetch, { handleRes } from './readmeAPIFetch.js';
*/
export default async function streamSpecToRegistry(spec: string) {
const spinner = ora({ text: 'Staging your API definition for upload...', ...oraOptions() }).start();
- // Create a temporary file to write the bundled spec to,
- // which we will then stream into the form data body
- const { path } = await tmpFile({ prefix: 'rdme-openapi-', postfix: '.json' });
- debug(`creating temporary file at ${path}`);
- await fs.writeFileSync(path, spec);
- const stream = fs.createReadStream(path);
-
- debug('file and stream created, streaming into form data payload');
+ debug('preparing spec into form data payload');
const formData = new FormData();
- formData.append('spec', {
- type: 'application/json',
- name: 'openapi.json',
- [Symbol.toStringTag]: 'File',
- stream() {
- return stream;
- },
- });
+ formData.append(
+ spec,
+ new Blob([spec], {
+ type: 'application/json',
+ }),
+ 'openapi.json',
+ );
const options = {
body: formData, |
v9
rdme openapi
? #1106README
, in favor of new autogenerated CLI reference docs indocumentation/commands.md
dist-gha/
directory to update with every new release f42392bvalidate
, deprecate/hideopen
#1072oclif
setupMAINTAINERS.md
gh
CLI usage) 331d28bExperimentalWarning
s show up fix: hideExperimentalWarning
#901docs:edit
command refactor: removeoas
,swagger
,docs:edit
#902oas
command refactor: removeoas
,swagger
,docs:edit
#902swagger
command refactor: removeoas
,swagger
,docs:edit
#902tsconfig
chore: tsconfig cleanup #905isPublic
flag in theversions:create
andversions:update
commands to behidden
so it's consistent with the other flags and with our API endpoints feat(versions): flag parity with API, copy fixes #906actions/checkout@v4
everywhere #895fetch
andFormData
andin favor ofmsw
node-fetch
andandnock
formdata-node
, convert everything over accordingly feat(fetch): use undici +ProxyAgent
#1000Add deprecation notice to(edit: cancelling this)docs
commandsThe text was updated successfully, but these errors were encountered: