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

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/jest](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`29.4.0` ->
`29.5.1`](https://renovatebot.com/diffs/npm/@types%2fjest/29.4.0/29.5.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.5.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.5.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.5.1/compatibility-slim/29.4.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.5.1/confidence-slim/29.4.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [jest](https://jestjs.io/)
([source](https://togithub.com/facebook/jest)) | [`29.4.3` ->
`29.5.0`](https://renovatebot.com/diffs/npm/jest/29.4.3/29.5.0) |
[![age](https://badges.renovateapi.com/packages/npm/jest/29.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/jest/29.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/jest/29.5.0/compatibility-slim/29.4.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/jest/29.5.0/confidence-slim/29.4.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>facebook/jest</summary>

###
[`v29.5.0`](https://togithub.com/facebook/jest/blob/HEAD/CHANGELOG.md#&#8203;2950)

[Compare
Source](https://togithub.com/facebook/jest/compare/v29.4.3...v29.5.0)

##### Features

- `[jest-changed-files]` Support Sapling
([#&#8203;13941](https://togithub.com/facebook/jest/pull/13941))
- `[jest-circus, @&#8203;jest/cli, jest-config]` Add feature to
randomize order of tests via CLI flag or through the config
file([#&#8203;12922](https://togithub.com/facebook/jest/pull/12922))
- `[jest-cli, jest-config, @&#8203;jest/core, jest-haste-map,
@&#8203;jest/reporters, jest-runner, jest-runtime, @&#8203;jest/types]`
Add `workerThreads` configuration option to allow using [worker
threads](https://nodejs.org/dist/latest/docs/api/worker_threads.html)
for parallelization
([#&#8203;13939](https://togithub.com/facebook/jest/pull/13939))
- `[jest-cli]` Export `yargsOptions`
([#&#8203;13970](https://togithub.com/facebook/jest/pull/13970))
- `[jest-config]` Add `openHandlesTimeout` option to configure possible
open handles warning.
([#&#8203;13875](https://togithub.com/facebook/jest/pull/13875))
- `[@jest/create-cache-key-function]` Allow passing `length` argument to
`createCacheKey()` function and set its default value to `16` on Windows
([#&#8203;13827](https://togithub.com/facebook/jest/pull/13827))
- `[jest-message-util]` Add support for
[AggregateError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)
([#&#8203;13946](https://togithub.com/facebook/jest/pull/13946) &
[#&#8203;13947](https://togithub.com/facebook/jest/pull/13947))
- `[jest-message-util]` Add support for [Error
causes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause)
in `test` and `it`
([#&#8203;13935](https://togithub.com/facebook/jest/pull/13935) &
[#&#8203;13966](https://togithub.com/facebook/jest/pull/13966))
- `[jest-reporters]` Add `summaryThreshold` option to summary reporter
to allow overriding the internal threshold that is used to print the
summary of all failed tests when the number of test suites surpasses it
([#&#8203;13895](https://togithub.com/facebook/jest/pull/13895))
- `[jest-runtime]` Expose `@sinonjs/fake-timers` async APIs functions
`advanceTimersByTimeAsync(msToRun)` (`tickAsync(msToRun)`),
`advanceTimersToNextTimerAsync(steps)` (`nextAsync`),
`runAllTimersAsync` (`runAllAsync`), and `runOnlyPendingTimersAsync`
(`runToLastAsync`)
([#&#8203;13981](https://togithub.com/facebook/jest/pull/13981))
- `[jest-runtime, @&#8203;jest/transform]` Allow V8 coverage provider to
collect coverage from files which were not loaded explicitly
([#&#8203;13974](https://togithub.com/facebook/jest/pull/13974))
- `[jest-snapshot]` Add support to `cts` and `mts` TypeScript files to
inline snapshots
([#&#8203;13975](https://togithub.com/facebook/jest/pull/13975))
- `[jest-worker]` Add `start` method to worker farms
([#&#8203;13937](https://togithub.com/facebook/jest/pull/13937))
- `[jest-worker]` Support passing a URL as path to worker
([#&#8203;13982](https://togithub.com/facebook/jest/pull/13982))

##### Fixes

- `[babel-plugin-jest-hoist]` Fix unwanted hoisting of nested `jest`
usages ([#&#8203;13952](https://togithub.com/facebook/jest/pull/13952))
- `[jest-circus]` Send test case results for `todo` tests
([#&#8203;13915](https://togithub.com/facebook/jest/pull/13915))
- `[jest-circus]` Update message printed on test timeout
([#&#8203;13830](https://togithub.com/facebook/jest/pull/13830))
- `[jest-circus]` Avoid creating the word "testfalse" when
`takesDoneCallback` is `false` in the message printed on test timeout
AND updated timeouts test
([#&#8203;13954](https://togithub.com/facebook/jest/pull/13954))
- `[jest-environment-jsdom]` Stop setting `document` to `null` on
teardown
([#&#8203;13972](https://togithub.com/facebook/jest/pull/13972))
- `[@jest/expect-utils]` Update `toStrictEqual()` to be able to check
`jest.fn().mock.calls`
([#&#8203;13960](https://togithub.com/facebook/jest/pull/13960))
- `[@jest/test-result]` Allow `TestResultsProcessor` type to return a
Promise ([#&#8203;13950](https://togithub.com/facebook/jest/pull/13950))

##### Chore & Maintenance

- `[jest-snapshot]` Remove dependency on `jest-haste-map`
([#&#8203;13977](https://togithub.com/facebook/jest/pull/13977))

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 14:19:19 +00:00
..
cypress fix: Updated cypress API usage to stop using deprecated API (#3636) 2023-04-27 08:49:55 +00:00
public
scripts
src Feat: default strategy UI (#3682) 2023-05-05 14:32:44 +03: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.d.ts chore: refactor Cypress tests (#3445) 2023-04-04 11:46:28 +03:00
cypress.json
index.html
index.js
orval.config.js
package.json chore(deps): update jest monorepo (#3694) 2023-05-05 14:19:19 +00:00
README.md
tsconfig.json chore: refactor Cypress tests (#3445) 2023-04-04 11:46:28 +03:00
tsconfig.node.json
vercel.json
vite.config.ts
yarn.lock chore(deps): update jest monorepo (#3694) 2023-05-05 14:19:19 +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