GithubHelp home page GithubHelp logo

Comments (5)

trivikr avatar trivikr commented on April 28, 2024 1

cc participants from previous discussion for awareness @robcmills @Daniel15 @lg-kialo

from jscodeshift.

trivikr avatar trivikr commented on April 28, 2024

There are two solutions I can think of for updated default value of extensions:

  • All supported extensions, like it's done in aws/aws-sdk-js-codemod#767
    • Backward compatible with <=0.15.0, as all extensions were processed anyway though js was default.
  • Read all extensions available in the glob, as set them as default
    • Requires jscodeshift to do extra work, i.e. reading extensions of all files.

from jscodeshift.

trivikr avatar trivikr commented on April 28, 2024

Example fix which allows all extensions by default #583

Although this fixes the regression, it will send all files for processing by default and will have a performance impact if the folder has lot of files.

from jscodeshift.

danieldelcore avatar danieldelcore commented on April 28, 2024

I find folks trip over this quite often. My thinking with @hypermod/cli was to turn on all extensions by default and parse them with the TSX parser since it's a large superset of js/jsx/ts (there are some minor caveats here in the form of generic syntax between ts and TSX, perhaps TS would have been a better way to go 😬).

https://github.com/hypermod-io/hypermod-community/blob/3b4722329bed3f02ac56c23c89925e6b906b9fa7/packages/cli/src/index.ts#L37-L49

from jscodeshift.

trivikr avatar trivikr commented on April 28, 2024

I posted a safer fix at #584, which explicitly passes supported JavaScript and TypeScript files.

from jscodeshift.

Related Issues (20)

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.