From d1c1247dfda0f51c1d42f3534b60209c46908fbf Mon Sep 17 00:00:00 2001 From: Jason Mulligan Date: Thu, 10 Aug 2023 06:59:34 -0400 Subject: [PATCH] Version bump to release, generating CHANGELOG.md Building outputs --- CHANGELOG.md | 7 +++++++ dist/filesize.cjs | 2 +- dist/filesize.esm.js | 2 +- dist/filesize.esm.min.js | 2 +- dist/filesize.js | 2 +- dist/filesize.min.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e96a5de..b2f7c73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [10.0.10](https://github.com/avoidwork/filesize.js/compare/10.0.9...10.0.10) + +- Revert "Tweaking types and removing any usage" [`3aee3e8`](https://github.com/avoidwork/filesize.js/commit/3aee3e83f3d5de1b5683a0904d48815e1f539a16) + #### [10.0.9](https://github.com/avoidwork/filesize.js/compare/10.0.8...10.0.9) +> 9 August 2023 + - Tweaking types and removing any usage [`#172`](https://github.com/avoidwork/filesize.js/pull/172) +- Version bump to release, generating CHANGELOG.md [`80dcac5`](https://github.com/avoidwork/filesize.js/commit/80dcac58df50362ab1a2ae18574ba94d023805c3) #### [10.0.8](https://github.com/avoidwork/filesize.js/compare/10.0.7...10.0.8) diff --git a/dist/filesize.cjs b/dist/filesize.cjs index 5e4c284..534841c 100644 --- a/dist/filesize.cjs +++ b/dist/filesize.cjs @@ -3,7 +3,7 @@ * * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 10.0.9 + * @version 10.0.10 */ 'use strict'; diff --git a/dist/filesize.esm.js b/dist/filesize.esm.js index 3590ad8..121b5d2 100644 --- a/dist/filesize.esm.js +++ b/dist/filesize.esm.js @@ -3,7 +3,7 @@ * * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 10.0.9 + * @version 10.0.10 */ const ARRAY = "array"; const BIT = "bit"; diff --git a/dist/filesize.esm.min.js b/dist/filesize.esm.min.js index b641995..0b68fa1 100644 --- a/dist/filesize.esm.min.js +++ b/dist/filesize.esm.min.js @@ -1,5 +1,5 @@ /*! 2023 Jason Mulligan - @version 10.0.9 + @version 10.0.10 */ const t="array",i="bit",e="bits",o="byte",n="bytes",r="",b="exponent",l="function",a="iec",s="Invalid number",p="Invalid rounding method",u="jedec",c="object",d=".",f="round",g="s",m="kbit",B="kB",h=" ",y="string",M="0",x={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function w(w,{bits:E=!1,pad:N=!1,base:T=-1,round:j=2,locale:P=r,localeOptions:k={},separator:G=r,spacer:K=h,symbols:S={},standard:Y=r,output:Z=y,fullform:v=!1,fullforms:I=[],exponent:O=-1,roundingMethod:$=f,precision:z=0}={}){let L=O,q=Number(w),A=[],C=0,D=r;-1===T&&0===Y.length?(T=10,Y=u):-1===T&&Y.length>0?T=(Y=Y===a?a:u)===a?2:10:Y=10===(T=2===T?2:10)||Y===u?u:a;const F=10===T?1e3:1024,H=!0===v,J=q<0,Q=Math[$];if("bigint"!=typeof w&&isNaN(w))throw new TypeError(s);if(typeof Q!==l)throw new TypeError(p);if(J&&(q=-q),(-1===L||isNaN(L))&&(L=Math.floor(Math.log(q)/Math.log(F)),L<0&&(L=0)),L>8&&(z>0&&(z+=8-L),L=8),Z===b)return L;if(0===q)A[0]=0,D=A[1]=x.symbol[Y][E?e:n][L];else{C=q/(2===T?Math.pow(2,10*L):Math.pow(1e3,L)),E&&(C*=8,C>=F&&L<8&&(C/=F,L++));const t=Math.pow(10,L>0?j:0);A[0]=Q(C*t)/t,A[0]===F&&L<8&&-1===O&&(A[0]=1,L++),D=A[1]=10===T&&1===L?E?m:B:x.symbol[Y][E?e:n][L]}if(J&&(A[0]=-A[0]),z>0&&(A[0]=A[0].toPrecision(z)),A[1]=S[A[1]]||A[1],!0===P?A[0]=A[0].toLocaleString():P.length>0?A[0]=A[0].toLocaleString(P,k):G.length>0&&(A[0]=A[0].toString().replace(d,G)),N&&!1===Number.isInteger(A[0])&&j>0){const t=G||d,i=A[0].toString().split(t),e=i[1]||r,o=e.length,n=j-o;A[0]=`${i[0]}${t}${e.padEnd(o+n,M)}`}return H&&(A[1]=I[L]?I[L]:x.fullform[Y][L]+(E?i:o)+(1===A[0]?r:g)),Z===t?A:Z===c?{value:A[0],symbol:A[1],exponent:L,unit:D}:A.join(K)}function E({bits:t=!1,pad:i=!1,base:e=-1,round:o=2,locale:n=r,localeOptions:b={},separator:l=r,spacer:a=h,symbols:s={},standard:p=r,output:u=y,fullform:c=!1,fullforms:d=[],exponent:g=-1,roundingMethod:m=f,precision:B=0}={}){return r=>w(r,{bits:t,pad:i,base:e,round:o,locale:n,localeOptions:b,separator:l,spacer:a,symbols:s,standard:p,output:u,fullform:c,fullforms:d,exponent:g,roundingMethod:m,precision:B})}export{w as filesize,E as partial};//# sourceMappingURL=filesize.esm.min.js.map diff --git a/dist/filesize.js b/dist/filesize.js index 6843417..cf13da1 100644 --- a/dist/filesize.js +++ b/dist/filesize.js @@ -3,7 +3,7 @@ * * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 10.0.9 + * @version 10.0.10 */ (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.filesize={}));})(this,(function(exports){'use strict';const ARRAY = "array"; const BIT = "bit"; diff --git a/dist/filesize.min.js b/dist/filesize.min.js index 3becd7b..74d1c9a 100644 --- a/dist/filesize.min.js +++ b/dist/filesize.min.js @@ -1,5 +1,5 @@ /*! 2023 Jason Mulligan - @version 10.0.9 + @version 10.0.10 */ !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).filesize={})}(this,(function(t){"use strict";const i="array",e="bit",o="bits",n="byte",r="bytes",s="",l="exponent",a="function",b="iec",p="Invalid number",f="Invalid rounding method",u="jedec",d="object",c=".",g="round",m="s",y="kbit",h="kB",B=" ",M="string",x="0",T={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function w(t,{bits:w=!1,pad:E=!1,base:j=-1,round:N=2,locale:P=s,localeOptions:k={},separator:z=s,spacer:G=B,symbols:K={},standard:S=s,output:Y=M,fullform:Z=!1,fullforms:v=[],exponent:I=-1,roundingMethod:O=g,precision:$=0}={}){let L=I,q=Number(t),A=[],C=0,D=s;-1===j&&0===S.length?(j=10,S=u):-1===j&&S.length>0?j=(S=S===b?b:u)===b?2:10:S=10===(j=2===j?2:10)||S===u?u:b;const F=10===j?1e3:1024,H=!0===Z,J=q<0,Q=Math[O];if("bigint"!=typeof t&&isNaN(t))throw new TypeError(p);if(typeof Q!==a)throw new TypeError(f);if(J&&(q=-q),(-1===L||isNaN(L))&&(L=Math.floor(Math.log(q)/Math.log(F)),L<0&&(L=0)),L>8&&($>0&&($+=8-L),L=8),Y===l)return L;if(0===q)A[0]=0,D=A[1]=T.symbol[S][w?o:r][L];else{C=q/(2===j?Math.pow(2,10*L):Math.pow(1e3,L)),w&&(C*=8,C>=F&&L<8&&(C/=F,L++));const t=Math.pow(10,L>0?N:0);A[0]=Q(C*t)/t,A[0]===F&&L<8&&-1===I&&(A[0]=1,L++),D=A[1]=10===j&&1===L?w?y:h:T.symbol[S][w?o:r][L]}if(J&&(A[0]=-A[0]),$>0&&(A[0]=A[0].toPrecision($)),A[1]=K[A[1]]||A[1],!0===P?A[0]=A[0].toLocaleString():P.length>0?A[0]=A[0].toLocaleString(P,k):z.length>0&&(A[0]=A[0].toString().replace(c,z)),E&&!1===Number.isInteger(A[0])&&N>0){const t=z||c,i=A[0].toString().split(t),e=i[1]||s,o=e.length,n=N-o;A[0]=`${i[0]}${t}${e.padEnd(o+n,x)}`}return H&&(A[1]=v[L]?v[L]:T.fullform[S][L]+(w?e:n)+(1===A[0]?s:m)),Y===i?A:Y===d?{value:A[0],symbol:A[1],exponent:L,unit:D}:A.join(G)}t.filesize=w,t.partial=function({bits:t=!1,pad:i=!1,base:e=-1,round:o=2,locale:n=s,localeOptions:r={},separator:l=s,spacer:a=B,symbols:b={},standard:p=s,output:f=M,fullform:u=!1,fullforms:d=[],exponent:c=-1,roundingMethod:m=g,precision:y=0}={}){return s=>w(s,{bits:t,pad:i,base:e,round:o,locale:n,localeOptions:r,separator:l,spacer:a,symbols:b,standard:p,output:f,fullform:u,fullforms:d,exponent:c,roundingMethod:m,precision:y})}}));//# sourceMappingURL=filesize.min.js.map diff --git a/package-lock.json b/package-lock.json index c20787b..6a3eb89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "filesize", - "version": "10.0.9", + "version": "10.0.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "filesize", - "version": "10.0.9", + "version": "10.0.10", "license": "BSD-3-Clause", "devDependencies": { "@rollup/plugin-terser": "^0.4.0", diff --git a/package.json b/package.json index f53c9ec..59c8461 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "filesize", "description": "JavaScript library to generate a human readable String describing the file size", - "version": "10.0.9", + "version": "10.0.10", "homepage": "https://filesizejs.com", "author": "Jason Mulligan ", "repository": {