dirsql 0.4.39 → 0.4.40

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/dist/platforms.js CHANGED
@@ -1,7 +1,11 @@
1
- // Single source of truth for the target platforms `dirsql` publishes.
1
+ // The target platforms `dirsql` publishes. The rows live in `platforms.json`,
2
+ // the one declarative copy of the table: this module types it, and the node
3
+ // distcheck flow (`internals/distcheck/.../node_flow/platforms.py`) reads the
4
+ // same file. The JSON sits under `src/` so `tsc` emits it into `dist/` and it
5
+ // ships with the package -- `loadNativeCore()` needs the map at runtime.
2
6
  //
3
7
  // Every target triple generates ONE npm sub-package: `@dirsql/lib-<slug>`,
4
- // holding the napi-rs `.node` addon. It backs both layers — the TypeScript
8
+ // holding the napi-rs `.node` addon. It backs both layers -- the TypeScript
5
9
  // SDK loads it via `loadNativeCore()`, and since #739 the `dirsql` CLI runs
6
10
  // in-process through its `runCli` export rather than spawning a binary. The
7
11
  // second family, `@dirsql/cli-<slug>`, shipped a redundant copy of the same
@@ -12,50 +16,11 @@
12
16
  //
13
17
  // `libTriples()` returns a `${process.platform}-${process.arch}` →
14
18
  // sub-package-name map.
15
- export const PLATFORMS = [
16
- {
17
- triple: "x86_64-unknown-linux-gnu",
18
- nodePlatform: "linux",
19
- nodeArch: "x64",
20
- libName: "@dirsql/lib-linux-x64-gnu",
21
- os: ["linux"],
22
- cpu: ["x64"],
23
- libc: ["glibc"],
24
- },
25
- {
26
- triple: "aarch64-unknown-linux-gnu",
27
- nodePlatform: "linux",
28
- nodeArch: "arm64",
29
- libName: "@dirsql/lib-linux-arm64-gnu",
30
- os: ["linux"],
31
- cpu: ["arm64"],
32
- libc: ["glibc"],
33
- },
34
- {
35
- triple: "x86_64-apple-darwin",
36
- nodePlatform: "darwin",
37
- nodeArch: "x64",
38
- libName: "@dirsql/lib-darwin-x64",
39
- os: ["darwin"],
40
- cpu: ["x64"],
41
- },
42
- {
43
- triple: "aarch64-apple-darwin",
44
- nodePlatform: "darwin",
45
- nodeArch: "arm64",
46
- libName: "@dirsql/lib-darwin-arm64",
47
- os: ["darwin"],
48
- cpu: ["arm64"],
49
- },
50
- {
51
- triple: "x86_64-pc-windows-msvc",
52
- nodePlatform: "win32",
53
- nodeArch: "x64",
54
- libName: "@dirsql/lib-win32-x64-msvc",
55
- os: ["win32"],
56
- cpu: ["x64"],
57
- },
58
- ];
19
+ import rows from "./platforms.json" with { type: "json" };
20
+ // JSON widens `nodePlatform` / `nodeArch` to `string`, which no data file can
21
+ // carry as `NodeJS.Platform` / `NodeJS.Architecture`. The cast is the only
22
+ // place the two vocabularies meet.
23
+ export const PLATFORMS = rows;
59
24
  /** Node `${platform}-${arch}` → `@dirsql/lib-*` napi sub-package name. */
60
25
  export function libTriples() {
61
26
  const out = {};
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "triple": "x86_64-unknown-linux-gnu",
4
+ "nodePlatform": "linux",
5
+ "nodeArch": "x64",
6
+ "libName": "@dirsql/lib-linux-x64-gnu",
7
+ "os": ["linux"],
8
+ "cpu": ["x64"],
9
+ "libc": ["glibc"]
10
+ },
11
+ {
12
+ "triple": "aarch64-unknown-linux-gnu",
13
+ "nodePlatform": "linux",
14
+ "nodeArch": "arm64",
15
+ "libName": "@dirsql/lib-linux-arm64-gnu",
16
+ "os": ["linux"],
17
+ "cpu": ["arm64"],
18
+ "libc": ["glibc"]
19
+ },
20
+ {
21
+ "triple": "x86_64-apple-darwin",
22
+ "nodePlatform": "darwin",
23
+ "nodeArch": "x64",
24
+ "libName": "@dirsql/lib-darwin-x64",
25
+ "os": ["darwin"],
26
+ "cpu": ["x64"]
27
+ },
28
+ {
29
+ "triple": "aarch64-apple-darwin",
30
+ "nodePlatform": "darwin",
31
+ "nodeArch": "arm64",
32
+ "libName": "@dirsql/lib-darwin-arm64",
33
+ "os": ["darwin"],
34
+ "cpu": ["arm64"]
35
+ },
36
+ {
37
+ "triple": "x86_64-pc-windows-msvc",
38
+ "nodePlatform": "win32",
39
+ "nodeArch": "x64",
40
+ "libName": "@dirsql/lib-win32-x64-msvc",
41
+ "os": ["win32"],
42
+ "cpu": ["x64"]
43
+ }
44
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirsql",
3
- "version": "0.4.39",
3
+ "version": "0.4.40",
4
4
  "description": "Ephemeral SQL index over a local directory",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/thekevinscott/dirsql",
@@ -59,6 +59,7 @@
59
59
  "command": "tsc -p tsconfig.build.json",
60
60
  "files": [
61
61
  "src/**/*.ts",
62
+ "src/**/*.json",
62
63
  "tsconfig.json",
63
64
  "tsconfig.build.json"
64
65
  ],
@@ -74,6 +75,7 @@
74
75
  "files": [
75
76
  "tools/stage-platform.ts",
76
77
  "src/platforms.ts",
78
+ "src/platforms.json",
77
79
  "napi/src/**/*.rs",
78
80
  "napi/build.rs",
79
81
  "napi/Cargo.toml",
@@ -99,6 +101,7 @@
99
101
  "napi/Cargo.toml",
100
102
  "../rust/src/**/*.rs",
101
103
  "src/**/*.ts",
104
+ "src/**/*.json",
102
105
  "tsconfig.json",
103
106
  "tsconfig.build.json"
104
107
  ],
@@ -116,6 +119,7 @@
116
119
  ],
117
120
  "files": [
118
121
  "src/**/*.ts",
122
+ "src/**/*.json",
119
123
  "tools/**/*.ts",
120
124
  "tests/**/*.ts",
121
125
  "vitest.config.ts"
@@ -129,6 +133,7 @@
129
133
  ],
130
134
  "files": [
131
135
  "src/**/*.ts",
136
+ "src/**/*.json",
132
137
  "vitest.config.ts"
133
138
  ],
134
139
  "output": []
@@ -137,6 +142,7 @@
137
142
  "command": "vitest run --dir tests/integration/hermetic --passWithNoTests",
138
143
  "files": [
139
144
  "src/**/*.ts",
145
+ "src/**/*.json",
140
146
  "tests/integration/hermetic/**/*.ts",
141
147
  "vitest.config.ts"
142
148
  ],
@@ -150,6 +156,7 @@
150
156
  ],
151
157
  "files": [
152
158
  "src/**/*.ts",
159
+ "src/**/*.json",
153
160
  "tools/**/*.ts",
154
161
  "tests/integration/binding/**/*.ts",
155
162
  "tests/exists.ts",
@@ -164,6 +171,7 @@
164
171
  ],
165
172
  "files": [
166
173
  "src/**/*.ts",
174
+ "src/**/*.json",
167
175
  "tools/**/*.ts",
168
176
  "tests/e2e/**/*.ts",
169
177
  "vitest.config.ts",
@@ -179,6 +187,7 @@
179
187
  ],
180
188
  "files": [
181
189
  "src/**/*.ts",
190
+ "src/**/*.json",
182
191
  "tools/**/*.ts",
183
192
  "tests/integration/**/*.ts",
184
193
  "tests/exists.ts",
@@ -213,10 +222,10 @@
213
222
  ]
214
223
  },
215
224
  "optionalDependencies": {
216
- "@dirsql/lib-linux-x64-gnu": "0.4.39",
217
- "@dirsql/lib-linux-arm64-gnu": "0.4.39",
218
- "@dirsql/lib-darwin-x64": "0.4.39",
219
- "@dirsql/lib-darwin-arm64": "0.4.39",
220
- "@dirsql/lib-win32-x64-msvc": "0.4.39"
225
+ "@dirsql/lib-linux-x64-gnu": "0.4.40",
226
+ "@dirsql/lib-linux-arm64-gnu": "0.4.40",
227
+ "@dirsql/lib-darwin-x64": "0.4.40",
228
+ "@dirsql/lib-darwin-arm64": "0.4.40",
229
+ "@dirsql/lib-win32-x64-msvc": "0.4.40"
221
230
  }
222
231
  }