mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-22 20:38:55 -05:00
fix: expire env maps, closes #1906
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
const { execSync } = require('child_process')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const LRU = require('lru-cache')
|
||||
|
||||
let _hasYarn
|
||||
const _yarnProjects = new Map()
|
||||
const _yarnProjects = new LRU({
|
||||
max: 10,
|
||||
maxAge: 1000
|
||||
})
|
||||
let _hasGit
|
||||
const _gitProjects = new Map()
|
||||
const _gitProjects = new LRU({
|
||||
max: 10,
|
||||
maxAge: 1000
|
||||
})
|
||||
|
||||
// env detection
|
||||
exports.hasYarn = () => {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"execa": "^0.10.0",
|
||||
"joi": "^13.0.0",
|
||||
"launch-editor": "^2.2.1",
|
||||
"lru-cache": "^4.1.3",
|
||||
"node-ipc": "^9.1.1",
|
||||
"opn": "^5.3.0",
|
||||
"ora": "^2.1.0",
|
||||
|
||||
Reference in New Issue
Block a user