Skip to content

Commit ded81c6

Browse files
authored
fix(ui): stop depending on the watch package (#6635)
1 parent c1bf3d8 commit ded81c6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/@vue/cli-ui/apollo-server/connectors/locales.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function loadFolder (root, context) {
4949
const folder = path.join(root, './locales')
5050
if (process.env.VUE_APP_CLI_UI_DEV && !watchedTrees.get(root) && fs.existsSync(folder)) {
5151
watchedTrees.set(root, true)
52-
const watch = require('watch')
53-
watch.watchTree(folder, () => {
52+
const chokidar = require('chokidar')
53+
chokidar.watch(folder).on('all', () => {
5454
_loadFolder(root, context)
5555
log('Locales reloaded', root)
5656
})

packages/@vue/cli-ui/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
"prismjs": "^1.23.0",
6161
"rss-parser": "^3.11.0",
6262
"shortid": "^2.2.15",
63-
"typescript": "~4.1.5",
64-
"watch": "^1.0.2"
63+
"typescript": "~4.1.5"
6564
},
6665
"devDependencies": {
6766
"@babel/core": "^7.12.16",
@@ -75,6 +74,7 @@
7574
"ansi_up": "^5.0.0",
7675
"apollo-client": "^2.6.10",
7776
"apollo-link": "^1.2.14",
77+
"chokidar": "^3.5.2",
7878
"core-js": "^3.8.3",
7979
"cross-env": "^7.0.3",
8080
"date-fns": "^2.17.0",

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -7128,7 +7128,7 @@ chokidar@3.5.1:
71287128
optionalDependencies:
71297129
fsevents "~2.3.1"
71307130

7131-
chokidar@3.5.2, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.2, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1:
7131+
chokidar@3.5.2, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.2, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.2:
71327132
version "3.5.2"
71337133
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
71347134
integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==

0 commit comments

Comments
 (0)