diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 763712f..8643e9e 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -6,9 +6,40 @@ on: jobs: run-tests-check-coverage: name: Run tests & check coverage + runs-on: ubuntu-latest permissions: checks: write pull-requests: write - uses: fingerprintjs/dx-team-toolkit/.github/workflows/coverage-diff.yml@v1 - with: - runAfterInstall: pnpm generate:version + + steps: + - name: Checkout the repository + uses: actions/checkout@v7 + + - name: Install pnpm + uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 + + - name: Install latest node version + uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'pnpm' + + - name: Install Node packages + run: pnpm install --frozen-lockfile + + - name: Generate version + run: pnpm generate:version + + - name: Build + run: pnpm build + + - name: Run tests and prepare coverage report + run: pnpm test:coverage + + - name: Send Coverage to Coveralls + uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage/lcov.info + # make it optional to not fail the whole job if coveralls fails + continue-on-error: true diff --git a/package.json b/package.json index bd277e4..8a10de0 100644 --- a/package.json +++ b/package.json @@ -84,9 +84,9 @@ "projects/*" ], "pnpm": { - "onlyBuiltDependencies": ["@parcel/watcher", "esbuild", "lmdb", "msgpackr-extract"], "overrides": { "rxjs": "~7.8.0" } - } + }, + "packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49f4402..919c686 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,13 +34,13 @@ importers: version: 15.2.10(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-browser@15.2.10(@angular/animations@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))) '@angular/platform-server': specifier: ^15.2.10 - version: 15.2.10(bb9340fd85b833f543ade9387312e178) + version: 15.2.10(ozg6ihtx76ye5mwqiskjono6ia) '@angular/router': specifier: ^15.2.10 version: 15.2.10(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-browser@15.2.10(@angular/animations@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(rxjs@7.8.2) '@nguniversal/express-engine': specifier: ^15.2.1 - version: 15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(express@4.20.0) + version: 15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(express@4.20.0) express: specifier: ^4.20.0 version: 4.20.0 @@ -56,7 +56,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^15.2.10 - version: 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) + version: 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) '@angular-eslint/schematics': specifier: ^15.2.1 version: 15.2.1(@angular/cli@15.2.10(chokidar@3.5.3))(eslint@8.56.0)(typescript@4.9.5) @@ -92,7 +92,7 @@ importers: version: 0.1.0 '@nguniversal/builders': specifier: ^15.2.1 - version: 15.2.1(@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@types/express@4.17.13)(chokidar@3.5.3)(typescript@4.9.5) + version: 15.2.1(@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@types/express@4.17.13)(chokidar@3.5.3)(typescript@4.9.5) '@types/express': specifier: ^4.17.0 version: 4.17.13 @@ -128,7 +128,7 @@ importers: version: 29.7.0(@types/node@12.20.52)(ts-node@10.9.1(@types/node@12.20.52)(typescript@4.9.5)) jest-preset-angular: specifier: ^14.0.3 - version: 14.0.3(1768b93d21c3361974a224b326b8b84c) + version: 14.0.3(u2q7nq3urm6q6nbjqmgv6cbbhu) lint-staged: specifier: ^13.0.3 version: 13.0.3(enquirer@2.4.1) @@ -192,7 +192,7 @@ importers: version: 15.2.1(eslint@8.56.0)(typescript@5.9.3) '@angular/build': specifier: ^21.2.12 - version: 21.2.12(8124ac35316412ffa9726ce4256f5c59) + version: 21.2.12(tgtkolpbo6xk4md46r5ydmb5zm) '@angular/cli': specifier: ^21.2.12 version: 21.2.12(@types/node@12.20.52)(chokidar@5.0.0) @@ -2235,10 +2235,6 @@ packages: '@jridgewell/remapping@2.3.5': resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} - '@jridgewell/resolve-uri@3.0.7': - resolution: {integrity: sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==} - engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -2397,49 +2393,42 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@napi-rs/nice-linux-arm64-musl@1.1.1': resolution: {integrity: sha512-+2Rzdb3nTIYZ0YJF43qf2twhqOCkiSrHx2Pg6DJaCPYhhaxbLcdlV8hCRMHghQ+EtZQWGNcS2xF4KxBhSGeutg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@napi-rs/nice-linux-ppc64-gnu@1.1.1': resolution: {integrity: sha512-4FS8oc0GeHpwvv4tKciKkw3Y4jKsL7FRhaOeiPei0X9T4Jd619wHNe4xCLmN2EMgZoeGg+Q7GY7BsvwKpL22Tg==} engines: {node: '>= 10'} cpu: [ppc64] os: [linux] - libc: [glibc] '@napi-rs/nice-linux-riscv64-gnu@1.1.1': resolution: {integrity: sha512-HU0nw9uD4FO/oGCCk409tCi5IzIZpH2agE6nN4fqpwVlCn5BOq0MS1dXGjXaG17JaAvrlpV5ZeyZwSon10XOXw==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] - libc: [glibc] '@napi-rs/nice-linux-s390x-gnu@1.1.1': resolution: {integrity: sha512-2YqKJWWl24EwrX0DzCQgPLKQBxYDdBxOHot1KWEq7aY2uYeX+Uvtv4I8xFVVygJDgf6/92h9N3Y43WPx8+PAgQ==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] - libc: [glibc] '@napi-rs/nice-linux-x64-gnu@1.1.1': resolution: {integrity: sha512-/gaNz3R92t+dcrfCw/96pDopcmec7oCcAQ3l/M+Zxr82KT4DljD37CpgrnXV+pJC263JkW572pdbP3hP+KjcIg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@napi-rs/nice-linux-x64-musl@1.1.1': resolution: {integrity: sha512-xScCGnyj/oppsNPMnevsBe3pvNaoK7FGvMjT35riz9YdhB2WtTG47ZlbxtOLpjeO9SqqQ2J2igCmz6IJOD5JYw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@napi-rs/nice-openharmony-arm64@1.1.1': resolution: {integrity: sha512-6uJPRVwVCLDeoOaNyeiW0gp2kFIM4r7PL2MczdZQHkFi9gVlgm+Vn+V6nTWRcu856mJ2WjYJiumEajfSm7arPQ==} @@ -2620,42 +2609,36 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.6': resolution: {integrity: sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] - libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.6': resolution: {integrity: sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.6': resolution: {integrity: sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.6': resolution: {integrity: sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.6': resolution: {integrity: sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [musl] '@parcel/watcher-win32-arm64@2.5.6': resolution: {integrity: sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==} @@ -2722,28 +2705,24 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.4': resolution: {integrity: sha512-lU+6rgXXViO61B4EudxtVMXSOfiZONR29Sys5VGSetUY7X8mg9FCKIIjcPPj8xNDeYzKl+H8F/qSKOBVFJChCQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.4': resolution: {integrity: sha512-DZaN1f0PGp/bSvKhtw50pPsnln4T13ycDq1FrDWRiHmWt1JeW+UtYg9touPFf8yt993p8tS2QjybpzKNTxYEwg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-musl@1.0.0-rc.4': resolution: {integrity: sha512-RnGxwZLN7fhMMAItnD6dZ7lvy+TI7ba+2V54UF4dhaWa/p8I/ys1E73KO6HmPmgz92ZkfD8TXS1IMV8+uhbR9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] '@rolldown/binding-openharmony-arm64@1.0.0-rc.4': resolution: {integrity: sha512-6lcI79+X8klGiGd8yHuTgQRjuuJYNggmEml+RsyN596P23l/zf9FVmJ7K0KVKkFAeYEdg0iMUKyIxiV5vebDNQ==} @@ -2832,79 +2811,66 @@ packages: resolution: {integrity: sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.60.4': resolution: {integrity: sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.60.4': resolution: {integrity: sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.60.4': resolution: {integrity: sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.60.4': resolution: {integrity: sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.60.4': resolution: {integrity: sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==} cpu: [loong64] os: [linux] - libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.60.4': resolution: {integrity: sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.60.4': resolution: {integrity: sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==} cpu: [ppc64] os: [linux] - libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.60.4': resolution: {integrity: sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.60.4': resolution: {integrity: sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.60.4': resolution: {integrity: sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.60.4': resolution: {integrity: sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.60.4': resolution: {integrity: sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openbsd-x64@4.60.4': resolution: {integrity: sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==} @@ -5134,7 +5100,7 @@ packages: git-raw-commits@2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} - deprecated: This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead. + deprecated: Deprecated and no longer maintained. Use @conventional-changelog/git-client instead. hasBin: true glob-parent@5.1.2: @@ -8809,7 +8775,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5)': + '@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5)': dependencies: '@ampproject/remapping': 2.2.0 '@angular-devkit/architect': 0.1502.10(chokidar@3.5.3) @@ -8874,7 +8840,7 @@ snapshots: webpack-merge: 5.8.0 webpack-subresource-integrity: 5.1.0(webpack@5.76.1(esbuild@0.17.8)) optionalDependencies: - '@angular/platform-server': 15.2.10(bb9340fd85b833f543ade9387312e178) + '@angular/platform-server': 15.2.10(ozg6ihtx76ye5mwqiskjono6ia) esbuild: 0.17.8 ng-packagr: 15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5) transitivePeerDependencies: @@ -9048,7 +9014,7 @@ snapshots: '@angular/core': 15.2.10(rxjs@7.8.2)(zone.js@0.11.5) tslib: 2.6.2 - '@angular/build@21.2.12(8124ac35316412ffa9726ce4256f5c59)': + '@angular/build@21.2.12(tgtkolpbo6xk4md46r5ydmb5zm)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2102.12(chokidar@5.0.0) @@ -9084,7 +9050,7 @@ snapshots: optionalDependencies: '@angular/core': 21.2.14(@angular/compiler@21.2.14)(rxjs@7.8.2)(zone.js@0.11.5) '@angular/platform-browser': 21.2.14(@angular/animations@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/common@21.2.14(@angular/core@21.2.14(@angular/compiler@21.2.14)(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@21.2.14(@angular/compiler@21.2.14)(rxjs@7.8.2)(zone.js@0.11.5)) - '@angular/platform-server': 15.2.10(bb9340fd85b833f543ade9387312e178) + '@angular/platform-server': 15.2.10(ozg6ihtx76ye5mwqiskjono6ia) less: 4.1.3 lmdb: 3.5.1 ng-packagr: 15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5) @@ -9266,7 +9232,7 @@ snapshots: optionalDependencies: '@angular/animations': 15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)) - '@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178)': + '@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia)': dependencies: '@angular/animations': 15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)) '@angular/common': 15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2) @@ -9404,7 +9370,7 @@ snapshots: '@babel/types': 7.29.7 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -10194,7 +10160,7 @@ snapshots: '@babel/parser': 7.29.7 '@babel/template': 7.29.7 '@babel/types': 7.29.7 - debug: 4.3.4 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -11086,9 +11052,9 @@ snapshots: '@jest/transform@29.7.0': dependencies: - '@babel/core': 7.20.12 + '@babel/core': 7.29.0 '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/trace-mapping': 0.3.31 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 @@ -11097,7 +11063,7 @@ snapshots: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pirates: 4.0.5 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -11131,10 +11097,8 @@ snapshots: '@jridgewell/remapping@2.3.5': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/resolve-uri@3.0.7': {} + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/resolve-uri@3.1.2': {} @@ -11142,8 +11106,8 @@ snapshots: '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/sourcemap-codec@1.4.15': {} @@ -11157,12 +11121,12 @@ snapshots: '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.0.7 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 '@leichtgewicht/ip-codec@2.0.4': {} @@ -11336,10 +11300,10 @@ snapshots: typescript: 4.9.5 webpack: 5.76.1(esbuild@0.17.8) - '@nguniversal/builders@15.2.1(@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@types/express@4.17.13)(chokidar@3.5.3)(typescript@4.9.5)': + '@nguniversal/builders@15.2.1(@angular-devkit/build-angular@15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@types/express@4.17.13)(chokidar@3.5.3)(typescript@4.9.5)': dependencies: '@angular-devkit/architect': 0.1502.10(chokidar@3.5.3) - '@angular-devkit/build-angular': 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) + '@angular-devkit/build-angular': 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) '@angular-devkit/core': 15.2.10(chokidar@3.5.3) '@nguniversal/common': 15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)) browser-sync: 2.27.10 @@ -11375,11 +11339,11 @@ snapshots: - supports-color - utf-8-validate - '@nguniversal/express-engine@15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(express@4.20.0)': + '@nguniversal/express-engine@15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(express@4.20.0)': dependencies: '@angular/common': 15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2) '@angular/core': 15.2.10(rxjs@7.8.2)(zone.js@0.11.5) - '@angular/platform-server': 15.2.10(bb9340fd85b833f543ade9387312e178) + '@angular/platform-server': 15.2.10(ozg6ihtx76ye5mwqiskjono6ia) '@nguniversal/common': 15.2.1(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)) express: 4.20.0 tslib: 2.6.2 @@ -11836,24 +11800,24 @@ snapshots: '@types/babel__core@7.1.19': dependencies: - '@babel/parser': 7.24.0 - '@babel/types': 7.24.0 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.17.1 '@types/babel__generator@7.6.4': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.29.7 '@types/babel__template@7.4.1': dependencies: - '@babel/parser': 7.24.0 - '@babel/types': 7.24.0 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 '@types/babel__traverse@7.17.1': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.29.7 '@types/body-parser@1.19.2': dependencies: @@ -11893,8 +11857,8 @@ snapshots: '@types/eslint@8.4.2': dependencies: - '@types/estree': 0.0.51 - '@types/json-schema': 7.0.11 + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 '@types/estree@0.0.51': {} @@ -12748,8 +12712,8 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 '@types/babel__core': 7.1.19 '@types/babel__traverse': 7.17.1 @@ -13149,14 +13113,14 @@ snapshots: chokidar@3.5.3: dependencies: anymatch: 3.1.2 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 chokidar@4.0.3: dependencies: @@ -15239,10 +15203,10 @@ snapshots: jest-regex-util: 29.6.3 jest-util: 29.7.0 jest-worker: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 jest-leak-detector@29.7.0: dependencies: @@ -15278,9 +15242,9 @@ snapshots: optionalDependencies: jest-resolve: 29.7.0 - jest-preset-angular@14.0.3(1768b93d21c3361974a224b326b8b84c): + jest-preset-angular@14.0.3(u2q7nq3urm6q6nbjqmgv6cbbhu): dependencies: - '@angular-devkit/build-angular': 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(bb9340fd85b833f543ade9387312e178))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) + '@angular-devkit/build-angular': 15.2.10(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(@angular/platform-server@15.2.10(ozg6ihtx76ye5mwqiskjono6ia))(ng-packagr@15.2.2(@angular/compiler-cli@15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5))(tslib@2.5.0)(typescript@4.9.5))(typescript@4.9.5) '@angular/compiler-cli': 15.2.10(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(typescript@4.9.5) '@angular/core': 15.2.10(rxjs@7.8.2)(zone.js@0.11.5) '@angular/platform-browser-dynamic': 15.2.10(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/compiler@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(@angular/platform-browser@15.2.10(@angular/animations@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5)))(@angular/common@15.2.10(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))(rxjs@7.8.2))(@angular/core@15.2.10(rxjs@7.8.2)(zone.js@0.11.5))) @@ -17173,7 +17137,7 @@ snapshots: dependencies: chokidar: 4.0.3 immutable: 5.1.5 - source-map-js: 1.0.2 + source-map-js: 1.2.1 optionalDependencies: '@parcel/watcher': 2.5.6 @@ -17811,7 +17775,7 @@ snapshots: terser@5.16.3: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.7.1 + acorn: 8.11.3 commander: 2.20.3 source-map-support: 0.5.21 @@ -17935,7 +17899,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 '@types/node': 12.20.52 - acorn: 8.7.1 + acorn: 8.11.3 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 @@ -17953,7 +17917,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 '@types/node': 14.18.33 - acorn: 8.7.1 + acorn: 8.11.3 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 @@ -18144,7 +18108,7 @@ snapshots: picomatch: 4.0.4 postcss: 8.5.15 rollup: 4.60.4 - tinyglobby: 0.2.15 + tinyglobby: 0.2.16 optionalDependencies: '@types/node': 12.20.52 fsevents: 2.3.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5ed6c3e..324cdaa 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ packages: - - 'projects/*' + - 'projects/*' diff --git a/projects/fingerprintjs-pro-angular/package.json b/projects/fingerprintjs-pro-angular/package.json index 0698773..26dc715 100644 --- a/projects/fingerprintjs-pro-angular/package.json +++ b/projects/fingerprintjs-pro-angular/package.json @@ -38,4 +38,4 @@ "@fingerprint/agent": "^4.0.0", "tslib": "^2.5.0" } -} +} \ No newline at end of file diff --git a/projects/fingerprintjs-pro-angular/src/lib/fingerprint.service.server.spec.ts b/projects/fingerprintjs-pro-angular/src/lib/fingerprint.service.server.spec.ts new file mode 100644 index 0000000..93e67cf --- /dev/null +++ b/projects/fingerprintjs-pro-angular/src/lib/fingerprint.service.server.spec.ts @@ -0,0 +1,27 @@ +import { TestBed } from '@angular/core/testing' +import { FingerprintService } from './fingerprint.service' +import { PLATFORM_ID } from '@angular/core' +import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './tokens/fingerprint-angular-settings-token' + +describe('FingerprintService (Server)', () => { + let service: FingerprintService + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + FingerprintService, + { provide: PLATFORM_ID, useValue: 'server' }, + { provide: FINGERPRINT_ANGULAR_SETTINGS_TOKEN, useValue: { startOptions: { apiKey: 'test' } } }, + ], + }) + service = TestBed.inject(FingerprintService) + }) + + it('should reject getVisitorData on non-browser platform', async () => { + await expect(service.getVisitorData()).rejects.toThrow('Fingerprint agent is not initialized on this platform') + }) + + it('should reject collectData on non-browser platform', async () => { + await expect(service.collectData()).rejects.toThrow('Fingerprint agent is not initialized on this platform') + }) +}) diff --git a/projects/fingerprintjs-pro-angular/src/lib/tokens/fingerprint-angular-settings-token.spec.ts b/projects/fingerprintjs-pro-angular/src/lib/tokens/fingerprint-angular-settings-token.spec.ts new file mode 100644 index 0000000..7876743 --- /dev/null +++ b/projects/fingerprintjs-pro-angular/src/lib/tokens/fingerprint-angular-settings-token.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing' +import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './fingerprint-angular-settings-token' + +describe('FINGERPRINT_ANGULAR_SETTINGS_TOKEN', () => { + it('should have a default value', () => { + TestBed.configureTestingModule({ + providers: [], + }) + const settings = TestBed.inject(FINGERPRINT_ANGULAR_SETTINGS_TOKEN) + expect(settings).toEqual({ startOptions: { apiKey: '' } }) + }) +}) diff --git a/projects/fingerprintjs-pro-angular/src/public-api.spec.ts b/projects/fingerprintjs-pro-angular/src/public-api.spec.ts new file mode 100644 index 0000000..b0e2eb4 --- /dev/null +++ b/projects/fingerprintjs-pro-angular/src/public-api.spec.ts @@ -0,0 +1,15 @@ +import * as publicApi from './public-api' +import { FingerprintService } from './lib/fingerprint.service' +import { FingerprintModule } from './lib/fingerprint.module' +import { provideFingerprint } from './lib/fingerprint.providers' +import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './lib/tokens/fingerprint-angular-settings-token' + +describe('public-api', () => { + it('should export the expected symbols', () => { + expect(publicApi.FingerprintService).toBe(FingerprintService) + expect(publicApi.FingerprintModule).toBe(FingerprintModule) + expect(publicApi.provideFingerprint).toBe(provideFingerprint) + expect(publicApi.FINGERPRINT_ANGULAR_SETTINGS_TOKEN).toBe(FINGERPRINT_ANGULAR_SETTINGS_TOKEN) + expect(publicApi.Fingerprint).toBeDefined() + }) +})