@node-minify/uglify-js 8.0.2-beta.0 → 8.0.5-beta.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/LICENSE +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/LICENSE
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MinifierOptions, Settings, Options } from '@node-minify/types';
|
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
4
|
* node-minify
|
|
5
|
-
* Copyright(c) 2011-
|
|
5
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
6
6
|
* MIT Licensed
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ interface MinifierOptionsUglifyJS extends Omit<MinifierOptions, 'settings'> {
|
|
|
18
18
|
settings: SettingsUglifyJS;
|
|
19
19
|
}
|
|
20
20
|
declare const minifyUglifyJS: {
|
|
21
|
-
({ settings, content, callback, index }: MinifierOptionsUglifyJS):
|
|
21
|
+
({ settings, content, callback, index }: MinifierOptionsUglifyJS): string | void;
|
|
22
22
|
default: any;
|
|
23
23
|
};
|
|
24
24
|
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
22
|
mod
|
|
19
23
|
));
|
|
@@ -31,7 +35,7 @@ var minifyUglifyJS = ({ settings, content, callback, index }) => {
|
|
|
31
35
|
if (contentMinified.map && settings && typeof settings.options.sourceMap === "object") {
|
|
32
36
|
import_utils.utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index });
|
|
33
37
|
}
|
|
34
|
-
if (settings && !settings.content) {
|
|
38
|
+
if (settings && !settings.content && settings.output) {
|
|
35
39
|
import_utils.utils.writeFile({ file: settings.output, content: contentMinified.code, index });
|
|
36
40
|
}
|
|
37
41
|
if (callback) {
|
|
@@ -43,7 +47,7 @@ minifyUglifyJS.default = minifyUglifyJS;
|
|
|
43
47
|
module.exports = minifyUglifyJS;
|
|
44
48
|
/*!
|
|
45
49
|
* node-minify
|
|
46
|
-
* Copyright(c) 2011-
|
|
50
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
47
51
|
* MIT Licensed
|
|
48
52
|
*/
|
|
49
53
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2023 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyJS from 'uglify-js';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings } from '@node-minify/types';\n\ninterface OptionsUglifyJS extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\ninterface SettingsUglifyJS extends Omit<Settings, 'options'> {\n options: OptionsUglifyJS;\n}\n\ninterface MinifierOptionsUglifyJS extends Omit<MinifierOptions, 'settings'> {\n settings: SettingsUglifyJS;\n}\n\n/**\n * Run uglifyJS.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyUglifyJS = ({ settings, content, callback, index }: MinifierOptionsUglifyJS) => {\n const contentMinified = uglifyJS.minify(typeof content === 'string' ? content : '', settings && settings.options);\n if (contentMinified.error) {\n if (callback) {\n return callback(contentMinified.error);\n }\n }\n if (contentMinified.map && settings && typeof settings.options.sourceMap === 'object') {\n // TODO\n utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index });\n }\n if (settings && !settings.content && settings.output) {\n utils.writeFile({ file: settings.output, content: contentMinified.code, index });\n }\n if (callback) {\n return callback(null, contentMinified.code);\n }\n return contentMinified.code;\n};\n\n/**\n * Expose `minifyUglifyJS()`.\n */\nminifyUglifyJS.default = minifyUglifyJS;\nexport = minifyUglifyJS;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASA,uBAAqB;AACrB,mBAAsB;AAsBtB,IAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAA+B;AAC1F,QAAM,kBAAkB,iBAAAA,QAAS,OAAO,OAAO,YAAY,WAAW,UAAU,IAAI,YAAY,SAAS,OAAO;AAChH,MAAI,gBAAgB,OAAO;AACzB,QAAI,UAAU;AACZ,aAAO,SAAS,gBAAgB,KAAK;AAAA,IACvC;AAAA,EACF;AACA,MAAI,gBAAgB,OAAO,YAAY,OAAO,SAAS,QAAQ,cAAc,UAAU;AAErF,uBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,UAAU,UAAU,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,EACpG;AACA,MAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,uBAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,MAAM,MAAM,CAAC;AAAA,EACjF;AACA,MAAI,UAAU;AACZ,WAAO,SAAS,MAAM,gBAAgB,IAAI;AAAA,EAC5C;AACA,SAAO,gBAAgB;AACzB;AAKA,eAAe,UAAU;AACzB,iBAAS;","names":["uglifyJS"]}
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ var require_src = __commonJS({
|
|
|
18
18
|
if (contentMinified.map && settings && typeof settings.options.sourceMap === "object") {
|
|
19
19
|
utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index });
|
|
20
20
|
}
|
|
21
|
-
if (settings && !settings.content) {
|
|
21
|
+
if (settings && !settings.content && settings.output) {
|
|
22
22
|
utils.writeFile({ file: settings.output, content: contentMinified.code, index });
|
|
23
23
|
}
|
|
24
24
|
if (callback) {
|
|
@@ -33,7 +33,7 @@ var require_src = __commonJS({
|
|
|
33
33
|
export default require_src();
|
|
34
34
|
/*!
|
|
35
35
|
* node-minify
|
|
36
|
-
* Copyright(c) 2011-
|
|
36
|
+
* Copyright(c) 2011-2023 Rodolphe Stoclin
|
|
37
37
|
* MIT Licensed
|
|
38
38
|
*/
|
|
39
39
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2023 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\nimport uglifyJS from 'uglify-js';\nimport { utils } from '@node-minify/utils';\nimport { MinifierOptions, Options, Settings } from '@node-minify/types';\n\ninterface OptionsUglifyJS extends Omit<Options, 'sourceMap'> {\n sourceMap?: { filename: string };\n}\n\ninterface SettingsUglifyJS extends Omit<Settings, 'options'> {\n options: OptionsUglifyJS;\n}\n\ninterface MinifierOptionsUglifyJS extends Omit<MinifierOptions, 'settings'> {\n settings: SettingsUglifyJS;\n}\n\n/**\n * Run uglifyJS.\n *\n * @param {Object} settings\n * @param {String} content\n * @param {Function} callback\n */\nconst minifyUglifyJS = ({ settings, content, callback, index }: MinifierOptionsUglifyJS) => {\n const contentMinified = uglifyJS.minify(typeof content === 'string' ? content : '', settings && settings.options);\n if (contentMinified.error) {\n if (callback) {\n return callback(contentMinified.error);\n }\n }\n if (contentMinified.map && settings && typeof settings.options.sourceMap === 'object') {\n // TODO\n utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index });\n }\n if (settings && !settings.content && settings.output) {\n utils.writeFile({ file: settings.output, content: contentMinified.code, index });\n }\n if (callback) {\n return callback(null, contentMinified.code);\n }\n return contentMinified.code;\n};\n\n/**\n * Expose `minifyUglifyJS()`.\n */\nminifyUglifyJS.default = minifyUglifyJS;\nexport = minifyUglifyJS;\n"],"mappings":";;;;;;AASA,OAAO,cAAc;AACrB,SAAS,aAAa;AAVtB;AAAA;AAgCA,QAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,UAAU,MAAM,MAA+B;AAC1F,YAAM,kBAAkB,SAAS,OAAO,OAAO,YAAY,WAAW,UAAU,IAAI,YAAY,SAAS,OAAO;AAChH,UAAI,gBAAgB,OAAO;AACzB,YAAI,UAAU;AACZ,iBAAO,SAAS,gBAAgB,KAAK;AAAA,QACvC;AAAA,MACF;AACA,UAAI,gBAAgB,OAAO,YAAY,OAAO,SAAS,QAAQ,cAAc,UAAU;AAErF,cAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,UAAU,UAAU,SAAS,gBAAgB,KAAK,MAAM,CAAC;AAAA,MACpG;AACA,UAAI,YAAY,CAAC,SAAS,WAAW,SAAS,QAAQ;AACpD,cAAM,UAAU,EAAE,MAAM,SAAS,QAAQ,SAAS,gBAAgB,MAAM,MAAM,CAAC;AAAA,MACjF;AACA,UAAI,UAAU;AACZ,eAAO,SAAS,MAAM,gBAAgB,IAAI;AAAA,MAC5C;AACA,aAAO,gBAAgB;AAAA,IACzB;AAKA,mBAAe,UAAU;AACzB,qBAAS;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/uglify-js",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5-beta.0",
|
|
4
4
|
"description": "uglify-js plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://github.com/srod/node-minify/tree/master/packages/uglify-js#readme",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
15
|
+
"node": ">=16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"directories": {
|
|
18
18
|
"lib": "dist",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"clean": "pnpm dlx rimraf dist",
|
|
44
|
-
"build": "
|
|
45
|
-
"prepublishOnly": "
|
|
44
|
+
"build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap",
|
|
45
|
+
"prepublishOnly": "pnpm build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@node-minify/utils": "8.0.
|
|
48
|
+
"@node-minify/utils": "8.0.5-beta.0",
|
|
49
49
|
"uglify-js": "3.17.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@node-minify/types": "8.0.
|
|
52
|
+
"@node-minify/types": "8.0.3-beta.0",
|
|
53
53
|
"@types/uglify-js": "^3.17.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "22a7b887ea22743702b1dc5a613755ae20838a73"
|
|
56
56
|
}
|