Skip to content

test: add angular test matrix#85

Open
Orkuncakilkaya wants to merge 2 commits into
mainfrom
angular-test-matrix
Open

test: add angular test matrix#85
Orkuncakilkaya wants to merge 2 commits into
mainfrom
angular-test-matrix

Conversation

@Orkuncakilkaya
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 74.29% 26/35
🟡 Branches 60% 3/5
🟢 Functions 80% 4/5
🟡 Lines 71.88% 23/32

Test suite run success

6 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from b46b7f3

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟡 All files 74.28 60 80 71.87
🔴  src 0 100 100 0
🔴   public-api.ts 0 100 100 0 5-12
🟢  src/lib 92.3 60 100 91.3
🟢   fingerprint.module.ts 100 100 100 100
🟢   fingerprint.service.ts 89.47 60 100 88.88 57,64
🟢   version.ts 100 100 100 100
🟡  src/lib/tokens 66.66 100 0 66.66
🟡   fingerprint-angular-settings-token.ts 66.66 100 0 66.66 7

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

@fingerprintjs/fingerprintjs-pro-angular@3.0.0-test.0

Major Changes

  • Introduce Fingerprint Agent API v4.

    This version removes the dependency on @fingerprintjs/fingerprintjs-pro-spa and uses @fingerprint/agent directly.
    Caching is no longer enabled by default. To enable caching, you must configure it in the startOptions of the module.

    The clearCache method has been removed from the FingerprintService. If you need to clear the cache manually, you should do it by directly interacting with the storage you configured.

    ⚠️This is a breaking change. Caching is no longer enabled by default.

    Why enable caching?

    Caching is essential for:

    • Reducing API usage: By storing visitor data locally, you avoid redundant calls to the Fingerprint API for the same visitor session.
    • Improving performance: Cached data is returned instantly, resulting in a faster user experience.
    • Lowering costs: If caching is not enabled manually after the upgrade, it will result in increased API usage on your Fingerprint Dashboard, which may increase your costs.

    Examples

    Enabling session storage caching

    FingerprintModule.forRoot({
      startOptions: {
        apiKey: 'your-fp-public-api-key',
        cache: {
          storage: 'sessionStorage',
          duration: 'optimize-cost',
        },
      },
    })

    Enabling local storage caching

    FingerprintModule.forRoot({
      startOptions: {
        apiKey: 'your-fp-public-api-key',
        cache: {
          storage: 'localStorage',
        },
      },
    })

    For more information, see the Fingerprint Agent documentation. (77b9ef3)

@Orkuncakilkaya Orkuncakilkaya marked this pull request as ready for review May 15, 2026 12:45
Comment thread .github/workflows/test-matrix.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an Angular version test matrix to validate the library across Angular 15–21, with supporting Node/pnpm configuration for CI and local test execution.

Changes:

  • Adds a GitHub Actions workflow for Angular matrix testing.
  • Adds a local bin/test-matrix.sh helper script with similar matrix logic.
  • Updates Node/test configuration and ignores generated test artifacts.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/test-matrix.yml Adds PR workflow to build and test the library across Angular versions.
bin/test-matrix.sh Adds local shell script for running the same Angular matrix.
package.json Adds Node engine requirement.
.node-version Sets the repository Node version to 22.
.gitignore Ignores pnpm store and matrix test logs.
projects/fingerprintjs-pro-angular/tsconfig.spec.json Adds Node types for specs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +104 to +116
for FILE in "tsconfig.json" "tsconfig.base.json" "projects/$LIB_NAME/tsconfig.spec.json"; do
if [ -f "$FILE" ]; then
sedi '/"types":/d' "$FILE"
sedi '/"esModuleInterop":/d' "$FILE"
sedi '/"allowSyntheticDefaultImports":/d' "$FILE"
sedi '/"skipLibCheck":/d' "$FILE"
sedi 's/"compilerOptions":\s*{/"compilerOptions": { "types": ["node", "jest"], "esModuleInterop": true, "allowSyntheticDefaultImports": true, "skipLibCheck": true,/g' "$FILE"
fi
done

find . -name "tsconfig.spec.json" -exec bash -c 'sed -i "s/\"types\":\s*\[/\"types\": [\"node\", \"jest\", /g" "$1"' _ {} \;
find . -name "tsconfig.spec.json" -exec bash -c 'sed -i "s/\"compilerOptions\":\s*{/\"compilerOptions\": { \"types\": [\"node\", \"jest\"], \"esModuleInterop\": true, \"allowSyntheticDefaultImports\": true, \"skipLibCheck\": true,/g" "$1"' _ {} \;

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants