ast-get-values-by-key 5.1.3 → 5.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 +13 -2
- package/LICENSE +1 -1
- package/README.md +4 -42
- package/dist/ast-get-values-by-key.esm.js +2 -2
- package/dist/ast-get-values-by-key.umd.js +4 -12
- package/package.json +22 -24
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,22 @@
|
|
|
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
|
-
## 5.
|
|
6
|
+
## 5.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
|
-
-
|
|
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
|
+
### Reverts
|
|
19
|
+
|
|
20
|
+
- 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)
|
|
21
|
+
- 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
22
|
|
|
12
23
|
## 5.0.0 (2022-12-01)
|
|
13
24
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright © 2010-
|
|
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
|
@@ -32,13 +32,10 @@ npm i ast-get-values-by-key
|
|
|
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
37
|
import { getByKey } from "ast-get-values-by-key";
|
|
38
38
|
|
|
39
|
-
// GETTER
|
|
40
|
-
// ======
|
|
41
|
-
|
|
42
39
|
// returns "object-path" notation paths where arrays use dots:
|
|
43
40
|
assert.deepEqual(
|
|
44
41
|
getByKey(
|
|
@@ -53,47 +50,12 @@ assert.deepEqual(
|
|
|
53
50
|
),
|
|
54
51
|
[{ val: "html", path: "parsed.0.tag" }],
|
|
55
52
|
);
|
|
56
|
-
|
|
57
|
-
// SETTER
|
|
58
|
-
// ======
|
|
59
|
-
|
|
60
|
-
assert.deepEqual(
|
|
61
|
-
getByKey(
|
|
62
|
-
{
|
|
63
|
-
parsed: [
|
|
64
|
-
{
|
|
65
|
-
tag: "html",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
foo: {
|
|
69
|
-
tag: null,
|
|
70
|
-
},
|
|
71
|
-
bar: {
|
|
72
|
-
tag: null,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
"tag", // value to search for
|
|
76
|
-
[123, 456], // pot of values to pick from (one result not enough)
|
|
77
|
-
),
|
|
78
|
-
{
|
|
79
|
-
parsed: [
|
|
80
|
-
{
|
|
81
|
-
tag: 123,
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
foo: {
|
|
85
|
-
tag: 456,
|
|
86
|
-
},
|
|
87
|
-
bar: {
|
|
88
|
-
tag: null, // value pot was depleted and there was nothing left to put here
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
);
|
|
92
53
|
```
|
|
93
54
|
|
|
55
|
+
|
|
94
56
|
## Documentation
|
|
95
57
|
|
|
96
|
-
Please [visit codsen.com](https://codsen.com/os/ast-get-values-by-key/) for a full description of the API.
|
|
58
|
+
Please [visit codsen.com](https://codsen.com/os/ast-get-values-by-key/) 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/ast-get-values-by-key/CHANGELOG.md).
|
|
97
59
|
|
|
98
60
|
## Contributing
|
|
99
61
|
|
|
@@ -103,6 +65,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
103
65
|
|
|
104
66
|
MIT License
|
|
105
67
|
|
|
106
|
-
Copyright © 2010-
|
|
68
|
+
Copyright © 2010-2026 Roy Revelt and other contributors
|
|
107
69
|
|
|
108
70
|
<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 ast-get-values-by-key
|
|
3
3
|
* @fileoverview Extract values and paths from AST by keys OR set them by keys
|
|
4
|
-
* @version 5.
|
|
4
|
+
* @version 5.2.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-get-values-by-key/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{traverse as m}from"ast-monkey-traverse";import{
|
|
10
|
+
import{traverse as m}from"ast-monkey-traverse";import{deepClone as o,match as y}from"codsen-utils";var i="5.2.0";var v=i;function k(p,c,t){let e;t!==void 0&&(e=Array.isArray(t)?o(t):[o(t)]);let n=[],d=m(p,(r,s,a)=>{let l=s!==void 0?s:r;if(s!==void 0&&y(r,c,{caseSensitiveMatch:!0})){if(e===void 0)n.push({val:s,path:a.path});else if(e.length)return e.shift()}return l});return e===void 0?n:d}export{k as getByKey,v as version};
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-get-values-by-key
|
|
3
3
|
* @fileoverview Extract values and paths from AST by keys OR set them by keys
|
|
4
|
-
* @version 5.
|
|
4
|
+
* @version 5.2.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-get-values-by-key/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var astGetValuesByKey=(()=>{var
|
|
10
|
+
"use strict";var astGetValuesByKey=(()=>{var C=Object.defineProperty,H=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,z=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertyNames,I=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&$(e,r,t[r]);if(I)for(var r of I(t))Z.call(t,r)&&$(e,r,t[r]);return e},w=(e,t)=>H(e,z(t));var q=(e,t)=>{for(var r in t)C(e,r,{get:t[r],enumerable:!0})},J=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of G(t))!B.call(e,l)&&l!==r&&C(e,l,{get:()=>t[l],enumerable:!(i=Q(t,l))||i.enumerable});return e};var Y=e=>J(C({},"__esModule",{value:!0}),e);var k=(e,t,r)=>$(e,typeof t!="symbol"?t+"":t,r);var de={};q(de,{getByKey:()=>he,version:()=>ce});var ye=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);var X=class{constructor(){k(this,"hasRepeatedReferences",!1);k(this,"clones",[]);k(this,"index");k(this,"sources",[])}get(e){if(this.index){let r=this.index.get(e);return r!==void 0&&(this.hasRepeatedReferences=!0),r}let t=this.sources.indexOf(e);if(t!==-1)return this.hasRepeatedReferences=!0,this.clones[t]}set(e,t){if(this.index){this.index.set(e,t);return}if(this.sources.push(e),this.clones.push(t),this.sources.length===32){this.index=new WeakMap;for(let r=0;r<this.sources.length;r++)this.index.set(this.sources[r],this.clones[r]);this.sources=[],this.clones=[]}}};function L(e,t){let r=t.get(e);if(r!==void 0)return r;let i=e.slice(0);return t.set(e,i),i}function ee(e,t){if(typeof Buffer<"u"&&Buffer.isBuffer(e)){let n=Buffer.from(e);return t.set(e,n),n}let r=L(e.buffer,t);if(e instanceof DataView){let n=new DataView(r,e.byteOffset,e.byteLength);return t.set(e,n),n}let i=e.constructor,l=new i(r,e.byteOffset,e.length);return t.set(e,l),l}function W(e,t,r,i){for(let l of r){let n=t[l];e[l]=typeof n!="object"||n===null?n:A(n,i)}}function A(e,t){if(typeof e!="object"||e===null)return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let n=e.length,s=new Array(n);t.set(e,s);let o=e,u=Object.keys(e);if(u.length===n&&(n===0||u[n-1]==="".concat(n-1)))for(let f=0;f<n;f++){let a=o[f];s[f]=typeof a!="object"||a===null?a:A(a,t)}else W(s,o,u,t);return s}let i=Object.getPrototypeOf(e);if(i===Object.prototype||i===null){let n={};return t.set(e,n),W(n,e,Object.keys(e),t),n}if(e instanceof Date){let n=new Date(e.getTime());return t.set(e,n),n}if(ArrayBuffer.isView(e))return ee(e,t);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return L(e,t);if(e instanceof Map){let n=new Map;t.set(e,n);for(let[s,o]of e)n.set(A(s,t),A(o,t));return n}if(e instanceof Set){let n=new Set;t.set(e,n);for(let s of e)n.add(A(s,t));return n}let l={};return t.set(e,l),W(l,e,Object.keys(e),t),l}function m(e){return A(e,new X)}function N(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}var te=256,re=1024,ne=1,ie=new Map,se=new Map;function M(e){if(e>=97&&e<=122)return e-32;if(e>65535)return e;let t=String.fromCharCode(e).toUpperCase();if(t.length!==1)return e;let r=t.charCodeAt(0);return e>127&&r<128?e:r}function D(e,t,r,i,l,n){for(let s=0;s<l;s++){let o=e.charCodeAt(t+s),u=r.charCodeAt(i+s);if(n||(o>=97&&o<=122&&(o-=32),u>=97&&u<=122&&(u-=32)),o!==u)return!1}return!0}function T(e,t,r){let i=t.indexOf("\\");if(i===-1&&e===t)return!0;let l=t.indexOf("*");if(i===-1&&l===-1){if(r)return!1;for(let a=0;a<t.length;a++)if(t.charCodeAt(a)>127)return;return e.length===t.length&&D(e,0,t,0,t.length,!1)}if(i!==-1)return;let n=0,s=!1,o=-1;for(let a=0;a<t.length;a++){let p=t.charCodeAt(a);if(p>127)return;if(p===42){if(o=a,!s){if(n++,n>1)return;s=!0}}else s=!1}let u=o+1,f=t.length-u;return e.length<l+f?!1:D(e,0,t,0,l,r)&&D(e,e.length-f,t,u,f,r)}function le(e){let t=new Uint32Array(e.length),r=0;for(let i=1;i<e.length;i++){for(;r>0&&e[i]!==e[r];)r=t[r-1];e[i]===e[r]&&r++,t[i]=r}return t}function oe(e,t){let r=[[]],i=!0,l=!1,n=!1,s=0;for(let c=0;c<e.length;){let d=e.codePointAt(c);if(d!==92){if(d===42)l=!0,n||(r.push([]),n=!0);else{let b=t?d:M(d);r[r.length-1].push(b),i&&(i=b<=127),s++,n=!1}c+=d>65535?2:1;continue}let h=c+1;for(;e.charCodeAt(h)===92;)h++;let y=h-c,g=e.codePointAt(h),x,j=!1;g===42?(j=y%2===0,x=j?y/2:(y-1)/2):g===void 0||g===10||g===13||g===8232||g===8233?x=Math.ceil(y/2):x=Math.floor(y/2);for(let b=0;b<x;b++)r[r.length-1].push(92),s++;if(j){n=!1,c=h;continue}if(g!==void 0){let b=t?g:M(g);r[r.length-1].push(b),i&&(i=b<=127),s++,h+=g>65535?2:1}n=!1,c=h}let o=l&&r[0].length===0,u=l&&r[r.length-1].length===0,f=[];for(let c of r)c.length&&f.push({values:c});let a=o?0:1,p=f.length-(u?0:1);for(let c=a;c<p;c++)f[c].values.length>ne&&(f[c].failure=le(f[c].values));return{asciiOnly:i,endsWithWildcard:u,hasWildcard:l,minimumInputLength:s,segments:f,startsWithWildcard:o}}function P(e,t){let r=t?ie:se,i=e.length<=re;if(i){let n=r.get(e);if(n)return n}let l=oe(e,t);if(i){if(r.size>=te){let n=r.keys().next().value;n!==void 0&&r.delete(n)}r.set(e,l)}return l}function E(e,t){if(t){let l=[];for(let n=0;n<e.length;){let s=e.codePointAt(n);l.push(s),n+=s>65535?2:1}return l}let r=new Uint32Array(e.length),i=0;for(let l=0;l<e.length;){let n=e.codePointAt(l);r[i]=M(n),i++,l+=n>65535?2:1}return i===r.length?r:r.subarray(0,i)}function O(e,t,r,i){for(let l=0;l<r.values.length;l++){let n=e.charCodeAt(t+l);if(!i&&n>=97&&n<=122&&(n-=32),n!==r.values[l])return!1}return!0}function ue(e,t,r,i,l){let n=i-t.values.length;if(n<r)return-1;if(!t.failure){for(let o=r;o<=n;o++)if(O(e,o,t,l))return o;return-1}let s=0;for(let o=r;o<i;o++){let u=e.charCodeAt(o);for(!l&&u>=97&&u<=122&&(u-=32);s>0&&u!==t.values[s];)s=t.failure[s-1];if(u===t.values[s]&&(s++,s===t.values.length))return o-s+1}return-1}function F(e,t,r){if(e.length<t.minimumInputLength)return!1;if(!t.hasWildcard)return e.length===t.minimumInputLength&&O(e,0,t.segments[0],r);let i=0,l=t.segments.length,n=0,s=e.length;if(!t.startsWithWildcard){let o=t.segments[0];if(!O(e,0,o,r))return!1;n=o.values.length,i++}if(!t.endsWithWildcard){l--;let o=t.segments[l];if(s-=o.values.length,!O(e,s,o,r))return!1}for(let o=i;o<l;o++){let u=t.segments[o],f=ue(e,u,n,s,r);if(f===-1)return!1;n=f+u.values.length}return!0}function S(e,t,r){for(let i=0;i<r.values.length;i++)if(e[t+i]!==r.values[i])return!1;return!0}function ae(e,t,r,i){let l=i-t.values.length;if(l<r)return-1;if(!t.failure){for(let s=r;s<=l;s++)if(S(e,s,t))return s;return-1}let n=0;for(let s=r;s<i;s++){for(;n>0&&e[s]!==t.values[n];)n=t.failure[n-1];if(e[s]===t.values[n]&&(n++,n===t.values.length))return s-n+1}return-1}function U(e,t){if(e.length<t.minimumInputLength)return!1;if(!t.hasWildcard)return e.length===t.minimumInputLength&&S(e,0,t.segments[0]);let r=0,i=t.segments.length,l=0,n=e.length;if(!t.startsWithWildcard){let s=t.segments[0];if(!S(e,0,s))return!1;l=s.values.length,r++}if(!t.endsWithWildcard){i--;let s=t.segments[i];if(n-=s.values.length,!S(e,n,s))return!1}for(let s=r;s<i;s++){let o=t.segments[s],u=ae(e,o,l,n);if(u===-1)return!1;l=u+o.values.length}return!0}function fe(e,t,r){let i=T(e,t,r);if(i!==void 0)return i;let l=P(t,r);return l.asciiOnly?F(e,l,r):U(E(e,r),l)}function R(e,t,r,i){var s;let l=T(e,t,r);if(l!==void 0)return l;let n=P(t,r);return n.asciiOnly?F(e,n,r):((s=i.tokens)!=null||(i.tokens=E(e,r)),U(i.tokens,n))}function K(e,t,r){if(typeof t!="string"&&!t.length)return!1;let i=r===void 0?!1:r.caseSensitiveMatch===!0;if(typeof t=="string"){let o=t.charCodeAt(0)===33,u=o?t.slice(1):t,f=fe(e,u,i);return o?!f:f}let l={},n=!1,s=!1;for(let o of t){let u=o.charCodeAt(0)===33,f=u?o.slice(1):o;if(u){if(R(e,f,i,l))return!1}else n=!0,!s&&R(e,f,i,l)&&(s=!0)}return n?s:!0}function V(e,t){if(typeof t!="function")throw new TypeError("ast-monkey-traverse/traverse(): [THROW_ID_01] The second argument must be a callback function. It was ".concat(typeof t,"."));let r={now:!1};function i(l,n,s,o){let u=l,f,a=v({depth:-1,path:""},s);if(a.depth+=1,Array.isArray(u))for(let p=0,c=u.length;p<c&&!o.now;p++){let d=a.path?"".concat(a.path,".").concat(p):"".concat(p);if(u[p]!==void 0){a.parent=m(u),a.parentType="array",a.parentKey=a.path?a.path.slice(a.path.lastIndexOf(".")+1):null;let h=u[p],y=n(h,void 0,w(v({},a),{path:d}),o);f=i(y===h?y:m(y),n,w(v({},a),{path:d}),o),Number.isNaN(f)&&p<u.length?(u.splice(p,1),p-=1):u[p]=f}else u.splice(p,1)}else if(N(u))for(let p in u){if(o.now&&p!=null)break;let c=a.path?"".concat(a.path,".").concat(p):p;a.depth===0&&p!=null&&(a.topmostKey=p),a.parent=m(u),a.parentType="object",a.parentKey=a.path?a.path.slice(a.path.lastIndexOf(".")+1):null;let d=u[p],h=n(p,d,w(v({},a),{path:c}),o);f=i(h===d?h:m(h),n,w(v({},a),{path:c}),o),Number.isNaN(f)?delete u[p]:u[p]=f}return u}return i(m(e),t,{},r)}var _="5.2.0";var ce=_;function he(e,t,r){let i;r!==void 0&&(i=Array.isArray(r)?m(r):[m(r)]);let l=[],n=V(e,(s,o,u)=>{let f=o!==void 0?o:s;if(o!==void 0&&K(s,t,{caseSensitiveMatch:!0})){if(i===void 0)l.push({val:o,path:u.path});else if(i.length)return i.shift()}return f});return i===void 0?l:n}return Y(de);})();
|
|
11
11
|
/**
|
|
12
12
|
* @name codsen-utils
|
|
13
13
|
* @fileoverview Various utility functions
|
|
14
|
-
* @version 1.
|
|
14
|
+
* @version 1.8.0
|
|
15
15
|
* @author Roy Revelt
|
|
16
16
|
* @license MIT
|
|
17
17
|
* {@link https://codsen.com/os/codsen-utils/}
|
|
18
18
|
*/
|
|
19
|
-
/**
|
|
20
|
-
* @name ast-monkey-util
|
|
21
|
-
* @fileoverview Utility library of AST helper functions
|
|
22
|
-
* @version 3.1.3
|
|
23
|
-
* @author Roy Revelt
|
|
24
|
-
* @license MIT
|
|
25
|
-
* {@link https://codsen.com/os/ast-monkey-util/}
|
|
26
|
-
*/
|
|
27
19
|
/**
|
|
28
20
|
* @name ast-monkey-traverse
|
|
29
21
|
* @fileoverview Utility library to traverse AST
|
|
30
|
-
* @version 4.
|
|
22
|
+
* @version 4.2.0
|
|
31
23
|
* @author Roy Revelt
|
|
32
24
|
* @license MIT
|
|
33
25
|
* {@link https://codsen.com/os/ast-monkey-traverse/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-get-values-by-key",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Extract values and paths from AST by keys OR set them by keys",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -44,45 +44,43 @@
|
|
|
44
44
|
},
|
|
45
45
|
"types": "types/index.d.ts",
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "node
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
|
|
47
|
+
"build": "node ../../ops/scripts/esbuild.js && npm run dts",
|
|
48
|
+
"coverage": "c8 uvu test",
|
|
49
|
+
"dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
|
|
51
50
|
"devtest": "c8 npm run unit && npm run examples && npm run lint",
|
|
52
|
-
"dts": "rollup -c &&
|
|
51
|
+
"dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
|
|
53
52
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
54
|
-
"lect": "node '../../ops/lect/lect.js'
|
|
55
|
-
"
|
|
56
|
-
"lint": "
|
|
53
|
+
"lect": "node '../../ops/lect/lect.js'",
|
|
54
|
+
"lect:check": "node '../../ops/lect/lect.js' --check",
|
|
55
|
+
"lint": "biome lint --error-on-warnings . && npm run typecheck",
|
|
56
|
+
"lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
|
|
57
57
|
"perf": "node perf/check.js",
|
|
58
58
|
"prep": "echo 'ready'",
|
|
59
|
-
"prettier": "
|
|
60
|
-
"prettier:format": "
|
|
61
|
-
"pretest": "npm run lect && npm run build",
|
|
59
|
+
"prettier": "biome format",
|
|
60
|
+
"prettier:format": "biome format --write .",
|
|
61
|
+
"pretest": "npm run lect:check && npm run build",
|
|
62
62
|
"test": "npm run devtest",
|
|
63
|
+
"typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
|
|
63
64
|
"unit": "uvu test"
|
|
64
65
|
},
|
|
65
|
-
"engines": {
|
|
66
|
-
"node": ">=14.18.0"
|
|
67
|
-
},
|
|
68
66
|
"c8": {
|
|
67
|
+
"all": true,
|
|
69
68
|
"check-coverage": true,
|
|
70
|
-
"exclude": [
|
|
71
|
-
|
|
72
|
-
],
|
|
69
|
+
"exclude": ["**/test/**/*.*"],
|
|
70
|
+
"include": ["dist/*.esm.js"],
|
|
73
71
|
"lines": 100
|
|
74
72
|
},
|
|
75
73
|
"lect": {
|
|
76
74
|
"licence": {
|
|
77
|
-
"extras": [
|
|
78
|
-
""
|
|
79
|
-
]
|
|
75
|
+
"extras": [""]
|
|
80
76
|
}
|
|
81
77
|
},
|
|
82
78
|
"dependencies": {
|
|
83
|
-
"ast-monkey-traverse": "^4.
|
|
84
|
-
"
|
|
85
|
-
|
|
79
|
+
"ast-monkey-traverse": "^4.2.0",
|
|
80
|
+
"codsen-utils": "^1.8.0"
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": ">=18.20.8"
|
|
86
84
|
},
|
|
87
85
|
"publishConfig": {
|
|
88
86
|
"registry": "https://registry.npmjs.org/"
|