Skip to content

Commit

Permalink
Don't force chokidar@2 to be downloaded from registry.npmjs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 15, 2020
1 parent 19dc038 commit d81a3da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/babel-cli/package.json
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-cli/src/babel/util.js
Expand Up @@ -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 " +
Expand Down
17 changes: 13 additions & 4 deletions yarn.lock
Expand Up @@ -39,8 +39,8 @@ __metadata:
dependencies:
"@babel/core": "workspace:*"
"@babel/helper-fixtures": "workspace:*"
"@nicolo-ribaudo/chokidar-2": ^2.1.8
chokidar: ^3.4.0
chokidarAt2: "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz"
commander: ^4.0.1
convert-source-map: ^1.1.0
fs-readdir-recursive: ^1.1.0
Expand All @@ -53,9 +53,9 @@ __metadata:
peerDependencies:
"@babel/core": ^7.0.0-0
dependenciesMeta:
chokidar:
"@nicolo-ribaudo/chokidar-2":
optional: true
chokidarAt2:
chokidar:
optional: true
bin:
babel: ./bin/babel.js
Expand Down Expand Up @@ -3547,6 +3547,15 @@ __metadata:
languageName: node
linkType: hard

"@nicolo-ribaudo/chokidar-2@npm:^2.1.8":
version: 2.1.8
resolution: "@nicolo-ribaudo/chokidar-2@npm:2.1.8"
dependencies:
chokidar: 2.1.8
checksum: a3528e53052074df562ad776ac1211dc03d41b0c06d90b5472cd60d6e717900e4a987d89cf269c3c031ee35674f369e6ebd2e4846ed19d06e5da8ed1ffecb682
languageName: node
linkType: hard

"@nodelib/fs.scandir@npm:2.1.3":
version: 2.1.3
resolution: "@nodelib/fs.scandir@npm:2.1.3"
Expand Down Expand Up @@ -5161,7 +5170,7 @@ __metadata:
languageName: node
linkType: hard

"chokidar@npm:^2.0.0":
"chokidar@npm:2.1.8, chokidar@npm:^2.0.0":
version: 2.1.8
resolution: "chokidar@npm:2.1.8"
dependencies:
Expand Down

0 comments on commit d81a3da

Please sign in to comment.