@tailwindcss-mangle/shared 4.1.1 → 4.1.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.
package/dist/index.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
@@ -39,6 +49,9 @@ __export(index_exports, {
39
49
  });
40
50
  module.exports = __toCommonJS(index_exports);
41
51
 
52
+ // src/classGenerator.ts
53
+ var import_node_process = __toESM(require("process"), 1);
54
+
42
55
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
43
56
  function isPlainObject(value) {
44
57
  if (value === null || typeof value !== "object") {
@@ -145,7 +158,7 @@ function groupBy(arr, cb) {
145
158
  const bucketCategory = cb(item);
146
159
  const bucket = result[bucketCategory];
147
160
  if (Array.isArray(bucket)) {
148
- result[bucketCategory].push(item);
161
+ bucket.push(item);
149
162
  } else {
150
163
  result[bucketCategory] = [item];
151
164
  }
@@ -253,13 +266,15 @@ var ClassGenerator = class {
253
266
  }
254
267
  if (opts.reserveClassName && regExpTest(opts.reserveClassName, newClassName)) {
255
268
  if (opts.log) {
256
- console.log(`The class name has been reserved. ${newClassName}`);
269
+ import_node_process.default.stdout.write(`The class name has been reserved. ${newClassName}
270
+ `);
257
271
  }
258
272
  this.newClassSize++;
259
273
  return this.generateClassName(original);
260
274
  }
261
275
  if (opts.log) {
262
- console.log(`Minify class name from ${original} to ${newClassName}`);
276
+ import_node_process.default.stdout.write(`Minify class name from ${original} to ${newClassName}
277
+ `);
263
278
  }
264
279
  const newClass = {
265
280
  name: newClassName,
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ // src/classGenerator.ts
2
+ import process from "process";
3
+
1
4
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
2
5
  function isPlainObject(value) {
3
6
  if (value === null || typeof value !== "object") {
@@ -104,7 +107,7 @@ function groupBy(arr, cb) {
104
107
  const bucketCategory = cb(item);
105
108
  const bucket = result[bucketCategory];
106
109
  if (Array.isArray(bucket)) {
107
- result[bucketCategory].push(item);
110
+ bucket.push(item);
108
111
  } else {
109
112
  result[bucketCategory] = [item];
110
113
  }
@@ -212,13 +215,15 @@ var ClassGenerator = class {
212
215
  }
213
216
  if (opts.reserveClassName && regExpTest(opts.reserveClassName, newClassName)) {
214
217
  if (opts.log) {
215
- console.log(`The class name has been reserved. ${newClassName}`);
218
+ process.stdout.write(`The class name has been reserved. ${newClassName}
219
+ `);
216
220
  }
217
221
  this.newClassSize++;
218
222
  return this.generateClassName(original);
219
223
  }
220
224
  if (opts.log) {
221
- console.log(`Minify class name from ${original} to ${newClassName}`);
225
+ process.stdout.write(`Minify class name from ${original} to ${newClassName}
226
+ `);
222
227
  }
223
228
  const newClass = {
224
229
  name: newClassName,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tailwindcss-mangle/shared",
3
3
  "type": "module",
4
- "version": "4.1.1",
4
+ "version": "4.1.3",
5
5
  "description": "The shared utils of tailwindcss-mangle",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",