Skip to content

Releases: juharris/optify

v1.5.1

22 Apr 02:01
04c5a98

Choose a tag to compare

[JS][optify-config] Fix featuresWithMetadata returning undefined afte…

v1.5.0: [JS] Add optional CacheOptions support for getAllOptions (#213)

14 Apr 02:01
c30e07a

Choose a tag to compare

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)

10 Apr 22:24
8bd2db3

Choose a tag to compare

## 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

08 Apr 02:11
c6b5383

Choose a tag to compare

[CLI] Improve arg parsing, list-features output, and add --preference…

v1.2.0: [JS] Add getOptions method with schema validation (#177)

26 Mar 21:19
8efb110

Choose a tag to compare

JS:
* Add `getOptions<T>` to `OptionsProvider` and `OptionsWatcher`
* Fix `CI with sudo pkg install -y -f ca_root_nss`

v1.1.7

16 Dec 22:51
f13c551

Choose a tag to compare

[JS] Update napi (#169)

v1.1.6

10 Dec 18:36
0f18c17

Choose a tag to compare

Bump versions for optimizations + Ruby `conditions?` (#168)

v1.1.5

01 Dec 14:58
d6fecf1

Choose a tag to compare

Bump version: patch for optimizations (#160)

v1.1.4: [JS] Remove extra files from package (#138)

07 Nov 23:42
713a5e3

Choose a tag to compare

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

26 Oct 03:48
3241775

Choose a tag to compare

[imports] Optimize and correct cycle detection (#135)