Coder Social home page Coder Social logo

dmn's People

Contributors

bridgear avatar dependabot[bot] avatar inikulin avatar maxnordlund avatar silverwind avatar targos avatar tombyrer avatar trott avatar vladimyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmn's Issues

Update dependencies

There's this ugly warning when installing dmn:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

I've attempted to update dependencies to their latest version, but they seem to contain some breaking changes as tests fail left and right afterwards.

Rewrite

I think it's time for a rewrite, I find the current code structure quite confusing and would prefer a rewrite that only retains the functionality of cleaning node_modules (don't need the others). Ideas:

  • Single-file executable script
  • Use a glob implementation that uses uv_fs_scandir under the hood for performance, e.g. withFileTypes of fs.readdir
  • Multiple classes for cleaning files, e.g. safe, unsafe
  • Recursive support with some logic to never remove whole modules
  • Maybe statically analyze modules on which files it loads, so we can exclude them

Memory leak

Seems like there is a pretty serious memory leak in this module, to reproduce:

npx create-react-app memleak
cd memleak
npx dmn clean -f

This will result in

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

By the way, I'm kind of tempted to rewrite the module, probably under a new name and with the only functionality of cleaning node_modules ๐Ÿ˜‰

Smarter line endings

Line endings are huge PITA for people who use different OS's for development (like I do). \n is not recognized by Windows in some editors, meanwhille \r\n ends up with extra ^M character in *nix systems. Currently dmn enforces \r\n in generated files (see: inikulin/ineed#3). We need to take smarter approach. Use the following strategy: If we already have .npmignore use it's line endings, otherwise use line endings of the OS in which dmn was invoked.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.