@vue/devtools-kit 8.1.5 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -8
- package/dist/index.js +6 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1645,10 +1645,11 @@ function processProvide(instance) {
|
|
|
1645
1645
|
value: returnError(() => instance.provides[key])
|
|
1646
1646
|
}));
|
|
1647
1647
|
}
|
|
1648
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1649
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
1648
1650
|
function processInject(instance, mergedType) {
|
|
1649
1651
|
if (!mergedType?.inject) return [];
|
|
1650
|
-
let keys
|
|
1651
|
-
let defaultValue;
|
|
1652
|
+
let keys;
|
|
1652
1653
|
if (Array.isArray(mergedType.inject)) keys = mergedType.inject.map((key) => ({
|
|
1653
1654
|
key,
|
|
1654
1655
|
originalKey: key
|
|
@@ -1657,10 +1658,7 @@ function processInject(instance, mergedType) {
|
|
|
1657
1658
|
const value = mergedType.inject[key];
|
|
1658
1659
|
let originalKey;
|
|
1659
1660
|
if (typeof value === "string" || typeof value === "symbol") originalKey = value;
|
|
1660
|
-
else
|
|
1661
|
-
originalKey = value.from;
|
|
1662
|
-
defaultValue = value.default;
|
|
1663
|
-
}
|
|
1661
|
+
else originalKey = value.from ?? key;
|
|
1664
1662
|
return {
|
|
1665
1663
|
key,
|
|
1666
1664
|
originalKey
|
|
@@ -1668,8 +1666,8 @@ function processInject(instance, mergedType) {
|
|
|
1668
1666
|
});
|
|
1669
1667
|
return keys.map(({ key, originalKey }) => ({
|
|
1670
1668
|
type: "injected",
|
|
1671
|
-
key:
|
|
1672
|
-
value: returnError(() => instance.ctx
|
|
1669
|
+
key: key !== originalKey ? `${String(originalKey)} ➞ ${String(key)}` : String(key),
|
|
1670
|
+
value: returnError(() => hasOwn(instance.ctx, key) ? instance.ctx[key] : void 0)
|
|
1673
1671
|
}));
|
|
1674
1672
|
}
|
|
1675
1673
|
function processRefs(instance) {
|
package/dist/index.js
CHANGED
|
@@ -1644,10 +1644,11 @@ function processProvide(instance) {
|
|
|
1644
1644
|
value: returnError(() => instance.provides[key])
|
|
1645
1645
|
}));
|
|
1646
1646
|
}
|
|
1647
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1648
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
1647
1649
|
function processInject(instance, mergedType) {
|
|
1648
1650
|
if (!mergedType?.inject) return [];
|
|
1649
|
-
let keys
|
|
1650
|
-
let defaultValue;
|
|
1651
|
+
let keys;
|
|
1651
1652
|
if (Array.isArray(mergedType.inject)) keys = mergedType.inject.map((key) => ({
|
|
1652
1653
|
key,
|
|
1653
1654
|
originalKey: key
|
|
@@ -1656,10 +1657,7 @@ function processInject(instance, mergedType) {
|
|
|
1656
1657
|
const value = mergedType.inject[key];
|
|
1657
1658
|
let originalKey;
|
|
1658
1659
|
if (typeof value === "string" || typeof value === "symbol") originalKey = value;
|
|
1659
|
-
else
|
|
1660
|
-
originalKey = value.from;
|
|
1661
|
-
defaultValue = value.default;
|
|
1662
|
-
}
|
|
1660
|
+
else originalKey = value.from ?? key;
|
|
1663
1661
|
return {
|
|
1664
1662
|
key,
|
|
1665
1663
|
originalKey
|
|
@@ -1667,8 +1665,8 @@ function processInject(instance, mergedType) {
|
|
|
1667
1665
|
});
|
|
1668
1666
|
return keys.map(({ key, originalKey }) => ({
|
|
1669
1667
|
type: "injected",
|
|
1670
|
-
key:
|
|
1671
|
-
value: returnError(() => instance.ctx
|
|
1668
|
+
key: key !== originalKey ? `${String(originalKey)} ➞ ${String(key)}` : String(key),
|
|
1669
|
+
value: returnError(() => hasOwn(instance.ctx, key) ? instance.ctx[key] : void 0)
|
|
1672
1670
|
}));
|
|
1673
1671
|
}
|
|
1674
1672
|
function processRefs(instance) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.1
|
|
4
|
+
"version": "8.2.1",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"birpc": "^2.6.1",
|
|
28
28
|
"hookable": "^5.5.3",
|
|
29
29
|
"perfect-debounce": "^2.0.0",
|
|
30
|
-
"@vue/devtools-shared": "^8.1
|
|
30
|
+
"@vue/devtools-shared": "^8.2.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/speakingurl": "^13.0.6",
|