dev-dep-tool
Advanced tools
Comparing version 0.0.14-dev.8 to 0.0.14-dev.9
var e=require("child_process") | ||
var t=require("dr-js/library/common/format") | ||
var o=require("./semver") | ||
var o=require("dr-js/library/common/data/SemVer") | ||
const s=/\033\[[0-9;]*[a-zA-Z]/g | ||
@@ -13,6 +13,6 @@ const r=/(\S+)\s+\S+\s+(\S+)\s+(\S+)/ | ||
if(!e[n])return | ||
const i=(0,o.compareSemver)(l,d)<=0?d:l | ||
const{version:u,source:p}=e[n] | ||
const h=[n,u,i,p] | ||
u.endsWith(i)?c.push(h):a.push(h)}) | ||
const{version:i,source:u}=e[n] | ||
const p=(0,o.compareSemVer)(l,d)<=0?d:l | ||
const h=[n,i,p,u] | ||
i.endsWith(p)?c.push(h):a.push(h)}) | ||
const d=c.length+a.length | ||
@@ -19,0 +19,0 @@ c.sort(n) |
@@ -29,3 +29,3 @@ var e=require("path") | ||
const l=["dependencies","devDependencies","peerDependencies","optionalDependencies","bundledDependencies"] | ||
const p=["private","name","version","description","author","contributors","license","keywords","repository","homepage","bugs","os","cpu","engines","engineStrict","preferGlobal","main","bin","man","files","directories","scripts","config","publishConfig",...l] | ||
const p=["private","name","version","description","author","contributors","license","keywords","repository","homepage","bugs","os","cpu","engines","engineStrict","preferGlobal","main","bin","man","files","directories","scripts","config","publishConfig",...l,"sideEffects"] | ||
exports.doPack=(async({pathInput:c,pathOutput:d,outputName:u,outputVersion:f,outputDescription:y,isPublish:h,isPublishDev:b})=>{const g=(0,e.resolve)(d,"install") | ||
@@ -32,0 +32,0 @@ const{packageJSON:m,exportFilePairList:v,installFilePairList:j}=a(c) |
@@ -1,15 +0,30 @@ | ||
var e=require("fs") | ||
var t=(i=require("uglify-es"))&&i.__esModule?i:{default:i} | ||
var i | ||
var o=require("dr-js/library/common/time") | ||
const r={ecma:8,toplevel:!0,parse:{ecma:8},compress:{ecma:8,toplevel:!0,join_vars:!1,sequences:!1},mangle:!1,output:{ecma:8,beautify:!0,indent_level:2,width:240},sourceMap:!1} | ||
exports.MODULE_OPTION=r | ||
const s=Object.assign({},r,{mangle:{toplevel:!0},output:{ecma:8,beautify:!1,semicolons:!1}}) | ||
exports.LIBRARY_OPTION=s | ||
exports.minifyWithUglifyEs=(({filePath:i,option:r,logger:s})=>{const l=(0,o.clock)() | ||
const n=(0,e.readFileSync)(i,{encoding:"utf8"}) | ||
const{error:c,code:a}=t.default.minify(n,r) | ||
if(c){s.log(`[minifyWithUglifyEs] failed to minify file: ${i}`) | ||
throw c}(0,e.writeFileSync)(i,a) | ||
const u=(0,o.clock)() | ||
return{sizeSource:Buffer.byteLength(n),sizeOutput:Buffer.byteLength(a),timeStart:l,timeEnd:u}}) | ||
var e=require("path") | ||
var t=require("fs") | ||
var i=(o=require("uglify-es"))&&o.__esModule?o:{default:o} | ||
var o | ||
var r=require("dr-js/library/common/time") | ||
var s=require("dr-js/library/common/format") | ||
const l={ecma:8,toplevel:!0,parse:{ecma:8},compress:{ecma:8,toplevel:!0,join_vars:!1,sequences:!1},mangle:!1,output:{ecma:8,beautify:!0,indent_level:2,width:240},sourceMap:!1} | ||
exports.MODULE_OPTION=l | ||
const n=Object.assign({},l,{mangle:{toplevel:!0},output:{ecma:8,beautify:!1,semicolons:!1}}) | ||
exports.LIBRARY_OPTION=n | ||
const a=({filePath:e,option:o,logger:s})=>{const l=(0,r.clock)() | ||
const n=(0,t.readFileSync)(e,{encoding:"utf8"}) | ||
const{error:a,code:c}=i.default.minify(n,o) | ||
if(a){s.log(`[minifyWithUglifyEs] failed to minify file: ${e}`) | ||
throw a}(0,t.writeFileSync)(e,c) | ||
const f=(0,r.clock)() | ||
return{sizeSource:Buffer.byteLength(n),sizeOutput:Buffer.byteLength(c),timeStart:l,timeEnd:f}} | ||
exports.minifyWithUglifyEs=a | ||
exports.minifyFileListWithUglifyEs=(async({fileList:t,option:i=n,rootPath:o="",logger:l})=>{l.padLog(`minify ${t.length} file with uglify-es`) | ||
const c=[] | ||
let f=(0,r.clock)() | ||
let u=0 | ||
let p=0 | ||
for(const r of t){const{sizeSource:t,sizeOutput:n,timeStart:f,timeEnd:m}=a({filePath:r,option:i,logger:l}) | ||
const y=n-t | ||
c.push([`∆ ${(100*y/t).toFixed(2)}% (${(0,s.binary)(y)}B)`,(0,s.time)(m-f),`${(0,e.relative)(o,r)}`]) | ||
u+=t | ||
p+=y}c.push(["--","--","--"]) | ||
c.push([`∆ ${(100*p/u).toFixed(2)}% (${(0,s.binary)(p)}B)`,(0,s.time)((0,r.clock)()-f),`TOTAL of ${t.length} file (${(0,s.binary)(u)}B)`]) | ||
l.log(`result:\n ${(0,s.padTable)({table:c,cellPad:" | ",rowPad:"\n ",padFuncList:[(e,t)=>e.padEnd(t),void 0,e=>e]})}`)}) |
@@ -1,1 +0,1 @@ | ||
{"name":"dev-dep-tool","version":"0.0.14-dev.8","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"https://github.com/dr-js/dev-dep.git","homepage":"https://github.com/dr-js/dev-dep#readme","bugs":"https://github.com/dr-js/dev-dep/issues","bin":"bin/index.js","sideEffects":false,"dependencies":{"dr-js":"^0.12.0"}} | ||
{"name":"dev-dep-tool","version":"0.0.14-dev.9","author":"dr-js","license":"MIT","description":"Provide common package devDependencies","keywords":["Dr","Dr-js","JavaScript"],"repository":"https://github.com/dr-js/dev-dep.git","homepage":"https://github.com/dr-js/dev-dep#readme","bugs":"https://github.com/dr-js/dev-dep/issues","bin":"bin/index.js","dependencies":{"dr-js":"^0.12.1-dev.0"},"sideEffects":false} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20872
306
4
Updateddr-js@^0.12.1-dev.0