dependencies-version
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -11,5 +11,7 @@ var fs = require('fs'); | ||
var depPath = baseDir + '/' + dir; | ||
if (dir[0] !== '.' && fs.lstatSync(depPath).isDirectory()) { | ||
var file = depPath + '/package.json'; | ||
var requirePath = file.replace('node_modules/', ''); | ||
if (fs.existsSync(file)) { | ||
@@ -16,0 +18,0 @@ var contents = fs.readFileSync(file); |
@@ -1,103 +0,2 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(); | ||
else if(typeof define === 'function' && define.amd) | ||
define([], factory); | ||
else if(typeof exports === 'object') | ||
exports["dependenciesVersion"] = factory(); | ||
else | ||
root["dependenciesVersion"] = factory(); | ||
})(this, function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var fs = __webpack_require__(1); | ||
function _getDependencies(baseDir, data) { | ||
data = data || {}; | ||
var dirs = fs.readdirSync(baseDir); | ||
dirs.forEach(function (dir) { | ||
try { | ||
var depPath = baseDir + '/' + dir; | ||
if (dir[0] !== '.' && fs.lstatSync(depPath).isDirectory()) { | ||
var file = depPath + '/package.json'; | ||
var requirePath = file.replace('node_modules/', ''); | ||
if (fs.existsSync(file)) { | ||
var contents = fs.readFileSync(file); | ||
var jsonContent = JSON.parse(contents); | ||
var version = jsonContent.version; | ||
var name = jsonContent.name || requirePath; | ||
data[name] = version; | ||
} else { | ||
_getDependencies(depPath, data); | ||
} | ||
} | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}); | ||
return data; | ||
} | ||
module.exports = { | ||
list: function list() { | ||
return _getDependencies('node_modules'); | ||
} | ||
}; | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports) { | ||
/***/ }) | ||
/******/ ]) | ||
}); | ||
; | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.dependenciesVersion=n():e.dependenciesVersion=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){var r=t(1);e.exports={list:function(){return function e(n,t){return t=t||{},r.readdirSync(n).forEach(function(o){try{var i=n+"/"+o;if("."!==o[0]&&r.lstatSync(i).isDirectory()){var u=i+"/package.json",c=u.replace("node_modules/","");if(r.existsSync(u)){var f=r.readFileSync(u),a=JSON.parse(f),d=a.version,l=a.name||c;t[l]=d}else e(i,t)}}catch(e){console.error(e)}}),t}("node_modules")}}},function(e,n){}])}); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.dependenciesVersion=n():e.dependenciesVersion=n()}(this,function(){return function(e){function n(o){if(r[o])return r[o].exports;var t=r[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){"use strict";function o(e,n){n=n||{};var r=t.readdirSync(e);return r.forEach(function(r){try{var i=e+"/"+r;if("."!==r[0]&&t.lstatSync(i).isDirectory()){var c=i+"/package.json",s=c.replace("node_modules/","");if(t.existsSync(c)){var d=t.readFileSync(c),a=JSON.parse(d),f=a.version,u=a.name||s;n[u]=f}else o(i,n)}}catch(e){console.error(e)}}),n}var t=r(1);e.exports={list:function(){return o("node_modules")}}},function(e,n){}])}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.dependenciesVersion=n():e.dependenciesVersion=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){var r=t(1);e.exports={list:function(){return function e(n,t){return t=t||{},r.readdirSync(n).forEach(function(o){try{var i=n+"/"+o;if("."!==o[0]&&r.lstatSync(i).isDirectory()){var u=i+"/package.json",c=u.replace("node_modules/","");if(r.existsSync(u)){var f=r.readFileSync(u),a=JSON.parse(f),d=a.version,l=a.name||c;t[l]=d}else e(i,t)}}catch(e){console.error(e)}}),t}("node_modules")}}},function(e,n){}])}); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "dependencies-version", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "List your runtime dependencies and their versions", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"commit": "git-cz", | ||
"watch:test": "npm t -- --watch", | ||
"test": "mocha src/index.test.js --compilers js:babel-core/register", | ||
"test": "jest", | ||
"check-jshint": "jshint src/index.js", | ||
"prebuild": "rimraf dist", | ||
"build": "npm-run-all --parallel build:*", | ||
"build": "npm run build:main && npm run build:umd && npm run build:umd.min", | ||
"build:main": "babel --copy-files --out-dir dist --ignore *.test.js src", | ||
"build:umd": "webpack --output-filename index.umd.js", | ||
"build:umd.min": "webpack --output-filename index.umd.min.js -p", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"build:umd.min": "webpack --output-filename index.umd.min.js -p" | ||
}, | ||
@@ -42,22 +39,13 @@ "repository": { | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-loader": "^6.2.10", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-stage-2": "^6.18.0", | ||
"chai": "^3.5.0", | ||
"commitizen": "^2.9.5", | ||
"cz-conventional-changelog": "^1.2.0", | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"ajv": "^6.0.0", | ||
"babel-loader": "^8.0.0", | ||
"ghooks": "^2.0.0", | ||
"istanbul": "^0.4.5", | ||
"jshint": "^2.9.4", | ||
"json-loader": "^0.5.4", | ||
"mocha": "^3.2.0", | ||
"npm-run-all": "^4.0.0", | ||
"rimraf": "^2.5.4", | ||
"semantic-release": "^6.3.2", | ||
"webpack": "^1.14.0" | ||
"webpack": "^4.17.0", | ||
"webpack-cli": "^3.1.0" | ||
}, | ||
"czConfig": { | ||
"path": "node_modules/cz-conventional-changelog" | ||
}, | ||
"config": { | ||
@@ -67,9 +55,3 @@ "ghooks": { | ||
} | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"es2015", | ||
"stage-2" | ||
] | ||
} | ||
} |
# dependencies-version | ||
[![travis build](https://img.shields.io/travis/creativedeveloper-net/npm-package-example.svg?style=flat-square)](https://travis-ci.org/creativedeveloper-net/npm-package-example) | ||
[![version](https://img.shields.io/npm/v/npm-package-example.svg?style=flat-square)](http://npm.im/npm-package-example) | ||
[![downloads](https://img.shields.io/npm/dm/npm-package-example.svg?style=flat-square)](http://npm-stat.com/charts.html?package=npm-package-example&from=2015-08-01) | ||
[![MIT License](https://img.shields.io/npm/l/npm-package-example.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
[![version](https://img.shields.io/npm/v/dependencies-version.svg?style=flat-square)](http://npm.im/tsachis/dependencies-version) | ||
[![downloads](https://img.shields.io/npm/dm/dependencies-version.svg?style=flat-square)](http://npm-stat.com/charts.html?package=dependencies-version&from=2018-08-01) | ||
[![MIT License](https://img.shields.io/npm/l/dependencies-version.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
Get a list of your runtime dependencies and their versions | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19979
10
45
8