@node-minify/no-compress 9.0.1 → 10.0.0-next.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/dist/index.cjs ADDED
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ default: () => src_default
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_utils = require("@node-minify/utils");
27
+ var noCompress = ({
28
+ settings,
29
+ content,
30
+ callback,
31
+ index
32
+ }) => {
33
+ if (settings && !settings.content && settings.output) {
34
+ import_utils.utils.writeFile({ file: settings.output, content, index });
35
+ }
36
+ if (callback) {
37
+ return callback(null, content);
38
+ }
39
+ return content;
40
+ };
41
+ noCompress.default = noCompress;
42
+ var src_default = noCompress;
43
+ /*!
44
+ * node-minify
45
+ * Copyright(c) 2011-2024 Rodolphe Stoclin
46
+ * MIT Licensed
47
+ */
48
+
49
+ // fix-cjs-exports
50
+ if (module.exports.default) {
51
+ Object.assign(module.exports.default, module.exports);
52
+ module.exports = module.exports.default;
53
+ delete module.exports.default;
54
+ }
@@ -12,3 +12,4 @@ declare const noCompress: {
12
12
  };
13
13
 
14
14
  export { noCompress as default };
15
+ export = noCompress
package/dist/index.d.ts CHANGED
@@ -12,3 +12,4 @@ declare const noCompress: {
12
12
  };
13
13
 
14
14
  export { noCompress as default };
15
+ export = noCompress
package/dist/index.js CHANGED
@@ -1,7 +1,5 @@
1
- "use strict";
2
-
3
1
  // src/index.ts
4
- var import_utils = require("@node-minify/utils");
2
+ import { utils } from "@node-minify/utils";
5
3
  var noCompress = ({
6
4
  settings,
7
5
  content,
@@ -9,7 +7,7 @@ var noCompress = ({
9
7
  index
10
8
  }) => {
11
9
  if (settings && !settings.content && settings.output) {
12
- import_utils.utils.writeFile({ file: settings.output, content, index });
10
+ utils.writeFile({ file: settings.output, content, index });
13
11
  }
14
12
  if (callback) {
15
13
  return callback(null, content);
@@ -17,10 +15,12 @@ var noCompress = ({
17
15
  return content;
18
16
  };
19
17
  noCompress.default = noCompress;
20
- module.exports = noCompress;
18
+ var src_default = noCompress;
19
+ export {
20
+ src_default as default
21
+ };
21
22
  /*!
22
23
  * node-minify
23
24
  * Copyright(c) 2011-2024 Rodolphe Stoclin
24
25
  * MIT Licensed
25
26
  */
26
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,28 +1,27 @@
1
1
  {
2
2
  "name": "@node-minify/no-compress",
3
- "version": "9.0.1",
3
+ "version": "10.0.0-next.0",
4
4
  "description": "no compress plugin for @node-minify, only concatenate",
5
5
  "keywords": [
6
6
  "concatenate"
7
7
  ],
8
8
  "author": "Rodolphe Stoclin <srodolphe@gmail.com>",
9
- "homepage": "https://github.com/srod/node-minify/tree/master/packages/no-compress#readme",
9
+ "homepage": "https://github.com/srod/node-minify/tree/main/packages/no-compress#readme",
10
10
  "license": "MIT",
11
+ "type": "module",
11
12
  "engines": {
12
- "node": ">=18.0.0"
13
+ "node": ">=22.0.0"
13
14
  },
14
15
  "directories": {
15
16
  "lib": "dist",
16
17
  "test": "__tests__"
17
18
  },
18
- "main": "./dist/index.js",
19
- "module": "./dist/index.mjs",
20
- "types": "./dist/index.d.ts",
19
+ "main": "./dist/index.cjs",
21
20
  "exports": {
21
+ "./package.json": "./package.json",
22
22
  ".": {
23
- "types": "./dist/index.d.ts",
24
- "import": "./dist/index.mjs",
25
- "require": "./dist/index.js"
23
+ "import": "./dist/index.js",
24
+ "default": "./dist/index.cjs"
26
25
  }
27
26
  },
28
27
  "files": [
@@ -38,18 +37,20 @@
38
37
  "bugs": {
39
38
  "url": "https://github.com/srod/node-minify/issues"
40
39
  },
41
- "dependencies": {
42
- "@node-minify/utils": "9.0.1"
43
- },
44
- "devDependencies": {
45
- "@node-minify/types": "9.0.0"
46
- },
47
40
  "scripts": {
48
- "clean": "pnpm dlx rimraf dist",
49
- "build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap",
41
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean && bunx fix-tsup-cjs",
42
+ "check-exports": "attw --pack .",
43
+ "format:check": "biome check .",
50
44
  "lint": "biome lint .",
45
+ "prepublishOnly": "bun run build",
51
46
  "test": "vitest run",
52
47
  "test:ci": "vitest run --coverage",
53
48
  "test:watch": "vitest"
49
+ },
50
+ "dependencies": {
51
+ "@node-minify/utils": "workspace:*"
52
+ },
53
+ "devDependencies": {
54
+ "@node-minify/types": "workspace:*"
54
55
  }
55
- }
56
+ }
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2024 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport type { MinifierOptions } from \"@node-minify/types\";\nimport { utils } from \"@node-minify/utils\";\n\n/**\n * Just merge, no compression.\n * @param settings NoCompress options\n * @param content Content to minify\n * @param callback Callback\n * @param index Index of current file in array\n * @returns Minified content\n */\nconst noCompress = ({\n settings,\n content,\n callback,\n index,\n}: MinifierOptions) => {\n if (settings && !settings.content && settings.output) {\n utils.writeFile({ file: settings.output, content, index });\n }\n if (callback) {\n return callback(null, content);\n }\n return content;\n};\n\n/**\n * Expose `noCompress()`.\n */\nnoCompress.default = noCompress;\nexport = noCompress;\n"],"mappings":";;;AAUA,mBAAsB;AAUtB,IAAM,aAAa,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,MAAuB;AACnB,MAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AAClD,uBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,MAAM,CAAC;AAAA,EAC7D;AACA,MAAI,UAAU;AACV,WAAO,SAAS,MAAM,OAAO;AAAA,EACjC;AACA,SAAO;AACX;AAKA,WAAW,UAAU;AACrB,iBAAS;","names":[]}
package/dist/index.mjs DELETED
@@ -1,34 +0,0 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __commonJS = (cb, mod) => function __require() {
3
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
- };
5
-
6
- // src/index.ts
7
- import { utils } from "@node-minify/utils";
8
- var require_src = __commonJS({
9
- "src/index.ts"(exports, module) {
10
- var noCompress = ({
11
- settings,
12
- content,
13
- callback,
14
- index
15
- }) => {
16
- if (settings && !settings.content && settings.output) {
17
- utils.writeFile({ file: settings.output, content, index });
18
- }
19
- if (callback) {
20
- return callback(null, content);
21
- }
22
- return content;
23
- };
24
- noCompress.default = noCompress;
25
- module.exports = noCompress;
26
- }
27
- });
28
- export default require_src();
29
- /*!
30
- * node-minify
31
- * Copyright(c) 2011-2024 Rodolphe Stoclin
32
- * MIT Licensed
33
- */
34
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2024 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport type { MinifierOptions } from \"@node-minify/types\";\nimport { utils } from \"@node-minify/utils\";\n\n/**\n * Just merge, no compression.\n * @param settings NoCompress options\n * @param content Content to minify\n * @param callback Callback\n * @param index Index of current file in array\n * @returns Minified content\n */\nconst noCompress = ({\n settings,\n content,\n callback,\n index,\n}: MinifierOptions) => {\n if (settings && !settings.content && settings.output) {\n utils.writeFile({ file: settings.output, content, index });\n }\n if (callback) {\n return callback(null, content);\n }\n return content;\n};\n\n/**\n * Expose `noCompress()`.\n */\nnoCompress.default = noCompress;\nexport = noCompress;\n"],"mappings":";;;;;;AAUA,SAAS,aAAa;AAVtB;AAAA;AAoBA,QAAM,aAAa,CAAC;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,MAAuB;AACnB,UAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AAClD,cAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,MAAM,CAAC;AAAA,MAC7D;AACA,UAAI,UAAU;AACV,eAAO,SAAS,MAAM,OAAO;AAAA,MACjC;AACA,aAAO;AAAA,IACX;AAKA,eAAW,UAAU;AACrB,qBAAS;AAAA;AAAA;","names":[]}