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

v9 roadmap #801

Closed
26 tasks done
kanadgupta opened this issue Apr 18, 2023 · 7 comments
Closed
26 tasks done

v9 roadmap #801

kanadgupta opened this issue Apr 18, 2023 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@kanadgupta
Copy link
Member

kanadgupta commented Apr 18, 2023

v9

@kanadgupta kanadgupta added the enhancement New feature or request label Apr 18, 2023
@kanadgupta kanadgupta added this to the v9 milestone Apr 18, 2023
@kanadgupta
Copy link
Member Author

Maybe we also migrate to ESM? 😬

@erunion
Copy link
Member

erunion commented Jul 5, 2023

fwiw, iirc last time i looked into that you still needed to pass the --experimental flag to Node for ESM in order to run bin/rdme. That was like a year and a half ago though, and before we migrated to TS, so maybe things are different now.

@kanadgupta
Copy link
Member Author

kanadgupta commented Aug 1, 2023

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):

FROM node:16-alpine as builder

@kanadgupta kanadgupta changed the title Drop support for Node 14 v9 milestone Aug 23, 2023
@erunion erunion pinned this issue Aug 23, 2023
@erunion
Copy link
Member

erunion commented Sep 13, 2023

Now that we've got rdme guides and rdme guides:prune aliased to rdme docs:<cmd> can we deprecate and remove rdme docs?

@kanadgupta
Copy link
Member Author

@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 /guides routes

@erunion
Copy link
Member

erunion commented Sep 14, 2023

For dumping node-fetch and formdata-node for native fetch the place where you're using formdata-node in #856 can be replaced with this diff:

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,

@darrenyong darrenyong unpinned this issue Feb 16, 2024
@kanadgupta kanadgupta pinned this issue May 6, 2024
@kanadgupta kanadgupta changed the title v9 milestone v9 and v10 roadmap Dec 5, 2024
@kanadgupta kanadgupta modified the milestone: v9 Dec 5, 2024
@kanadgupta kanadgupta changed the title v9 and v10 roadmap v9 roadmap Dec 6, 2024
@kanadgupta
Copy link
Member Author

@kanadgupta kanadgupta unpinned this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants