Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
295 changes: 171 additions & 124 deletions .github/workflows/node.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions .github/workflows/publish-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
node-version-file: ".node-version"
- name: Prepare Environment
run: |
corepack enable

cd packages
yarn install
yarn lerna run --scope \*\*/${{ matrix.package-name }} --include-dependencies --stream build
yarn build:single ${{ matrix.package-name }}/tsconfig.build.json
env:
CI: true
- name: Run typecheck and linter
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:

cd packages
yarn install
yarn lerna run --scope \*\*/${{ matrix.package-name }} --include-dependencies --stream build
yarn build:single ${{ matrix.package-name }}/tsconfig.build.json
env:
CI: true
- name: Run tests
Expand All @@ -145,7 +145,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
node-version-file: ".node-version"
- name: Prepare Environment
run: |
corepack enable
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
node-version-file: ".node-version"

- name: Download release artifact
uses: actions/download-artifact@v6
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ meteor-settings.json
.github/workflows/forkSync.yml
.github/workflows/forkSynk.yml

**/*.tsbuildinfo

.pnp.*
.yarn/*
!.yarn/patches
Expand Down
8 changes: 3 additions & 5 deletions meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"unit": "jest",
"unitci": "jest --maxWorkers 2 --coverage",
"unitcov": "jest --coverage",
"test": "yarn check-types && yarn unit",
"test": "yarn unit",
"watch": "jest --watch",
"update-snapshots": "jest --updateSnapshot",
"ci:lint": "yarn check-types && yarn lint",
"ci:lint": "yarn lint",
"cov-open": "open-cli coverage/lcov-report/index.html",
"cov": "yarn unitcov && yarn cov-open",
"license-validate": "node ../scripts/checkLicenses.js --allowed=\"MIT,BSD,ISC,Apache,Unlicense,CC0,LGPL,CC BY 3.0,CC BY 4.0,MPL 2.0,Python 2.0\" --excludePackages=timecode,rxjs/ajax,rxjs/fetch,rxjs/internal-compatibility,nw-pre-gyp-module-test,rxjs/operators,rxjs/testing,rxjs/webSocket,undefined,i18next-conv,@fortawesome/fontawesome-common-types,argv,indexof,custom-license,private,public-domain-module,@sofie-automation/corelib,@sofie-automation/shared-lib,@sofie-automation/job-worker",
Expand All @@ -32,9 +32,7 @@
"prepareChangelog": "run release --prerelease --release-as patch",
"validate:all-dependencies": "run validate:prod-dependencies && run validate:dev-dependencies && run license-validate",
"validate:prod-dependencies": "yarn npm audit --environment production",
"validate:dev-dependencies": "yarn npm audit --environment development --severity moderate",
"check-types": "tsc --noEmit -p tsconfig.json",
"watch-types": "run check-types --watch"
"validate:dev-dependencies": "yarn npm audit --environment development --severity moderate"
},
"dependencies": {
"@babel/runtime": "^7.26.7",
Expand Down
12 changes: 10 additions & 2 deletions meteor/tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@
// "./node_modules/@types/meteor/*",
"./.meteor/local/types/packages.d.ts"
]
}
},
"noEmit": true
},
"include": ["client/**/*", "server/**/*", "lib/**/*", "__mocks__/**/*", "tslint-rules/**/*"],
"exclude": ["node_modules", "**/.coverage/**/*"]
"exclude": ["node_modules", "**/.coverage/**/*"],
"references": [
{ "path": "../shared-lib/tsconfig.build.json" },
{ "path": "../blueprints-integration/tsconfig.build.json" },
{ "path": "../corelib/tsconfig.build.json" },
{ "path": "../meteor-lib/tsconfig.build.json" },
{ "path": "../job-worker/tsconfig.build.json" }
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:packages": "cd packages && run test",
"lint:packages": "cd packages && run lint",
"unit:packages": "cd packages && run unit",
"check-types:meteor": "cd meteor && run check-types",
"check-types": "cd packages && run build",
"test:meteor": "cd meteor && run test",
"lint:meteor": "cd meteor && yarn lint",
"unit:meteor": "cd meteor && yarn unit",
Expand All @@ -33,7 +33,7 @@
"meteor": "cd meteor && meteor",
"docs:serve": "cd packages && run docs:serve",
"reset": "node scripts/reset.mjs",
"test-all": "yarn install && run install-and-build && run check-types:meteor && run lint:packages && run lint:meteor && run test:packages && run test:meteor"
"test-all": "yarn install && run install-and-build && run check-types && run lint:packages && run lint:meteor && run test:packages && run test:meteor"
},
"devDependencies": {
"concurrently": "^9.1.2",
Expand Down
2 changes: 0 additions & 2 deletions packages/blueprints-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
},
"homepage": "https://github.com/Sofie-Automation/sofie-core/blob/main/packages/blueprints-integration#readme",
"scripts": {
"build": "run -T rimraf dist && run build:main",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
13 changes: 10 additions & 3 deletions packages/blueprints-integration/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"@sofie-automation/blueprints-integration": ["./src/index.ts"]
},
"resolveJsonModule": true,
"types": ["node"]
}
"types": ["node"],
"composite": true
},
"references": [
{
"path": "../shared-lib"
}
]
}
2 changes: 0 additions & 2 deletions packages/corelib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
},
"homepage": "https://github.com/Sofie-Automation/sofie-core/blob/main/packages/corelib#readme",
"scripts": {
"build": "run -T rimraf dist && run build:main",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
16 changes: 13 additions & 3 deletions packages/corelib/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"target": "es2019",
"rootDir": "./src",
"outDir": "./dist",
"baseUrl": "./",
"paths": {
Expand All @@ -12,6 +13,15 @@
},
"resolveJsonModule": true,
"types": ["node"],
"esModuleInterop": true
}
"esModuleInterop": true,
"composite": true
},
"references": [
{
"path": "../shared-lib"
},
{
"path": "../blueprints-integration"
}
]
}
4 changes: 0 additions & 4 deletions packages/job-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
},
"homepage": "https://github.com/Sofie-Automation/sofie-core/blob/main/packages/job-worker#readme",
"scripts": {
"dev": "run -T nodemon --config nodemon.json src/index.ts",
"dev:debug": "run -T nodemon --config nodemon.json --inspect-brk src/index.ts",
"build": "run -T rimraf dist && run build:main",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
14 changes: 11 additions & 3 deletions packages/job-worker/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
Expand All @@ -14,6 +15,13 @@
"resolveJsonModule": true,
"types": ["node"],
"skipLibCheck": true,
"esModuleInterop": true
}
"esModuleInterop": true,
"composite": true
},
"references": [
//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a syntax error, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, typescript allows comments in its json files.

I am using comments here to force prettier to format this array across multiple lines, to make it easier to read

{ "path": "../shared-lib/tsconfig.build.json" },
{ "path": "../blueprints-integration/tsconfig.build.json" },
{ "path": "../corelib/tsconfig.build.json" }
]
}
3 changes: 1 addition & 2 deletions packages/live-status-gateway-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
},
"homepage": "https://github.com/nrkno/sofie-core/blob/master/packages/live-status-gateway-api#readme",
"scripts": {
"build": "yarn generate-schema-types && run -T rimraf dist && run build:main",
"build:main": "run -T tsc -p tsconfig.build.json",
"build:prepare": "run generate-schema-types",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
6 changes: 4 additions & 2 deletions packages/live-status-gateway-api/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"target": "es2019",
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"@sofie-automation/live-status-gateway-api": ["./src/index.ts"]
},
"resolveJsonModule": true,
"types": ["node"]
"types": ["node"],
"composite": true
}
}
4 changes: 0 additions & 4 deletions packages/live-status-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
"homepage": "https://github.com/Sofie-Automation/sofie-core/blob/main/packages/live-status-gateway#readme",
"contributors": [],
"scripts": {
"build": "run -T rimraf dist && run build:main",
"buildstart": "run build && run dev",
"buildinspect": "run build && run inspect",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint --ignore-pattern server",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
12 changes: 10 additions & 2 deletions packages/live-status-gateway/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.bin",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
Expand All @@ -13,5 +14,12 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"esModuleInterop": true
}
},
"references": [
{ "path": "../shared-lib/tsconfig.build.json" },
{ "path": "../live-status-gateway-api/tsconfig.build.json" },
{ "path": "../blueprints-integration/tsconfig.build.json" },
{ "path": "../server-core-integration/tsconfig.build.json" },
{ "path": "../corelib/tsconfig.build.json" }
]
}
2 changes: 0 additions & 2 deletions packages/meteor-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
},
"homepage": "https://github.com/nrkno/sofie-core/blob/main/packages/corelib#readme",
"scripts": {
"build": "run -T rimraf dist && run build:main",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"unit": "run -T jest",
Expand Down
14 changes: 11 additions & 3 deletions packages/meteor-lib/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"target": "es2019",
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"@sofie-automation/meteor-lib": ["./src/index.ts"]
},
"resolveJsonModule": true,
"types": ["node"],
"esModuleInterop": true
}
"esModuleInterop": true,
"composite": true
},
"references": [
//
{ "path": "../shared-lib/tsconfig.build.json" },
{ "path": "../blueprints-integration/tsconfig.build.json" },
{ "path": "../corelib/tsconfig.build.json" }
]
}
2 changes: 1 addition & 1 deletion packages/mos-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY . .
RUN corepack enable
RUN yarn install --immutable
RUN yarn run pinst --disable
RUN yarn lerna run --scope \*\*/mos-gateway --include-dependencies --stream build
RUN yarn build:single mos-gateway/tsconfig.build.json
RUN yarn workspaces focus mos-gateway --production # purge dev-dependencies

# DEPLOY IMAGE
Expand Down
4 changes: 0 additions & 4 deletions packages/mos-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
}
],
"scripts": {
"build": "run -T rimraf dist && run build:main",
"buildstart": "run build && run dev",
"buildinspect": "run build && run inspect",
"build:main": "run -T tsc -p tsconfig.build.json",
"lint:raw": "run -T eslint",
"lint": "run lint:raw .",
"lint-fix": "run lint --fix",
Expand Down
9 changes: 7 additions & 2 deletions packages/mos-gateway/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.bin",
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
Expand All @@ -13,5 +13,10 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"esModuleInterop": true
}
},
"references": [
//
{ "path": "../shared-lib/tsconfig.build.json" },
{ "path": "../server-core-integration/tsconfig.build.json" }
]
}
2 changes: 1 addition & 1 deletion packages/openapi/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"include": ["client/ts/**/*.ts", "src/**/*.ts", "index.ts"],
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"exclude": ["node_modules/**", "**/*spec.ts", "**/__tests__/*", "**/__mocks__/*"],
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
Expand Down
Loading
Loading