@merkur/plugin-css-scrambler 0.32.0 → 0.34.0

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/lib/index.cjs CHANGED
@@ -76,7 +76,7 @@ function scramblerFactory(hashingTable) {
76
76
  }
77
77
 
78
78
  return `${prefixTable.get(prefix)}_${mainPartTable.get(
79
- mainPart
79
+ mainPart,
80
80
  )}_${uniqueHash}`;
81
81
  })
82
82
  .join(' ');
package/lib/index.js CHANGED
@@ -76,7 +76,7 @@ function scramblerFactory(hashingTable) {
76
76
  }
77
77
 
78
78
  return `${prefixTable.get(prefix)}_${mainPartTable.get(
79
- mainPart
79
+ mainPart,
80
80
  )}_${uniqueHash}`;
81
81
  })
82
82
  .join(' ');
package/lib/index.mjs CHANGED
@@ -74,7 +74,7 @@ function scramblerFactory(hashingTable) {
74
74
  }
75
75
 
76
76
  return `${prefixTable.get(prefix)}_${mainPartTable.get(
77
- mainPart
77
+ mainPart,
78
78
  )}_${uniqueHash}`;
79
79
  })
80
80
  .join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkur/plugin-css-scrambler",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Merkur plugin for scrambling CSS classes.",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -65,5 +65,5 @@
65
65
  "classnames": "^2.3.2",
66
66
  "postcss-selector-parser": "^6.0.12"
67
67
  },
68
- "gitHead": "c45ffe12725e3c4afcf7f13869a25a96f6807055"
68
+ "gitHead": "3bc4a1efb8f8d5cee6bcf5f1454809747904153c"
69
69
  }
package/postcss/index.js CHANGED
@@ -24,7 +24,7 @@ function postCssScrambler(options) {
24
24
  fs.writeFileSync(options.hashTable, JSON.stringify(tableData));
25
25
  } else {
26
26
  [prefixesTable, mainPartsTable] = JSON.parse(
27
- fs.readFileSync(options.hashTable)
27
+ fs.readFileSync(options.hashTable),
28
28
  );
29
29
  }
30
30
 
@@ -45,7 +45,7 @@ function postCssScrambler(options) {
45
45
  const mainPartIndex = mainPartsTable.indexOf(mainPart);
46
46
  if (prefixIndex === -1 || mainPartIndex === -1) {
47
47
  throw new Error(
48
- `The ${className} CSS class in not in the hash table`
48
+ `The ${className} CSS class in not in the hash table`,
49
49
  );
50
50
  }
51
51
 
@@ -124,7 +124,7 @@ function applyPostCssScramblePlugin(options) {
124
124
  generateHashTable: true,
125
125
  hashTable: path.resolve(
126
126
  process.env.WIDGET_DIRNAME,
127
- './build/static/hashtable.json'
127
+ './build/static/hashtable.json',
128
128
  ),
129
129
  ...options,
130
130
  });
@@ -137,7 +137,7 @@ function applyPostCssScramblePlugin(options) {
137
137
 
138
138
  const postCssUseEntryIndex = rule.use.findIndex(
139
139
  (useEntry) =>
140
- useEntry === 'postcss-loader' || useEntry.loader === 'postcss-loader'
140
+ useEntry === 'postcss-loader' || useEntry.loader === 'postcss-loader',
141
141
  );
142
142
 
143
143
  if (~postCssUseEntryIndex) {
@@ -173,7 +173,7 @@ function applyPostCssScramblePlugin(options) {
173
173
 
174
174
  // add postcss loader to rule matching css files
175
175
  const cssRuleIndex = config.module.rules.findIndex((rule) =>
176
- rule.test.test('.css')
176
+ rule.test.test('.css'),
177
177
  );
178
178
 
179
179
  if (~cssRuleIndex) {