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

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://togithub.com/vitejs/vite/tree/main/#readme)
([source](https://togithub.com/vitejs/vite)) | [`4.0.4` ->
`4.1.1`](https://renovatebot.com/diffs/npm/vite/4.0.4/4.1.1) |
[![age](https://badges.renovateapi.com/packages/npm/vite/4.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vite/4.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vite/4.1.1/compatibility-slim/4.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vite/4.1.1/confidence-slim/4.0.4)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitejs/vite</summary>

###
[`v4.1.1`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small411-2023-02-02-small)

[Compare
Source](c57c21cc36...v4.1.1)

- chore: 4.1.0 changelog cleanup
([#&#8203;11900](https://togithub.com/vitejs/vite/issues/11900))
([7747d32](https://togithub.com/vitejs/vite/commit/7747d32)), closes
[#&#8203;11900](https://togithub.com/vitejs/vite/issues/11900)
- fix: catch statSync error
([#&#8203;11907](https://togithub.com/vitejs/vite/issues/11907))
([f80b9a2](https://togithub.com/vitejs/vite/commit/f80b9a2)), closes
[#&#8203;11907](https://togithub.com/vitejs/vite/issues/11907)

###
[`v4.1.0`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#&#8203;410-2023-02-02)

[Compare
Source](https://togithub.com/vitejs/vite/compare/v4.0.4...c57c21cc36d953d36a518226cbc06fb92b48a784)

Vite 4.1 updates to the latest versions of Rollup and esbuild. Check out
the new [Rollup docs](https://rollupjs.org/), that are now powered by
VitePress making the navigation between Vite and Rollup docs easier for
users.

[Vite docs](https://vitejs.dev) got a theme update migrating to the
latest version of VitePress.

As part of [Vite 4](https://vitejs.dev/blog/announcing-vite4.html), the
Vue and React plugins have been extracted out of the monorepo. Although
their release cycle will no longer follow Vite releases moving forward,
Vite 4.1 is released in parallel with new versions of
[@&#8203;vitejs/plugin-react](https://togithub.com/vitejs/vite-plugin-react/releases/tag/plugin-react%403.1.0)
and
[@&#8203;vitejs/plugin-react-swc](https://togithub.com/vitejs/vite-plugin-react-swc/releases/tag/v3.1.0).
[@&#8203;vitejs/plugin-react](https://togithub.com/vitejs/plugin-react)
3.1.0 reworks the way HMR is handled fixing many edge cases and
[@&#8203;vitejs/plugin-react-swc](https://togithub.com/vitejs/plugin-react-swc)
3.1.0 adds support for SWC plugins.

There is also a new major for
[@&#8203;vitejs/plugin-legacy](https://togithub.com/vitejs/vite/blob/main/packages/plugin-legacy),
see [changelog for
v4.0.0](https://togithub.com/vitejs/vite/blob/main/packages/plugin-legacy/CHANGELOG.md#&#8203;400-2023-02-02).
This version contains breaking changes:

- Support browserslist and update default target
([#&#8203;11318](https://togithub.com/vitejs/vite/pull/11318)). See
[updated `targets`
default](https://togithub.com/vitejs/vite/tree/main/packages/plugin-legacy#targets).
- Bump modern target to support async generator
([#&#8203;11896](https://togithub.com/vitejs/vite/pull/11896)). Learn
more at [the browsers support
docs](https://togithub.com/vitejs/vite/tree/main/packages/plugin-legacy#browsers-that-supports-esm-but-does-not-support-widely-available-features).

##### Features

- feat: add experimental option to skip SSR transform
([#&#8203;11411](https://togithub.com/vitejs/vite/issues/11411))
([e781ef3](https://togithub.com/vitejs/vite/commit/e781ef3)), closes
[#&#8203;11411](https://togithub.com/vitejs/vite/issues/11411)
- feat: reproducible manifest
([#&#8203;11542](https://togithub.com/vitejs/vite/issues/11542))
([efc8979](https://togithub.com/vitejs/vite/commit/efc8979)), closes
[#&#8203;11542](https://togithub.com/vitejs/vite/issues/11542)
- feat: support BROWSER and BROWSER_ARGS in env file
([#&#8203;11513](https://togithub.com/vitejs/vite/issues/11513))
([8972868](https://togithub.com/vitejs/vite/commit/8972868)), closes
[#&#8203;11513](https://togithub.com/vitejs/vite/issues/11513)
- feat(cli): clear console by pressing c
([#&#8203;11493](https://togithub.com/vitejs/vite/issues/11493))
([#&#8203;11494](https://togithub.com/vitejs/vite/issues/11494))
([1ae018f](https://togithub.com/vitejs/vite/commit/1ae018f)), closes
[#&#8203;11493](https://togithub.com/vitejs/vite/issues/11493)
[#&#8203;11494](https://togithub.com/vitejs/vite/issues/11494)
- perf(build): disable rollup cache for builds
([#&#8203;11454](https://togithub.com/vitejs/vite/issues/11454))
([580ba7a](https://togithub.com/vitejs/vite/commit/580ba7a)), closes
[#&#8203;11454](https://togithub.com/vitejs/vite/issues/11454)
- perf(resolve): improve file existence check
([#&#8203;11436](https://togithub.com/vitejs/vite/issues/11436))
([4a12b89](https://togithub.com/vitejs/vite/commit/4a12b89)), closes
[#&#8203;11436](https://togithub.com/vitejs/vite/issues/11436)

##### Bug Fixes

- fix: await bundle closing
([#&#8203;11873](https://togithub.com/vitejs/vite/issues/11873))
([1e6768d](https://togithub.com/vitejs/vite/commit/1e6768d)), closes
[#&#8203;11873](https://togithub.com/vitejs/vite/issues/11873)
- fix: make viteMetadata property of RenderedChunk optional
([#&#8203;11768](https://togithub.com/vitejs/vite/issues/11768))
([128f09e](https://togithub.com/vitejs/vite/commit/128f09e)), closes
[#&#8203;11768](https://togithub.com/vitejs/vite/issues/11768)
- fix: replace import.meta.hot with undefined in the production
([#&#8203;11317](https://togithub.com/vitejs/vite/issues/11317))
([73afe6d](https://togithub.com/vitejs/vite/commit/73afe6d)), closes
[#&#8203;11317](https://togithub.com/vitejs/vite/issues/11317)
- fix: update CJS interop error message
([#&#8203;11842](https://togithub.com/vitejs/vite/issues/11842))
([356ddfe](https://togithub.com/vitejs/vite/commit/356ddfe)), closes
[#&#8203;11842](https://togithub.com/vitejs/vite/issues/11842)
- fix(client): serve client sources next to deployed scripts
([#&#8203;11865](https://togithub.com/vitejs/vite/issues/11865))
([63bd261](https://togithub.com/vitejs/vite/commit/63bd261)), closes
[#&#8203;11865](https://togithub.com/vitejs/vite/issues/11865)
- fix(deps): update all non-major dependencies
([#&#8203;11846](https://togithub.com/vitejs/vite/issues/11846))
([5d55083](https://togithub.com/vitejs/vite/commit/5d55083)), closes
[#&#8203;11846](https://togithub.com/vitejs/vite/issues/11846)
- fix(esbuild): avoid polluting global namespace while minify is false
([#&#8203;11882](https://togithub.com/vitejs/vite/issues/11882))
([c895379](https://togithub.com/vitejs/vite/commit/c895379)), closes
[#&#8203;11882](https://togithub.com/vitejs/vite/issues/11882)
- fix: deep resolve side effects when glob does not contain /
([#&#8203;11807](https://togithub.com/vitejs/vite/issues/11807))
([f3a0c3b](https://togithub.com/vitejs/vite/commit/f3a0c3b)), closes
[#&#8203;11807](https://togithub.com/vitejs/vite/issues/11807)
- fix: duplicated sourceMappingURL for worker bundles (fix
[#&#8203;11601](https://togithub.com/vitejs/vite/issues/11601))
([#&#8203;11602](https://togithub.com/vitejs/vite/issues/11602))
([5444781](https://togithub.com/vitejs/vite/commit/5444781)), closes
[#&#8203;11601](https://togithub.com/vitejs/vite/issues/11601)
[#&#8203;11602](https://togithub.com/vitejs/vite/issues/11602)
- fix: emit assets from SSR build
([#&#8203;11430](https://togithub.com/vitejs/vite/issues/11430))
([ffbdcdb](https://togithub.com/vitejs/vite/commit/ffbdcdb)), closes
[#&#8203;11430](https://togithub.com/vitejs/vite/issues/11430)
- fix: revert "load sourcemaps alongside modules
([#&#8203;11576](https://togithub.com/vitejs/vite/issues/11576))"
([#&#8203;11775](https://togithub.com/vitejs/vite/issues/11775))
([697dd00](https://togithub.com/vitejs/vite/commit/697dd00)), closes
[#&#8203;11576](https://togithub.com/vitejs/vite/issues/11576)
[#&#8203;11775](https://togithub.com/vitejs/vite/issues/11775)
- fix: scope tracking for shadowing variables in blocks
([#&#8203;11806](https://togithub.com/vitejs/vite/issues/11806))
([#&#8203;11811](https://togithub.com/vitejs/vite/issues/11811))
([568bdab](https://togithub.com/vitejs/vite/commit/568bdab)), closes
[#&#8203;11806](https://togithub.com/vitejs/vite/issues/11806)
[#&#8203;11811](https://togithub.com/vitejs/vite/issues/11811)
- fix(cli): exit 1 on ctrl+c
([#&#8203;11563](https://togithub.com/vitejs/vite/issues/11563))
([fb77411](https://togithub.com/vitejs/vite/commit/fb77411)), closes
[#&#8203;11563](https://togithub.com/vitejs/vite/issues/11563)
- fix(css): insert styles in the same position
([#&#8203;11763](https://togithub.com/vitejs/vite/issues/11763))
([d2f1381](https://togithub.com/vitejs/vite/commit/d2f1381)), closes
[#&#8203;11763](https://togithub.com/vitejs/vite/issues/11763)
- fix(esbuild): check server before reload tsconfig
([#&#8203;11747](https://togithub.com/vitejs/vite/issues/11747))
([c56b954](https://togithub.com/vitejs/vite/commit/c56b954)), closes
[#&#8203;11747](https://togithub.com/vitejs/vite/issues/11747)
- fix(hmr): hmr websocket failure for custom middleware mode with
server.hmr.server
([#&#8203;11487](https://togithub.com/vitejs/vite/issues/11487))
([00919bb](https://togithub.com/vitejs/vite/commit/00919bb)), closes
[#&#8203;11487](https://togithub.com/vitejs/vite/issues/11487)
- fix(ssr): load sourcemaps alongside modules (fix:
[#&#8203;3288](https://togithub.com/vitejs/vite/issues/3288))
([#&#8203;11576](https://togithub.com/vitejs/vite/issues/11576))
([dc05e97](https://togithub.com/vitejs/vite/commit/dc05e97)), closes
[#&#8203;3288](https://togithub.com/vitejs/vite/issues/3288)
[#&#8203;11576](https://togithub.com/vitejs/vite/issues/11576)
- refactor: upgrade resolve.exports
([#&#8203;11712](https://togithub.com/vitejs/vite/issues/11712))
([00a79ec](https://togithub.com/vitejs/vite/commit/00a79ec)), closes
[#&#8203;11712](https://togithub.com/vitejs/vite/issues/11712)
- fix: remove moment from force interop packages
([#&#8203;11502](https://togithub.com/vitejs/vite/issues/11502))
([b89ddd6](https://togithub.com/vitejs/vite/commit/b89ddd6)), closes
[#&#8203;11502](https://togithub.com/vitejs/vite/issues/11502)
- fix(css): fix stale css when reloading with hmr disabled
([#&#8203;10270](https://togithub.com/vitejs/vite/issues/10270))
([#&#8203;11506](https://togithub.com/vitejs/vite/issues/11506))
([e5807c4](https://togithub.com/vitejs/vite/commit/e5807c4)), closes
[#&#8203;10270](https://togithub.com/vitejs/vite/issues/10270)
[#&#8203;11506](https://togithub.com/vitejs/vite/issues/11506)
- fix(hmr): base default protocol on client source location
([#&#8203;11497](https://togithub.com/vitejs/vite/issues/11497))
([167753d](https://togithub.com/vitejs/vite/commit/167753d)), closes
[#&#8203;11497](https://togithub.com/vitejs/vite/issues/11497)
- fix(metadata): expose viteMetadata type
([#&#8203;11511](https://togithub.com/vitejs/vite/issues/11511))
([32dee3c](https://togithub.com/vitejs/vite/commit/32dee3c)), closes
[#&#8203;11511](https://togithub.com/vitejs/vite/issues/11511)
- fix(resolve): ensure exports has precedence over mainFields (cherry
pick [#&#8203;11234](https://togithub.com/vitejs/vite/issues/11234))
([#&#8203;11595](https://togithub.com/vitejs/vite/issues/11595))
([691e432](https://togithub.com/vitejs/vite/commit/691e432)), closes
[#&#8203;11234](https://togithub.com/vitejs/vite/issues/11234)
[#&#8203;11595](https://togithub.com/vitejs/vite/issues/11595)
- fix(resolve): use only root package.json as exports source
([#&#8203;11259](https://togithub.com/vitejs/vite/issues/11259))
([b9afa6e](https://togithub.com/vitejs/vite/commit/b9afa6e)), closes
[#&#8203;11259](https://togithub.com/vitejs/vite/issues/11259)
- refactor(build): close rollup bundle directly
([#&#8203;11460](https://togithub.com/vitejs/vite/issues/11460))
([a802828](https://togithub.com/vitejs/vite/commit/a802828)), closes
[#&#8203;11460](https://togithub.com/vitejs/vite/issues/11460)

##### Previous Changelogs

#####
[4.1.0-beta.2](https://togithub.com/vitejs/vite/compare/v4.1.0-beta.1....v4.1.0-beta.2)
(2023-02-01)

See [4.1.0-beta.2
changelog](https://togithub.com/vitejs/vite/blob/v4.1.0-beta.2/packages/vite/CHANGELOG.md)

#####
[4.1.0-beta.1](https://togithub.com/vitejs/vite/compare/v4.1.0-beta.0....v4.1.0-beta.1)
(2023-01-26)

See [4.1.0-beta.1
changelog](https://togithub.com/vitejs/vite/blob/v4.1.0-beta.1/packages/vite/CHANGELOG.md)

#####
[4.1.0-beta.0](https://togithub.com/vitejs/vite/compare/v4.0.3....v4.1.0-beta.0)
(2023-01-09)

See [4.1.0-beta.0
changelog](https://togithub.com/vitejs/vite/blob/v4.1.0-beta.0/packages/vite/CHANGELOG.md)

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 17:00:26 +00:00
..
cypress refactor: remove variants per environment feature flag (#3102) 2023-02-14 14:02:02 +00:00
public
src feat: oss import (#3123) 2023-02-16 08:08:51 +01:00
.editorconfig
.gitignore
.nvmrc chore(deps): update node.js to v14.21.1 (#2385) 2022-11-10 15:58:42 +01:00
.prettierignore Orval generator POC (#2724) 2023-01-05 11:57:53 +01:00
.prettierrc
cypress.json
index.html ui flags replaced in index.html (#2617) 2022-12-07 14:31:27 +02:00
index.js
orval.config.js Orval generator POC (#2724) 2023-01-05 11:57:53 +01:00
package.json chore(deps): update dependency vite to v4.1.1 (#3126) 2023-02-16 17:00:26 +00:00
README.md Refactor/lazy load (#2842) 2023-01-12 11:34:45 +01:00
tsconfig.json Add multiple tags (#3032) 2023-02-03 12:28:06 +02:00
tsconfig.node.json Orval generator POC (#2724) 2023-01-05 11:57:53 +01:00
vercel.json fix: update vercel proxy paths (#2623) 2022-12-07 13:00:51 +01:00
vite.config.ts fix: preload error (#2980) 2023-01-24 20:40:03 +01:00
yarn.lock chore(deps): update dependency vite to v4.1.1 (#3126) 2023-02-16 17:00:26 +00:00

frontend

This directory contains the Unleash Admin UI frontend app.

Run with a local instance of the unleash-api

First, start the unleash-api backend on port 4242. Then, start the frontend dev server:

cd ~/frontend
yarn install
yarn run start

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