We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a115151 commit 8dd0b11Copy full SHA for 8dd0b11
packages/@vue/cli-shared-utils/lib/env.js
@@ -1,11 +1,18 @@
1
const { execSync } = require('child_process')
2
const fs = require('fs')
3
const path = require('path')
4
+const LRU = require('lru-cache')
5
6
let _hasYarn
-const _yarnProjects = new Map()
7
+const _yarnProjects = new LRU({
8
+ max: 10,
9
+ maxAge: 1000
10
+})
11
let _hasGit
-const _gitProjects = new Map()
12
+const _gitProjects = new LRU({
13
14
15
16
17
// env detection
18
exports.hasYarn = () => {
packages/@vue/cli-shared-utils/package.json
@@ -23,6 +23,7 @@
23
"execa": "^0.10.0",
24
"joi": "^13.0.0",
25
"launch-editor": "^2.2.1",
26
+ "lru-cache": "^4.1.3",
27
"node-ipc": "^9.1.1",
28
"opn": "^5.3.0",
29
"ora": "^2.1.0",
0 commit comments