Skip to content

Commit

Permalink
fix: replace old require-uncached with import-fresh (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric authored and marionebl committed Jan 27, 2019
1 parent b35000c commit b636e8c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion @commitlint/resolve-extends/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
},
"dependencies": {
"babel-runtime": "6.26.0",
"import-fresh": "^3.0.0",
"lodash": "4.17.11",
"require-uncached": "^1.0.3",
"resolve-from": "^4.0.0",
"resolve-global": "^0.1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/resolve-extends/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';

import 'resolve-global'; // eslint-disable-line import/no-unassigned-import
import requireUncached from 'require-uncached';
import importFresh from 'import-fresh';
import resolveFrom from 'resolve-from';
import {isArray, merge, mergeWith, omit} from 'lodash';

Expand Down Expand Up @@ -118,7 +118,7 @@ function resolveFromSilent(cwd, id) {

function resolveGlobalSilent(id) {
try {
const resolveGlobal = requireUncached('resolve-global');
const resolveGlobal = importFresh('resolve-global');
return resolveGlobal(id);
} catch (err) {}
}
22 changes: 21 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,11 @@ callsites@^0.2.0:
resolved "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=

callsites@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3"
integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==

camelcase-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
Expand Down Expand Up @@ -5167,6 +5172,14 @@ ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6:
resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
integrity sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==

import-fresh@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"

[email protected]:
version "2.1.0"
resolved "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
Expand Down Expand Up @@ -5919,7 +5932,7 @@ js-types@^1.0.0:
resolved "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03"
integrity sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=

js-yaml@^3.10.0:
js-yaml@^3.10.0, js-yaml@^3.5.1:
version "3.12.0"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==
Expand Down Expand Up @@ -7480,6 +7493,13 @@ parallel-transform@^1.1.0:
inherits "^2.0.3"
readable-stream "^2.1.5"

parent-module@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5"
integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==
dependencies:
callsites "^3.0.0"

parent-require@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977"
Expand Down

0 comments on commit b636e8c

Please sign in to comment.