1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/frontend
renovate[bot] 4e919a7bf5
chore(deps): update dependency @biomejs/biome to v1.8.1 (#7038)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev)
([source](https://togithub.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome))
| [`1.8.0` ->
`1.8.1`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/1.8.0/1.8.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@biomejs%2fbiome/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@biomejs%2fbiome/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@biomejs%2fbiome/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@biomejs%2fbiome/1.8.0/1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

###
[`v1.8.1`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#v181-2024-06-10)

[Compare
Source](378c05edd4...39db99b1cd)

##### Analyzer

##### CLI

##### Bug fixes

- Fix [#&#8203;3069](https://togithub.com/biomejs/biome/issues/3069),
prevent overwriting paths when using `--staged` or `--changed` options.
Contributed by [@&#8203;unvalley](https://togithub.com/unvalley)
- Fix a case where the file link inside a diagnostic wasn't correctly
displayed inside a terminal run by VSCode. Contributed by
[@&#8203;uncenter](https://togithub.com/uncenter)

##### Configuration

##### Bug fixes

- Fix [#&#8203;3067](https://togithub.com/biomejs/biome/issues/3067), by
assigning the correct default value to `indentWidth`. Contributed by
[@&#8203;ematipico](https://togithub.com/ematipico)

##### Editors

##### Formatter

##### Bug fixes

- Fix the bug where whitespace after the & character in CSS nesting was
incorrectly trimmed, ensuring proper targeting of child classes
[#&#8203;3061](https://togithub.com/biomejs/biome/issues/3061).
Contributed by [@&#8203;denbezrukov](https://togithub.com/denbezrukov)
- Fix [#&#8203;3068](https://togithub.com/biomejs/biome/issues/3068)
where the CSS formatter was inadvertently converting variable
declarations and function calls to lowercase. Contributed by
[@&#8203;denbezrukov](https://togithub.com/denbezrukov)
- Fix the formatting of CSS grid layout properties. Contributed by
[@&#8203;denbezrukov](https://togithub.com/denbezrukov)

##### JavaScript APIs

##### Linter

##### Bug fixes

- The `noEmptyBlock` css lint rule now treats empty blocks containing
comments as valid ones. Contributed by
[@&#8203;Sec-ant](https://togithub.com/Sec-ant)

- [useLiteralKeys](https://biomejs.dev/linter/rules/use-literal-keys/)
no longer reports quoted member names
([#&#8203;3085](https://togithub.com/biomejs/biome/issues/3085)).

Previously
[useLiteralKeys](https://biomejs.dev/linter/rules/use-literal-keys/)
reported quoted member names that can be unquoted.
    For example, the rule suggested the following fix:

    ```diff
    - const x = { "prop": 0 };
    + const x = { prop: 0 };
    ```

This conflicted with the option
[quoteProperties](https://biomejs.dev/reference/configuration/#javascriptformatterquoteproperties)
of our formatter.

    The rule now ignores quoted member names.

    Contributed by [@&#8203;Conaclos](https://togithub.com/Conaclos)

-
[noEmptyInterface](https://biomejs.dev/linter/rules/no-empty-interface/)
now ignores empty interfaces in ambient modules
([#&#8203;3110](https://togithub.com/biomejs/biome/issues/3110)).
Contributed by [@&#8203;Conaclos](https://togithub.com/Conaclos)

-
[noUnusedVariables](https://biomejs.dev/linter/rules/no-unused-variables/)
and
[noUnusedFunctionParameters](https://biomejs.dev/linter/rules/no-unused-function-parameters/)
no longer report the parameters of a constructor type
([#&#8203;3135](https://togithub.com/biomejs/biome/issues/3135)).

    Previously, `arg` was reported as unused in a constructor type like:

    ```ts
    export type Classlike = new (arg: unknown) => string;
    ```

    Contributed by [@&#8203;Conaclos](https://togithub.com/Conaclos)

-
[noStringCaseMismatch](https://biomejs.dev/linter/rules/no-string-case-mismatch/)
now ignores escape sequences
([#&#8203;3134](https://togithub.com/biomejs/biome/issues/3134)).

    The following code is no longer reported by the rule:

    ```js
    s.toUpperCase() === "\u001b";
    ```

    Contributed by [@&#8203;Conaclos](https://togithub.com/Conaclos)

##### Parser

##### New features

- Implemented CSS Unknown At-Rule parsing, allowing the parser to
gracefully handle unsupported or unrecognized CSS at-rules. Contributed
by [@&#8203;denbezrukov](https://togithub.com/denbezrukov)

##### Bug fixes

- Fix [#&#8203;3055](https://togithub.com/biomejs/biome/issues/3055)
CSS: Layout using named grid lines is now correctly parsed. Contributed
by [@&#8203;denbezrukov](https://togithub.com/denbezrukov)
- Fix [#&#8203;3091](https://togithub.com/biomejs/biome/issues/3091).
Allows the parser to handle nested style rules and at-rules properly,
enhancing the parser's compatibility with the CSS Nesting Module.
Contributed by [@&#8203;denbezrukov](https://togithub.com/denbezrukov)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-10 16:22:22 +00:00
..
cypress chore: make feature.spec and segements.spec more resilient (#7289) 2024-06-07 08:37:53 +02:00
public
scripts
src fix: revert yarn4 (#7334) 2024-06-10 14:35:18 +03:00
.editorconfig
.gitignore chore: add gitignores to frontend and website subdirectories (#7336) 2024-06-10 14:39:14 +02:00
.nvmrc chore: bump to @types/node 20 as well as updating frontend .nvmrc (#7137) 2024-05-24 07:40:20 +00:00
check-imports.rc fix: revert yarn4 (#7334) 2024-06-10 14:35:18 +03:00
cypress.config.ts
cypress.d.ts
index.html
index.js
orval.config.js
package.json chore(deps): update dependency @biomejs/biome to v1.8.1 (#7038) 2024-06-10 16:22:22 +00:00
README.md
tsconfig.json
tsconfig.node.json
vercel.json
vite.config.mts
yarn.lock chore(deps): update dependency @biomejs/biome to v1.8.1 (#7038) 2024-06-10 16:22:22 +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