Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Grump 1.0-ish wishlist #1

@guncha

Description

@guncha

Tracking things I'd like to do / fix for the 1.0 release:

  • Rewrite Grump in Typescript

This would help ensure that GrumpFS indeed matches the Node's FS interface and increase reliability. It's also an opportunity to clean up a bunch of modules and perhaps narrow the scope some more.

  • Cache the directory tree so it can be reused by GrumpFS

A lot of globbing libraries like to make a lot of fs.dirlist calls and currently each one of them triggers a full traversal of the handlers. Also, since the handlers are based on the patterns and not actual directory structure, weird requests can be served where something that looks like a directory is actually a file.

  • Don't trigger the handler when doing fs.stat calls and similar

Most callers just want to know if a file exists and if it's a directory. These can be answered by traversing the handlers. Only asking for the file size would require running the handler, but I'm yet to see any build tool that does that.

  • Grump.require should wrap graceful-fs and similar libraries, too
  • Add ability for handlers to pass on handling the filename in which case the next one is tried
  • Find a better way to deal with *Sync calls

Currently, the sync package requires that the current stack frame starts inside a fiber somewhere which any callback based code is going to violate. There could be a separate sync path trough Grump that does it's best to serve the request. This would also let us get rid of the fibers package which is a compiled module that patches Node internals and could cause weird bugs and conflicts.

  • Implement the less used fs methods for GrumpFS, like read and open.
  • Implement fs write methods that should simply write the file to the cache or with a configuration option, write it to the file system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions