| 1 |
{ |
| 2 |
"_id": "parent-module", |
| 3 |
"_rev": "5-47f47c01f0256374e2996a00a587d5b2", |
| 4 |
"name": "parent-module", |
| 5 |
"description": "Get the path of the parent module", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "2.0.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"0.1.0": { |
| 11 |
"name": "parent-module", |
| 12 |
"version": "0.1.0", |
| 13 |
"description": "Get the path of the parent module", |
| 14 |
"license": "MIT", |
| 15 |
"repository": { |
| 16 |
"type": "git", |
| 17 |
"url": "https://github.com/sindresorhus/parent-module" |
| 18 |
}, |
| 19 |
"author": { |
| 20 |
"name": "Sindre Sorhus", |
| 21 |
"email": "[email protected]", |
| 22 |
"url": "sindresorhus.com" |
| 23 |
}, |
| 24 |
"engines": { |
| 25 |
"node": ">=0.10.0" |
| 26 |
}, |
| 27 |
"scripts": { |
| 28 |
"test": "xo && ava" |
| 29 |
}, |
| 30 |
"files": [ |
| 31 |
"index.js" |
| 32 |
], |
| 33 |
"keywords": [ |
| 34 |
"parent", |
| 35 |
"module", |
| 36 |
"package", |
| 37 |
"pkg", |
| 38 |
"caller", |
| 39 |
"calling", |
| 40 |
"module", |
| 41 |
"path", |
| 42 |
"callsites", |
| 43 |
"callsite", |
| 44 |
"stacktrace", |
| 45 |
"stack", |
| 46 |
"trace", |
| 47 |
"function", |
| 48 |
"file" |
| 49 |
], |
| 50 |
"dependencies": { |
| 51 |
"callsites": "^1.0.0" |
| 52 |
}, |
| 53 |
"devDependencies": { |
| 54 |
"ava": "*", |
| 55 |
"execa": "^0.2.2", |
| 56 |
"xo": "*" |
| 57 |
}, |
| 58 |
"gitHead": "0ebdd4a7582d4cee30ca2151fbd592b4b3b20ff2", |
| 59 |
"bugs": { |
| 60 |
"url": "https://github.com/sindresorhus/parent-module/issues" |
| 61 |
}, |
| 62 |
"homepage": "https://github.com/sindresorhus/parent-module", |
| 63 |
"_id": "[email protected]", |
| 64 |
"_shasum": "b5292863a1e8c476ecf857e7d75c98920b24b8a6", |
| 65 |
"_from": ".", |
| 66 |
"_npmVersion": "2.14.12", |
| 67 |
"_nodeVersion": "4.2.4", |
| 68 |
"_npmUser": { |
| 69 |
"name": "sindresorhus", |
| 70 |
"email": "[email protected]" |
| 71 |
}, |
| 72 |
"dist": { |
| 73 |
"shasum": "b5292863a1e8c476ecf857e7d75c98920b24b8a6", |
| 74 |
"tarball": "https://registry.npmjs.org/parent-module/-/parent-module-0.1.0.tgz" |
| 75 |
}, |
| 76 |
"maintainers": [ |
| 77 |
{ |
| 78 |
"name": "sindresorhus", |
| 79 |
"email": "[email protected]" |
| 80 |
} |
| 81 |
], |
| 82 |
"directories": {} |
| 83 |
}, |
| 84 |
"1.0.0": { |
| 85 |
"name": "parent-module", |
| 86 |
"version": "1.0.0", |
| 87 |
"description": "Get the path of the parent module", |
| 88 |
"license": "MIT", |
| 89 |
"repository": { |
| 90 |
"type": "git", |
| 91 |
"url": "git+https://github.com/sindresorhus/parent-module.git" |
| 92 |
}, |
| 93 |
"author": { |
| 94 |
"name": "Sindre Sorhus", |
| 95 |
"email": "[email protected]", |
| 96 |
"url": "sindresorhus.com" |
| 97 |
}, |
| 98 |
"engines": { |
| 99 |
"node": ">=6" |
| 100 |
}, |
| 101 |
"scripts": { |
| 102 |
"test": "xo && ava" |
| 103 |
}, |
| 104 |
"keywords": [ |
| 105 |
"parent", |
| 106 |
"module", |
| 107 |
"package", |
| 108 |
"pkg", |
| 109 |
"caller", |
| 110 |
"calling", |
| 111 |
"module", |
| 112 |
"path", |
| 113 |
"callsites", |
| 114 |
"callsite", |
| 115 |
"stacktrace", |
| 116 |
"stack", |
| 117 |
"trace", |
| 118 |
"function", |
| 119 |
"file" |
| 120 |
], |
| 121 |
"dependencies": { |
| 122 |
"callsites": "^3.0.0" |
| 123 |
}, |
| 124 |
"devDependencies": { |
| 125 |
"ava": "^1.0.1", |
| 126 |
"execa": "^1.0.0", |
| 127 |
"xo": "^0.23.0" |
| 128 |
}, |
| 129 |
"gitHead": "21d44dd4d566218c6abd1b8747469756fba455d6", |
| 130 |
"bugs": { |
| 131 |
"url": "https://github.com/sindresorhus/parent-module/issues" |
| 132 |
}, |
| 133 |
"homepage": "https://github.com/sindresorhus/parent-module#readme", |
| 134 |
"_id": "[email protected]", |
| 135 |
"_npmVersion": "6.4.1", |
| 136 |
"_nodeVersion": "11.5.0", |
| 137 |
"_npmUser": { |
| 138 |
"name": "sindresorhus", |
| 139 |
"email": "[email protected]" |
| 140 |
}, |
| 141 |
"dist": { |
| 142 |
"integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", |
| 143 |
"shasum": "df250bdc5391f4a085fb589dad761f5ad6b865b5", |
| 144 |
"tarball": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", |
| 145 |
"fileCount": 4, |
| 146 |
"unpackedSize": 3865, |
| 147 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcIlHoCRA9TVsSAnZWagAA7j8P/iXA1TC9HTMKzU1Ye5X4\ntOtox1HhIfp7VwNnFVti2GytUXxmlfs0r8UaCfcIk8IBAARsvKDREp3LobS3\n1ZbX5st+42h+b2oycKQkUhBaN//PZhp/WVTrA9vzRz07JS7ZqEu2j5t0iznb\nBdavKmC6OfzY3B3rsDpHukc1uhWDnQJMFb9S1NVObKlTjKcIkAYlissa8eue\n10WvvQzdCNIZlxU2G6XGezAYw2N7HvdmoyCOrgC+jb4GguE57467rrI/My5u\nL1NqFLaeiaB0w5V+mb5O3lkyxFPVHeqf6NoeWn6oeoeZ6fOugJbq4+MSQ5sJ\nReYJfAfcNmTPyXwLZFC36F/zZVxztfLiLQAyx1IIEP0A9NNXiOCUhx1F6PA1\n0xePgwCP4TgwBH79di4DXvmNvzCFj3W67F1KPna51FQTkxKU4MdCvCsejiiY\nmQFmz0UkqiXeUfKp0eKmRF+GTx5d6LhHrhHStFU8xEcjO19nu22vEQ1GLyLw\nplNWVvBTUskpOgK0yxcbwSB4G/9xxTrAQYr5O39ND1tD8qoCDxeHbRCWj2ya\n1HGFBXCe5gAr5PV+RHwIfUwMM7tuoUQgEcpKC5IVppnHE2I2Ay6aC+/lN713\nn5zICEuseMRuuqJLesGXcvkqXN6W/3cO9hsjcFS9c+BAcpgncvY+8EaAHmjV\nvsWu\r\n=VW5f\r\n-----END PGP SIGNATURE-----\r\n" |
| 148 |
}, |
| 149 |
"maintainers": [ |
| 150 |
{ |
| 151 |
"name": "sindresorhus", |
| 152 |
"email": "[email protected]" |
| 153 |
} |
| 154 |
], |
| 155 |
"directories": {}, |
| 156 |
"_npmOperationalInternal": { |
| 157 |
"host": "s3://npm-registry-packages", |
| 158 |
"tmp": "tmp/parent-module_1.0.0_1545753063775_0.45941122354092845" |
| 159 |
}, |
| 160 |
"_hasShrinkwrap": false |
| 161 |
}, |
| 162 |
"1.0.1": { |
| 163 |
"name": "parent-module", |
| 164 |
"version": "1.0.1", |
| 165 |
"description": "Get the path of the parent module", |
| 166 |
"license": "MIT", |
| 167 |
"repository": { |
| 168 |
"type": "git", |
| 169 |
"url": "git+https://github.com/sindresorhus/parent-module.git" |
| 170 |
}, |
| 171 |
"author": { |
| 172 |
"name": "Sindre Sorhus", |
| 173 |
"email": "[email protected]", |
| 174 |
"url": "sindresorhus.com" |
| 175 |
}, |
| 176 |
"engines": { |
| 177 |
"node": ">=6" |
| 178 |
}, |
| 179 |
"scripts": { |
| 180 |
"test": "xo && ava" |
| 181 |
}, |
| 182 |
"keywords": [ |
| 183 |
"parent", |
| 184 |
"module", |
| 185 |
"package", |
| 186 |
"pkg", |
| 187 |
"caller", |
| 188 |
"calling", |
| 189 |
"module", |
| 190 |
"path", |
| 191 |
"callsites", |
| 192 |
"callsite", |
| 193 |
"stacktrace", |
| 194 |
"stack", |
| 195 |
"trace", |
| 196 |
"function", |
| 197 |
"file" |
| 198 |
], |
| 199 |
"dependencies": { |
| 200 |
"callsites": "^3.0.0" |
| 201 |
}, |
| 202 |
"devDependencies": { |
| 203 |
"ava": "^1.4.1", |
| 204 |
"execa": "^1.0.0", |
| 205 |
"xo": "^0.24.0" |
| 206 |
}, |
| 207 |
"gitHead": "48267d001c4d215ba21a701a6882dba30fb8d614", |
| 208 |
"bugs": { |
| 209 |
"url": "https://github.com/sindresorhus/parent-module/issues" |
| 210 |
}, |
| 211 |
"homepage": "https://github.com/sindresorhus/parent-module#readme", |
| 212 |
"_id": "[email protected]", |
| 213 |
"_nodeVersion": "8.15.0", |
| 214 |
"_npmVersion": "6.9.0", |
| 215 |
"_npmUser": { |
| 216 |
"name": "sindresorhus", |
| 217 |
"email": "[email protected]" |
| 218 |
}, |
| 219 |
"dist": { |
| 220 |
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", |
| 221 |
"shasum": "691d2709e78c79fae3a156622452d00762caaaa2", |
| 222 |
"tarball": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", |
| 223 |
"fileCount": 4, |
| 224 |
"unpackedSize": 3922, |
| 225 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnLEgCRA9TVsSAnZWagAAnfUP/34CM4qiVo4Qaylc5j9N\naflPKZecVGFTivIGy9F7I+dTMiCXRhABp0MaLq1s03KOHAgym2ZL89ItB+l9\ngeUhRz7hFcTm4sP+iEtBQ0D+vr0Q+arS7qoROTXJ94ybC0rC/+Hr9XyvXZRX\nW0KQYkekqyTn5AIH1ZN7o0zgnfapdTgz7zBhGTsICqd1jl3FFJLshsXowO1X\naBCErOvowwQKaTVWnU65cIuMKKN9g80jIWZVYu5F6B9VOUOV7moGY3C0GofN\nD/b2lSMlF8En4UbiSI1F0NmGwnbDplri5KsHyXAFSoVhQFp65VQBJjZU/DnM\n8S8zan/8jpAAxAw7cZZ0G911zDLh+Jo7HuB+xc+dwLbK8fONAJOVFkRLAdCJ\nGC/XcyZ5ftPTwmDbn3wLOdk8UZytBP/FD69NU4HTvPkG2SkKAbv0jK+nIJEs\ncaQGh42m7mFEhmiXBLJZ83UAFlVsyAej9s14GRet3fAqWhIbnzdv9boQwYSi\nTGy0kxGtaaa8G/WcBZyn+hGGPlakNn0RUV6ZhZ0y5zpaM/YPFS885Oj0i8Um\nhuwvIYCf6hlxcLylUI/BY+HLzp2W7qFABT+ib7VA3QHznyW21tyHqXGXWiiu\n9urgGmksS5dhsEF4vYzZPN80xAI4qXf5pIBMUzB0b1kvemyCGJ/9FCxUghlt\nqqUz\r\n=Y7oh\r\n-----END PGP SIGNATURE-----\r\n" |
| 226 |
}, |
| 227 |
"maintainers": [ |
| 228 |
{ |
| 229 |
"name": "sindresorhus", |
| 230 |
"email": "[email protected]" |
| 231 |
} |
| 232 |
], |
| 233 |
"directories": {}, |
| 234 |
"_npmOperationalInternal": { |
| 235 |
"host": "s3://npm-registry-packages", |
| 236 |
"tmp": "tmp/parent-module_1.0.1_1553772832186_0.1578223180001468" |
| 237 |
}, |
| 238 |
"_hasShrinkwrap": false |
| 239 |
}, |
| 240 |
"2.0.0": { |
| 241 |
"name": "parent-module", |
| 242 |
"version": "2.0.0", |
| 243 |
"description": "Get the path of the parent module", |
| 244 |
"license": "MIT", |
| 245 |
"repository": { |
| 246 |
"type": "git", |
| 247 |
"url": "git+https://github.com/sindresorhus/parent-module.git" |
| 248 |
}, |
| 249 |
"author": { |
| 250 |
"name": "Sindre Sorhus", |
| 251 |
"email": "[email protected]", |
| 252 |
"url": "sindresorhus.com" |
| 253 |
}, |
| 254 |
"engines": { |
| 255 |
"node": ">=8" |
| 256 |
}, |
| 257 |
"scripts": { |
| 258 |
"test": "xo && ava && tsd" |
| 259 |
}, |
| 260 |
"keywords": [ |
| 261 |
"parent", |
| 262 |
"module", |
| 263 |
"package", |
| 264 |
"caller", |
| 265 |
"calling", |
| 266 |
"module", |
| 267 |
"path", |
| 268 |
"callsites", |
| 269 |
"callsite", |
| 270 |
"stacktrace", |
| 271 |
"stack", |
| 272 |
"trace", |
| 273 |
"function", |
| 274 |
"file" |
| 275 |
], |
| 276 |
"dependencies": { |
| 277 |
"callsites": "^3.1.0" |
| 278 |
}, |
| 279 |
"devDependencies": { |
| 280 |
"ava": "^1.4.1", |
| 281 |
"execa": "^1.0.0", |
| 282 |
"tsd": "^0.7.2", |
| 283 |
"xo": "^0.24.0" |
| 284 |
}, |
| 285 |
"gitHead": "1923bf8f724f7f2e77a2c893116285a8b0a47598", |
| 286 |
"bugs": { |
| 287 |
"url": "https://github.com/sindresorhus/parent-module/issues" |
| 288 |
}, |
| 289 |
"homepage": "https://github.com/sindresorhus/parent-module#readme", |
| 290 |
"_id": "[email protected]", |
| 291 |
"_nodeVersion": "8.16.0", |
| 292 |
"_npmVersion": "6.9.0", |
| 293 |
"_npmUser": { |
| 294 |
"name": "sindresorhus", |
| 295 |
"email": "[email protected]" |
| 296 |
}, |
| 297 |
"dist": { |
| 298 |
"integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", |
| 299 |
"shasum": "fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708", |
| 300 |
"tarball": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", |
| 301 |
"fileCount": 5, |
| 302 |
"unpackedSize": 4625, |
| 303 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyFjVCRA9TVsSAnZWagAA/yQP/3p0SAYda/UfvdMK1J3A\necG8eD/cd8XMG9f7mcyvdOkd2YM3IPfu0capE6kP4Wp9TkZPnpMTxguu2oxe\ni+mssu1Dd/L8LMxxsbsU7V3EyX2QV0dGsiB91H/QlPRfr3WapnL660JTNaze\n0cQF9vOs8GfTUCrsm3IOxuPJHiAkxs4udS1NzgNsGh5custjt9tP5Dx8fu8j\nCFDzT6R38iEV2Cn2w0IIQzJBkhQ5XuKgiex8RMtvKRa+fWSSwkQlMRM+9QRE\n5x1ACxEbFiubXr0pG3eZt6gMR8cCoxZjqOfXOAS6c5BGunVDLDY7UpJnhQEH\nfgJqbpzTsXYtaoDN9O4U1UloGyiLYKu8bTigBBfsPc5d/L0vUtWK4kw6XX6F\nHZuqQibUlTcXWc17zKyb+QOtTcIs2LAOhd0YB+vNxf45whQyO+bwl+N3LAd1\nJz5qh/kUw4/0YtQZuTrqbl58F2/hk/zGPpS8rbF4Nk25pi+sdzuqMpGuXMhF\ngTMTg1SmgVX4O29hKtLqiTE8+1T/mQR25mm7MfNmM0go1nHUmEe6tzA71Qb1\nvBnVimAkAxXTKdd8p5KchKNpYo+hJ+OKPpdt8LEwZlGm9Qs+5+INtDwHUTts\nZP3FvhmRX3oDhAavOEBM7wtX6oQR8IROq32aKPJ8jn6KdrixER/htTKDqQLM\nyLn+\r\n=G19r\r\n-----END PGP SIGNATURE-----\r\n" |
| 304 |
}, |
| 305 |
"maintainers": [ |
| 306 |
{ |
| 307 |
"name": "sindresorhus", |
| 308 |
"email": "[email protected]" |
| 309 |
} |
| 310 |
], |
| 311 |
"directories": {}, |
| 312 |
"_npmOperationalInternal": { |
| 313 |
"host": "s3://npm-registry-packages", |
| 314 |
"tmp": "tmp/parent-module_2.0.0_1556633813147_0.3310203047620397" |
| 315 |
}, |
| 316 |
"_hasShrinkwrap": false |
| 317 |
} |
| 318 |
}, |
| 319 |
"readme": "# parent-module [](https://travis-ci.org/sindresorhus/parent-module)\n\n> Get the path of the parent module\n\nNode.js exposes `module.parent`, but it only gives you the first cached parent, which is not necessarily the actual parent.\n\n\n## Install\n\n```\n$ npm install parent-module\n```\n\n\n## Usage\n\n```js\n// bar.js\nconst parentModule = require('parent-module');\n\nmodule.exports = () => {\n\tconsole.log(parentModule());\n\t//=> '/Users/sindresorhus/dev/unicorn/foo.js'\n};\n```\n\n```js\n// foo.js\nconst bar = require('./bar');\n\nbar();\n```\n\n\n## API\n\n### parentModule([filePath])\n\nBy default, it will return the path of the immediate parent.\n\n#### filePath\n\nType: `string`<br>\nDefault: [`__filename`](https://nodejs.org/api/globals.html#globals_filename)\n\nFile path of the module of which to get the parent path.\n\nUseful if you want it to work [multiple module levels down](https://github.com/sindresorhus/parent-module/tree/master/fixtures/filepath).\n\n\n## Tip\n\nCombine it with [`read-pkg-up`](https://github.com/sindresorhus/read-pkg-up) to read the package.json of the parent module.\n\n```js\nconst path = require('path');\nconst readPkgUp = require('read-pkg-up');\nconst parentModule = require('parent-module');\n\nconsole.log(readPkgUp.sync({cwd: path.dirname(parentModule())}).pkg);\n//=> {name: 'chalk', version: '1.0.0', …}\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", |
| 320 |
"maintainers": [ |
| 321 |
{ |
| 322 |
"name": "sindresorhus", |
| 323 |
"email": "[email protected]" |
| 324 |
} |
| 325 |
], |
| 326 |
"time": { |
| 327 |
"modified": "2019-04-30T14:16:57.663Z", |
| 328 |
"created": "2016-01-22T15:05:41.453Z", |
| 329 |
"0.1.0": "2016-01-22T15:05:41.453Z", |
| 330 |
"1.0.0": "2018-12-25T15:51:03.878Z", |
| 331 |
"1.0.1": "2019-03-28T11:33:52.331Z", |
| 332 |
"2.0.0": "2019-04-30T14:16:53.267Z" |
| 333 |
}, |
| 334 |
"homepage": "https://github.com/sindresorhus/parent-module#readme", |
| 335 |
"keywords": [ |
| 336 |
"parent", |
| 337 |
"module", |
| 338 |
"package", |
| 339 |
"caller", |
| 340 |
"calling", |
| 341 |
"module", |
| 342 |
"path", |
| 343 |
"callsites", |
| 344 |
"callsite", |
| 345 |
"stacktrace", |
| 346 |
"stack", |
| 347 |
"trace", |
| 348 |
"function", |
| 349 |
"file" |
| 350 |
], |
| 351 |
"repository": { |
| 352 |
"type": "git", |
| 353 |
"url": "git+https://github.com/sindresorhus/parent-module.git" |
| 354 |
}, |
| 355 |
"author": { |
| 356 |
"name": "Sindre Sorhus", |
| 357 |
"email": "[email protected]", |
| 358 |
"url": "sindresorhus.com" |
| 359 |
}, |
| 360 |
"bugs": { |
| 361 |
"url": "https://github.com/sindresorhus/parent-module/issues" |
| 362 |
}, |
| 363 |
"license": "MIT", |
| 364 |
"readmeFilename": "readme.md", |
| 365 |
"users": { |
| 366 |
"nraibaud": true |
| 367 |
} |
| 368 |
} |