1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
Unleash is the open source feature toggle service.
Go to file
renovate[bot] 0bb5a3d076
chore(deps): update dependency vitest to v0.25.1 (#2384)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.1`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293)
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294)

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290)
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292)
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####     Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072)

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210)
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257)
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179)
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107)

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266)
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267)
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248)
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064)
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281)
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

###
[`v0.24.5`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.5)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

#####    🚀 Features

- **vite-node**: Trigger beforeFullReload / beforePrune / invalidate
hook  -  by [@&#8203;ycmjason](https://togithub.com/ycmjason) in
[https://github.com/vitest-dev/vitest/issues/2079](https://togithub.com/vitest-dev/vitest/issues/2079)

#####    🐞 Bug Fixes

- Respect folders with dot at the start, when mocking  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2244](https://togithub.com/vitest-dev/vitest/issues/2244)
- Prevent using mocks in rpc  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2254](https://togithub.com/vitest-dev/vitest/issues/2254)
- Show actual unhandled errors, serialize DOMErrors  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2253](https://togithub.com/vitest-dev/vitest/issues/2253)
- Load deps reporter  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2249](https://togithub.com/vitest-dev/vitest/issues/2249)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2186](https://togithub.com/vitest-dev/vitest/issues/2186)

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[https://github.com/vitest-dev/vitest/issues/2151](https://togithub.com/vitest-dev/vitest/issues/2151)
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[https://github.com/vitest-dev/vitest/issues/2164](https://togithub.com/vitest-dev/vitest/issues/2164)
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2188](https://togithub.com/vitest-dev/vitest/issues/2188)
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/1919](https://togithub.com/vitest-dev/vitest/issues/1919)
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2228](https://togithub.com/vitest-dev/vitest/issues/2228)
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2226](https://togithub.com/vitest-dev/vitest/issues/2226)
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[https://github.com/vitest-dev/vitest/issues/1868](https://togithub.com/vitest-dev/vitest/issues/1868)
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[https://github.com/vitest-dev/vitest/issues/2201](https://togithub.com/vitest-dev/vitest/issues/2201)
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2180](https://togithub.com/vitest-dev/vitest/issues/2180)
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2232](https://togithub.com/vitest-dev/vitest/issues/2232)
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2181](https://togithub.com/vitest-dev/vitest/issues/2181)
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2184](https://togithub.com/vitest-dev/vitest/issues/2184)
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[https://github.com/vitest-dev/vitest/issues/2163](https://togithub.com/vitest-dev/vitest/issues/2163)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-10 15:58:27 +01:00
.do
.github chore(deps): update lycheeverse/lychee-action action to v1.5.4 (#2367) 2022-11-09 23:59:14 +01:00
.husky
coverage
docker fix: update resolutions 2022-11-03 15:38:51 +01:00
docs/api/oas docs: Remove/update references to Heroku (#2099) 2022-10-19 12:02:00 +00:00
examples
frontend chore(deps): update dependency vitest to v0.25.1 (#2384) 2022-11-10 15:58:27 +01:00
perf
scripts chore(deps): update dpage/pgadmin4 docker tag to v6.15 (#2225) 2022-10-22 07:54:59 +00:00
src Fix async issue (#2387) 2022-11-10 14:27:09 +02:00
website chore(deps): bump loader-utils from 1.4.0 to 1.4.1 in /website (#2353) 2022-11-10 14:43:02 +01:00
.dockerignore
.editorconfig
.eslintignore
.eslintrc
.gitignore docs: adds documentation for personal api tokens (#2164) 2022-10-13 11:02:04 +02:00
.lycheeignore docs: remove instagram url from link checker (#2257) 2022-10-26 09:43:23 +02:00
.node-version chore(deps): update node.js to v14.20.1 (#2158) 2022-10-10 02:18:14 +00:00
.nvmrc
.prettierignore
app.json fix: tell heroku to not build in production mode 2022-10-18 21:35:50 +02:00
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile Fix docker build (#2326) 2022-11-03 15:02:20 +01:00
LICENSE
package.json 4.18.0-beta.4 2022-11-10 14:32:16 +02:00
README.md
renovate.json
tsconfig.json
yarn.lock chore(deps): update dependency eslint to v8.27.0 (#2374) 2022-11-10 08:21:34 +01:00

🚀 Unleash 4.16 brings powerful Constraints feature to OSS users. Read more →

The Unleash website

Build and Tests Coverage Status Docker Pulls Apache-2.0 license Join Unleash on Slack

Open Live Demo →

About Unleash

Unleash is an open source feature management solution. It improves the workflow of your development team and leads to quicker software delivery. Unleash increases efficiency and gives teams full control of how and when they enable new functionality for end users. Unleash lets teams ship code to production in smaller releases whenever they want.

Feature toggles make it easy to test how your code works with real production data without the fear that you'll accidentally break your users' experience. It also helps your team work on multiple features in parallel without each maintaining an separate feature branch.

Unleash is the largest open source solution for feature flagging on GitHub. There's 12 official client and server SDKs and 10+ community SDKs available; you can even make your own if you want to. You can use Unleash with any language and any framework.


Get started in 2 steps

1. Start Unleash

With git and docker installed, it's easy to get started:

Run this script:

git clone git@github.com:Unleash/unleash-docker.git
cd unleash-docker
docker compose up -d

Then point your browser to localhost:4242 and log in using:

  • username: admin
  • password: unleash4all

If you'd rather run the source code in this repo directly via Node.js, see the step-by-step instructions to get up and running in the contributing guide.

2. Connect your SDK

Find your preferred SDK in our list of official SDKs and import it into your project. Follow the setup guides for your specific SDK.

If you use the docker compose file from the previous step, here's the configuration details you'll need to get going:

  • For front-end SDKs, use:
    • URL: http://localhost:3000
    • clientKey: proxy-client-key
  • For server-side SDKs, use:
    • Unleash API URL: http://localhost:4242/api/
    • API token: default:development.unleash-insecure-api-token

If you use a different setup, your configuration details will most likely also be different.

Check a feature toggle

Checking the state of a feature toggle in your code is easy! The syntax will vary depending on your language, but all you need is a simple function call to check whether a toggle is available. Here's how it might look in Java:

if (unleash.isEnabled("AwesomeFeature")) {
  // do new, flashy thing
} else {
  // do old, boring stuff
}

Run Unleash on a service?

If you don't want to run Unleash locally, we also provide easy deployment setups for Heroku and Digital Ocean:

Deploy to Heroku Deploy to DigitalOcean

Configure and run Unleash anywhere

The above sections show you how to get up and running quickly and easily. When you're ready to start configuring and customizing Unleash for your own environment, check out the documentation for getting started with self-managed deployments, Unleash configuration options, or running Unleash locally via docker.


Online demo

Try out the Unleash online demo.

The Unleash online demo


Community and help — sharing is caring

We know that learning a new tool can be hard and time-consuming. We have a growing community that loves to help out. Please don't hesitate to reach out for help.

Join Unleash on Slack

💬 Join Unleash on Slack if you want ask open questions about Unleash, feature toggling or discuss these topics in general.

💻 Create a GitHub issue if you have found a bug or have ideas on how to improve Unleash.

📚 Visit the documentation for more in-depth descriptions, how-to guides, and more.


Contribute to Unleash

Building Unleash is a collaborative effort, and we owe a lot of gratitude to many smart and talented individuals. Building it together with community ensures that we build a product that solves real problems for real people. We'd love to have your help too: Please feel free to open issues or provide pull requests.

Check out the CONTRIBUTING.md file for contribution guidelines and the Unleash developer guide for tips on environment setup, running the tests, and running Unleash from source.

Contributors

The Unleash contributors


Features our users love

Flexibility and adaptability

Security and performance

  • Privacy by design (GDPR and Schrems II). End-user data never leaves your application.
  • Audit logs
  • Enforce OWASP's secure headers via the strict HTTPS-only mode
  • Flexible hosting options: host it on premise or in the cloud (any cloud)
  • Scale the Unleash Proxy independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance

Looking for more features?

If you're looking for one of the following features, please take a look at our Pro and Enterprise plans:


Architecture

Read more in the system overview section of the Unleash documentation.


Unleash SDKs

To connect your application to Unleash you'll need to use a client SDK for your programming language.

Official server-side SDKs:

Official front-end SDKs:

The front-end SDKs connects via the Unleash Proxy in order to ensure privacy, scalability and security.

Community SDKs:

If none of the official SDKs fit your need, there's also a number of community-developed SDKs where you might find an implementation for your preferred language (such as Elixir, Dart, Clojure, and more).


Users of Unleash

Unleash is trusted by thousands of companies all over the world.

Proud Open-Source users: (send us a message if you want to add your logo here)

The Unleash logo encircled by logos for Finn.no, nav (the Norwegian Labour and Welfare Administration), Budgets, Otovo, and Amedia. The encircling logos are all connected to the Unleash logo.


Migration guides

Unleash has evolved significantly over the past few years, and we know how hard it can be to keep software up to date. If you're using the current major version, upgrading shouldn't be an issue. If you're on a previous major version, check out the Unleash migration guide!


Want to know more about Unleash?

Videos and podcasts

Articles and more