chrome-types-helpers
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -78,5 +78,5 @@ /** | ||
// path (only used in `api:accessibilityFeatures` for now). | ||
while (path && !(path in this.#source)) { | ||
path = parentName(path); | ||
} | ||
// while (path && !(path in this.#source)) { | ||
// path = parentName(path); | ||
// } | ||
@@ -97,7 +97,11 @@ return this.#rawArray(path).map((top) => { | ||
if (Array.isArray(lookup)) { | ||
const defaultParent = lookup.find(({default_parent}) => default_parent); | ||
if (!defaultParent) { | ||
throw new Error(`could not find default parent for: ${path}`); | ||
if (lookup.length === 1) { | ||
lookup = lookup[0]; | ||
} else { | ||
const defaultParent = lookup.find(({default_parent}) => default_parent); | ||
if (!defaultParent) { | ||
throw new Error(`could not find default parent for: ${path}, lookup length: ${lookup.length}`); | ||
} | ||
lookup = defaultParent; | ||
} | ||
lookup = defaultParent; | ||
} | ||
@@ -126,2 +130,3 @@ | ||
if (filtered.length >= 2) { | ||
console.warn(filtered); | ||
throw new Error(`got multiple ambig for ${path}: ${filtered.length}`); | ||
@@ -459,3 +464,7 @@ } | ||
switch (name) { | ||
case 'api:accessibilityFeatures': { | ||
// TODO(samthor): These both have "multiple" allowed permission paths. We just pretend both | ||
// are required since our display is ambiguous re: AND/OR. | ||
case 'api:declarativeNetRequest': | ||
case 'api:accessibilityFeatures': | ||
case 'api:declarativeNetRequest.onRuleMatchedDebug': { | ||
/** @type {Set<string>} */ | ||
@@ -462,0 +471,0 @@ const allDependencies = new Set(); |
@@ -5,3 +5,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212980
5936