GithubHelp home page GithubHelp logo

Comments (8)

jedwards1211 avatar jedwards1211 commented on April 24, 2024 6

@benjamn I'm getting a similar error with with exportSpecifier in [email protected]/[email protected].

Was there a breaking change in recent releases of ast-types?

andy@Andys-MacBook-Pro-2:jscodeshift-find-imports (master) $ node
Welcome to Node.js v12.16.0.
Type ".help" for more information.
> var j = require('jscodeshift')
undefined
> j.exportSpecifier(j.identifier('foo'), j.identifier('bar'))
Uncaught:
Error: no value or default function given for field "exported" of ExportSpecifier("id": Identifier | null, "name": Identifier | null)
    at addParam (/Users/andy/codemodsquad/jscodeshift-find-imports/node_modules/jscodeshift/node_modules/ast-types/lib/types.js:443:27)
    at /Users/andy/codemodsquad/jscodeshift-find-imports/node_modules/jscodeshift/node_modules/ast-types/lib/types.js:477:21
    at Array.forEach (<anonymous>)
    at Function.builder [as exportSpecifier] (/Users/andy/codemodsquad/jscodeshift-find-imports/node_modules/jscodeshift/node_modules/ast-types/lib/types.js:475:46)
> 
andy@Andys-MacBook-Pro-2:jscodeshift-find-imports (master) $ npm ls recast
[email protected] /Users/andy/codemodsquad/jscodeshift-find-imports
└─┬ [email protected]
  └── [email protected] 

from jscodeshift.

fkling avatar fkling commented on April 24, 2024

Regarding printing: benjamn/recast/pull/209
Regarding building: have to investigate more

from jscodeshift.

benjamn avatar benjamn commented on April 24, 2024

Possibly related: benjamn/recast#206

from jscodeshift.

fkling avatar fkling commented on April 24, 2024

^ Ah, thank you. I haven seen that issue before :)

from jscodeshift.

cpojer avatar cpojer commented on April 24, 2024

This seems to have been resolved in recast?

from jscodeshift.

fkling avatar fkling commented on April 24, 2024

Printing yes, but not building (I think).

from jscodeshift.

cpojer avatar cpojer commented on April 24, 2024

@benjamn does building work yet?

from jscodeshift.

benjamn avatar benjamn commented on April 24, 2024

This should work as of https://github.com/benjamn/ast-types/releases/tag/v0.8.9, thanks to @marcioj.

Upgrading to recast 0.10.29 should do the trick: https://github.com/benjamn/recast/releases/tag/v0.10.29

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.