Skip to content

Commit

Permalink
fix: Converted the last require() to import.
Browse files Browse the repository at this point in the history
  • Loading branch information
KvelaGorrrrnio committed Mar 2, 2022
1 parent 3b39ae6 commit 1879b7d
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 4,827 deletions.
55 changes: 27 additions & 28 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{
"compilerOptions": {
// Target latest version of ECMAScript.
"target": "esnext",
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
// Process & infer types from .js files.
"allowJs": false,
// Don't emit; allow Babel to transform files.
"noEmit": false,
// Enable strictest settings like strictNullChecks & noImplicitAny.
"strict": false,
// Disallow features that require cross-file information for emit.
"isolatedModules": false,
// Import non-ES modules as default imports.
"esModuleInterop": true,
//Support for jsx.
"jsx": "react",
// Check for "any" while converting to TS this can be turned off.
"noImplicitAny": true,
"module": "commonjs",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"outDir": "../dist"
},
"include": ["../client", "../shared"],
"exclude": ["../**/node_modules/*", "../**/dist", "../**/*.spec.ts"]
}
{
"compilerOptions": {
"target": "esnext",
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
// Process & infer types from .js files.
"allowJs": false,
// Don't emit; allow Babel to transform files.
"noEmit": false,
// Enable strictest settings like strictNullChecks & noImplicitAny.
"strict": false,
// Disallow features that require cross-file information for emit.
"isolatedModules": false,
// Import non-ES modules as default imports.
"esModuleInterop": true,
//Support for jsx.
"jsx": "react",
// Check for "any" while converting to TS this can be turned off.
"noImplicitAny": true,
"module": "commonjs",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"outDir": "../dist"
},
"include": ["../client", "../shared"],
"exclude": ["../**/node_modules/*", "../**/dist", "../**/*.spec.ts"]
}
10 changes: 7 additions & 3 deletions server/__tests__/channelReducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import {
storeSetCompleteChState,
storeSetOutputLevel,
} from '../../shared/src/actions/channelActions'
import { IChannel, InumberOfChannels } from '../../shared/src/reducers/channelsReducer'
import {
IChannel,
InumberOfChannels,
} from '../../shared/src/reducers/channelsReducer'

let fs = require('fs')
import fs from 'fs'
const parsedFullStoreJSON = fs.readFileSync(
'__tests__/__mocks__/parsedFullStore.json'
'__tests__/__mocks__/parsedFullStore.json',
'utf-8'
)

describe('Test redux channelReducer actions', () => {
Expand Down
8 changes: 5 additions & 3 deletions server/__tests__/faderReducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ import {
storeXmix,
} from '../../shared/src/actions/faderActions'

let fs = require('fs')
import fs from 'fs'
const parsedSimpleStoreJSON = fs.readFileSync(
'__tests__/__mocks__/parsedSimpleStore.json'
'__tests__/__mocks__/parsedSimpleStore.json',
'utf-8'
)
const parsedFullStoreJSON = fs.readFileSync(
'__tests__/__mocks__/parsedFullStore.json'
'__tests__/__mocks__/parsedFullStore.json',
'utf-8'
)

describe('Test redux faderReducers actions', () => {
Expand Down
5 changes: 3 additions & 2 deletions server/__tests__/indexReducer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import indexReducer from '../../shared/src/reducers/indexReducer'

let fs = require('fs')
import fs from 'fs'
const parsedEmptyStoreJSON = fs.readFileSync(
'__tests__/__mocks__/parsedEmptyStore.json'
'__tests__/__mocks__/parsedEmptyStore.json',
'utf-8'
)

describe('Test initialize store', () => {
Expand Down
5 changes: 3 additions & 2 deletions server/__tests__/settingsReducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import {
UPDATE_SETTINGS,
} from '../../shared/src/actions/settingsActions'

let fs = require('fs')
import fs from 'fs'
const parsedFullStoreJSON = fs.readFileSync(
'__tests__/__mocks__/parsedFullStore.json'
'__tests__/__mocks__/parsedFullStore.json',
'utf-8'
)

describe('Test redux settingsReducer actions', () => {
Expand Down
83 changes: 41 additions & 42 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
{
"name": "server",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build": "tsc",
"watch": "tsc --watch",
"test": "jest",
"test:watch": "jest --watch",
"lint": ""
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.35",
"@types/redux": "^3.6.0",
"jest": "^26.6.3",
"typescript": "^4.5.5"
},
"dependencies": {
"@babel/core": "^7.13.10",
"@tv2media/logger": "^1.2.2",
"@types/socket.io": "^3.0.2",
"@types/webmidi": "^2.0.6",
"casparcg-connection": "^5.1.0",
"emberplus-connection": "^0.0.4",
"express": "^4.17.1",
"express-csp-header": "^4.0.0",
"node-emberplus": "https://github.com/olzzon/node-emberplus#feat/export-ber",
"node-vmix": "^1.6.0",
"osc": "^2.4.2",
"performance-now": "^2.1.0",
"redux": "^4.1.2",
"shared": "^0.0.0",
"socket.io": "^4.4.1",
"ts-jest": "^26.5.3",
"vmix-js-utils": "^4.0.7",
"web-midi-api": "^2.0.8",
"webmidi": "^2.5.2"
},
"peerDependencies": {}
}
{
"name": "server",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build": "tsc",
"watch": "tsc --watch",
"test": "jest",
"test:watch": "jest --watch",
"lint": ""
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.35",
"@types/redux": "^3.6.0",
"jest": "^26.6.3",
"typescript": "^4.5.5"
},
"dependencies": {
"@babel/core": "^7.13.10",
"@tv2media/logger": "^1.2.2",
"@types/socket.io": "^3.0.2",
"@types/webmidi": "^2.0.6",
"casparcg-connection": "^5.1.0",
"emberplus-connection": "^0.0.4",
"express": "^4.17.1",
"node-emberplus": "https://github.com/olzzon/node-emberplus#feat/export-ber",
"node-vmix": "^1.6.0",
"osc": "^2.4.2",
"performance-now": "^2.1.0",
"redux": "^4.1.2",
"shared": "^0.0.0",
"socket.io": "^4.4.1",
"ts-jest": "^26.5.3",
"vmix-js-utils": "^4.0.7",
"web-midi-api": "^2.0.8",
"webmidi": "^2.5.2"
},
"peerDependencies": {}
}
4 changes: 2 additions & 2 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ESNEXT",
"lib": ["ESNEXT", "dom"],
"target": "esnext",
"lib": ["esnext", "dom"],
"moduleResolution": "node",
"allowJs": false,
"strict": false,
Expand Down
Loading

0 comments on commit 1879b7d

Please sign in to comment.