@squawk/fixes 0.2.4 → 0.3.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/README.md +16 -2
- package/dist/resolver.d.ts.map +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<h1><img src="
|
|
1
|
+
<h1><img src="../../../assets/squawk-logo.svg" alt="squawk logo" width="48" height="48" style="vertical-align: middle"> @squawk/fixes</h1>
|
|
2
2
|
|
|
3
|
-
[](
|
|
3
|
+
[](../../../LICENSE.md) [](https://www.npmjs.com/package/@squawk/fixes) 
|
|
4
4
|
|
|
5
5
|
Pure logic library for querying US fix/waypoint data. Look up fixes by
|
|
6
6
|
identifier, geographic proximity, or identifier search. Contains no bundled
|
|
@@ -38,6 +38,20 @@ import { createFixResolver } from '@squawk/fixes';
|
|
|
38
38
|
const resolver = createFixResolver({ data: myFixes });
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Browser / SPA usage
|
|
42
|
+
|
|
43
|
+
The resolver factory has no Node-specific imports and ships an explicit `/browser` subpath for SPAs and edge runtimes. Pair it with `@squawk/fix-data/browser`:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { loadUsBundledFixes } from '@squawk/fix-data/browser';
|
|
47
|
+
import { createFixResolver } from '@squawk/fixes/browser';
|
|
48
|
+
|
|
49
|
+
const dataset = await loadUsBundledFixes();
|
|
50
|
+
const resolver = createFixResolver({ data: dataset.records });
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The `/browser` entry is identical to the main entry; the separate subpath exists so browser support is an explicit, `publint`-verified part of the public API surface.
|
|
54
|
+
|
|
41
55
|
## API
|
|
42
56
|
|
|
43
57
|
### `createFixResolver(options)`
|
package/dist/resolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"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,kBAAkB,GAAG,WAAW,CAgE1E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squawk/fixes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fix/waypoint queries by identifier, location, or name search",
|
|
6
6
|
"author": "Neil Cochran",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./browser": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|
|
@@ -29,16 +33,17 @@
|
|
|
29
33
|
],
|
|
30
34
|
"scripts": {
|
|
31
35
|
"build": "tsc",
|
|
32
|
-
"test": "
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"test:coverage": "vitest run --coverage",
|
|
33
38
|
"lint": "tsc --noEmit && eslint src",
|
|
34
39
|
"lint:pack": "publint && attw --pack . --profile esm-only"
|
|
35
40
|
},
|
|
36
41
|
"dependencies": {
|
|
37
|
-
"@squawk/geo": "^0.4.
|
|
38
|
-
"@squawk/types": "^0.7.
|
|
42
|
+
"@squawk/geo": "^0.4.2",
|
|
43
|
+
"@squawk/types": "^0.7.2"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
41
|
-
"@squawk/fix-data": "^0.6.
|
|
46
|
+
"@squawk/fix-data": "^0.6.2",
|
|
42
47
|
"@types/node": "^25.6.0"
|
|
43
48
|
},
|
|
44
49
|
"keywords": [
|