@vue/cli-shared-utils
Advanced tools
Comparing version 3.0.1 to 3.0.2
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 | ||
}) | ||
@@ -10,0 +17,0 @@ // env detection |
@@ -9,5 +9,8 @@ const ipc = require('node-ipc') | ||
disconnectOnIdle: false, | ||
idleTimeout: DEFAULT_IDLE_TIMEOUT | ||
idleTimeout: DEFAULT_IDLE_TIMEOUT, | ||
namespaceOnProject: true | ||
} | ||
const PROJECT_ID = process.env.VUE_CLI_PROJECT_ID | ||
exports.IpcMessenger = class IpcMessenger { | ||
@@ -49,2 +52,9 @@ constructor (options = {}) { | ||
if (this.connected) { | ||
if (this.options.namespaceOnProject && PROJECT_ID) { | ||
data = { | ||
_projectId: PROJECT_ID, | ||
_data: data | ||
} | ||
} | ||
ipc.of[this.id].emit(type, data) | ||
@@ -123,4 +133,13 @@ | ||
_onMessage (data) { | ||
this.listeners.forEach(fn => fn(data)) | ||
this.listeners.forEach(fn => { | ||
if (this.options.namespaceOnProject && data._projectId) { | ||
if (data._projectId === PROJECT_ID) { | ||
data = data._data | ||
} else { | ||
return | ||
} | ||
} | ||
fn(data) | ||
}) | ||
} | ||
} |
{ | ||
"name": "@vue/cli-shared-utils", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "shared utilities for vue-cli packages", | ||
@@ -26,2 +26,3 @@ "main": "index.js", | ||
"launch-editor": "^2.2.1", | ||
"lru-cache": "^4.1.3", | ||
"node-ipc": "^9.1.1", | ||
@@ -28,0 +29,0 @@ "opn": "^5.3.0", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
20874
653
12
3
+ Addedlru-cache@^4.1.3
+ Addedlru-cache@4.1.5(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedyallist@2.1.2(transitive)