1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/frontend
renovate[bot] bdfe3826ab
chore(deps): update dependency @biomejs/biome to v1.8.2 (#7475)
[![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.1` ->
`1.8.2`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/1.8.1/1.8.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@biomejs%2fbiome/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@biomejs%2fbiome/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@biomejs%2fbiome/1.8.1/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@biomejs%2fbiome/1.8.1/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v1.8.2`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#v182-2024-06-20)

[Compare
Source](39db99b1cd...54b4c9a390)

##### CLI

##### Bug fixes

- Fix [#&#8203;3201](https://togithub.com/biomejs/biome/issues/3201) by
correctly injecting the source code of the file when printing the
diagnostics. Contributed by
[@&#8203;ematipico](https://togithub.com/ematipico)
- Fix [#&#8203;3179](https://togithub.com/biomejs/biome/issues/3179)
where comma separators are not correctly removed after running `biome
migrate` and thus choke the parser. Contributed by
[@&#8203;Sec-ant](https://togithub.com/Sec-ant)
- Fix [#&#8203;3232](https://togithub.com/biomejs/biome/issues/3232) by
correctly using the colors set by the user. Contributed by
[@&#8203;ematipico](https://togithub.com/ematipico)

##### Enhancement

-   Reword the reporter message `No fixes needed` to `No fixes applied`.

The former message is misleading when there're still errors or warnings
in the files that should be taken care of manually. For example:

    ```block
    Checked 2 files in <TIME>. No fixes needed.
    Found 2 errors.
    ```

    The new message suits better in these cases.

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

##### Configuration

##### Bug fixes

- Don't conceal previous overrides
([#&#8203;3176](https://togithub.com/biomejs/biome/issues/3176)).

Previously, each override inherited the unset configuration of the base
configuration.
This means that setting a configuration in an override can be concealed
by a subsequent override that inherits of the value from the base
configuration.

For example, in the next example, `noDebugger` was disabled for the
`index.js` file.

    ```json
    {
      "linter": {
        "rules": {
          "suspicious": { "noDebugger": "off" }
        }
      },
      "overrides": [
        {
          "include": ["index.js"],
          "linter": {
            "rules": {
              "suspicious": { "noDebugger": "warn" }
            }
          }
        }, {
          "include": ["index.js"],
          "linter": {
            "rules": {
              "suspicious": { "noDoubleEquals": "off" }
            }
          }
        }
      ]
    }
    ```

    The rule is now correctly enabled for the `index.js` file.

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

##### Formatter

##### Bug fixes

- Fix [#&#8203;3103](https://togithub.com/biomejs/biome/issues/3103) by
correctly resolving CSS formatter options. Contributed by
[@&#8203;ah-yu](https://togithub.com/ah-yu)
- Fix [#&#8203;3192](https://togithub.com/biomejs/biome/issues/3192)
don't add an extra whitespace within :has. Contributed by
[@&#8203;denbezrukov](https://togithub.com/denbezrukov)

##### JavaScript APIs

##### Bug fixes

-   Fix a regression introduced by the release of `v1.8.0`

##### Linter

##### New features

- Add
[nursery/useValidAutocomplete](https://biomejs.dev/linter/rules/use-valid-autocomplete/).
Contributed by [@&#8203;unvalley](https://togithub.com/unvalley)

##### Bug fixes

- Add
[nursery/noShorthandPropertyOverrides](https://biomejs.dev/linter/rules/no-shorthand-property-overrides).
[#&#8203;2958](https://togithub.com/biomejs/biome/issues/2958)
Contributed by [@&#8203;neokidev](https://togithub.com/neokidev)

- Fix \[[#&#8203;3084](https://togithub.com/biomejs/biome/issues/3084)]
false positive by correctly recognize parenthesized return statement.
Contributed by [@&#8203;unvalley](https://togithub.com/unvalley)

-
[useImportExtensions](https://biomejs.dev/linter/rules/use-import-extensions/)
now suggests a correct fix for `import '.'` and `import './.'`.
Contributed by [@&#8203;minht11](https://togithub.com/minht11)

- Fix [useDateNow](https://biomejs.dev/linter/rules/use-date-now/) false
positive when new Date object has arguments `new Date(0).getTime()`.
Contributed by [@&#8203;minht11](https://togithub.com/minht11).

- The
[`noUnmatchableAnbSelector`](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector/)
rule is now able to catch unmatchable `an+b` selectors like `0n+0` or
`-0n+0`. Contributed by [@&#8203;Sec-ant](https://togithub.com/Sec-ant).

- The
[`useHookAtTopLevel`](https://biomejs.dev/linter/rules/use-hook-at-top-level/)
rule now recognizes properties named as hooks like `foo.useFoo()`.
Contributed by [@&#8203;ksnyder9801](https://togithub.com/ksnyder9801)

- Fix [#&#8203;3092](https://togithub.com/biomejs/biome/issues/3092),
prevent warning for `Custom properties (--*)`. Contributed by
[@&#8203;chansuke](https://togithub.com/chansuke)

- Fix a false positive in the
[`useLiteralKeys`](https://biomejs.dev/linter/rules/use-literal-keys/)
rule. ([#&#8203;3160](https://togithub.com/biomejs/biome/issues/3160))

    This rule now ignores the following kind of computed member name:

    ```js
    const a = {
      [`line1
      line2`]: true,
    };
    ```

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

- The
[noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property/)
rule now ignores the `composes` property often used in css modules.
[#&#8203;3000](https://togithub.com/biomejs/biome/issues/3000)
Contributed by [@&#8203;chansuke](https://togithub.com/chansuke)

- Fix false positives of the
[useExhaustiveDependencies](https://biomejs.dev/linter/rules/use-exhaustive-dependencies/)
rule.

The component itself is considered stable when it is used recursively
inside a hook closure defined inside of it:

    ```jsx
    import { useMemo } from "react";

    function MyRecursiveComponent() {
// MyRecursiveComponent is stable, we don't need to add it to the
dependencies list.
      const children = useMemo(() => <MyRecursiveComponent />, []);
      return <div>{children}</div>;
    }
    ```

Also, `export default function` and `export default class` are
considered stable now because they can only appear at the top level of a
module.

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

- Fix missing `withDefaults` macro in vue files for globals variables.
Contributed by [@&#8203;Shyam-Chen](https://togithub.com/Shyam-Chen)

##### Parser

##### Bug fixes

- Fix CSS modules settings mapping. 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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-27 18:47:05 +00:00
..
.yarn/releases task: Yarn v4 (#7457) 2024-06-27 12:52:43 +02:00
cypress chore: wait to input the name of the segment when checking for error messages (#7377) 2024-06-12 14:06:44 +02:00
public
scripts
src chore: resource limits flag (#7471) 2024-06-27 14:25:07 +02:00
.editorconfig
.gitignore chore: add gitignores to frontend and website subdirectories (#7336) 2024-06-10 14:39:14 +02:00
.npmignore task: Yarn v4 (#7457) 2024-06-27 12:52:43 +02:00
.nvmrc
.yarnrc.yml task: Yarn v4 (#7457) 2024-06-27 12:52:43 +02:00
check-imports.rc task: Yarn v4 (#7457) 2024-06-27 12:52:43 +02: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.2 (#7475) 2024-06-27 18:47:05 +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.2 (#7475) 2024-06-27 18:47:05 +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