1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/frontend
renovate[bot] 89ee341888
chore(deps): update react-router monorepo to v6.16.0 (#4893)
[![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.15.0` ->
`6.16.0`](https://renovatebot.com/diffs/npm/react-router/6.15.0/6.16.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-router/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-router/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-router/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-router/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [react-router-dom](https://togithub.com/remix-run/react-router) |
[`6.15.0` ->
`6.16.0`](https://renovatebot.com/diffs/npm/react-router-dom/6.15.0/6.16.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-router-dom/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-router-dom/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-router-dom/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-router-dom/6.15.0/6.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v6.16.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6160)

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

##### Minor Changes

- In order to move towards stricter TypeScript support in the future,
we're aiming to replace current usages of `any` with `unknown` on
exposed typings for user-provided data. To do this in Remix v2 without
introducing breaking changes in React Router v6, we have added generics
to a number of shared types. These continue to default to `any` in React
Router and are overridden with `unknown` in Remix. In React Router v7 we
plan to move these to `unknown` as a breaking change.
([#&#8203;10843](https://togithub.com/remix-run/react-router/pull/10843))
    -   `Location` now accepts a generic for the `location.state` value
-
`ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction`
now accept a generic for the `context` parameter (only used in SSR
usages via `createStaticHandler`)
- The return type of `useMatches` (now exported as `UIMatch`) accepts
generics for `match.data` and `match.handle` - both of which were
already set to `unknown`
- Move the `@private` class export `ErrorResponse` to an
`UNSAFE_ErrorResponseImpl` export since it is an implementation detail
and there should be no construction of `ErrorResponse` instances in
userland. This frees us up to export a `type ErrorResponse` which
correlates to an instance of the class via `InstanceType`. Userland code
should only ever be using `ErrorResponse` as a type and should be
type-narrowing via `isRouteErrorResponse`.
([#&#8203;10811](https://togithub.com/remix-run/react-router/pull/10811))
- Export `ShouldRevalidateFunctionArgs` interface
([#&#8203;10797](https://togithub.com/remix-run/react-router/pull/10797))
- Removed private/internal APIs only required for the Remix v1 backwards
compatibility layer and no longer needed in Remix v2
(`_isFetchActionRedirect`, `_hasFetcherDoneAnything`)
([#&#8203;10715](https://togithub.com/remix-run/react-router/pull/10715))

##### Patch Changes

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

</details>

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

###
[`v6.16.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#6160)

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

##### Minor Changes

-   Updated dependencies:
    -   `@remix-run/router@1.9.0`
    -   `react-router@6.16.0`

##### Patch Changes

- Properly encode rendered URIs in server rendering to avoid hydration
errors
([#&#8203;10769](https://togithub.com/remix-run/react-router/pull/10769))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-01 04:39:54 +00:00
..
cypress test: makes overview spec less flaky by doing 2 step search (#4862) 2023-09-29 08:18:51 +01:00
public
scripts
src feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
.editorconfig
.gitignore Test npm publish (#3554) 2023-04-18 15:44:19 +02:00
.nvmrc chore: update to node 18 (#3527) 2023-04-18 10:35:32 +02:00
.prettierignore
.prettierrc
cypress.config.ts test: add interactive demo guide e2e test (#3656) 2023-05-08 09:16:18 +01:00
cypress.d.ts chore: refactor Cypress tests (#3445) 2023-04-04 11:46:28 +03:00
index.html
index.js
orval.config.js
package.json chore(deps): update react-router monorepo to v6.16.0 (#4893) 2023-10-01 04:39:54 +00:00
README.md feat: application usage frontend (#4561) 2023-08-24 13:13:02 +03:00
tsconfig.json chore: refactor Cypress tests (#3445) 2023-04-04 11:46:28 +03:00
tsconfig.node.json
vercel.json
vite.config.ts fix: set css preload to false (#4524) 2023-08-17 15:04:41 +02:00
yarn.lock chore(deps): update react-router monorepo to v6.16.0 (#4893) 2023-10-01 04:39:54 +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:

For now we only use generated types (src/openapi/models). We will use methods (src/openapi/apis) for new features soon.

yarn gen:api
rm -rf src/openapi/apis

clean up src/openapi/index.ts imports, only keep first line export * from './models';

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