Skip to content

fix: address Copilot review findings on PR #379

c9107ff
Select commit
Loading
Failed to load commit list.
Merged

Add JSON Delta API (v5.0.0-alpha.0) #379

fix: address Copilot review findings on PR #379
c9107ff
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Mar 8, 2026 in 24s

Annotations

Check warning on line 475 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdn&open=AZzKhqz1bUJJ94dzrCdn&pullRequest=379

Check warning on line 194 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use concise character class syntax '\w' instead of '[a-zA-Z0-9_]'.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdt&open=AZzKhq0BbUJJ94dzrCdt&pullRequest=379

Check warning on line 60 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdd&open=AZzKhqz1bUJJ94dzrCdd&pullRequest=379

Check warning on line 572 in src/jsonDiff.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'embeddedObjKeys' is deprecated.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzMS6CVLSFP-gpYFgId&open=AZzMS6CVLSFP-gpYFgId&pullRequest=379

Check failure on line 46 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdc&open=AZzKhqz1bUJJ94dzrCdc&pullRequest=379

Check warning on line 151 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use concise character class syntax '\w' instead of '[a-zA-Z0-9_]'.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCde&open=AZzKhqz1bUJJ94dzrCde&pullRequest=379

Check warning on line 157 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdf&open=AZzKhqz1bUJJ94dzrCdf&pullRequest=379

Check failure on line 289 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdm&open=AZzKhqz1bUJJ94dzrCdm&pullRequest=379

Check warning on line 321 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use concise character class syntax '\w' instead of '[a-zA-Z0-9_]'.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdz&open=AZzKhq0BbUJJ94dzrCdz&pullRequest=379

Check failure on line 251 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdj&open=AZzKhqz1bUJJ94dzrCdj&pullRequest=379

Check failure on line 303 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdy&open=AZzKhq0BbUJJ94dzrCdy&pullRequest=379

Check warning on line 37 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdp&open=AZzKhq0BbUJJ94dzrCdp&pullRequest=379

Check warning on line 428 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer negative index over length minus index for `slice`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCd6&open=AZzKhq0BbUJJ94dzrCd6&pullRequest=379

Check warning on line 176 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use 'String#startsWith' method instead.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCds&open=AZzKhq0BbUJJ94dzrCds&pullRequest=379

Check warning on line 30 in tests/jsonDelta.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `structuredClone(…)` over `JSON.parse(JSON.stringify(…))` to create a deep clone.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqw1bUJJ94dzrCdb&open=AZzKhqw1bUJJ94dzrCdb&pullRequest=379

Check warning on line 222 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdv&open=AZzKhq0BbUJJ94dzrCdv&pullRequest=379

Check warning on line 24 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdo&open=AZzKhq0BbUJJ94dzrCdo&pullRequest=379

Check warning on line 20 in tests/jsonDelta.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `node:path` over `path`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqw1bUJJ94dzrCda&open=AZzKhqw1bUJJ94dzrCda&pullRequest=379

Check warning on line 148 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use concise character class syntax '\w' instead of '[a-zA-Z0-9_]'.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdr&open=AZzKhq0BbUJJ94dzrCdr&pullRequest=379

Check warning on line 47 in tests/deltaPath.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `Number.NaN` over `NaN`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzMS5_aLSFP-gpYFgIb&open=AZzMS5_aLSFP-gpYFgIb&pullRequest=379

Check warning on line 172 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This assertion is unnecessary since it does not change the type of the expression.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdi&open=AZzKhqz1bUJJ94dzrCdi&pullRequest=379

Check warning on line 387 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'value' will use Object's default stringification format ('[object Object]') when stringified.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCd0&open=AZzKhq0BbUJJ94dzrCd0&pullRequest=379

Check warning on line 284 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCdx&open=AZzKhq0BbUJJ94dzrCdx&pullRequest=379

Check warning on line 275 in src/jsonDelta.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhqz1bUJJ94dzrCdk&open=AZzKhqz1bUJJ94dzrCdk&pullRequest=379

Check warning on line 413 in src/deltaPath.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'val' will use Object's default stringification format ('[object Object]') when stringified.

See more on https://sonarcloud.io/project/issues?id=ltwlf_json-diff-ts&issues=AZzKhq0BbUJJ94dzrCd4&open=AZzKhq0BbUJJ94dzrCd4&pullRequest=379