1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/frontend
renovate[bot] c99b6b3abc
chore(deps): update dependency swr to v2.2.0 (#4311)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [swr](https://swr.vercel.app)
([source](https://togithub.com/vercel/swr)) | [`2.1.5` ->
`2.2.0`](https://renovatebot.com/diffs/npm/swr/2.1.5/2.2.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/swr/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/swr/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/swr/2.1.5/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/swr/2.1.5/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vercel/swr (swr)</summary>

### [`v2.2.0`](https://togithub.com/vercel/swr/releases/tag/v2.2.0)

[Compare
Source](https://togithub.com/vercel/swr/compare/v2.1.5...v2.2.0)

#### What's Changed

- feat: use `React.use` API by
[@&#8203;himself65](https://togithub.com/himself65) in
[https://github.com/vercel/swr/pull/2596](https://togithub.com/vercel/swr/pull/2596)
- feat: improve preload and suspense integration by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2658](https://togithub.com/vercel/swr/pull/2658)
- feat: Add react-server bundle for core and infinite by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2664](https://togithub.com/vercel/swr/pull/2664)
- fix: remove `startTransition` so mutation hook could update
immediately by [@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2654](https://togithub.com/vercel/swr/pull/2654)
- fix: keepPreviousData should also work in suspense by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2649](https://togithub.com/vercel/swr/pull/2649)
- fix: do unsubscribe synchronously by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2648](https://togithub.com/vercel/swr/pull/2648)
- fix: reset the error when mutate succeeded by
[@&#8203;koba04](https://togithub.com/koba04) in
[https://github.com/vercel/swr/pull/2592](https://togithub.com/vercel/swr/pull/2592)
- fix: Fix mutation types order by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2669](https://togithub.com/vercel/swr/pull/2669)
- fix: Conditional Typing in useSWRMutation to Allow Optional ExtraArg
Without Explicitly Passing Undefined by
[@&#8203;saengmotmi](https://togithub.com/saengmotmi) in
[https://github.com/vercel/swr/pull/2666](https://togithub.com/vercel/swr/pull/2666)
- fix: Pass displayed data as second parameter of functional optimistic
data by [@&#8203;francescogior](https://togithub.com/francescogior) in
[https://github.com/vercel/swr/pull/2668](https://togithub.com/vercel/swr/pull/2668)
- fix: Adjust rsc exports by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2673](https://togithub.com/vercel/swr/pull/2673)
- fix: Revert "fix: remove startTransition so mutation hook could update
immediately
([#&#8203;2654](https://togithub.com/vercel/swr/issues/2654))" by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2681](https://togithub.com/vercel/swr/pull/2681)
- types: fix immutable export paths by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2670](https://togithub.com/vercel/swr/pull/2670)
- types: improve `useSWRMutation` type. by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2604](https://togithub.com/vercel/swr/pull/2604)
- chore: upgrade to pnpm8 by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2605](https://togithub.com/vercel/swr/pull/2605)
- ci: drop unused inputs and step by
[@&#8203;nicolewhite](https://togithub.com/nicolewhite) in
[https://github.com/vercel/swr/pull/2624](https://togithub.com/vercel/swr/pull/2624)
- ci: update github token by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2636](https://togithub.com/vercel/swr/pull/2636)
- ci: use gh token credentials for cloning repo by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2637](https://togithub.com/vercel/swr/pull/2637)
- ci: use script to bump semver version by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2651](https://togithub.com/vercel/swr/pull/2651)
- ci: Add daily test job for react canary by
[@&#8203;suyanhanx](https://togithub.com/suyanhanx) in
[https://github.com/vercel/swr/pull/2601](https://togithub.com/vercel/swr/pull/2601)
- build: fix equal signs by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2628](https://togithub.com/vercel/swr/pull/2628)
- build: fix bad runner by [@&#8203;huozhi](https://togithub.com/huozhi)
in
[https://github.com/vercel/swr/pull/2629](https://togithub.com/vercel/swr/pull/2629)
- build: use prepatch/minor/major command for prerelease by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2627](https://togithub.com/vercel/swr/pull/2627)
- build: fix release semver by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2630](https://togithub.com/vercel/swr/pull/2630)
- build: add trigger release job by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2615](https://togithub.com/vercel/swr/pull/2615)
- build: determin release tag by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2616](https://togithub.com/vercel/swr/pull/2616)
- build: fix conflict types for index and index.react-server by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[https://github.com/vercel/swr/pull/2677](https://togithub.com/vercel/swr/pull/2677)
- test: fix flaky suspense test in canary by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2655](https://togithub.com/vercel/swr/pull/2655)
- test: improve preload test by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2657](https://togithub.com/vercel/swr/pull/2657)
- test: add e2e test for react-server entry by
[@&#8203;promer94](https://togithub.com/promer94) in
[https://github.com/vercel/swr/pull/2671](https://togithub.com/vercel/swr/pull/2671)
- test: add a new test setting to run tests with build files by
[@&#8203;koba04](https://togithub.com/koba04) in
[https://github.com/vercel/swr/pull/2583](https://togithub.com/vercel/swr/pull/2583)

#### New Contributors

- [@&#8203;suyanhanx](https://togithub.com/suyanhanx) made their first
contribution in
[https://github.com/vercel/swr/pull/2601](https://togithub.com/vercel/swr/pull/2601)
- [@&#8203;nicolewhite](https://togithub.com/nicolewhite) made their
first contribution in
[https://github.com/vercel/swr/pull/2624](https://togithub.com/vercel/swr/pull/2624)
- [@&#8203;saengmotmi](https://togithub.com/saengmotmi) made their first
contribution in
[https://github.com/vercel/swr/pull/2666](https://togithub.com/vercel/swr/pull/2666)
- [@&#8203;francescogior](https://togithub.com/francescogior) made their
first contribution in
[https://github.com/vercel/swr/pull/2668](https://togithub.com/vercel/swr/pull/2668)

**Full Changelog**:
https://github.com/vercel/swr/compare/v2.1.5...v2.2.0

</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://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-21 09:45:34 +00:00
..
cypress chore: remove strategyImprovements flag (#4043) 2023-06-28 11:38:21 +03:00
public
scripts
src feat: Feature toggle type - edit form (#4269) 2023-07-20 13:00:47 +02:00
.editorconfig
.gitignore
.nvmrc
.prettierignore
.prettierrc
cypress.config.ts test: add interactive demo guide e2e test (#3656) 2023-05-08 09:16:18 +01:00
cypress.d.ts
index.html
index.js
orval.config.js
package.json chore(deps): update dependency swr to v2.2.0 (#4311) 2023-07-21 09:45:34 +00:00
README.md chore: simplify package scripts (#3736) 2023-05-12 11:23:22 +01:00
tsconfig.json
tsconfig.node.json
vercel.json
vite.config.ts
yarn.lock chore(deps): update dependency swr to v2.2.0 (#4311) 2023-07-21 09:45:34 +00:00

frontend

This directory contains the Unleash Admin UI frontend app.

Run with a local instance of the unleash-api

Refer to the Contributing to Unleash guide for instructions. The frontend dev server runs (in port 3000) simultaneously with the backend dev server (in port 4242):

yarn install
yarn dev

Run with a sandbox instance of the Unleash API

Alternatively, instead of running unleash-api on localhost, you can use a remote instance:

cd ./frontend
yarn install
yarn run start:sandbox

Running end-to-end tests

We have a set of Cypress tests that run on the build before a PR can be merged so it's important that you check these yourself before submitting a PR. On the server the tests will run against the deployed Heroku app so this is what you probably want to test against:

yarn run start:sandbox

In a different shell, you can run the tests themselves:

yarn run e2e:heroku

If you need to test against patches against a local server instance, you'll need to run that, and then run the end to end tests using:

yarn run e2e

You may also need to test that a feature works against the enterprise version of unleash. Assuming the Heroku instance is still running, this can be done by:

yarn run start:enterprise
yarn run e2e

Generating the OpenAPI client

The frontend uses an OpenAPI client generated from the backend's OpenAPI spec. Whenever there are changes to the backend API, the client should be regenerated:

./scripts/generate-openapi.sh

This script assumes that you have a running instance of the enterprise backend at http://localhost:4242. The new OpenAPI client will be generated from the runtime schema of this instance. The target URL can be changed by setting the UNLEASH_OPENAPI_URL env var.

Analyzing bundle size

npx vite-bundle-visualizer in the root of the frontend directory