Don't force chokidar@2 to be downloaded from registry.npmjs.org (#12182)
This commit is contained in:
@@ -33,8 +33,8 @@
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"chokidar": "^3.4.0",
|
||||
"chokidarAt2": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz"
|
||||
"@nicolo-ribaudo/chokidar-2": "^2.1.8",
|
||||
"chokidar": "^3.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
|
||||
@@ -116,10 +116,10 @@ process.on("uncaughtException", function (err) {
|
||||
|
||||
export function requireChokidar(): Object {
|
||||
try {
|
||||
// todo(babel 8): revert `chokidarAt2` hack
|
||||
// todo(babel 8): revert `@nicolo-ribaudo/chokidar-2` hack
|
||||
return parseInt(process.version) >= 8
|
||||
? require("chokidar")
|
||||
: require("chokidarAt2");
|
||||
: require("@nicolo-ribaudo/chokidar-2");
|
||||
} catch (err) {
|
||||
console.error(
|
||||
"The optional dependency chokidar failed to install and is required for " +
|
||||
|
||||
Reference in New Issue
Block a user