Code Monkey home page Code Monkey logo

copenhagen's People

Contributors

greenkeeperio-bot avatar novemberborn avatar

Stargazers

 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

Forkers

jamestalmage

copenhagen's Issues

Thoughts

Interesting approach to the problem. I think it has promise. Just a couple thoughts:

  • As a Babel plugin, I do not think this is a likely solution for CoffeeScript or TypeScript. They use their own parsers and AST. Unless they decide to throw out their current parser solutions and move to Babel, I just think it's really unlikely. There is talk of making the Babel parser extendable, but it's a low-priority, far in the future thing (Other languages moving onboard is probably even further out). I don't necessarily see this as a big problem. If copenhagen proves to be a more reliable solution than istanbul, then it can serve as a model for other languages - and prove that "cover before transpilation" is a good strategy.

  • A bigger concern is what this is going to do to power-assert. If power-assert is applied second, I fear it will completely muddle the output. There may be other transforms to be concerned about, but I'm not sure.

  • I just saw a PR on Babel that fixed some source-map stuff. I wonder if that fixes any of our issues.

  • I doubt you are going to escape the need for exit handlers. From the docs:

    Tools like nyc can use this module to get a stream for the collected data. This data can then be piped to disk, alleviating the need for exit handlers

    Much of the work that went into signal-exit was to address the issue of coverage data not making it to disk before the process exits.

    var stream = fs.createWriteStream('/some/path');
    
    // this isn't guaranteed to make it to disk if you force exit the process.
    stream.write(largeChunkOfData);
    process.exit();

As I said, I think there's promise. You are certainly trying to tackle a real problem, istanbul has struggled to get transpiled code right for a long time, so I think a replacement is worth pursuing. I think this approach might work. I just wanted to give you some food for thought.

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.