node-modules / autod Goto Github PK
View Code? Open in Web Editor NEWAuto generate dependencies and devDependencies by parse the project file.
Auto generate dependencies and devDependencies by parse the project file.
autod -k should@3,koa@~0.10
好像对 webpack 的支持不太友好。
比如:
alias: {
'libs': 'xxx'
}
最后会把 libs
也当成一个包。
另外,webpack loader 都不能解释出来。
/**
* Handle all http request, both http and https support well.
*
* @example
*
* var urllib = require('urllib');
* // GET http://httptest.cnodejs.net
* urllib.request('http://httptest.cnodejs.net/test/get', function(err, data, res) {});
* // POST http://httptest.cnodejs.net
* var args = { type: 'post', data: { foo: 'bar' } };
* urllib.request('http://httptest.cnodejs.net/test/post', args, function(err, data, res) {});
*
* @param {String|Object} url
* @param {Object} [args], optional
$ autod -i -w
[DEPENDENCIES]
"dependencies": {
"amqp": "0.1.8",
"async": "0.2.9",
"colors": "0.6.2",
"moment": "2.5.1",
"underscore": "1.5.2"
},
"devDependencies": {
"optimist": "0.6.0"
}
Dependencies updates
Package Name Old Version Latest Version
underscore * 1.5.2
colors * 0.6.2
amqp * 0.1.8
async * 0.2.9
moment * 2.5.1
/usr/local/lib/node_modules/autod/bin/autod:64
if (!old[key]) {
^
TypeError: Cannot read property 'optimist' of undefined
at printUpdates (/usr/local/lib/node_modules/autod/bin/autod:64:13)
at writePackage (/usr/local/lib/node_modules/autod/bin/autod:136:3)
at /usr/local/lib/node_modules/autod/bin/autod:159:5
at /usr/local/lib/node_modules/autod/lib/autod.js:291:16
at done (/usr/local/lib/node_modules/autod/lib/autod.js:190:14)
at /usr/local/lib/node_modules/autod/lib/autod.js:201:7
at args.(anonymous function) (/usr/local/lib/node_modules/autod/node_modules/bagpipe/lib/bagpipe.js:122:16)
at /usr/local/lib/node_modules/autod/lib/autod.js:166:5
at done (/usr/local/lib/node_modules/autod/node_modules/urllib/lib/urllib.js:211:5)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/autod/node_modules/urllib/lib/urllib.js:349:7)
Not sure this is general for lerna
based packages, the latest
registry is missing, causing the installation failed by the default latest
version, e.g.
The registry is actually available with default latest
version.
https://registry.npmjs.org/@commitlint/config-conventional
but not
https://registry.npmjs.org/@commitlint/config-conventional/latest
场景:
.js
文件引入依赖 xdevdep
中问题:最终这个插件还是会出现在 package.json 的 dependencies 定义里
我比较好奇 autod 几种定义的权重关系是怎样的
will autod
support other popular file extensions? for many popular open source projects are written in .vue
or .ts
, but it just support js
and jsx
by hard coding at present. Thank you :)
plugin 组件并能不修改 autod 中解析的出的依赖,,建议将 modulse 变量传递给 plugin
Package Name Old Version Latest Version
@rollup/plugin-node-resolve - 13.1.1
@rollup/plugin-alias - 3.1.8
@rollup/plugin-commonjs - 21.0.1
@rollup/plugin-json - 4.1.0
rollup-plugin-vue - 6.0.0
rollup-plugin-terser - 7.0.2
glob - 7.2.0
vue - 2.6.14
vitepress - 0.20.10
vite - 2.7.8
@vitejs/plugin-vue - 2.0.1
$ autod
[ERROR] package ["lastdate","dmphash","itierskin","ali-cache"] get remote version error.
[ERROR] Error packages path map:
autod --devDependencies=mocha,should,istanbul
Using gulp-load-plugin, It needn't require package, but should configured in package.json.
Keep option can support glob or regex that ignore these package.
$ autod -k gulp-*
不支持scope库模块命名,比如require('@xxx/moduleName'),无法识别该模块
☖ autod --exclude test/fixtures
[ERROR] package ["c1","c2"] get remote version error.
[ERROR] Error packages path map:
{ c1:
[ '/Users/popomore/code/popomore/father/test/fixtures/spm/hash/a1.js',
'/Users/popomore/code/popomore/father/test/fixtures/spm/hash/a2.js' ],
c2:
[ '/Users/popomore/code/popomore/father/test/fixtures/spm/hash/a3.js',
'/Users/popomore/code/popomore/father/test/fixtures/spm/hash/a4.js' ] }
有个非常规的使用场景,例如:编写grunt或gulp的插件,会依赖gulp,grunt,但一般写入到devDep方便测试,却在主文件中使用;此时不应自动写入dependences。
for npm run autod
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.