Coder Social home page Coder Social logo

Comments (7)

borisdiakur avatar borisdiakur commented on August 17, 2024 1

Yes, Iā€™m ok with using fs-extra.

from memoize-fs.

tunnckoCore avatar tunnckoCore commented on August 17, 2024

Or, I'm guessing that if we make a simple check if there is astBody: true to put function's ast there instead of silently ignore.

from memoize-fs.

tunnckoCore avatar tunnckoCore commented on August 17, 2024

Some other ways are https://github.com/luin/serialize and https://www.npmjs.com/package/serializr

from memoize-fs.

tunnckoCore avatar tunnckoCore commented on August 17, 2024

can confirm that with node-serialize everything works :) We should not worry about the "security implications" since we are in the fs and most probably there won't have (end-)user input ability given by the developer anyway.

serializr package wants some schema and stuff and is too much for our case.

from memoize-fs.

tunnckoCore avatar tunnckoCore commented on August 17, 2024

Want PR? We also can allow passing serialize and deserialize as options.

- JSON.parse(resultString).data
+ return deserialize(resultString).data

and

const meriyah = require('meriyah')
+ const {serialize, unserialize: deserialize} = require('node-serialize')

from memoize-fs.

borisdiakur avatar borisdiakur commented on August 17, 2024

Hey @tunnckoCore, I like the idea of having the ability to use a custom serializer, or choosing one using an option. Maybe could list one as a peer dependency. PRs welcome šŸ˜‰

from memoize-fs.

tunnckoCore avatar tunnckoCore commented on August 17, 2024

Yea, i gone for the options method in my patch too, I'll PR.

Are you okay including fs-extra instead of fs in that PR too? It fixes other problems (including one if you use fs.mkdir recursive: true as I suggested) when you have high parallelism (i'm running memoize-fs inside jest-runner which runner runs hundreds of files).

from memoize-fs.

Related Issues (11)

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.