1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend
renovate[bot] c69e5d03af
chore(deps): update react-router monorepo to v6.13.0 (#4066)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-router](https://togithub.com/remix-run/react-router) |
[`6.11.2` ->
`6.13.0`](https://renovatebot.com/diffs/npm/react-router/6.11.2/6.13.0)
|
[![age](https://badges.renovateapi.com/packages/npm/react-router/6.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/react-router/6.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/react-router/6.13.0/compatibility-slim/6.11.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/react-router/6.13.0/confidence-slim/6.11.2)](https://docs.renovatebot.com/merge-confidence/)
|
| [react-router-dom](https://togithub.com/remix-run/react-router) |
[`6.11.2` ->
`6.13.0`](https://renovatebot.com/diffs/npm/react-router-dom/6.11.2/6.13.0)
|
[![age](https://badges.renovateapi.com/packages/npm/react-router-dom/6.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/react-router-dom/6.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/react-router-dom/6.13.0/compatibility-slim/6.11.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/react-router-dom/6.13.0/confidence-slim/6.11.2)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>remix-run/react-router (react-router)</summary>

###
[`v6.13.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#&#8203;6130)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router@6.12.1...react-router@6.13.0)

##### Minor Changes

- Move
[`React.startTransition`](https://react.dev/reference/react/startTransition)
usage behind a [future
flag](https://reactrouter.com/en/main/guides/api-development-strategy)
to avoid issues with existing incompatible `Suspense` usages. We
recommend folks adopting this flag to be better compatible with React
concurrent mode, but if you run into issues you can continue without the
use of `startTransition` until v7. Issues usually boils down to creating
net-new promises during the render cycle, so if you run into issues you
should either lift your promise creation out of the render cycle or put
it behind a `useMemo`.
([#&#8203;10596](https://togithub.com/remix-run/react-router/pull/10596))

    Existing behavior will no longer include `React.startTransition`:

    ```jsx
    <BrowserRouter>
      <Routes>{/*...*/}</Routes>
    </BrowserRouter>

    <RouterProvider router={router} />
    ```

If you wish to enable `React.startTransition`, pass the future flag to
your component:

    ```jsx
    <BrowserRouter future={{ v7_startTransition: true }}>
      <Routes>{/*...*/}</Routes>
    </BrowserRouter>

<RouterProvider router={router} future={{ v7_startTransition: true }}/>
    ```

##### Patch Changes

- Work around webpack/terser `React.startTransition` minification bug in
production mode
([#&#8203;10588](https://togithub.com/remix-run/react-router/pull/10588))

###
[`v6.12.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#&#8203;6121)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router@6.12.0...react-router@6.12.1)

> **Warning**
> Please use version `6.13.0` or later instead of `6.12.1`. This version
suffers from a `webpack`/`terser` minification issue resulting in
invalid minified code in your resulting production bundles which can
cause issues in your application. See
[#&#8203;10579](https://togithub.com/remix-run/react-router/issues/10579)
for more details.

##### Patch Changes

- Adjust feature detection of `React.startTransition` to fix webpack +
react 17 compilation error
([#&#8203;10569](https://togithub.com/remix-run/react-router/pull/10569))

###
[`v6.12.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#&#8203;6120)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router@6.11.2...react-router@6.12.0)

##### Minor Changes

- Wrap internal router state updates with `React.startTransition` if it
exists
([#&#8203;10438](https://togithub.com/remix-run/react-router/pull/10438))

##### Patch Changes

-   Updated dependencies:
    -   `@remix-run/router@1.6.3`

</details>

<details>
<summary>remix-run/react-router (react-router-dom)</summary>

###
[`v6.13.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#&#8203;6130)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.12.1...react-router-dom@6.13.0)

##### Minor Changes

- Move
[`React.startTransition`](https://react.dev/reference/react/startTransition)
usage behind a [future
flag](https://reactrouter.com/en/main/guides/api-development-strategy)
to avoid issues with existing incompatible `Suspense` usages. We
recommend folks adopting this flag to be better compatible with React
concurrent mode, but if you run into issues you can continue without the
use of `startTransition` until v7. Issues usually boils down to creating
net-new promises during the render cycle, so if you run into issues you
should either lift your promise creation out of the render cycle or put
it behind a `useMemo`.
([#&#8203;10596](https://togithub.com/remix-run/react-router/pull/10596))

    Existing behavior will no longer include `React.startTransition`:

    ```jsx
    <BrowserRouter>
      <Routes>{/*...*/}</Routes>
    </BrowserRouter>

    <RouterProvider router={router} />
    ```

If you wish to enable `React.startTransition`, pass the future flag to
your component:

    ```jsx
    <BrowserRouter future={{ v7_startTransition: true }}>
      <Routes>{/*...*/}</Routes>
    </BrowserRouter>

<RouterProvider router={router} future={{ v7_startTransition: true }}/>
    ```

##### Patch Changes

- Work around webpack/terser `React.startTransition` minification bug in
production mode
([#&#8203;10588](https://togithub.com/remix-run/react-router/pull/10588))
-   Updated dependencies:
    -   `react-router@6.13.0`

###
[`v6.12.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#&#8203;6121)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.12.0...react-router-dom@6.12.1)

> **Warning**
> Please use version `6.13.0` or later instead of `6.12.1`. This version
suffers from a `webpack`/`terser` minification issue resulting in
invalid minified code in your resulting production bundles which can
cause issues in your application. See
[#&#8203;10579](https://togithub.com/remix-run/react-router/issues/10579)
for more details.

##### Patch Changes

- Adjust feature detection of `React.startTransition` to fix webpack +
react 17 compilation error
([#&#8203;10569](https://togithub.com/remix-run/react-router/pull/10569))
-   Updated dependencies:
    -   `react-router@6.12.1`

###
[`v6.12.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#&#8203;6120)

[Compare
Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.11.2...react-router-dom@6.12.0)

##### Minor Changes

- Wrap internal router state updates with `React.startTransition` if it
exists
([#&#8203;10438](https://togithub.com/remix-run/react-router/pull/10438))

##### Patch Changes

- Re-throw `DOMException` (`DataCloneError`) when attempting to perform
a `PUSH` navigation with non-serializable state.
([#&#8203;10427](https://togithub.com/remix-run/react-router/pull/10427))
-   Updated dependencies:
    -   `@remix-run/router@1.6.3`
    -   `react-router@6.12.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 these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 21:44:19 +00:00
..
cypress
public
scripts
src fix: allow roles to be selected when adding user to project (#4102) 2023-06-27 22:18:30 +02:00
.editorconfig
.gitignore
.nvmrc chore: update to node 18 (#3527) 2023-04-18 10:35:32 +02:00
.prettierignore Orval generator POC (#2724) 2023-01-05 11:57:53 +01:00
.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 react-router monorepo to v6.13.0 (#4066) 2023-06-27 21:44:19 +00:00
README.md
tsconfig.json
tsconfig.node.json
vercel.json
vite.config.ts
yarn.lock chore(deps): update react-router monorepo to v6.13.0 (#4066) 2023-06-27 21:44:19 +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