Skip to content

Commit b636e8c

Browse files
byCedricmarionebl
authored andcommitted
fix: replace old require-uncached with import-fresh (#533)
1 parent b35000c commit b636e8c

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

@commitlint/resolve-extends/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
},
7676
"dependencies": {
7777
"babel-runtime": "6.26.0",
78+
"import-fresh": "^3.0.0",
7879
"lodash": "4.17.11",
79-
"require-uncached": "^1.0.3",
8080
"resolve-from": "^4.0.0",
8181
"resolve-global": "^0.1.0"
8282
}

@commitlint/resolve-extends/src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22

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

@@ -118,7 +118,7 @@ function resolveFromSilent(cwd, id) {
118118

119119
function resolveGlobalSilent(id) {
120120
try {
121-
const resolveGlobal = requireUncached('resolve-global');
121+
const resolveGlobal = importFresh('resolve-global');
122122
return resolveGlobal(id);
123123
} catch (err) {}
124124
}

yarn.lock

+21-1
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,11 @@ callsites@^0.2.0:
22312231
resolved "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
22322232
integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=
22332233

2234+
callsites@^3.0.0:
2235+
version "3.0.0"
2236+
resolved "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3"
2237+
integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==
2238+
22342239
camelcase-keys@^2.0.0:
22352240
version "2.1.0"
22362241
resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@@ -5167,6 +5172,14 @@ ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6:
51675172
resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
51685173
integrity sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==
51695174

5175+
import-fresh@^3.0.0:
5176+
version "3.0.0"
5177+
resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
5178+
integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==
5179+
dependencies:
5180+
parent-module "^1.0.0"
5181+
resolve-from "^4.0.0"
5182+
51705183
51715184
version "2.1.0"
51725185
resolved "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
@@ -5919,7 +5932,7 @@ js-types@^1.0.0:
59195932
resolved "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03"
59205933
integrity sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=
59215934

5922-
js-yaml@^3.10.0:
5935+
js-yaml@^3.10.0, js-yaml@^3.5.1:
59235936
version "3.12.0"
59245937
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
59255938
integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==
@@ -7480,6 +7493,13 @@ parallel-transform@^1.1.0:
74807493
inherits "^2.0.3"
74817494
readable-stream "^2.1.5"
74827495

7496+
parent-module@^1.0.0:
7497+
version "1.0.0"
7498+
resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5"
7499+
integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==
7500+
dependencies:
7501+
callsites "^3.0.0"
7502+
74837503
parent-require@^1.0.0:
74847504
version "1.0.0"
74857505
resolved "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977"

0 commit comments

Comments
 (0)