@jdxcode/aube-node 1.28.0 → 1.29.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 CHANGED
@@ -46,6 +46,31 @@ Rejected promises are `AubeError` objects with a stable `code` and a
46
46
  human-readable `diagnostic`. Published `ERR_AUBE_*` values follow aube's
47
47
  [error-code stability policy](https://github.com/jdx/aube/blob/main/docs/error-codes.md).
48
48
 
49
+ ## Configuration
50
+
51
+ Register embedder setting defaults before the first `install`:
52
+
53
+ ```ts
54
+ import { configure, install } from "@jdxcode/aube-node"
55
+
56
+ configure({
57
+ defaults: {
58
+ minimumReleaseAge: "259200", // seconds; 3-day cooldown for fresh releases
59
+ },
60
+ })
61
+ ```
62
+
63
+ Defaults use canonical setting names and sit at the lowest precedence —
64
+ environment variables, project files, and user configuration all override
65
+ them. Registration is process-global and first-write-wins: calling
66
+ `configure` after an install (or a second time) rejects with
67
+ `ERR_AUBE_EMBED_ALREADY_INITIALIZED`, and unknown setting names reject with
68
+ `ERR_AUBE_EMBED_INVALID_SETTING`. Without a `configure` call the addon
69
+ applies its built-in defaults (`nodeLinker=hoisted`, `minimumReleaseAge=0`).
70
+
71
+ Per-install, `osvTransitiveCheck: true` forces a live transitive OSV check
72
+ even when resolution reused every version from the existing lockfile.
73
+
49
74
  ## Compiled Bun executables
50
75
 
51
76
  Add `bunPlugin({ os, arch, libc })` from `@jdxcode/aube-node/bun-plugin` to each
package/index.d.ts CHANGED
@@ -16,10 +16,19 @@ export interface AubeError extends Error {
16
16
  diagnostic: string
17
17
  }
18
18
 
19
+ export type ConfigureInput = {
20
+ /**
21
+ * Embedder setting defaults by canonical setting name (e.g.
22
+ * `minimumReleaseAge`). Lowest precedence: environment variables, project
23
+ * files, and user configuration all override them.
24
+ */
25
+ defaults?: Record<string, string>
26
+ }
19
27
  export type InstallInput = {
20
28
  add?: { name: string; version?: string; dev?: boolean }[]
21
29
  force?: boolean
22
30
  offline?: boolean
31
+ osvTransitiveCheck?: boolean
23
32
  onEvent?: (event: InstallEvent) => void
24
33
  signal?: AbortSignal
25
34
  }
@@ -31,4 +40,10 @@ export type InstallResult = {
31
40
  downloaded: number
32
41
  durationMs: number
33
42
  }
43
+ /**
44
+ * Register embedder setting defaults for this process. Call before the first
45
+ * `install`; later (or repeated) calls throw `ERR_AUBE_EMBED_ALREADY_INITIALIZED`,
46
+ * and unknown setting names throw `ERR_AUBE_EMBED_INVALID_SETTING`.
47
+ */
48
+ export function configure(input?: ConfigureInput): void
34
49
  export function install(projectDir: string, input?: InstallInput): Promise<InstallResult>
package/index.js CHANGED
@@ -28,4 +28,5 @@ function load() {
28
28
  }
29
29
 
30
30
  const addon = load()
31
+ exports.configure = addon.configure
31
32
  exports.install = addon.install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdxcode/aube-node",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "description": "Node-API bindings for embedding the aube package manager",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/jdx/aube",
@@ -28,13 +28,13 @@
28
28
  "node": ">=18"
29
29
  },
30
30
  "optionalDependencies": {
31
- "@jdxcode/aube-node-darwin-arm64": "1.28.0",
32
- "@jdxcode/aube-node-darwin-x64": "1.28.0",
33
- "@jdxcode/aube-node-linux-arm64": "1.28.0",
34
- "@jdxcode/aube-node-linux-x64": "1.28.0",
35
- "@jdxcode/aube-node-linux-arm64-musl": "1.28.0",
36
- "@jdxcode/aube-node-linux-x64-musl": "1.28.0",
37
- "@jdxcode/aube-node-win32-arm64": "1.28.0",
38
- "@jdxcode/aube-node-win32-x64": "1.28.0"
31
+ "@jdxcode/aube-node-darwin-arm64": "1.29.0",
32
+ "@jdxcode/aube-node-darwin-x64": "1.29.0",
33
+ "@jdxcode/aube-node-linux-arm64": "1.29.0",
34
+ "@jdxcode/aube-node-linux-x64": "1.29.0",
35
+ "@jdxcode/aube-node-linux-arm64-musl": "1.29.0",
36
+ "@jdxcode/aube-node-linux-x64-musl": "1.29.0",
37
+ "@jdxcode/aube-node-win32-arm64": "1.29.0",
38
+ "@jdxcode/aube-node-win32-x64": "1.29.0"
39
39
  }
40
40
  }