string-uglify 3.1.0 → 3.2.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/CHANGELOG.md CHANGED
@@ -3,11 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 3.1.0 (2025-10-15)
6
+ ## 3.2.0 (2026-08-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - resolve review findings REV-004 through REV-007 ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
11
+ - retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
7
12
 
8
13
  ### Features
9
14
 
10
- - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
15
+ - add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
16
+ - refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
17
+
18
+ ### Performance Improvements
19
+
20
+ - index generated names and validate uglifyById ([989a11c](https://github.com/codsen/codsen/commit/989a11c52b9f878ff473caa96024ca91762fbbb4))
21
+
22
+ ### Reverts
23
+
24
+ - Revert "Merge pull request #128 from codsen/release/npm-32198404552-1" ([5baeeaa](https://github.com/codsen/codsen/commit/5baeeaaa677b86f1eaa6396cadf3aea32b06416e)), closes [#128](https://github.com/codsen/codsen/issues/128)
25
+ - Revert "Merge pull request #127 from codsen/release/npm-32194020886-1" ([5f1e94d](https://github.com/codsen/codsen/commit/5f1e94deef910ce735266b16aeee08a76de7a862)), closes [#127](https://github.com/codsen/codsen/issues/127)
11
26
 
12
27
  ## 3.0.0 (2022-12-01)
13
28
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright © 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2026 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1 align="center">string-uglify</h1>
2
2
 
3
- <p align="center">Shorten sets of strings deterministically, to be git-friendly</p>
3
+ <p align="center">Shorten sets of strings deterministically</p>
4
4
 
5
5
  <p align="center">
6
6
  <a href="https://codsen.com/os/string-uglify" rel="nofollow noreferrer noopener">
@@ -32,9 +32,9 @@ npm i string-uglify
32
32
  ## Quick Take
33
33
 
34
34
  ```js
35
- import { strict as assert } from "assert";
35
+ import { strict as assert } from "node:assert";
36
36
 
37
- import { uglifyById, uglifyArr, version } from "string-uglify";
37
+ import { uglifyArr } from "string-uglify";
38
38
 
39
39
  // notice we put dots and hashes for classes and id's but algorithm will work
40
40
  // fine too if you won't.
@@ -45,17 +45,13 @@ const names = [
45
45
  "#zzz",
46
46
  ];
47
47
 
48
- // notice we put dots and hashes for classes and id's but algorithm will work
49
- // fine too if you won't.
50
48
  assert.deepEqual(uglifyArr(names), [".o", ".s", ".z", "#l"]);
51
-
52
- // uglify a particular id number (inefficient):
53
- assert.equal(uglifyById(names, 3), "#l");
54
49
  ```
55
50
 
51
+
56
52
  ## Documentation
57
53
 
58
- Please [visit codsen.com](https://codsen.com/os/string-uglify/) for a full description of the API.
54
+ Please [visit codsen.com](https://codsen.com/os/string-uglify/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/string-uglify/CHANGELOG.md).
59
55
 
60
56
  ## Contributing
61
57
 
@@ -65,6 +61,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
65
61
 
66
62
  MIT License
67
63
 
68
- Copyright © 2010-2025 Roy Revelt and other contributors
64
+ Copyright © 2010-2026 Roy Revelt and other contributors
69
65
 
70
66
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name string-uglify
3
- * @fileoverview Shorten sets of strings deterministically, to be git-friendly
4
- * @version 3.1.0
3
+ * @fileoverview Shorten sets of strings deterministically
4
+ * @version 3.2.0
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-uglify/}
8
8
  */
9
9
 
10
- var $="3.1.0";var D=$;function d(l,o=0){return l.codePointAt(o)||0}function w(l){let o="abcdefghijklmnopqrstuvwxyz",u="abcdefghijklmnopqrstuvwxyz0123456789",n={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},r={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},f={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},s=[];if(!Array.isArray(l)||!l.length)return l;for(let e=0,p=l.length;e<p;e++){if(l.indexOf(l[e])<e){s.push(s[l.indexOf(l[e])]);continue}let b=".#".includes(l[e][0])?l[e][0]:"",h=Array.from(l[e]).reduce((t,c)=>t+d(c),0);if(".#".includes(l[e][0])&&l[e].length<4||!".#".includes(l[e][0])&&l[e].length<3){let t=l[e];if(!s.includes(t)){s.push(t),t.startsWith(".")&&t.length===2&&n[t.slice(1)]===!1?n[t.slice(1)]=!0:t.startsWith("#")&&t.length===2&&r[t.slice(1)]===!1?r[t.slice(1)]=!0:!t.startsWith(".")&&!t.startsWith("#")&&t.length===1&&f[t]===!1&&(f[t]=!0);continue}}let i=`${b}${o[h%o.length]}${u[h%u.length]}`;if(s.includes(i)){let t=i,c=0,y=Array.from(l[e]).reduce((a,g)=>a<200?a+d(g):(a+d(g))%u.length,0),x=Array.from(l[e]).map(a=>d(a)).reduce((a,g)=>{let m=a+g;do m=String(m).split("").reduce((v,j)=>v+Number.parseInt(j,10),0);while(m>=10);return m},0);for(;s.includes(t);)c+=1,t+=u[y*x*c%u.length];i=t}s.push(i),i.startsWith(".")&&i.length===2&&n[i.slice(1)]===!1?n[i.slice(1)]=!0:i.startsWith("#")&&i.length===2&&r[i.slice(1)]===!1?r[i.slice(1)]=!0:!i.startsWith(".")&&!i.startsWith("#")&&i.length===1&&f[i]===!1&&(f[i]=!0)}for(let e=0,p=s.length;e<p;e++)s[e].startsWith(".")?n[s[e].slice(1,2)]===!1?(n[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):n[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):s[e].startsWith("#")?r[s[e].slice(1,2)]===!1?(r[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):r[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):!s[e].startsWith(".")&&!s[e].startsWith("#")&&(f[s[e].slice(0,1)]?f[s[e].slice(0,1)]===s[e]&&(s[e]=s[e].slice(0,1)):(f[s[e].slice(0,1)]=s[e],s[e]=s[e].slice(0,1)));return s}function A(l,o){return w(l)[o]}export{w as uglifyArr,A as uglifyById,D as version};
10
+ var v="3.2.0";var E=v;function w(t,n=0){return t.codePointAt(n)||0}function W(t){let n="abcdefghijklmnopqrstuvwxyz",g="abcdefghijklmnopqrstuvwxyz0123456789",r={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},o={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},c={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},s=[];if(!Array.isArray(t)||!t.length)return t;let f=t.length>=48?new Set:void 0,u=f?new Map:void 0;for(let e=0,h=t.length;e<h;e++){let m;if(u)m=u.get(t[e]);else{let l=t.indexOf(t[e]);l<e&&(m=s[l])}if(m!==void 0){s.push(m);continue}let j=".#".includes(t[e][0])?t[e][0]:"",p=0;for(let l of t[e])p+=w(l);if(".#".includes(t[e][0])&&t[e].length<4||!".#".includes(t[e][0])&&t[e].length<3){let l=t[e];if(!(f?f.has(l):s.includes(l))){s.push(l),f&&u&&(f.add(l),u.set(t[e],l)),l.startsWith(".")&&l.length===2&&r[l.slice(1)]===!1?r[l.slice(1)]=!0:l.startsWith("#")&&l.length===2&&o[l.slice(1)]===!1?o[l.slice(1)]=!0:!l.startsWith(".")&&!l.startsWith("#")&&l.length===1&&c[l]===!1&&(c[l]=!0);continue}}let i=`${j}${n[p%n.length]}${g[p%g.length]}`;if(f?f.has(i):s.includes(i)){let l=i,y=0,d=0,a=0;for(let x of t[e]){let $=w(x);for(d=d<200?d+$:(d+$)%g.length,a+=$;a>=10;){let b=0;for(;a>0;)b+=a%10,a=Math.floor(a/10);a=b}}for(;f?f.has(l):s.includes(l);)y+=1,l+=g[d*a*y%g.length];i=l}s.push(i),f&&u&&(f.add(i),u.set(t[e],i)),i.startsWith(".")&&i.length===2&&r[i.slice(1)]===!1?r[i.slice(1)]=!0:i.startsWith("#")&&i.length===2&&o[i.slice(1)]===!1?o[i.slice(1)]=!0:!i.startsWith(".")&&!i.startsWith("#")&&i.length===1&&c[i]===!1&&(c[i]=!0)}for(let e=0,h=s.length;e<h;e++)s[e].startsWith(".")?r[s[e].slice(1,2)]===!1?(r[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):r[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):s[e].startsWith("#")?o[s[e].slice(1,2)]===!1?(o[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):o[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):!s[e].startsWith(".")&&!s[e].startsWith("#")&&(c[s[e].slice(0,1)]?c[s[e].slice(0,1)]===s[e]&&(s[e]=s[e].slice(0,1)):(c[s[e].slice(0,1)]=s[e],s[e]=s[e].slice(0,1)));return s}function D(t,n){if(!Number.isInteger(n))throw new TypeError(`string-uglify/uglifyById(): [THROW_ID_01] The second input argument, idNum, must be an integer. It was given as ${String(n)} (type ${typeof n}).`);if(n<0||n>=t.length)throw new RangeError(`string-uglify/uglifyById(): [THROW_ID_02] The second input argument, idNum, must point to an item in refArr. It was given as ${n}, while refArr contains ${t.length} item${t.length===1?"":"s"}.`);return W(t)[n]}export{W as uglifyArr,D as uglifyById,E as version};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name string-uglify
3
- * @fileoverview Shorten sets of strings deterministically, to be git-friendly
4
- * @version 3.1.0
3
+ * @fileoverview Shorten sets of strings deterministically
4
+ * @version 3.2.0
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-uglify/}
8
8
  */
9
9
 
10
- "use strict";var stringUglify=(()=>{var h=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var A=(l,n)=>{for(var f in n)h(l,f,{get:n[f],enumerable:!0})},N=(l,n,f,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of k(n))!D.call(l,r)&&r!==f&&h(l,r,{get:()=>n[r],enumerable:!(a=E(n,r))||a.enumerable});return l};var O=l=>N(h({},"__esModule",{value:!0}),l);var I={};A(I,{uglifyArr:()=>y,uglifyById:()=>S,version:()=>C});var b="3.1.0";var C=b;function d(l,n=0){return l.codePointAt(n)||0}function y(l){let n="abcdefghijklmnopqrstuvwxyz",f="abcdefghijklmnopqrstuvwxyz0123456789",a={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},r={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},o={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},s=[];if(!Array.isArray(l)||!l.length)return l;for(let e=0,p=l.length;e<p;e++){if(l.indexOf(l[e])<e){s.push(s[l.indexOf(l[e])]);continue}let x=".#".includes(l[e][0])?l[e][0]:"",$=Array.from(l[e]).reduce((t,c)=>t+d(c),0);if(".#".includes(l[e][0])&&l[e].length<4||!".#".includes(l[e][0])&&l[e].length<3){let t=l[e];if(!s.includes(t)){s.push(t),t.startsWith(".")&&t.length===2&&a[t.slice(1)]===!1?a[t.slice(1)]=!0:t.startsWith("#")&&t.length===2&&r[t.slice(1)]===!1?r[t.slice(1)]=!0:!t.startsWith(".")&&!t.startsWith("#")&&t.length===1&&o[t]===!1&&(o[t]=!0);continue}}let i="".concat(x).concat(n[$%n.length]).concat(f[$%f.length]);if(s.includes(i)){let t=i,c=0,v=Array.from(l[e]).reduce((u,g)=>u<200?u+d(g):(u+d(g))%f.length,0),j=Array.from(l[e]).map(u=>d(u)).reduce((u,g)=>{let m=u+g;do m=String(m).split("").reduce((W,w)=>W+Number.parseInt(w,10),0);while(m>=10);return m},0);for(;s.includes(t);)c+=1,t+=f[v*j*c%f.length];i=t}s.push(i),i.startsWith(".")&&i.length===2&&a[i.slice(1)]===!1?a[i.slice(1)]=!0:i.startsWith("#")&&i.length===2&&r[i.slice(1)]===!1?r[i.slice(1)]=!0:!i.startsWith(".")&&!i.startsWith("#")&&i.length===1&&o[i]===!1&&(o[i]=!0)}for(let e=0,p=s.length;e<p;e++)s[e].startsWith(".")?a[s[e].slice(1,2)]===!1?(a[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):a[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):s[e].startsWith("#")?r[s[e].slice(1,2)]===!1?(r[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):r[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):!s[e].startsWith(".")&&!s[e].startsWith("#")&&(o[s[e].slice(0,1)]?o[s[e].slice(0,1)]===s[e]&&(s[e]=s[e].slice(0,1)):(o[s[e].slice(0,1)]=s[e],s[e]=s[e].slice(0,1)));return s}function S(l,n){return y(l)[n]}return O(I);})();
10
+ "use strict";var stringUglify=(()=>{var y=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var D=(l,i)=>{for(var r in i)y(l,r,{get:i[r],enumerable:!0})},S=(l,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let f of I(i))!E.call(l,f)&&f!==r&&y(l,f,{get:()=>i[f],enumerable:!(o=O(i,f))||o.enumerable});return l};var C=l=>S(y({},"__esModule",{value:!0}),l);var T={};D(T,{uglifyArr:()=>x,uglifyById:()=>R,version:()=>N});var w="3.2.0";var N=w;function j(l,i=0){return l.codePointAt(i)||0}function x(l){let i="abcdefghijklmnopqrstuvwxyz",r="abcdefghijklmnopqrstuvwxyz0123456789",o={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},f={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},u={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},s=[];if(!Array.isArray(l)||!l.length)return l;let a=l.length>=48?new Set:void 0,g=a?new Map:void 0;for(let e=0,h=l.length;e<h;e++){let m;if(g)m=g.get(l[e]);else{let t=l.indexOf(l[e]);t<e&&(m=s[t])}if(m!==void 0){s.push(m);continue}let k=".#".includes(l[e][0])?l[e][0]:"",p=0;for(let t of l[e])p+=j(t);if(".#".includes(l[e][0])&&l[e].length<4||!".#".includes(l[e][0])&&l[e].length<3){let t=l[e];if(!(a?a.has(t):s.includes(t))){s.push(t),a&&g&&(a.add(t),g.set(l[e],t)),t.startsWith(".")&&t.length===2&&o[t.slice(1)]===!1?o[t.slice(1)]=!0:t.startsWith("#")&&t.length===2&&f[t.slice(1)]===!1?f[t.slice(1)]=!0:!t.startsWith(".")&&!t.startsWith("#")&&t.length===1&&u[t]===!1&&(u[t]=!0);continue}}let n="".concat(k).concat(i[p%i.length]).concat(r[p%r.length]);if(a?a.has(n):s.includes(n)){let t=n,b=0,d=0,c=0;for(let W of l[e]){let $=j(W);for(d=d<200?d+$:(d+$)%r.length,c+=$;c>=10;){let v=0;for(;c>0;)v+=c%10,c=Math.floor(c/10);c=v}}for(;a?a.has(t):s.includes(t);)b+=1,t+=r[d*c*b%r.length];n=t}s.push(n),a&&g&&(a.add(n),g.set(l[e],n)),n.startsWith(".")&&n.length===2&&o[n.slice(1)]===!1?o[n.slice(1)]=!0:n.startsWith("#")&&n.length===2&&f[n.slice(1)]===!1?f[n.slice(1)]=!0:!n.startsWith(".")&&!n.startsWith("#")&&n.length===1&&u[n]===!1&&(u[n]=!0)}for(let e=0,h=s.length;e<h;e++)s[e].startsWith(".")?o[s[e].slice(1,2)]===!1?(o[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):o[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):s[e].startsWith("#")?f[s[e].slice(1,2)]===!1?(f[s[e].slice(1,2)]=s[e],s[e]=s[e].slice(0,2)):f[s[e].slice(1,2)]===s[e]&&(s[e]=s[e].slice(0,2)):!s[e].startsWith(".")&&!s[e].startsWith("#")&&(u[s[e].slice(0,1)]?u[s[e].slice(0,1)]===s[e]&&(s[e]=s[e].slice(0,1)):(u[s[e].slice(0,1)]=s[e],s[e]=s[e].slice(0,1)));return s}function R(l,i){if(!Number.isInteger(i))throw new TypeError("string-uglify/uglifyById(): [THROW_ID_01] The second input argument, idNum, must be an integer. It was given as ".concat(String(i)," (type ").concat(typeof i,")."));if(i<0||i>=l.length)throw new RangeError("string-uglify/uglifyById(): [THROW_ID_02] The second input argument, idNum, must point to an item in refArr. It was given as ".concat(i,", while refArr contains ").concat(l.length," item").concat(l.length===1?"":"s","."));return x(l)[i]}return C(T);})();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "string-uglify",
3
- "version": "3.1.0",
4
- "description": "Shorten sets of strings deterministically, to be git-friendly",
3
+ "version": "3.2.0",
4
+ "description": "Shorten sets of strings deterministically",
5
5
  "keywords": [
6
6
  "class",
7
7
  "classes",
@@ -40,42 +40,41 @@
40
40
  },
41
41
  "types": "types/index.d.ts",
42
42
  "scripts": {
43
- "build": "node '../../ops/scripts/esbuild.js' && npm run dts",
44
- "cjs-off": "exit 0",
45
- "cjs-on": "exit 0",
46
- "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
43
+ "build": "node ../../ops/scripts/esbuild.js && npm run dts",
44
+ "coverage": "c8 uvu test",
45
+ "dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
47
46
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
48
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
47
+ "dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
49
48
  "examples": "node '../../ops/scripts/run-examples.js'",
50
- "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
51
- "letspublish": "npm publish --provenance || :",
52
- "lint": "eslint . --fix --concurrency=auto --cache",
49
+ "lect": "node '../../ops/lect/lect.js'",
50
+ "lect:check": "node '../../ops/lect/lect.js' --check",
51
+ "lint": "biome lint --error-on-warnings . && npm run typecheck",
52
+ "lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
53
53
  "perf": "node perf/check.js",
54
54
  "prep": "echo 'ready'",
55
- "prettier": "prettier",
56
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
57
- "pretest": "npm run lect && npm run build",
55
+ "prettier": "biome format",
56
+ "prettier:format": "biome format --write .",
57
+ "pretest": "npm run lect:check && npm run build",
58
58
  "test": "npm run devtest",
59
+ "typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
59
60
  "unit": "uvu test"
60
61
  },
61
- "engines": {
62
- "node": ">=14.18.0"
63
- },
64
62
  "c8": {
63
+ "all": true,
65
64
  "check-coverage": true,
66
- "exclude": [
67
- "**/test/**/*.*"
68
- ],
65
+ "exclude": ["**/test/**/*.*"],
66
+ "include": ["dist/*.esm.js"],
69
67
  "lines": 100
70
68
  },
71
69
  "lect": {
72
70
  "licence": {
73
- "extras": [
74
- ""
75
- ]
71
+ "extras": [""]
76
72
  },
77
73
  "various": {}
78
74
  },
75
+ "engines": {
76
+ "node": ">=18.20.8"
77
+ },
79
78
  "publishConfig": {
80
79
  "registry": "https://registry.npmjs.org/"
81
80
  }
package/.eslintcache DELETED
@@ -1 +0,0 @@
1
- [{"/home/runner/work/codsen/codsen/packages/string-uglify/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/string-uglify/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/string-uglify/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/string-uglify/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/string-uglify/test/test.js":"5"},{"size":603,"mtime":1760566739160,"results":"6","hashOfConfig":"7"},{"size":539,"mtime":1760566739160,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760566739161,"results":"10","hashOfConfig":"7"},{"size":8785,"mtime":1760566739161,"results":"11","hashOfConfig":"9"},{"size":7919,"mtime":1760566739161,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/string-uglify/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/string-uglify/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/string-uglify/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/string-uglify/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/string-uglify/test/test.js",[],["29","30","31","32"],{"ruleId":"33","severity":2,"message":"34","line":3,"column":25,"nodeType":null,"messageId":"35","endLine":3,"endColumn":31,"suppressions":"36"},{"ruleId":"33","severity":2,"message":"37","line":3,"column":33,"nodeType":null,"messageId":"35","endLine":3,"endColumn":37,"suppressions":"38"},{"ruleId":"33","severity":2,"message":"39","line":3,"column":39,"nodeType":null,"messageId":"35","endLine":3,"endColumn":42,"suppressions":"40"},{"ruleId":"33","severity":2,"message":"41","line":3,"column":44,"nodeType":null,"messageId":"35","endLine":3,"endColumn":49,"suppressions":"42"},"@typescript-eslint/no-unused-vars","'throws' is defined but never used.","unusedVar",["43"],"'type' is defined but never used.",["44"],"'not' is defined but never used.",["45"],"'match' is defined but never used.",["46"],{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},"directive",""]