estools / esrecurse Goto Github PK
View Code? Open in Web Editor NEWAST recursive visitor
License: Other
AST recursive visitor
License: Other
Hi,
I was trying to run the tests for react-router and I run into a call stack issue. Is this the proper place to raise this concern or should I do it on react-router's issue queue?
My local environment(Mac) looks like this:
โ react-router git:(master) node --version; npm --version; git rev-parse HEAD;
v5.1.0
3.5.0
d92d83d268e6c356a1cf996d784ca561009d6b8c
Thanks!
I am trying to extract data from inside
esrecurse.visit(ast, {
VariableDeclaration: function (node) {
return returnNode;
}
});
console.log(returnNode);
How can I extract data from the inside the visit->VariableDeclaration call?
Is there a sense to add generic nodes to traversing, such as Expression, Function, Node, Statement, Declaration, Pattern?
That is done in ast-types, and that feature seems to be quite useful.
For example:
visit(ast, {
//walk into any node
Node: function(node){
}
});
Just an idea.
Hello Everyone, How can I find the license file of [@esrecurse 4.3.0] . Master license is available, but I am looking for the specific these one.
@Constellation Hi Yusuke, thank you for this package. Would you mind adding the license file to the repo & the npm package? Without it we're not really able to use it, because it makes the npm package a distribution of proprietary code.
Many thanks.
Hello!
First of all, thank you for great tools. I have general questions regarding estools.
Thanks in advance!
When calling react, or reactDom with eslint node_module
Module build failed: RangeError: Maximum call stack size exceeded
at keys (native)
at Referencer.Visitor.visitChildren (/xxxx/node_modules/eslint/node_modules/escope/node_modules/esrecurse/esrecurse.js:78:24)
at Referencer.Visitor.visit
When I run npm install
on hast-util-to-html
repo, I got this error:
bash-3.2$ npm i
npm WARN deprecated [email protected]: Just use Array.isArray directly
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v7.3.0
npm ERR! npm v3.10.10
npm ERR! path /Users/hwong/.npm/es6-weak-map/2.0.2
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/Users/hwong/.npm/es6-weak-map/2.0.2'
npm ERR! { Error: EACCES: permission denied, mkdir '/Users/hwong/.npm/es6-weak-map/2.0.2'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/hwong/.npm/es6-weak-map/2.0.2',
npm ERR! parent: 'escope' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/hwong/github/unional/hast-util-to-html/npm-debug.log
I look through the log and it seems like it is coming from esrecurse
although I'm not 100% sure.
Here is the last part of npm-debug.log (as it is very long to post here):
23829 verbose get https://registry.npmjs.org/esrecurse not expired, no request
23830 silly addNameRange number 2 { name: 'esrecurse', range: '>=4.1.0 <5.0.0', hasData: true }
23831 silly addNameRange versions [ 'esrecurse',
23831 silly addNameRange [ '1.0.0',
23831 silly addNameRange '1.0.1',
23831 silly addNameRange '1.1.0',
23831 silly addNameRange '1.2.0',
23831 silly addNameRange '2.0.0',
23831 silly addNameRange '3.0.0',
23831 silly addNameRange '3.1.0',
23831 silly addNameRange '3.1.1',
23831 silly addNameRange '4.0.0',
23831 silly addNameRange '4.1.0' ] ]
23832 silly addNamed [email protected]
23833 verbose addNamed "4.1.0" is a plain semver version for esrecurse
23834 verbose get https://registry.npmjs.org/es6-weak-map not expired, no request
23835 silly addNameRange number 2 { name: 'es6-weak-map', range: '>=2.0.1 <3.0.0', hasData: true }
23836 silly addNameRange versions [ 'es6-weak-map',
23836 silly addNameRange [ '0.0.0',
23836 silly addNameRange '0.1.0',
23836 silly addNameRange '0.1.1',
23836 silly addNameRange '0.1.2',
23836 silly addNameRange '0.1.3',
23836 silly addNameRange '0.1.4',
23836 silly addNameRange '1.0.0',
23836 silly addNameRange '1.0.1',
23836 silly addNameRange '1.0.2',
23836 silly addNameRange '2.0.0',
23836 silly addNameRange '2.0.1',
23836 silly addNameRange '2.0.2' ] ]
23837 silly addNamed [email protected]
23838 verbose addNamed "2.0.2" is a plain semver version for es6-weak-map
23839 verbose get https://registry.npmjs.org/es6-map not expired, no request
23840 silly addNameRange number 2 { name: 'es6-map', range: '>=0.1.3 <0.2.0', hasData: true }
23841 silly addNameRange versions [ 'es6-map',
23841 silly addNameRange [ '0.0.0',
23841 silly addNameRange '0.0.1',
23841 silly addNameRange '0.1.0',
23841 silly addNameRange '0.1.1',
23841 silly addNameRange '0.1.2',
23841 silly addNameRange '0.1.3',
23841 silly addNameRange '0.1.4',
23841 silly addNameRange '0.1.5' ] ]
23842 silly addNamed [email protected]
23843 verbose addNamed "0.1.5" is a plain semver version for es6-map
23844 silly mapToRegistry name es6-weak-map
23845 silly mapToRegistry using default registry
23846 silly mapToRegistry registry https://registry.npmjs.org/
23847 silly mapToRegistry data Result {
23847 silly mapToRegistry raw: 'es6-weak-map',
23847 silly mapToRegistry scope: null,
23847 silly mapToRegistry escapedName: 'es6-weak-map',
23847 silly mapToRegistry name: 'es6-weak-map',
23847 silly mapToRegistry rawSpec: '',
23847 silly mapToRegistry spec: 'latest',
23847 silly mapToRegistry type: 'tag' }
23848 silly mapToRegistry uri https://registry.npmjs.org/es6-weak-map
23849 verbose addRemoteTarball https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz not in flight; adding
23850 verbose addRemoteTarball [ 'https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz',
23850 verbose addRemoteTarball '5e3ab32251ffd1538a1f8e5ffa1357772f92d96f' ]
23851 silly cache afterAdd [email protected]
23852 verbose afterAdd /Users/hwong/.npm/esrecurse/4.1.0/package/package.json not in flight; writing
23853 verbose correctMkdir /Users/hwong/.npm correctMkdir not in flight; initializing
23854 info retry fetch attempt 1 at 11:46:58 AM
23855 info attempt registry request try #1 at 11:46:58 AM
23856 http fetch GET https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz
23857 silly cache afterAdd [email protected]
23858 verbose afterAdd /Users/hwong/.npm/es6-map/0.1.5/package/package.json not in flight; writing
23859 verbose correctMkdir /Users/hwong/.npm correctMkdir not in flight; initializing
23860 verbose afterAdd /Users/hwong/.npm/es6-map/0.1.5/package/package.json written
23861 verbose afterAdd /Users/hwong/.npm/esrecurse/4.1.0/package/package.json written
23862 http fetch 200 https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz
23863 silly fetchAndShaCheck shasum 5e3ab32251ffd1538a1f8e5ffa1357772f92d96f
23864 verbose addTmpTarball /var/folders/zl/l_7sqkhd1zd84mbbrhtbx4j9yfd8z6/T/npm-91769-c13a28b7/registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz not in flight; adding
23865 verbose addTmpTarball already have metadata; skipping unpack for [email protected]
23866 verbose correctMkdir /Users/hwong/.npm correctMkdir not in flight; initializing
23867 silly rollbackFailedOptional Starting
23868 silly rollbackFailedOptional Finishing
23869 silly runTopLevelLifecycles Finishing
23870 silly install printInstalled
23871 verbose stack Error: EACCES: permission denied, mkdir '/Users/hwong/.npm/es6-weak-map/2.0.2'
23872 verbose cwd /Users/hwong/github/unional/hast-util-to-html
23873 error Darwin 16.4.0
23874 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
23875 error node v7.3.0
23876 error npm v3.10.10
23877 error path /Users/hwong/.npm/es6-weak-map/2.0.2
23878 error code EACCES
23879 error errno -13
23880 error syscall mkdir
23881 error Error: EACCES: permission denied, mkdir '/Users/hwong/.npm/es6-weak-map/2.0.2'
23881 error { Error: EACCES: permission denied, mkdir '/Users/hwong/.npm/es6-weak-map/2.0.2'
23881 error errno: -13,
23881 error code: 'EACCES',
23881 error syscall: 'mkdir',
23881 error path: '/Users/hwong/.npm/es6-weak-map/2.0.2',
23881 error parent: 'escope' }
23882 error Please try running this command again as root/Administrator.
23883 verbose exit [ -13, true ]
I have setup npm to work without sudo.
Could this be a bug on the npm side?
I'm running with:
npm: 3.10.10
node: 7.3.0
Hi,
I was wondering if you could release a new version that contains the estraverse update. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.