@adamlui/minify.js 1.8.1 → 1.8.2

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/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  <a href="https://www.npmjs.com/package/@adamlui/minify.js"><img height=31 src="https://img.shields.io/npm/dm/%40adamlui%2Fminify.js?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
25
25
  <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
- <a href="https://github.com/adamlui/minify.js/releases/tag/node-v1.8.1"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.8.1-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
+ <a href="https://github.com/adamlui/minify.js/releases/tag/node-v1.8.2"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.8.2-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
27
27
  <a href="https://www.npmjs.com/package/@adamlui/minify.js?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fminify.js?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
28
28
  <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_minify.js:node.js/src/minify.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_minify.js%3Anode.js%2Fsrc%2Fminify.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
29
29
  <a href="https://github.com/toolleeo/cli-apps#programming"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
package/dist/cli.min.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Source: https://code.minify-js.org/node.js
5
5
  * Documentation: https://docs.minify-js.org/node.js
6
6
  */
7
- const pkgName="@adamlui/minify.js",copyright="© 2024 Adam Lui & contributors under the MIT license.",cmdFormat="minify-js [inputPath] [outputPath] [options]",srcURL="https://code.minify-js.org/node.js",docURL="https://docs.minify-js.org/node.js/#-command-line-usage";(async()=>{const o=require(__dirname.match(/src/)?"./minify":"./minify.min"),n=require("fs"),s=require("path"),i=require("node-clipboardy"),r=require("child_process")["execSync"],t="",a="",l="",c="",m="";let f="en";if("win32"==process.platform)try{f=r("(Get-Culture).TwoLetterISOLanguageName",{shell:"powershell",encoding:"utf-8"}).trim()}catch(e){}else{var d=process.env;f=(d.LANG||d.LANGUAGE||d.LC_ALL||d.LC_MESSAGES||d.LC_NAME||"en").split(".")[0]}let p={};d=new Promise((r,t)=>{const a="https://cdn.jsdelivr.net/gh/adamlui/minify.js@6ed23225fa888bd686d5bef27d29dc52aa1ae7ec/_locales/",e=(f?f.replace("-","_"):"en")+"/";let l=a+e+"messages.json",c=0;$(l).then(async function i(e){try{const o=await e.json(),n={};for(const s in o)"object"==typeof o[s]&&"message"in o[s]&&(n[s]=o[s].message);r(n)}catch(e){if(3==++c)return r({});$(l=f.includes("-")&&1==c?l.replace(/([^_]*)_[^/]*(\/.*)/,"$1$2"):a+"en/messages.json").then(i).catch(t)}}).catch(t)});try{p=await d}catch(e){}const g={},h={flags:{dryRun:/^--?(?:n|dry-?run)$/,includeDotFolders:/^--?(?:dd?|(?:include-?)?dot-?(?:folder|dir(?:ector(?:y|ie))?)s?=?(?:true|1)?)$/,includeDotFiles:/^--?(?:df|D|(?:include-?)?dot-?files?=?(?:true|1)?)$/,noRecursion:/^--?(?:R|(?:disable|no)-?recursi(?:on|ve)|recursi(?:on|ve)=(?:false|0))$/,noMangle:/^--?(?:M|(?:disable|no)-?mangle|mangle=(?:false|0))$/,noFilenameChange:/^--?(?:X|(?:disable|no)-?(?:file)?name-?change|(?:file)?name-?change=(?:false|0))$/,copy:/^--?c(?:opy)?$/,quietMode:/^--?q(?:uiet)?(?:-?mode)?$/},paramOptions:{ignoreFiles:/^--?(?:ignore|skip|exclude)(?:d?-?files?)?(?:=.*|$)/,comment:/^--?comments?(?:=.*|$)/},infoCmds:{help:/^--?h(?:elp)?$/,version:/^--?ve?r?s?i?o?n?$/}};if(process.argv.forEach(i=>{var e,o,n;i.startsWith("-")&&(n=Object.keys(h.flags).find(e=>h.flags[e].test(i)),e=Object.keys(h.paramOptions).find(e=>h.paramOptions[e].test(i)),o=Object.keys(h.infoCmds).find(e=>h.infoCmds[e].test(i)),n?g[n]=!0:e?(/=.+/.test(i)||(console.error(`
7
+ const pkgName="@adamlui/minify.js",copyright="© 2024 Adam Lui & contributors under the MIT license.",cmdFormat="minify-js [inputPath] [outputPath] [options]",srcURL="https://code.minify-js.org/node.js",docURL="https://docs.minify-js.org/node.js/#-command-line-usage";(async()=>{const o=require(__dirname.match(/src/)?"./minify":"./minify.min"),n=require("fs"),s=require("path"),i=require("node-clipboardy"),r=require("child_process")["execSync"],t="",a="",l="",c="",m="";let f="en";if("win32"==process.platform)try{f=r("(Get-Culture).TwoLetterISOLanguageName",{shell:"powershell",encoding:"utf-8"}).trim()}catch(e){}else{var d=process.env;f=(d.LANG||d.LANGUAGE||d.LC_ALL||d.LC_MESSAGES||d.LC_NAME||"en").split(".")[0]}let p={};d=new Promise((r,t)=>{const a="https://cdn.jsdelivr.net/gh/adamlui/minify.js@db5b8e1ff2e8b8d49d92535abd6cb9f685ed0bb9/_locales/",e=(f?f.replace("-","_"):"en")+"/";let l=a+e+"messages.json",c=0;$(l).then(async function i(e){try{const o=await e.json(),n={};for(const s in o)"object"==typeof o[s]&&"message"in o[s]&&(n[s]=o[s].message);r(n)}catch(e){if(3==++c)return r({});$(l=f.includes("-")&&1==c?l.replace(/([^_]*)_[^/]*(\/.*)/,"$1$2"):a+"en/messages.json").then(i).catch(t)}}).catch(t)});try{p=await d}catch(e){}const g={},h={flags:{dryRun:/^--?(?:n|dry-?run)$/,includeDotFolders:/^--?(?:dd?|(?:include-?)?dot-?(?:folder|dir(?:ector(?:y|ie))?)s?=?(?:true|1)?)$/,includeDotFiles:/^--?(?:df|D|(?:include-?)?dot-?files?=?(?:true|1)?)$/,noRecursion:/^--?(?:R|(?:disable|no)-?recursi(?:on|ve)|recursi(?:on|ve)=(?:false|0))$/,noMangle:/^--?(?:M|(?:disable|no)-?mangle|mangle=(?:false|0))$/,noFilenameChange:/^--?(?:X|(?:disable|no)-?(?:file)?name-?change|(?:file)?name-?change=(?:false|0))$/,copy:/^--?c(?:opy)?$/,quietMode:/^--?q(?:uiet)?(?:-?mode)?$/},paramOptions:{ignoreFiles:/^--?(?:ignore|skip|exclude)(?:d?-?files?)?(?:=.*|$)/,comment:/^--?comments?(?:=.*|$)/},infoCmds:{help:/^--?h(?:elp)?$/,version:/^--?ve?r?s?i?o?n?$/}};if(process.argv.forEach(i=>{var e,o,n;i.startsWith("-")&&(n=Object.keys(h.flags).find(e=>h.flags[e].test(i)),e=Object.keys(h.paramOptions).find(e=>h.paramOptions[e].test(i)),o=Object.keys(h.infoCmds).find(e=>h.infoCmds[e].test(i)),n?g[n]=!0:e?(/=.+/.test(i)||(console.error(`
8
8
  ${a+(p.prefix_error||"ERROR")}: `+`Arg [--${i.replace(/-/g,"")}] `+`${p.error_noEqual||"requires '=' followed by a value"}.${t}`),_(),process.exit(1)),n=i.split("=")[1],g[e]=parseInt(n)||n):o||(console.error(`
9
9
  ${a+(p.prefix_error||"ERROR")}: `+`Arg [${i}] ${p.error_notRecognized||"not recognized"}.`),console.info(`
10
10
  ${l+(p.info_validArgs||"Valid arguments are below")}.`),y(["flags","paramOptions","infoCmds"]),process.exit(1)))}),process.argv.some(e=>h.infoCmds.help.test(e)))y();else if(process.argv.some(e=>h.infoCmds.version.test(e))){d=r(`npm view ${pkgName} version`).toString().trim()||"none";let e,i=process.cwd();for(;"/"!=i;){var u=s.join(i,"package.json");if(n.existsSync(u)){u=require(u);e=(u.dependencies?.[pkgName]||u.devDependencies?.[pkgName])?.match(/(\d+\.\d+\.\d+)/)[0]||"none";break}i=s.dirname(i)}console.info(`
package/docs/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  <a href="https://www.npmjs.com/package/@adamlui/minify.js"><img height=31 src="https://img.shields.io/npm/dm/%40adamlui%2Fminify.js?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
25
25
  <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
- <a href="https://github.com/adamlui/minify.js/releases/tag/node-v1.8.1"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.8.1-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
+ <a href="https://github.com/adamlui/minify.js/releases/tag/node-v1.8.2"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.8.2-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
27
27
  <a href="https://www.npmjs.com/package/@adamlui/minify.js?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fminify.js?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
28
28
  <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_minify.js:node.js/src/minify.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_minify.js%3Anode.js%2Fsrc%2Fminify.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
29
29
  <a href="https://github.com/toolleeo/cli-apps#programming"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamlui/minify.js",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Recursively minify all JavaScript files",
5
5
  "author": {
6
6
  "name": "Adam Lui",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "node-clipboardy": "^1.0.3",
56
- "uglify-js": "^3.18.0"
56
+ "uglify-js": "^3.19.1"
57
57
  },
58
58
  "funding": {
59
59
  "type": "github",