Skip to content

Commit 1d20142

Browse files
committed
feat!: esm
1 parent c0dfd63 commit 1d20142

47 files changed

Lines changed: 855 additions & 2450 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ This is the _HyperDeck Connection_ library of the [**Sofie** TV Automation Syste
1515

1616
---
1717

18-
## Technology Highlights
19-
20-
- Typescript
21-
- Yarn
22-
- Jeststandard-version
23-
- codecov
24-
2518
## Installation
2619

2720
For usage by library consumers installation is as easy as:

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { generateEslintConfig } from '@sofie-automation/code-standard-preset/esl
22

33
export default await generateEslintConfig({
44
testRunner: 'vitest',
5-
})
5+
})

jest-integration.config.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

jest.config.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@
3939
"lint:raw": "eslint",
4040
"lint": "run lint:raw .",
4141
"lint-fix": "run lint --fix",
42-
"unit": "jest",
42+
"unit": "vitest --run",
4343
"test": "run lint && run unit",
44-
"test:integration": "run lint && jest --config=jest-integration.config.js",
45-
"watch": "jest --watch",
46-
"cov": "jest --coverage && open-cli coverage/lcov-report/index.html",
44+
"watch": "vitest --watch",
45+
"cov": "vitest --coverage && open-cli coverage/lcov-report/index.html",
4746
"cov-open": "open-cli coverage/lcov-report/index.html",
4847
"docs": "run docs:html && open-cli docs/index.html",
4948
"docs:test": "run docs:html",
@@ -66,18 +65,17 @@
6665
"devDependencies": {
6766
"@eslint/js": "^10.0.1",
6867
"@sofie-automation/code-standard-preset": "~3.2.2",
69-
"@types/jest": "^29.5.14",
7068
"@types/node": "^22.19.21",
69+
"@vitest/coverage-v8": "^4.1.9",
7170
"eslint": "^10.5.0",
7271
"husky": "^9.1.7",
73-
"jest": "^29.7.0",
7472
"lint-staged": "^17.0.7",
7573
"open-cli": "^9.0.0",
7674
"prettier": "^3.8.4",
7775
"rimraf": "^6.1.3",
78-
"ts-jest": "^29.4.11",
7976
"typedoc": "^0.28.19",
80-
"typescript": "~6.0.3"
77+
"typescript": "~6.0.3",
78+
"vitest": "^4.1.9"
8179
},
8280
"keywords": [
8381
"blackmagic",

src/__mocks__/net.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { EventEmitter } from 'events'
2+
import { expect } from 'vitest'
23
const setTimeoutOrg = setTimeout
34
const sockets: Array<Socket> = []
4-
// eslint-disable-next-line @typescript-eslint/ban-types
5+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
56
const onNextSocket: Array<Function> = []
67

78
export class Socket extends EventEmitter {
@@ -57,7 +58,6 @@ export class Socket extends EventEmitter {
5758

5859
const w = this.expectedWrites.shift()
5960
if (w) {
60-
// eslint-disable-next-line jest/no-standalone-expect
6161
expect(buff).toEqual(w.call)
6262
this.emit('data', w.response)
6363
}

src/__tests__/codes.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { AsynchronousCode, SynchronousCode, ErrorCode, ResponseCodeType, GetResponseCodeType } from '../codes'
1+
import { describe, expect, test } from 'vitest'
2+
import { AsynchronousCode, SynchronousCode, ErrorCode, ResponseCodeType, GetResponseCodeType } from '../codes.js'
23

34
describe('Codes', () => {
45
test('Codes: AsynchronousCode range', async () => {

src/__tests__/commands.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ShuttleCommand } from '../commands/shuttle'
1+
import { describe, expect, test } from 'vitest'
2+
import { ShuttleCommand } from '../commands/shuttle.js'
23

34
describe('Commands', () => {
45
describe('ShuttleCommand', () => {

0 commit comments

Comments
 (0)