Skip to content

refactor: update persistence module to TS#1261

Open
jaissica12 wants to merge 4 commits into
developmentfrom
refactor/SDKE-1107-update-persistence-to-TS
Open

refactor: update persistence module to TS#1261
jaissica12 wants to merge 4 commits into
developmentfrom
refactor/SDKE-1107-update-persistence-to-TS

remove unused iForwardingStatsBatches import

4928096
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded May 25, 2026 in 26s

Annotations

Check warning on line 344 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move function 'removeLocalStorage' to the outer scope.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighO&open=AZ4eKgukxSI5yJcCighO&pullRequest=1261

Check warning on line 508 in src/persistence.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=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighU&open=AZ4eKgukxSI5yJcCighU&pullRequest=1261

Check warning on line 876 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighd&open=AZ4eKgukxSI5yJcCighd&pullRequest=1261

Check warning on line 964 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighk&open=AZ4eKgukxSI5yJcCighk&pullRequest=1261

Check warning on line 215 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighH&open=AZ4eKgukxSI5yJcCighH&pullRequest=1261

Check failure on line 499 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighT&open=AZ4eKgukxSI5yJcCighT&pullRequest=1261

Check warning on line 395 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighR&open=AZ4eKgukxSI5yJcCighR&pullRequest=1261

Check failure on line 709 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCigha&open=AZ4eKgukxSI5yJcCigha&pullRequest=1261

Check warning on line 920 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `Date.now()` over `Date#getTime()`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighg&open=AZ4eKgukxSI5yJcCighg&pullRequest=1261

Check warning on line 409 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This assertion is unnecessary since the receiver accepts the original type of the expression.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ5IvVo6wJC_ZtSB6X5a&open=AZ5IvVo6wJC_ZtSB6X5a&pullRequest=1261

Check warning on line 280 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighL&open=AZ4eKgukxSI5yJcCighL&pullRequest=1261

Check warning on line 792 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use `.includes()`, rather than `.indexOf()`, when checking for existence.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighc&open=AZ4eKgukxSI5yJcCighc&pullRequest=1261

Check warning on line 945 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `Date.now()` over `Date#getTime()`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighh&open=AZ4eKgukxSI5yJcCighh&pullRequest=1261

Check warning on line 555 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use `.includes()`, rather than `.indexOf()`, when checking for existence.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighV&open=AZ4eKgukxSI5yJcCighV&pullRequest=1261

Check warning on line 384 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighQ&open=AZ4eKgukxSI5yJcCighQ&pullRequest=1261

Check warning on line 208 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless assignment to variable "obj".

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighF&open=AZ4eKgukxSI5yJcCighF&pullRequest=1261

Check warning on line 707 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighZ&open=AZ4eKgukxSI5yJcCighZ&pullRequest=1261

Check warning on line 137 in src/persistence.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=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighC&open=AZ4eKgukxSI5yJcCighC&pullRequest=1261

Check warning on line 210 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless assignment to variable "obj".

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighG&open=AZ4eKgukxSI5yJcCighG&pullRequest=1261

Check failure on line 647 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighY&open=AZ4eKgukxSI5yJcCighY&pullRequest=1261

Check warning on line 483 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighS&open=AZ4eKgukxSI5yJcCighS&pullRequest=1261

Check warning on line 288 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighM&open=AZ4eKgukxSI5yJcCighM&pullRequest=1261

Check warning on line 324 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighN&open=AZ4eKgukxSI5yJcCighN&pullRequest=1261

Check failure on line 132 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighB&open=AZ4eKgukxSI5yJcCighB&pullRequest=1261

Check warning on line 988 in src/persistence.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=mParticle_mparticle-web-sdk&issues=AZ4eKgukxSI5yJcCighl&open=AZ4eKgukxSI5yJcCighl&pullRequest=1261