ast-loose-compare 4.1.3 → 4.2.1
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 +20 -2
- package/LICENSE +1 -1
- package/README.md +4 -3
- package/dist/ast-loose-compare.esm.js +2 -2
- package/dist/ast-loose-compare.umd.js +10 -26
- package/package.json +22 -23
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,29 @@
|
|
|
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
|
-
## 4.1
|
|
6
|
+
## 4.2.1 (2026-08-22)
|
|
7
|
+
|
|
8
|
+
### Performance Improvements
|
|
9
|
+
|
|
10
|
+
- optimise package hot paths and JSON editing ([f3112bd](https://github.com/codsen/codsen/commit/f3112bd7fc0d7c9bc09312d3744c950691d72ca5))
|
|
11
|
+
|
|
12
|
+
## 4.2.0 (2026-08-19)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- repair representative perf workloads ([975e958](https://github.com/codsen/codsen/commit/975e958c0794ec256eba84e088b472483fb69e52))
|
|
17
|
+
- resolve various review findings ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
|
|
18
|
+
- retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
|
|
7
19
|
|
|
8
20
|
### Features
|
|
9
21
|
|
|
10
|
-
-
|
|
22
|
+
- add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
|
|
23
|
+
- refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
|
|
24
|
+
|
|
25
|
+
### Reverts
|
|
26
|
+
|
|
27
|
+
- 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)
|
|
28
|
+
- 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
29
|
|
|
12
30
|
## 4.0.0 (2022-12-01)
|
|
13
31
|
|
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,7 +32,7 @@ npm i ast-loose-compare
|
|
|
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 { looseCompare } from "ast-loose-compare";
|
|
38
38
|
|
|
@@ -57,9 +57,10 @@ assert.equal(
|
|
|
57
57
|
);
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
|
|
60
61
|
## Documentation
|
|
61
62
|
|
|
62
|
-
Please [visit codsen.com](https://codsen.com/os/ast-loose-compare/) for a full description of the API.
|
|
63
|
+
Please [visit codsen.com](https://codsen.com/os/ast-loose-compare/) 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-loose-compare/CHANGELOG.md).
|
|
63
64
|
|
|
64
65
|
## Contributing
|
|
65
66
|
|
|
@@ -69,6 +70,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
69
70
|
|
|
70
71
|
MIT License
|
|
71
72
|
|
|
72
|
-
Copyright © 2010-
|
|
73
|
+
Copyright © 2010-2026 Roy Revelt and other contributors
|
|
73
74
|
|
|
74
75
|
<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-loose-compare
|
|
3
3
|
* @fileoverview Compare anything: AST, objects, arrays and strings
|
|
4
|
-
* @version 4.1
|
|
4
|
+
* @version 4.2.1
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-loose-compare/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{empty as
|
|
10
|
+
import{empty as n}from"ast-contains-only-empty-space";import{isPlainObject as c}from"codsen-utils";var a="4.2.1";var h=a;function u(r,e,s){function i(o){return o!=null}let t,p;if(s===void 0){if(!i(r)||!i(e))return}else if(!i(r)||!i(e))return!1;if(s=s||!0,typeof r!=typeof e)return!!(n(r)&&n(e));if(Array.isArray(r)&&Array.isArray(e))if(e.length){for(t=0,p=e.length;t<p;t++)if(Array.isArray(e[t])||c(e[t])){if(s=u(r[t],e[t],s),!s)return!1}else if(e[t]!==r[t])return!!(n(e[t])&&n(r[t]))}else return!!(e.length===0&&r.length===0||n(e)&&n(r));else if(c(r)&&c(e))if(Object.keys(e).length){let o=Object.keys(e);for(t=0,p=o.length;t<p;t++)if(Array.isArray(e[o[t]])||c(e[o[t]])||typeof e[o[t]]=="string"){if(s=u(r[o[t]],e[o[t]],s),!s)return!1}else if(e[o[t]]!==r[o[t]]&&(!n(e[o[t]])||!n(r[o[t]])))return!1}else return!!(Object.keys(e).length===0&&Object.keys(r).length===0||n(e)&&n(r));else if(typeof r=="string"&&typeof e=="string"){if(r!==e)return!!(n(e)&&n(r))}else return!!(n(e)&&n(r));return s}function x(r,e){return u(r,e)}export{x as looseCompare,h as version};
|
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-loose-compare
|
|
3
3
|
* @fileoverview Compare anything: AST, objects, arrays and strings
|
|
4
|
-
* @version 4.1
|
|
4
|
+
* @version 4.2.1
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-loose-compare/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var astLooseCompare=(()=>{var
|
|
10
|
+
"use strict";var astLooseCompare=(()=>{var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var m=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!y.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(s=d(t,r))||s.enumerable});return e};var A=e=>v(a({},"__esModule",{value:!0}),e);var k={};m(k,{looseCompare:()=>C,version:()=>x});function b(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)}function f(e){if(typeof e=="string")return!e.trim();if(Array.isArray(e)){for(let t of e)if(!f(t))return!1}else if(b(e)){for(let t of Object.keys(e))if(!f(e[t]))return!1}return!0}function i(e){return typeof e=="string"?!e.trim():typeof e!="object"||!e?!1:f(e)}var W=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"]);function l(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 p,$=(p=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:p.get;var M=Date.prototype.getTime;var h="4.2.1";var x=h;function c(e,t,n){function s(o){return o!=null}let r,u;if(n===void 0){if(!s(e)||!s(t))return}else if(!s(e)||!s(t))return!1;if(n=n||!0,typeof e!=typeof t)return!!(i(e)&&i(t));if(Array.isArray(e)&&Array.isArray(t))if(t.length){for(r=0,u=t.length;r<u;r++)if(Array.isArray(t[r])||l(t[r])){if(n=c(e[r],t[r],n),!n)return!1}else if(t[r]!==e[r])return!!(i(t[r])&&i(e[r]))}else return!!(t.length===0&&e.length===0||i(t)&&i(e));else if(l(e)&&l(t))if(Object.keys(t).length){let o=Object.keys(t);for(r=0,u=o.length;r<u;r++)if(Array.isArray(t[o[r]])||l(t[o[r]])||typeof t[o[r]]=="string"){if(n=c(e[o[r]],t[o[r]],n),!n)return!1}else if(t[o[r]]!==e[o[r]]&&(!i(t[o[r]])||!i(e[o[r]])))return!1}else return!!(Object.keys(t).length===0&&Object.keys(e).length===0||i(t)&&i(e));else if(typeof e=="string"&&typeof t=="string"){if(e!==t)return!!(i(t)&&i(e))}else return!!(i(t)&&i(e));return n}function C(e,t){return c(e,t)}return A(k);})();
|
|
11
11
|
/**
|
|
12
|
-
* @name
|
|
13
|
-
* @fileoverview
|
|
14
|
-
* @version
|
|
15
|
-
* @author Roy Revelt
|
|
16
|
-
* @license MIT
|
|
17
|
-
* {@link https://codsen.com/os/codsen-utils/}
|
|
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
|
-
/**
|
|
28
|
-
* @name ast-monkey-traverse
|
|
29
|
-
* @fileoverview Utility library to traverse AST
|
|
30
|
-
* @version 4.1.3
|
|
12
|
+
* @name ast-contains-only-empty-space
|
|
13
|
+
* @fileoverview Does AST contain only empty space?
|
|
14
|
+
* @version 4.2.0
|
|
31
15
|
* @author Roy Revelt
|
|
32
16
|
* @license MIT
|
|
33
|
-
* {@link https://codsen.com/os/ast-
|
|
17
|
+
* {@link https://codsen.com/os/ast-contains-only-empty-space/}
|
|
34
18
|
*/
|
|
35
19
|
/**
|
|
36
|
-
* @name
|
|
37
|
-
* @fileoverview
|
|
38
|
-
* @version
|
|
20
|
+
* @name codsen-utils
|
|
21
|
+
* @fileoverview Various utility functions
|
|
22
|
+
* @version 1.9.0
|
|
39
23
|
* @author Roy Revelt
|
|
40
24
|
* @license MIT
|
|
41
|
-
* {@link https://codsen.com/os/
|
|
25
|
+
* {@link https://codsen.com/os/codsen-utils/}
|
|
42
26
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-loose-compare",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Compare anything: AST, objects, arrays and strings",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -43,44 +43,43 @@
|
|
|
43
43
|
},
|
|
44
44
|
"types": "types/index.d.ts",
|
|
45
45
|
"scripts": {
|
|
46
|
-
"build": "node
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
|
|
46
|
+
"build": "node ../../ops/scripts/esbuild.js && npm run dts",
|
|
47
|
+
"coverage": "c8 uvu test",
|
|
48
|
+
"dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
|
|
50
49
|
"devtest": "c8 npm run unit && npm run examples && npm run lint",
|
|
51
|
-
"dts": "rollup -c &&
|
|
50
|
+
"dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
|
|
52
51
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
53
|
-
"lect": "node '../../ops/lect/lect.js'
|
|
54
|
-
"
|
|
55
|
-
"lint": "
|
|
52
|
+
"lect": "node '../../ops/lect/lect.js'",
|
|
53
|
+
"lect:check": "node '../../ops/lect/lect.js' --check",
|
|
54
|
+
"lint": "biome lint --error-on-warnings . && npm run typecheck",
|
|
55
|
+
"lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
|
|
56
56
|
"perf": "node perf/check.js",
|
|
57
57
|
"prep": "echo 'ready'",
|
|
58
|
-
"prettier": "
|
|
59
|
-
"prettier:format": "
|
|
60
|
-
"pretest": "npm run lect && npm run build",
|
|
58
|
+
"prettier": "biome format",
|
|
59
|
+
"prettier:format": "biome format --write .",
|
|
60
|
+
"pretest": "npm run lect:check && npm run build",
|
|
61
61
|
"test": "npm run devtest",
|
|
62
|
+
"typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
|
|
62
63
|
"unit": "uvu test"
|
|
63
64
|
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=14.18.0"
|
|
66
|
-
},
|
|
67
65
|
"c8": {
|
|
66
|
+
"all": true,
|
|
68
67
|
"check-coverage": true,
|
|
69
|
-
"exclude": [
|
|
70
|
-
|
|
71
|
-
],
|
|
68
|
+
"exclude": ["**/test/**/*.*"],
|
|
69
|
+
"include": ["dist/*.esm.js"],
|
|
72
70
|
"lines": 100
|
|
73
71
|
},
|
|
74
72
|
"lect": {
|
|
75
73
|
"licence": {
|
|
76
|
-
"extras": [
|
|
77
|
-
""
|
|
78
|
-
]
|
|
74
|
+
"extras": [""]
|
|
79
75
|
}
|
|
80
76
|
},
|
|
81
77
|
"dependencies": {
|
|
82
|
-
"ast-contains-only-empty-space": "^4.
|
|
83
|
-
"codsen-utils": "^1.
|
|
78
|
+
"ast-contains-only-empty-space": "^4.2.0",
|
|
79
|
+
"codsen-utils": "^1.9.0"
|
|
80
|
+
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=18.20.8"
|
|
84
83
|
},
|
|
85
84
|
"publishConfig": {
|
|
86
85
|
"registry": "https://registry.npmjs.org/"
|