Skip to content

Commit

Permalink
Update web deps (blakeblackshear#4383)
Browse files Browse the repository at this point in the history
* Bump jest from 27.5.1 to 29.3.1 in /web

Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 29.3.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.3.1/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump msw from 0.38.2 to 0.48.0 in /web

Bumps [msw](https://github.com/mswjs/msw) from 0.38.2 to 0.48.0.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](mswjs/msw@v0.38.2...v0.48.0)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump idb-keyval from 6.1.0 to 6.2.0 in /web

Bumps [idb-keyval](https://github.com/jakearchibald/idb-keyval) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/jakearchibald/idb-keyval/releases)
- [Changelog](https://github.com/jakearchibald/idb-keyval/blob/main/CHANGELOG.md)
- [Commits](jakearchibald/idb-keyval@v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: idb-keyval
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @babel/preset-typescript from 7.16.7 to 7.18.6 in /web

Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.16.7 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-preset-typescript)

---
updated-dependencies:
- dependency-name: "@babel/preset-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump typescript from 4.6.2 to 4.8.4 in /web

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.2 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.6.2...v4.8.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @testing-library/user-event from 13.5.0 to 14.4.3 in /web

Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.5.0 to 14.4.3.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](testing-library/user-event@v13.5.0...v14.4.3)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump preact-router from 4.0.1 to 4.1.0 in /web

Bumps [preact-router](https://github.com/preactjs/preact-router) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/preactjs/preact-router/releases)
- [Commits](preactjs/preact-router@4.0.1...4.1.0)

---
updated-dependencies:
- dependency-name: preact-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump axios from 0.26.0 to 1.1.3 in /web

Bumps [axios](https://github.com/axios/axios) from 0.26.0 to 1.1.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.26.0...v1.1.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @preact/preset-vite from 2.1.7 to 2.4.0 in /web

Bumps [@preact/preset-vite](https://github.com/preactjs/preset-vite) from 2.1.7 to 2.4.0.
- [Release notes](https://github.com/preactjs/preset-vite/releases)
- [Commits](preactjs/preset-vite@v2.1.7...v2.4.0)

---
updated-dependencies:
- dependency-name: "@preact/preset-vite"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @testing-library/jest-dom from 5.16.2 to 5.16.5 in /web

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.16.2 to 5.16.5.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v5.16.2...v5.16.5)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* revamp frontend

* disable broken tests

* disable a few more tests

* update typescript

* couple docs updates

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and herostrat committed Nov 24, 2022
1 parent 7f3e44d commit f21ad0e
Show file tree
Hide file tree
Showing 48 changed files with 9,727 additions and 15,703 deletions.
5 changes: 3 additions & 2 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ ffmpeg -c:v h264_qsv -re -stream_loop -1 -i https://streams.videolan.org/ffmpeg/

- [Frigate source code](#frigate-core-web-and-docs)
- All [core](#core) prerequisites _or_ another running Frigate instance locally available
- Node.js 14
- Node.js 16

### Making changes

Expand Down Expand Up @@ -169,6 +169,7 @@ npm run lint
```

- Add to unit tests and ensure they pass. As much as possible, you should strive to _increase_ test coverage whenever making changes. This will help ensure features do not accidentally become broken in the future.
- If you run into error messages like "TypeError: Cannot read properties of undefined (reading 'context')" when running tests, this may be due to these issues (https://github.com/vitest-dev/vitest/issues/1910, https://github.com/vitest-dev/vitest/issues/1652) in vitest, but I haven't been able to resolve them.

```console
npm run test
Expand All @@ -181,7 +182,7 @@ npm run test
### Prerequisites

- [Frigate source code](#frigate-core-web-and-docs)
- Node.js 14
- Node.js 16

### Making changes

Expand Down
2 changes: 0 additions & 2 deletions web/.eslintignore

This file was deleted.

19 changes: 15 additions & 4 deletions web/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
{
"env": {
"browser": true,
"es2021": true
"es2021": true,
"vitest-globals/env": true
},
"extends": ["eslint:recommended", "preact", "prettier"],
"extends": ["eslint:recommended", "plugin:vitest-globals/recommended", "preact", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"ecmaVersion": "latest",
"sourceType": "module"
},
"settings": {
"jest": {
"version": 27
}
},
"ignorePatterns": ["*.d.ts"],
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"comma-dangle": [
"error",
{ "objects": "always-multiline", "arrays": "always-multiline", "imports": "always-multiline" }
{
"objects": "always-multiline",
"arrays": "always-multiline",
"imports": "always-multiline"
}
],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"no-console": "error"
Expand Down
File renamed without changes.
36 changes: 36 additions & 0 deletions web/__test__/test-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import '@testing-library/jest-dom';
import 'regenerator-runtime/runtime';
// This creates a fake indexeddb so there is no need to mock idb-keyval
import "fake-indexeddb/auto";
import { setupServer } from 'msw/node';
import { handlers } from './handlers';
import { vi } from 'vitest';

// This configures a request mocking server with the given request handlers.
export const server = setupServer(...handlers);

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: (query) => ({
matches: false,
media: query,
onchange: null,
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
}),
});

vi.mock('../src/env');

// Establish API mocking before all tests.
beforeAll(() => server.listen());

// Reset any request handlers that we may add during the tests,
// so they don't affect other tests.
afterEach(() => {
server.resetHandlers();
});

// Clean up after the tests are finished.
afterAll(() => server.close());
File renamed without changes.
4 changes: 0 additions & 4 deletions web/babel.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions web/config/server.js

This file was deleted.

29 changes: 0 additions & 29 deletions web/config/setupTests.js

This file was deleted.

198 changes: 0 additions & 198 deletions web/jest.config.js

This file was deleted.

Loading

0 comments on commit f21ad0e

Please sign in to comment.