wext-manifest-transformer 1.2.2 → 1.2.3

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.
@@ -10,10 +10,9 @@ const transformer = (manifest, selectedVendor, nodeEnv) => {
10
10
  }
11
11
  if (typeof manifest === "object" && !!manifest) {
12
12
  return Object.entries(manifest).reduce((newManifest, [key, value]) => {
13
- var _a;
14
13
  const vendorMatch = key.match(constants_1.CUSTOM_PREFIX_REGEX);
15
14
  if (!!vendorMatch) {
16
- const matches = ((_a = vendorMatch[1]) === null || _a === void 0 ? void 0 : _a.split("|")) || [];
15
+ const matches = vendorMatch[1]?.split("|") || [];
17
16
  const isProd = nodeEnv === "production";
18
17
  const hasCurrentVendor = matches.includes(selectedVendor);
19
18
  const hasVendorKeys = matches.some((m) => constants_1.browserVendors.includes(m));
@@ -7,10 +7,9 @@ export const transformer = (manifest, selectedVendor, nodeEnv) => {
7
7
  }
8
8
  if (typeof manifest === "object" && !!manifest) {
9
9
  return Object.entries(manifest).reduce((newManifest, [key, value]) => {
10
- var _a;
11
10
  const vendorMatch = key.match(CUSTOM_PREFIX_REGEX);
12
11
  if (!!vendorMatch) {
13
- const matches = ((_a = vendorMatch[1]) === null || _a === void 0 ? void 0 : _a.split("|")) || [];
12
+ const matches = vendorMatch[1]?.split("|") || [];
14
13
  const isProd = nodeEnv === "production";
15
14
  const hasCurrentVendor = matches.includes(selectedVendor);
16
15
  const hasVendorKeys = matches.some((m) => browserVendors.includes(m));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wext-manifest-transformer",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Transformer that lets you specify `manifest.json` properties to appear only in specific browsers.",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/abhijithvijayan/wext-manifest-transformer.git",
@@ -10,7 +10,7 @@
10
10
  "url": "https://abhijithvijayan.in"
11
11
  },
12
12
  "engines": {
13
- "node": ">=18.0.0"
13
+ "node": ">=18"
14
14
  },
15
15
  "main": "lib/cjs/index.js",
16
16
  "module": "lib/esm/index.js",
@@ -58,7 +58,7 @@
58
58
  "devDependencies": {
59
59
  "@abhijithvijayan/eslint-config": "^2.8.0",
60
60
  "@abhijithvijayan/eslint-config-airbnb": "^1.1.0",
61
- "@abhijithvijayan/tsconfig": "^1.4.2",
61
+ "@abhijithvijayan/tsconfig": "^1.4.3",
62
62
  "@babel/eslint-parser": "^7.23.9",
63
63
  "@types/jest": "^26.0.23",
64
64
  "@types/node": "^20.19.1",