Skip to content

Conversation

@roncohen
Copy link
Contributor

Work in progress on the Bucket CLI. @Swiftwork did all the hard work.

Swiftwork and others added 30 commits February 18, 2025 13:12
…config` option. (#285)

This PR introduces the `config`, which is an user-supplied JSON value
that matches a given feature context (similar to targeting). The
resolved configuration variant is then passed down to the client SDKs
for use.
Was missing in the previous alpha release, which meant that the value of
the `toolbar` prop wasn't correctly configured in the browser SDK.
This PR adds support for remote configuration to the node-sdk.
This PR improves the handling of check/evaluate events in the age of
`remote config`. Fixes some additional small nagging issues along the
way.
Unable to write a test for this, but tested manually.
This PR adds the ability to pass the `meta` to `getFeature(s)` and the
bound client.
…k/example (#313)

Bumps
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)
from 2.1.4 to 2.1.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">vitest's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.9</h2>
<p>This release includes security patches for:</p>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/security/advisories/GHSA-8gvc-j273-4wm5">Browser
mode serves arbitrary files | CVE-2025-24963</a></li>
<li><a
href="https://github.com/vitest-dev/vitest/security/advisories/GHSA-9crc-q9x8-hgqq">Remote
Code Execution when accessing a malicious website while Vitest API
server is listening | CVE-2025-24964</a></li>
</ul>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>backport <a
href="https://redirect.github.com/vitest-dev/vitest/issues/7317">vitest-dev/vitest#7317</a>
to v2 - by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/pull/7318">vitest-dev/vitest#7318</a></li>
<li>(backport <a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7340">#7340</a>
to v2) restrict served files from <code>/__screenshot-error</code> - by
<a href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/pull/7343">vitest-dev/vitest#7343</a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.8...v2.1.9">View
changes on GitHub</a></h5>
<h2>v2.1.8</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>Support Node 21  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> <a
href="https://github.com/vitest-dev/vitest/commit/92f7a2ad"><!-- raw
HTML omitted -->(92f7a)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.7...v2.1.8">View
changes on GitHub</a></h5>
<h2>v2.1.7</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>Revert support for Vite 6  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> <a
href="https://github.com/vitest-dev/vitest/commit/fbe5c39d"><!-- raw
HTML omitted -->(fbe5c)<!-- raw HTML omitted --></a>
<ul>
<li>This introduced some breaking changes (<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6992">vitest-dev/vitest#6992</a>).
We will enable support for it later. In the meantime, you can still use
<code>pnpm.overrides</code> or yarn resolutions to override the
<code>vite</code> version in the <code>vitest</code> package - the APIs
are compatible.</li>
</ul>
</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.6...v2.1.7">View
changes on GitHub</a></h5>
<h2>v2.1.6</h2>
<h2>🚀 Features</h2>
<ul>
<li>Support Vite 6</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.5...v2.1.6">View
changes on GitHub</a></h5>
<h2>v2.1.5</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><code>dangerouslyIgnoreUnhandledErrors</code> without base reporter
 -  by <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6808">vitest-dev/vitest#6808</a>
<a href="https://github.com/vitest-dev/vitest/commit/0bf0ab00"><!-- raw
HTML omitted -->(0bf0a)<!-- raw HTML omitted --></a></li>
<li>Capture <code>unhandledRejection</code> even when base reporter is
not used  -  by <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6812">vitest-dev/vitest#6812</a>
<a href="https://github.com/vitest-dev/vitest/commit/8878b04d"><!-- raw
HTML omitted -->(8878b)<!-- raw HTML omitted --></a></li>
<li>Don't change the working directory when loading workspace projects
 -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6811">vitest-dev/vitest#6811</a>
<a href="https://github.com/vitest-dev/vitest/commit/f0aeaca8"><!-- raw
HTML omitted -->(f0aea)<!-- raw HTML omitted --></a></li>
<li>Remove <code>sequence.concurrent</code> from the
<code>RuntimeConfig</code> type  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6880">vitest-dev/vitest#6880</a>
<a href="https://github.com/vitest-dev/vitest/commit/6af73d93"><!-- raw
HTML omitted -->(6af73)<!-- raw HTML omitted --></a></li>
<li>Stop the runner before restarting, restart on workspace config
change  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6859">vitest-dev/vitest#6859</a>
<a href="https://github.com/vitest-dev/vitest/commit/b01df47d"><!-- raw
HTML omitted -->(b01df)<!-- raw HTML omitted --></a></li>
<li>Don't rerun on Esc or Ctrl-C during watch filter  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6895">vitest-dev/vitest#6895</a>
<a href="https://github.com/vitest-dev/vitest/commit/98f76ea7"><!-- raw
HTML omitted -->(98f76)<!-- raw HTML omitted --></a></li>
<li>Print ssrTransform error  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6885">vitest-dev/vitest#6885</a>
<a href="https://github.com/vitest-dev/vitest/commit/4c96cce7"><!-- raw
HTML omitted -->(4c96c)<!-- raw HTML omitted --></a></li>
<li>Throw an error and a warning if <code>.poll</code>,
<code>.element</code>, <code>.rejects</code>/<code>.resolves</code>, and
<code>locator.*</code> weren't awaited  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6877">vitest-dev/vitest#6877</a>
<a href="https://github.com/vitest-dev/vitest/commit/93b67c24"><!-- raw
HTML omitted -->(93b67)<!-- raw HTML omitted --></a></li>
<li><strong>browser</strong>:
<ul>
<li>Don't process the default css styles  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6861">vitest-dev/vitest#6861</a>
<a href="https://github.com/vitest-dev/vitest/commit/0d67f04b"><!-- raw
HTML omitted -->(0d67f)<!-- raw HTML omitted --></a></li>
<li>Support non US key input  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6873">vitest-dev/vitest#6873</a>
<a href="https://github.com/vitest-dev/vitest/commit/5969d8da"><!-- raw
HTML omitted -->(5969d)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/commit/c9e59a089d94642eea29a43f2ee1986a5afb99c6"><code>c9e59a0</code></a>
chore: release v2.1.9</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e0fe1d81e2d4bcddb1c6ca3c5c3970d8ba697383"><code>e0fe1d8</code></a>
fix: backport <a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7317">#7317</a>
to v2 (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7318">#7318</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/d69cc75698dd6dbeaed5c237ebb46ccd41bfb438"><code>d69cc75</code></a>
bump: 2.1.8</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/92f7a2ad18453343bfef1333af4b4c8191f72ec4"><code>92f7a2a</code></a>
fix: support Node 21</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/81ed45b3a46759ac5b8aaa3a5fad80767316c4ae"><code>81ed45b</code></a>
chore: release v2.1.7</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/fbe5c39d8891abcd91dc6b03720ee2b6c7678197"><code>fbe5c39</code></a>
fix: revert support for Vite 6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/b936702debce5a9deca637b25950afa485ad3639"><code>b936702</code></a>
bump: 2.1.6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/32f23b98b4b1a3708360debc03b6719f5226db87"><code>32f23b9</code></a>
chore: release v2.1.5</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/417bdb423d7a33d9c8be5b2d0d7027a2c38ded43"><code>417bdb4</code></a>
fix(browser): init browsers eagerly when tests are running (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/6876">#6876</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/93b67c24b1e8297f230d54d953a5c537aa7b9f75"><code>93b67c2</code></a>
fix: throw an error and a warning if <code>.poll</code>,
<code>.element</code>, <code>.rejects</code>/`.resolv...</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v2.1.9/packages/vitest">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitest&package-manager=npm_and_yarn&previous-version=2.1.4&new-version=2.1.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/bucketco/bucket-javascript-sdk/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Ciobanu <alex+git@ciobanu.org>
…handling (#318)

- Enhanced flag resolution methods with more robust error handling
- Added support for more context attributes in context translator
- Improved type checking and resolution for different flag types
- Updated README with more detailed usage and resolution method
explanations
- Bumped node-sdk dependency to 1.6.0-alpha.3
Update node-sdk dependency to the latest alpha version in yarn.lock and package.json
matus-vacula and others added 27 commits February 26, 2025 10:47
#308)

- standardize on `features` for passing a feaure list
- take arguments from the old `features` options and put them in
  at the root options map.
…ly defined list (#315)

This removes the need to pass in a feature list to the SDK in order for
features to show up in the toolbar. Instead, we'll use the
`/features/evaluated` endpoint which returns all features.
…ontexts (#297)

- Updated README files to document new `avatar` attribute
- Added `avatar` to user and company context types in browser and node
SDKs
- Expanded documentation for special attributes in context objects
- Added type definitions for avatar in relevant type files
…andling (#319)

- Upgrade Bucket Browser SDK to 3.0.0-alpha.2
- Improve context translation with more robust type handling
- Enhance flag resolution methods with detailed error handling
- Add support for more complex object and string flag evaluations
- Update README with comprehensive documentation on flag resolution
methods
- Improve test coverage for various flag resolution scenarios
…efinitions

- Streamline BucketProps by removing redundant properties
- Improve type documentation for BucketProvider props
- Merge InitOptions with BucketProps for cleaner configuration
- Update client initialization to use spread configuration
…ck (#309)

Remove legacy `featureId` option when using the `requestFeedback` and
`feedback` methods

The actual feedback payload can still contain the featureId because
bucket's prompting message do not include the feature key.
If you use `useFeature` or any of the other hooks that rely on the
BucketProvider without actually installing the Provider we should
complain loudly. I went for throwing an error when the provider is
missing because it's a serious mistake and should show up loudly as part
of the development workflow:

<img width="987" alt="Screenshot 2025-02-13 at 14 34 14"
src="https://github.com/user-attachments/assets/a75de6ef-2793-44be-848d-ec9a3fe13e97"
/>
Feature list is pulled from front.bucket.co now so this manual list is
superfluous.
Refactor type handling for useFeature to better support different
feature configurations and improve type safety
Event listeners allow capturing different events that happen in the Browser SDK.

They are useful for a number of things like building client side
integrations to analytics or error-logging systems.
… huddle feature example (#331)

Update example to demonstrate fallback features with the Bucket
OpenFeature provider, including:
- Add fallback configuration for the huddle feature
- Enhance HuddleFeature component to display provider and join URL
- Update browser SDK dependency to 3.0.0-alpha.4
Update variable names in HuddleFeature component to enhance readability:
- Rename 'provider' to 'huddleMeetingProvider'
- Simplify useObjectFlagDetails configuration
https://github.com/user-attachments/assets/9d45f398-933e-4b05-9e7f-5bda3f5599f8

https://github.com/user-attachments/assets/b8e1b30b-5384-42bc-9ad7-7a380d48375b

- added stagger animation for feature rows
- toolbar button and popover is now semi-transparent background with
blurred glass effect
- tweaked borders to be inset shadows instead
- made toolbar button round
- fixed single pixel resizing when showing Reset
- Simplified the getting started instructions
- Cleaned up outdates "features update" instructions. There's "Event
listeners" instead.
- Update docs to reflect that `featureOptions` are passed at the root
level now
If you are still using the tracking-sdk please consider switching to one
of the maintained SDKs:

### React SDK

Client side React SDK

[Read the docs](packages/react-sdk/README.md)

### Browser SDK

Browser SDK for use in non-React web applications

[Read the docs](packages/browser-sdk/README.md) 

### Node.js SDK

Node.js SDK for use on the server side.

[Read the docs](packages/node-sdk/README.md)

## OpenFeature Browser Provider

Use Bucket with OpenFeature in the browser through the Bucket
OpenFeature Browser Provider

[Read the docs](packages/openfeature-browser-provider/README.md)

## OpenFeature Node.js Provider

Use the Bucket with OpenFeature on the server in Node.js through the
Bucket OpenFeature Node.js Provider

[Read the docs](packages/openfeature-node-provider/README.md)
Setting a port will make playwright wait until the server is listening
We'll be moving exposing feature overrides through what is returned from
the `getFeature()` call rather than exposing it directly on the client.
To use ESM modules properly in the CLI package ESLint needed an upgrade.
This also uncovered a handful of omissions in the code. I have divided
up the commits to help facilitate review:

1. The first commit is pure style changes due to the React plugin
e42cce5.
2. The second commit has the bulk of the configuration and some
important fixes
9c05eb5.
3. The third commit has some business logic changes due to the incorrect
circular reference
0f9df07.
4. The fourth commit is to handle the preact libraries
5af8eb7

The second and third commits are the important to review and I would
love help testing the feedback modal to make sure no infinite loops have
crept in as is so common with `useEffect` and `function` dependencies.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Matus Vacula <matus@bucket.co>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Ciobanu <alex+git@ciobanu.org>
Co-authored-by: Rasmus Makwarth <makwarth@gmail.com>
Co-authored-by: Ron Cohen <ron@bucket.co>
Release new alpha releases of browser-sdk, react-sdk and node-sdk.
@Swiftwork
Copy link
Contributor

Superseded by #345 due to messed up commit history in main.

@Swiftwork Swiftwork closed this Feb 26, 2025
@Swiftwork Swiftwork deleted the feat/cli branch May 20, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants