Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dcloudio/uni-cli-shared

Package Overview
Dependencies
Maintainers
4
Versions
1739
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dcloudio/uni-cli-shared - npm Package Compare versions

Comparing version 0.2.930 to 0.2.931

24

lib/cache.js

@@ -11,2 +11,4 @@ /**

let globalUsingComponents = Object.create(null)
function updateJsonFile (name, jsonStr) {

@@ -49,3 +51,9 @@ changedJsonFileSet.add(name)

if (usingComponents) { // merge usingComponents
jsonObj.usingComponents = JSON.parse(oldJsonStr).usingComponents || {}
if (process.env.UNI_PLATFORM !== 'mp-weixin') { // 简单处理其他平台全局组件,直接合并到独立 json 中
jsonObj.usingComponents = Object.assign({},
globalUsingComponents,
JSON.parse(oldJsonStr).usingComponents || {})
} else {
jsonObj.usingComponents = JSON.parse(oldJsonStr).usingComponents || {}
}
}

@@ -57,2 +65,7 @@ const newJsonStr = JSON.stringify(jsonObj, null, 2)

} else { // add
if (process.env.UNI_PLATFORM !== 'mp-weixin') { // 简单处理其他平台全局组件,直接合并到独立 json 中
if (usingComponents) {
jsonObj.usingComponents = Object.assign({}, globalUsingComponents, jsonObj.usingComponents || {})
}
}
updateJsonFile(name, jsonObj)

@@ -62,3 +75,2 @@ }

// TODO 需要合并开发者自己在 pages.json 中引用的 components
function updateUsingComponents (name, usingComponents, type) {

@@ -68,2 +80,10 @@ if (type === 'Component') {

}
if (type === 'App') { // 记录全局组件
globalUsingComponents = usingComponents
}
if (process.env.UNI_PLATFORM !== 'mp-weixin') { // 简单处理其他平台全局组件,直接合并到独立 json 中
usingComponents = Object.assign({}, globalUsingComponents, usingComponents)
}
const oldJsonStr = getJsonFile(name)

@@ -70,0 +90,0 @@ if (oldJsonStr) { // update

2

package.json
{
"name": "@dcloudio/uni-cli-shared",
"version": "0.2.930",
"version": "0.2.931",
"description": "uni-cli-shared",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc