Skip to content

Conversation

@nytamin
Copy link
Member

@nytamin nytamin commented Feb 4, 2025

Sofie-Automation/Sofie-TV-automation#58

Info to developers

This release includes a significant refactor/reformatting that affects a large part of the code base. If you want to submit contributions to release53 based on release52, please read the instructions in the Modernizing tech stack PR.

@nytamin nytamin requested a review from a team as a code owner February 4, 2025 14:10
@jstarpl jstarpl changed the title Release53 Release 53 Mar 20, 2025
nytamin and others added 27 commits April 14, 2025 10:00
Fix: Hot standby was not referring to the devices full name
feat: replace deprecated mongodb fields with projection
chore: refactor UploadButton to avoid duplication
feat: live status gateway type generation
feat: support hosting sofie under subdirectory
# Conflicts:
#	meteor/server/publications/buckets.ts
#	packages/webui/public/origo-ui/dist/origo.css
#	packages/webui/src/client/lib/ModalDialog.tsx
#	packages/webui/src/client/ui/App.tsx
#	packages/webui/src/client/ui/FloatingInspectors/VTFloatingInspector.tsx
#	packages/webui/src/client/ui/Header.tsx
#	packages/webui/src/client/ui/RundownView.tsx
#	packages/webui/src/client/ui/RundownView/SwitchboardPopUp.tsx
#	packages/webui/src/client/ui/SegmentStoryboard/StoryboardPartSecondaryPieces/StoryboardSecondaryPiece.tsx
#	packages/webui/src/client/ui/Settings.tsx
#	packages/webui/src/client/ui/Status.tsx
#	packages/webui/src/client/ui/Status/MediaManager.tsx
#	packages/webui/src/client/ui/SupportPopUp.tsx
#	packages/webui/src/client/ui/TestTools/index.tsx
#	packages/yarn.lock
feat: Director's Screen

# Conflicts:
#	packages/documentation/docs/user-guide/features/sofie-views-and-screens.mdx
…ease53

# Conflicts:
#	packages/job-worker/src/ingest/__tests__/syncChangesToPartInstance.test.ts
(they where accidentally removed during the remormatting)
…vice-page-crash

fix: PeripheralDevice.configManifest is an optional field
jstarpl and others added 17 commits October 29, 2025 11:24
This is not strict about it, if a system has more than one then it will simply get a stuck migration. Once the system has a single studio it will not allow adding or removing any.
…ause non-existent documents in the publication to be removed
* chore: tidy protectedString reexports

* chore: replace createManualPromise with Promise.withResolvers

* chore: remove remaining tempLib reexports from meteor

* chore: tidy protectedString reexports

* chore: remove remaining tempLib reexports from webui
Co-authored-by: Simon Rogers <s.rogers@evs.com>
No functional change, just a chore to have types aligned
* chore: update docs broken links

* chore: update docusaurus
validLicenses = strs.map(str => new RegExp(str), 'i')
const strs = m[1].split(",");
console.log(`Valid licenses: ${strs.join(", ")}`);
validLicenses = strs.map((str) => new RegExp(str), "i");

Check failure

Code scanning / CodeQL

Regular expression injection High

This regular expression is constructed from a
command-line argument
.

Copilot Autofix

AI 19 days ago

To fix the problem, we need to escape any special regex metacharacters in the user-provided license names before constructing a RegExp. The most robust and widely-accepted approach is to use the _.escapeRegExp function from the lodash package, producing literals out of any strings that contained special regex characters. This prevents injection and ensures that patterns only match the intended literal license names.

Steps:

  1. Add a lodash import (const _ = require('lodash');) at the top.
  2. Update line 15 so each str is sanitized using _.escapeRegExp before passing into the RegExp constructor.
  3. (Unrelated but possibly important: move the "i" flag into the RegExp constructor rather than Array.map's second parameter, but this is not the focus here.)
Suggested changeset 2
scripts/checkLicenses.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/scripts/checkLicenses.js b/scripts/checkLicenses.js
--- a/scripts/checkLicenses.js
+++ b/scripts/checkLicenses.js
@@ -1,4 +1,5 @@
 const legally = require("../meteor/node_modules/legally");
+const _ = require('lodash');
 
 // Usage: node checkLicenses.js --allowed=MIT,ISC --excludePackages=badPackageWhoDoesntSpeficyLicense
 
@@ -12,7 +13,7 @@
 	if (m) {
 		const strs = m[1].split(",");
 		console.log(`Valid licenses: ${strs.join(", ")}`);
-		validLicenses = strs.map((str) => new RegExp(str), "i");
+		validLicenses = strs.map((str) => new RegExp(_.escapeRegExp(str), "i"));
 	}
 
 	m = argString.match(/--excludePackages=(.*)/);
EOF
@@ -1,4 +1,5 @@
const legally = require("../meteor/node_modules/legally");
const _ = require('lodash');

// Usage: node checkLicenses.js --allowed=MIT,ISC --excludePackages=badPackageWhoDoesntSpeficyLicense

@@ -12,7 +13,7 @@
if (m) {
const strs = m[1].split(",");
console.log(`Valid licenses: ${strs.join(", ")}`);
validLicenses = strs.map((str) => new RegExp(str), "i");
validLicenses = strs.map((str) => new RegExp(_.escapeRegExp(str), "i"));
}

m = argString.match(/--excludePackages=(.*)/);
package.json
Outside changed files

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -43,5 +43,8 @@
 		"semver": "^7.6.3",
 		"snyk-nodejs-lockfile-parser": "^1.58.16"
 	},
-	"packageManager": "yarn@4.10.3"
+	"packageManager": "yarn@4.10.3",
+	"dependencies": {
+		"lodash": "^4.17.21"
 }
+}
EOF
@@ -43,5 +43,8 @@
"semver": "^7.6.3",
"snyk-nodejs-lockfile-parser": "^1.58.16"
},
"packageManager": "yarn@4.10.3"
"packageManager": "yarn@4.10.3",
"dependencies": {
"lodash": "^4.17.21"
}
}
This fix introduces these dependencies
Package Version Security advisories
lodash (npm) 4.17.21 None
Copilot is powered by AI and may make mistakes. Always verify output.
jstarpl and others added 11 commits November 21, 2025 02:20
Changes in this commit:
Split schemas into modular components with inheritance to reduce duplication
Introduce channels for improved documentation structure and clarity
Recursively resolve example references
Generate a merged asyncapi.yaml for tooling compatibility (e.g., Postman)
Reorganize schema directory structure
Update references, filenames, and fix spelling inconsistencies
Remove deprecated/unused schema files and scripts
Improve generated documentation and clean up formatting
Generate types for client-sent messages
…schema

chore: refactor lsg asyncapi schema
* chore: disable running postinstall

* chore: add yarn minimal age gate

* chore: run dependabot for meteor and packages dirs
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)
4.2% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.