@thi.ng/distance 2.0.9 → 2.1.3

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +81 -60
  2. package/package.json +104 -99
package/CHANGELOG.md CHANGED
@@ -1,94 +1,115 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [2.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@2.0.8...@thi.ng/distance@2.0.9) (2021-11-10)
7
-
8
- **Note:** Version bump only for package @thi.ng/distance
9
-
10
-
11
-
12
-
13
-
14
- ## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@2.0.7...@thi.ng/distance@2.0.8) (2021-11-04)
15
-
16
- **Note:** Version bump only for package @thi.ng/distance
17
-
18
-
19
-
20
-
21
-
22
- ## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@2.0.6...@thi.ng/distance@2.0.7) (2021-11-03)
23
-
24
- **Note:** Version bump only for package @thi.ng/distance
25
-
26
-
27
-
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
28
5
 
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
29
8
 
30
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@1.0.7...@thi.ng/distance@2.0.0) (2021-10-12)
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
31
11
 
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.1.0) (2021-11-17)
32
13
 
33
- ### Build System
14
+ #### 🚀 Features
34
15
 
35
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
36
21
 
22
+ #### ♻️ Refactoring
37
23
 
38
- ### Features
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
39
30
 
40
- * **distance:** add/update argmin fns/params ([9c0f003](https://github.com/thi-ng/umbrella/commit/9c0f0032d8fbce3634971a36497ef22a7343edbb))
31
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.0.1) (2021-10-13)
41
32
 
33
+ #### ♻️ Refactoring
42
34
 
43
- ### BREAKING CHANGES
35
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
36
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
37
+ - add .js suffix for all relative imports
44
38
 
45
- * discontinue CommonJS & UMD versions
39
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.0.0) (2021-10-12)
46
40
 
47
- - only ESM modules will be published from now on
48
- - CJS obsolete due to ESM support in recent versions of node:
49
- - i.e. launch NodeJS via:
50
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
51
- - in the node REPL use `await import(...)` instead of `require()`
52
- - UMD obsolete due to widespread browser support for ESM
41
+ #### 🛑 Breaking changes
53
42
 
54
- Also:
55
- - normalize/restructure/reorg all package.json files
56
- - cleanup all build scripts, remove obsolete
57
- - switch from mocha to @thi.ng/testament for all tests
43
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
44
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
45
+ - only ESM modules will be published from now on
46
+ - CJS obsolete due to ESM support in recent versions of node:
47
+ - i.e. launch NodeJS via:
48
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
49
+ - in the node REPL use `await import(...)` instead of `require()`
50
+ - UMD obsolete due to widespread browser support for ESM
51
+ Also:
52
+ - normalize/restructure/reorg all package.json files
53
+ - cleanup all build scripts, remove obsolete
54
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
58
55
 
56
+ #### 🚀 Features
59
57
 
58
+ - add/update argmin fns/params ([9c0f003](https://github.com/thi-ng/umbrella/commit/9c0f003))
59
+ - add argminN() for numeric inputs
60
+ - updata argmin fn to accept metric functions OR IDistance impls
61
+ - add [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/main/packages/checks) as direct dependency (already was transitive)
60
62
 
63
+ #### ♻️ Refactoring
61
64
 
65
+ - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
66
+ - largely related to recent updates/restructuring of these packages:
67
+ - api
68
+ - defmulti
69
+ - errors
70
+ - logger
71
+ - update imports ([df599da](https://github.com/thi-ng/umbrella/commit/df599da))
72
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
73
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
62
74
 
75
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.3.0) (2021-04-19)
63
76
 
64
- ## [1.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@1.0.6...@thi.ng/distance@1.0.7) (2021-09-03)
77
+ #### 🚀 Features
65
78
 
66
- **Note:** Version bump only for package @thi.ng/distance
79
+ - replace HAVERSINE w/ alts ([3a9a77a](https://github.com/thi-ng/umbrella/commit/3a9a77a))
80
+ - add HAVERSINE_LATLON, HAVERSINE_LONLAT
81
+ - update readme
82
+ - add argmin*() fns ([72ed376](https://github.com/thi-ng/umbrella/commit/72ed376))
67
83
 
68
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@0.2.2...@thi.ng/distance@0.3.0) (2021-04-19)
84
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.2.0) (2021-03-30)
69
85
 
70
- ### Features
86
+ #### 🚀 Features
71
87
 
72
- - **distance:** add argmin*() fns ([72ed376](https://github.com/thi-ng/umbrella/commit/72ed3760c7a6982bcab7d94666957cad90f4f0ef))
73
- - **distance:** replace HAVERSINE w/ alts ([3a9a77a](https://github.com/thi-ng/umbrella/commit/3a9a77ab0fd06484f2fda5d67c7b151645436a32))
88
+ - add HAVERSINE preset, update readme ([cfc771e](https://github.com/thi-ng/umbrella/commit/cfc771e))
74
89
 
75
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@0.1.11...@thi.ng/distance@0.2.0) (2021-03-30)
90
+ ### [0.1.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.9) (2021-03-17)
76
91
 
77
- ### Features
92
+ #### 🩹 Bug fixes
78
93
 
79
- - **distance:** add HAVERSINE preset, update readme ([cfc771e](https://github.com/thi-ng/umbrella/commit/cfc771eb21cf2574eaa2476eaee7920674cae9c3))
94
+ - update KNearest ctor & heap handling ([#283](https://github.com/thi-ng/umbrella/issues/283)) ([e7cd6f1](https://github.com/thi-ng/umbrella/commit/e7cd6f1))
95
+ - add k>0 assertion in ctor
80
96
 
81
- ## [0.1.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@0.1.8...@thi.ng/distance@0.1.9) (2021-03-17)
97
+ ### [0.1.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.2) (2021-02-20)
82
98
 
83
- ### Bug Fixes
99
+ #### ♻️ Refactoring
84
100
 
85
- - **distance:** update KNearest ctor & heap handling ([#283](https://github.com/thi-ng/umbrella/issues/283)) ([e7cd6f1](https://github.com/thi-ng/umbrella/commit/e7cd6f134bb05d5d5e37e7e7ba241f984d94d98c))
101
+ - use clamp0() ([8987946](https://github.com/thi-ng/umbrella/commit/8987946))
86
102
 
87
- # 0.1.0 (2021-01-21)
103
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.0) (2021-01-21)
88
104
 
89
- ### Features
105
+ #### 🚀 Features
90
106
 
91
- - **distance:** add Manhattan metric, rename types, add docs ([4f0b199](https://github.com/thi-ng/umbrella/commit/4f0b1992ccd3ee76fce7d9c7a5433adb80b029a2))
92
- - **distance:** add new package ([1b41aa4](https://github.com/thi-ng/umbrella/commit/1b41aa46a8e2228f69df400195a08d05d2a9f235))
93
- - **distance:** clamp search radius, minor other changes ([4a09a0f](https://github.com/thi-ng/umbrella/commit/4a09a0f6e7ab8f2276daca58758f86b68a050caf))
94
- - **distance:** update INeighborhood, KNearest ([be3e43d](https://github.com/thi-ng/umbrella/commit/be3e43dcaf6a25f6de0f6ffb9f241d2f09362ecb))
107
+ - add Manhattan metric, rename types, add docs ([4f0b199](https://github.com/thi-ng/umbrella/commit/4f0b199))
108
+ - clamp search radius, minor other changes ([4a09a0f](https://github.com/thi-ng/umbrella/commit/4a09a0f))
109
+ - update INeighborhood, KNearest ([be3e43d](https://github.com/thi-ng/umbrella/commit/be3e43d))
110
+ - expose `dist` impl in INeighborhood
111
+ - disable sort-by-default in KNearest
112
+ - fix Knearest.reset dist metric
113
+ - add docs
114
+ - update tests
115
+ - add new package ([1b41aa4](https://github.com/thi-ng/umbrella/commit/1b41aa4))
package/package.json CHANGED
@@ -1,108 +1,113 @@
1
1
  {
2
- "name": "@thi.ng/distance",
3
- "version": "2.0.9",
4
- "description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
2
+ "name": "@thi.ng/distance",
3
+ "version": "2.1.3",
4
+ "description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/distance#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
12
18
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/distance#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/api": "^8.3.2",
38
+ "@thi.ng/checks": "^3.1.2",
39
+ "@thi.ng/errors": "^2.1.2",
40
+ "@thi.ng/heaps": "^2.1.2",
41
+ "@thi.ng/math": "^5.1.2",
42
+ "@thi.ng/vectors": "^7.3.0"
43
+ },
44
+ "devDependencies": {
45
+ "@microsoft/api-extractor": "^7.18.19",
46
+ "@thi.ng/testament": "^0.2.2",
47
+ "rimraf": "^3.0.2",
48
+ "tools": "^0.0.1",
49
+ "typedoc": "^0.22.9",
50
+ "typescript": "^4.5.2"
51
+ },
52
+ "keywords": [
53
+ "distance",
54
+ "metric",
55
+ "k-nearest",
56
+ "nd",
57
+ "neighborhood",
58
+ "points",
59
+ "query",
60
+ "region",
61
+ "spatial",
62
+ "typescript",
63
+ "vector"
64
+ ],
65
+ "publishConfig": {
66
+ "access": "public"
67
+ },
68
+ "engines": {
69
+ "node": ">=12.7"
70
+ },
71
+ "files": [
72
+ "*.js",
73
+ "*.d.ts"
74
+ ],
75
+ "exports": {
76
+ ".": {
77
+ "import": "./index.js"
35
78
  },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.2.0",
38
- "@thi.ng/checks": "^3.0.7",
39
- "@thi.ng/errors": "^2.0.6",
40
- "@thi.ng/heaps": "^2.0.8",
41
- "@thi.ng/math": "^5.0.8",
42
- "@thi.ng/vectors": "^7.1.1"
79
+ "./api": {
80
+ "import": "./api.js"
43
81
  },
44
- "devDependencies": {
45
- "@thi.ng/testament": "^0.1.6"
82
+ "./argmin": {
83
+ "import": "./argmin.js"
46
84
  },
47
- "keywords": [
48
- "distance",
49
- "metric",
50
- "k-nearest",
51
- "nd",
52
- "neighborhood",
53
- "points",
54
- "query",
55
- "region",
56
- "spatial",
57
- "typescript",
58
- "vector"
59
- ],
60
- "publishConfig": {
61
- "access": "public"
85
+ "./eucledian": {
86
+ "import": "./eucledian.js"
62
87
  },
63
- "engines": {
64
- "node": ">=12.7"
88
+ "./haversine": {
89
+ "import": "./haversine.js"
65
90
  },
66
- "files": [
67
- "*.js",
68
- "*.d.ts"
69
- ],
70
- "exports": {
71
- ".": {
72
- "import": "./index.js"
73
- },
74
- "./api": {
75
- "import": "./api.js"
76
- },
77
- "./argmin": {
78
- "import": "./argmin.js"
79
- },
80
- "./eucledian": {
81
- "import": "./eucledian.js"
82
- },
83
- "./haversine": {
84
- "import": "./haversine.js"
85
- },
86
- "./knearest": {
87
- "import": "./knearest.js"
88
- },
89
- "./manhattan": {
90
- "import": "./manhattan.js"
91
- },
92
- "./nearest": {
93
- "import": "./nearest.js"
94
- },
95
- "./squared": {
96
- "import": "./squared.js"
97
- }
91
+ "./knearest": {
92
+ "import": "./knearest.js"
98
93
  },
99
- "thi.ng": {
100
- "related": [
101
- "geom-accel",
102
- "k-means",
103
- "vectors"
104
- ],
105
- "year": 2021
94
+ "./manhattan": {
95
+ "import": "./manhattan.js"
106
96
  },
107
- "gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
108
- }
97
+ "./nearest": {
98
+ "import": "./nearest.js"
99
+ },
100
+ "./squared": {
101
+ "import": "./squared.js"
102
+ }
103
+ },
104
+ "thi.ng": {
105
+ "related": [
106
+ "geom-accel",
107
+ "k-means",
108
+ "vectors"
109
+ ],
110
+ "year": 2021
111
+ },
112
+ "gitHead": "d777b58d7bec4496d38166cdabda4ffb78b0dc47\n"
113
+ }