wext-manifest-loader
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -30,6 +30,6 @@ "use strict"; | ||
}; | ||
const transformVendorKeys = (manifest, vendor) => { | ||
const transformVendorKeys = (manifest, selectedVendor) => { | ||
if (Array.isArray(manifest)) { | ||
return manifest.map((newManifest) => { | ||
return transformVendorKeys(newManifest, vendor); | ||
return transformVendorKeys(newManifest, selectedVendor); | ||
}); | ||
@@ -42,4 +42,4 @@ } | ||
const vendors = vendorMatch[1].split('|'); | ||
if (vendors.indexOf(vendor) > -1) { | ||
newManifest[vendorMatch[2]] = value; | ||
if (vendors.includes(selectedVendor)) { | ||
newManifest[vendorMatch[2]] = transformVendorKeys(value, selectedVendor); | ||
} | ||
@@ -54,7 +54,7 @@ } | ||
(isProd && envKey === ENVKeys.PROD)) { | ||
newManifest[envMatch[2]] = value; | ||
newManifest[envMatch[2]] = transformVendorKeys(value, selectedVendor); | ||
} | ||
} | ||
else { | ||
newManifest[key] = transformVendorKeys(value, vendor); | ||
newManifest[key] = transformVendorKeys(value, selectedVendor); | ||
} | ||
@@ -88,3 +88,3 @@ } | ||
if (vendor) { | ||
if (browserVendors.indexOf(vendor) < 0) { | ||
if (!browserVendors.includes(vendor)) { | ||
return this.emitError(`${LOADER_NAME}: browser ${vendor} is not supported`); | ||
@@ -91,0 +91,0 @@ } |
{ | ||
"name": "wext-manifest-loader", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Webpack loader that lets you specify `manifest.json` properties to appear only in specific browsers.", | ||
@@ -41,26 +41,26 @@ "license": "MIT", | ||
"loader-utils": "^2.0.0", | ||
"schema-utils": "^2.7.0" | ||
"schema-utils": "^2.7.1" | ||
}, | ||
"devDependencies": { | ||
"@abhijithvijayan/eslint-config": "2.5.3", | ||
"@abhijithvijayan/eslint-config": "2.6.2", | ||
"@abhijithvijayan/eslint-config-airbnb": "^1.0.2", | ||
"@abhijithvijayan/tsconfig": "^1.2.0", | ||
"@abhijithvijayan/tsconfig": "^1.3.0", | ||
"@babel/eslint-parser": "^7.12.17", | ||
"@types/loader-utils": "^2.0.1", | ||
"@types/node": "^14.0.14", | ||
"@typescript-eslint/eslint-plugin": "^3.5.0", | ||
"@typescript-eslint/parser": "^3.5.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.3.1", | ||
"eslint-config-airbnb": "^18.2.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-jsx-a11y": "^6.3.1", | ||
"@types/node": "^14.14.31", | ||
"@typescript-eslint/eslint-plugin": "^4.15.1", | ||
"@typescript-eslint/parser": "^4.15.1", | ||
"eslint": "^7.20.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-react": "^7.20.3", | ||
"eslint-plugin-react-hooks": "^4.0.5", | ||
"prettier": "^2.0.5", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-react": "^7.22.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"prettier": "^2.2.1", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^3.9.6" | ||
"typescript": "^4.1.5" | ||
} | ||
} |
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
15604
Updatedschema-utils@^2.7.1