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

Remove built-in dependencies #927

Open
17 tasks
streamich opened this issue Jun 22, 2023 · 2 comments
Open
17 tasks

Remove built-in dependencies #927

streamich opened this issue Jun 22, 2023 · 2 comments
Projects

Comments

@streamich
Copy link
Owner

streamich commented Jun 22, 2023

Review and try to remove built-in Node.js module dependencies, so they are not bundled when building for web.

  • path
  • process
  • stream — is there a way to make the stream module optional?
    • Or maybe explicitly install readable-stream as required dependency.
  • buffer — create a thin wrapper around Uint8Array, when Buffer global is missing.
  • util
    • util.inherits()
  • Error messages
    • internal/errors.ts — Node-like errors vendored module
    • assert
      • assert.strictEqual()
      • assert()
    • url
      • url.URL
    • util
      • util.format()
      • util.inspect()
@streamich streamich created this issue from a note in memfs Board (To do) Jun 22, 2023
@abhishiv
Copy link

Hey @streamich shouldn't this list include stream as well since memfs uses Readable, Writable?

@streamich
Copy link
Owner Author

streamich commented Jul 10, 2023

We will always need some stream implementation, due to fs.createReadStream() and fs.createWriteStream().

Maybe we could explicitly install readable-stream dependency, instead of relying on Node's built-in stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
memfs Board
  
To do
Development

No branches or pull requests

2 participants