Skip to content

Commit acfb587

Browse files
davidbuzinskigithub-advanced-security[bot]mcafaroDavid Buzinski
authored
Fix CodeQL findings (#58)
* Potential fix for code scanning alert no. 4: Incomplete string escaping or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 3: Incomplete string escaping or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Use `replaceAll` instead of `replace` Co-authored-by: Mark Cafaro <34887852+mcafaro@users.noreply.github.com> * Update buildtool.unit.test.ts * bump compiler target to support replaceAll * Update tsconfig.json --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Mark Cafaro <34887852+mcafaro@users.noreply.github.com> Co-authored-by: David Buzinski <davidb@vdi-lsddp-236.dhcp.mathworks.com>
1 parent e9f1c4a commit acfb587

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/buildtool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface RunBuildOptions {
77
}
88

99
export function generateCommand(options: RunBuildOptions): string {
10-
const pluginsPath = path.join(__dirname,"plugins").replace("'","''");
10+
const pluginsPath = path.join(__dirname,"plugins").replaceAll("'","''");
1111
let command: string = "addpath('"+ pluginsPath +"'); buildtool"
1212
if (options.Tasks) {
1313
command = command + " " + options.Tasks;

src/buildtool.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as path from "path";
44
import * as buildtool from "./buildtool";
55

66
describe("command generation", () => {
7-
const command = "addpath('"+ path.join(__dirname, "plugins").replace("'","''") +"'); buildtool"
7+
const command = "addpath('"+ path.join(__dirname, "plugins").replaceAll("'","''") +"'); buildtool"
88
it("buildtool invocation with unspecified tasks and build options", () => {
99
const options: buildtool.RunBuildOptions = {
1010
Tasks: "",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES6",
3+
"target": "ES2022",
44
"module": "CommonJS",
55
"declaration": true,
66
"sourceMap": true,

0 commit comments

Comments
 (0)