Releases: juharris/optify
Releases · juharris/optify
v1.5.1
v1.5.0: [JS] Add optional CacheOptions support for getAllOptions (#213)
Bump to 1.5.0
`getAllOptions` did not support the same opt-in caching path already available on `getOptions`. This change adds parity by allowing callers to pass `CacheOptions` to cache deserialized results for repeated calls with equivalent inputs.
- **API parity: `getAllOptions(..., cacheOptions?)`**
- Extended JS wrapper typings for both `OptionsProvider` and
`OptionsWatcher` to accept an optional `CacheOptions` argument on
`getAllOptions`.
- Added prototype wrappers that route `getAllOptions` through shared
caching logic.
- **Shared caching implementation**
- Added `getAllOptionsWithCaching` in `src/caching.ts`.
- Reused existing cache storage/init behavior and feature filtering strategy.
- Added keying for `getAllOptions` based on filtered feature set + configurable-strings mode.
- Preserved existing guardrail: caching with overrides is rejected.
- **Watcher cache invalidation behavior preserved**
- `OptionsWatcher.getAllOptions` now follows the same cache-staleness check pattern used by cached `getOptions` (`lastModified` vs cache creation time, then `resetCaches`).
- **Focused test coverage**
- Added cache tests for `getAllOptions` across `OptionsProvider` and `OptionsWatcher`:
- returns same object identity when caching is enabled
- returns fresh objects when caching is not enabled
- throws when caching is requested with overrides
```ts
const cacheOptions = new CacheOptions();
const a = provider.getAllOptions(["A"], null, cacheOptions);
const b = provider.getAllOptions(["A"], null, cacheOptions);
// same cached object
expect(a).toBe(b);
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
Co-authored-by: Justin D. Harris <juharris@users.noreply.github.com>
v1.4.0: [JS] Add setConstraints and setOverrides preference methods (#209)
## Summary - Add `setConstraints` and `setOverrides` methods to `GetOptionsPreferences` that accept native JS objects, complementing the existing JSON string variants - Add tests for `setOverrides`, `setOverridesJson`, and `hasOverrides` - Update existing tests to use `setConstraints` instead of `setConstraintsJson` where applicable - Bump version to 1.4.0 Co-authored-by: Justin Harris <juharris@users.noreply.github.com>
v1.3.0
[CLI] Improve arg parsing, list-features output, and add --preference…
v1.2.0: [JS] Add getOptions method with schema validation (#177)
JS: * Add `getOptions<T>` to `OptionsProvider` and `OptionsWatcher` * Fix `CI with sudo pkg install -y -f ca_root_nss`
v1.1.7
[JS] Update napi (#169)
v1.1.6
Bump versions for optimizations + Ruby `conditions?` (#168)
v1.1.5
Bump version: patch for optimizations (#160)
v1.1.4: [JS] Remove extra files from package (#138)
Make the package smaller. Fix CI issues: https://github.com/rust-lang/rust/pull/131477 The PR doesn't directly mention undefined N-API symbols. But the fact that the runner image updated Rust from 1.90 to 1.91, and that's when the linking failures started, is compelling evidence. The fix I added (the -undefined dynamic_lookup flags) is the correct solution regardless - it's been the standard approach for N-API addons on macOS for years. Why the linker flags are now needed: 1. GitHub Actions runner image update: The macos-15-arm64 runner image was updated from version 20251021.0066 (used in Oct 26 successful build) to 20251104.0104 (used in Nov 7 failed builds) 2. Rust version upgrade: The runner image update included Rust 1.90.0 → 1.91.0 3. Rust 1.91 macOS linking changes: Rust 1.91 https://github.com/rust-lang/rust/pull/131477 via the SDKROOT environment variable. This appears to have made the linker stricter about undefined symbols in cdylibs. 4. The fix: Adding -undefined dynamic_lookup linker flags for macOS targets is the standard solution for N-API native addons, as these symbols are intentionally undefined and resolved at runtime by Node.js. The flags tell the macOS linker to allow these undefined symbols.
v1.1.3
[imports] Optimize and correct cycle detection (#135)