From 71d34089269e370355fcd8325ec9802d77f53346 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 14:34:54 +0100 Subject: [PATCH 1/9] chore: remove Dependabot config and document changesets flow - Delete .github/dependabot.yml (we use Snyk) - Replace semantic-release publish section in contributing.md with the changesets flow INTER-2313 --- .github/dependabot.yml | 28 ---------------------------- contributing.md | 16 +++++++++------- 2 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8f4048d8..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directories: - - "/examples" - open-pull-requests-limit: 0 # install only security updates - schedule: - interval: "daily" - commit-message: - prefix: "test(deps):" - groups: - test-deps: - patterns: - - "*" - applies-to: security-updates - - - package-ecosystem: "npm" - directory: "/" - open-pull-requests-limit: 0 # install only security updates - schedule: - interval: "daily" - commit-message: - prefix: "build" - include: scope - groups: - dev-deps: - dependency-type: "development" - applies-to: security-updates diff --git a/contributing.md b/contributing.md index 27d99486..be44b1f9 100644 --- a/contributing.md +++ b/contributing.md @@ -58,12 +58,14 @@ pnpm test:dts ### How to publish -The library is automatically released and published to NPM on every push to the main branch if there are relevant changes using [semantic-release](https://github.com/semantic-release/semantic-release) with following plugins: +Releases are managed with [changesets](https://github.com/changesets/changesets). -- [@semantic-release/commit-analyzer](https://github.com/semantic-release/commit-analyzer) -- [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator) -- [@semantic-release/changelog](https://github.com/semantic-release/changelog) -- [@semantic-release/npm](https://github.com/semantic-release/npm) -- [@semantic-release/github](https://github.com/semantic-release/github) +When you make a change that should be released, add a changeset to your pull request: -The workflow must be approved by one of the maintainers, first. +```shell +pnpm changeset +``` + +This prompts you to select the bump type (`major`, `minor`, or `patch`) and to write a summary that becomes the changelog entry. Commit the generated file in `.changeset/` along with your changes. + +When PRs with changesets are merged to `main`, the [release workflow](.github/workflows/release.yml) opens (or updates) a "Version Packages" pull request that bumps the version and updates the changelog. Merging that pull request builds the package and publishes it to NPM. From 41b2d458c07fa99456fd079ae2df8cde51c8b0b0 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 14:39:27 +0100 Subject: [PATCH 2/9] docs: fix demo page count and add missing vite example INTER-2313 --- contributing.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contributing.md b/contributing.md index be44b1f9..91332b7e 100644 --- a/contributing.md +++ b/contributing.md @@ -8,13 +8,14 @@ The main branch is locked for the push action. For proposing changes, use the st ### Development playground -There are 4 demo pages for this integration: +There are 6 demo pages for this integration: 1. In `/examples/create-react-app` folder. It is a rich demo with scenarios of using different caching strategies. You can find more info about configuration and starting demo in the [readme](examples/create-react-app/README.md). 2. In `/examples/next` folder. It is a demo built with NextJS that allows testing SSR scenarios. You can find more info about configuration and starting demo in the [readme](examples/next/README.md). 3. In `/examples/next-appDir` folder. It is the same demo built with NextJS, but with new `app` directory approach. You can find more info about configuration and starting demo in the [readme](examples/next-appDir/README.md). 4. In `/examples/preact` folder. It is a demo built with Preact. You can find more info about configuration and starting demo in the [readme](examples/preact/README.md). -5. In `/examples/webpack-based` folder. It is a simple demo built with raw webpack. +5. In `/examples/vite` folder. It is a demo built with Vite. You can find more info about configuration and starting demo in the [readme](examples/vite/README.md). +6. In `/examples/webpack-based` folder. It is a simple demo built with raw webpack. ❗ Build projects before testing integration. First build the `@fingerprint/react` package, and then start any of the example apps. From f58c7ee1a5f4a7dc61d13933f55f24bdf3fa9c0e Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 14:51:23 +0100 Subject: [PATCH 3/9] docs: clarify example development commands --- contributing.md | 35 +++++++++++++++----------- examples/create-react-app/package.json | 3 ++- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/contributing.md b/contributing.md index 91332b7e..709a1eae 100644 --- a/contributing.md +++ b/contributing.md @@ -1,30 +1,37 @@ -# Contributing to Fingerprint React integration +# Contributing to Fingerprint React SDK ## Working with code -We prefer using [pnpm](https://pnpm.io/) for installing dependencies and running scripts. +We use [pnpm](https://pnpm.io/) for installing dependencies and running scripts. -The main branch is locked for the push action. For proposing changes, use the standard [pull request approach](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). It's recommended to discuss fixes or new functionality in the Issues, first. +The main branch is locked for the push action. For proposing changes, use the standard [pull request approach](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). It's recommended to discuss fixes or new functionality in the Issues first. -### Development playground +### How to build -There are 6 demo pages for this integration: +Just run: + +```shell +pnpm install +pnpm build +``` -1. In `/examples/create-react-app` folder. It is a rich demo with scenarios of using different caching strategies. You can find more info about configuration and starting demo in the [readme](examples/create-react-app/README.md). -2. In `/examples/next` folder. It is a demo built with NextJS that allows testing SSR scenarios. You can find more info about configuration and starting demo in the [readme](examples/next/README.md). -3. In `/examples/next-appDir` folder. It is the same demo built with NextJS, but with new `app` directory approach. You can find more info about configuration and starting demo in the [readme](examples/next-appDir/README.md). -4. In `/examples/preact` folder. It is a demo built with Preact. You can find more info about configuration and starting demo in the [readme](examples/preact/README.md). -5. In `/examples/vite` folder. It is a demo built with Vite. You can find more info about configuration and starting demo in the [readme](examples/vite/README.md). -6. In `/examples/webpack-based` folder. It is a simple demo built with raw webpack. +### Development playground -❗ Build projects before testing integration. First build the `@fingerprint/react` package, and then start any of the example apps. +Six demo apps are available: -### How to build +1. [`create-react-app`](examples/create-react-app/README.md) — a rich demo covering different caching strategies. +2. [`next`](examples/next/README.md) — a Next.js demo for testing SSR scenarios. +3. [`next-appDir`](examples/next-appDir/README.md) — the same Next.js demo using the `app` directory. +4. [`preact`](examples/preact/README.md) — a Preact demo. +5. [`vite`](examples/vite/README.md) — a Vite demo. +6. [`webpack-based`](examples/webpack-based/README.md) — a demo using raw webpack. -Just run: +❗ Build the SDK before building/starting an example app. From the repository root, run: ```shell pnpm build +pnpm --filter vite-example build +pnpm --filter next-example dev ``` ### Code style diff --git a/examples/create-react-app/package.json b/examples/create-react-app/package.json index c9ffb619..8557c63b 100644 --- a/examples/create-react-app/package.json +++ b/examples/create-react-app/package.json @@ -13,7 +13,8 @@ "typescript": "*" }, "scripts": { - "start": "PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start", + "dev": "PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start", + "start": "pnpm dev", "build": "DISABLE_ESLINT_PLUGIN=true react-scripts build" }, "browserslist": { From afc4d05fbf7f74d12e13fe3b34a055623ad3696b Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 14:59:11 +0100 Subject: [PATCH 4/9] docs: update example setup instructions --- examples/create-react-app/README.md | 14 ++++-- examples/next-appDir/README.md | 14 ++++-- examples/next/README.md | 14 ++++-- examples/preact/README.md | 14 ++++-- examples/vite/README.md | 76 ++++++----------------------- examples/webpack-based/README.md | 14 ++++-- 6 files changed, 66 insertions(+), 80 deletions(-) diff --git a/examples/create-react-app/README.md b/examples/create-react-app/README.md index 11b51b47..3aaf039c 100644 --- a/examples/create-react-app/README.md +++ b/examples/create-react-app/README.md @@ -13,12 +13,18 @@ To get the API key: ### Installing dependencies -1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`) -2. Come back to the example folder (`cd examples/create-react-app`) and run `pnpm install`. +From the repository root, install dependencies and build the SDK: -After you've completed all the steps and inserted the API key, you can run: +```shell +pnpm install +pnpm build +``` -### `pnpm start` +After setting the API key, start the example: + +```shell +pnpm --filter fingerprintjs-react-spa-example dev +``` Runs the app in the development mode.\ Open [http://localhost:3001](http://localhost:3001) to view it in the browser. diff --git a/examples/next-appDir/README.md b/examples/next-appDir/README.md index 75c13b6f..98842cbc 100644 --- a/examples/next-appDir/README.md +++ b/examples/next-appDir/README.md @@ -17,12 +17,18 @@ To get the API key: ### Installing dependencies -1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`) -2. Come back to the example folder (`cd examples/next-appDir`) and run `pnpm install`. +From the repository root, install dependencies and build the SDK: -After you've completed all the steps and inserted the API key, you can run: +```shell +pnpm install +pnpm build +``` -### `pnpm dev` +After setting the API key, start the example: + +```shell +pnpm --filter next-appDir dev +``` Runs the app in the development mode.\ Open [http://localhost:3002](http://localhost:3002) to view it in the browser. diff --git a/examples/next/README.md b/examples/next/README.md index ccc13776..32b45d4d 100644 --- a/examples/next/README.md +++ b/examples/next/README.md @@ -16,12 +16,18 @@ To get the API key: ### Installing dependencies -1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`) -2. Come back to the example folder (`cd examples/next`) and run `pnpm install`. +From the repository root, install dependencies and build the SDK: -After you've completed all the steps and inserted the API key, you can run: +```shell +pnpm install +pnpm build +``` -### `pnpm dev` +After setting the API key, start the example: + +```shell +pnpm --filter next-example dev +``` Runs the app in the development mode.\ Open [http://localhost:3002](http://localhost:3002) to view it in the browser. diff --git a/examples/preact/README.md b/examples/preact/README.md index 4e8729d7..a2cb3894 100644 --- a/examples/preact/README.md +++ b/examples/preact/README.md @@ -14,12 +14,18 @@ To get the API key: ### Installing dependencies -1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`) -2. Come back to the example folder (`cd examples/preact`) and run `pnpm install`. +From the repository root, install dependencies and build the SDK: -After you've completed all the steps and inserted the API key, you can run: +```shell +pnpm install +pnpm build +``` -### `pnpm start` +After setting the API key, start the example: + +```shell +pnpm --filter preact-example dev +``` Runs the app in the development mode.\ Open [http://localhost:8080](http://localhost:8080) to view it in the browser. diff --git a/examples/vite/README.md b/examples/vite/README.md index d2e77611..c4eb7a27 100644 --- a/examples/vite/README.md +++ b/examples/vite/README.md @@ -1,73 +1,29 @@ -# React + TypeScript + Vite +# Fingerprint Vite Example -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +This example demonstrates using Fingerprint in a React application built with Vite. -Currently, two official plugins are available: +## Setting up -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +### Fingerprint Public API key -## React Compiler +To try this example: -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +1. Create a `.env` or `.env.local` file in this directory. +2. Set `VITE_FPJS_PUBLIC_API_KEY` to your Fingerprint Public API key. -## Expanding the ESLint configuration +Find your API key in the Fingerprint Dashboard under [API Keys](https://dashboard.fingerprint.com/api-keys). If you do not have an account, [sign up for free](https://dashboard.fingerprint.com/signup/). -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: +### Installing dependencies -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... +From the repository root, install dependencies and build the SDK: - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```shell +pnpm install +pnpm build ``` -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' +After setting the API key, start the example: -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```shell +pnpm --filter vite-example dev ``` diff --git a/examples/webpack-based/README.md b/examples/webpack-based/README.md index 42eda8cc..b6ca7bfc 100644 --- a/examples/webpack-based/README.md +++ b/examples/webpack-based/README.md @@ -17,12 +17,18 @@ To get the API key: ### Installing dependencies -1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`) -2. Come back to the example folder (`cd examples/webpack-based`) and run `pnpm install`. +From the repository root, install dependencies and build the SDK: -After you've completed all the steps and inserted the API key, you can run: +```shell +pnpm install +pnpm build +``` -### `pnpm dev` +After setting the API key, start the example: + +```shell +pnpm --filter webpack-based dev +``` Runs the app in the development mode.\ Open [http://localhost:8080](http://localhost:8080) to view it in the browser. From 8258a2366f45b441569d548671a1ad75e699aabb Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 15:02:50 +0100 Subject: [PATCH 5/9] docs: clarify example commands --- README.md | 2 +- contributing.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 21c7da60..4fbe201e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ import ReactDOM from 'react-dom/client' import { FingerprintProvider } from '@fingerprint/react' import App from './App' -const root = ReactDOM.createRoot(document.getElementById('app')) +const root = ReactDOM.createRoot(document.getElementById('root')) // supports the same options as `start()` function. root.render( diff --git a/contributing.md b/contributing.md index 709a1eae..85110b9c 100644 --- a/contributing.md +++ b/contributing.md @@ -26,14 +26,19 @@ Six demo apps are available: 5. [`vite`](examples/vite/README.md) — a Vite demo. 6. [`webpack-based`](examples/webpack-based/README.md) — a demo using raw webpack. -❗ Build the SDK before building/starting an example app. From the repository root, run: +Build the SDK before building or starting an example app. From the repository root, run: ```shell pnpm build -pnpm --filter vite-example build -pnpm --filter next-example dev ``` +Build an example with `pnpm --filter build`, or start it with +`pnpm --filter dev`. + +For example: +```shell +pnpm --filter vite-example dev +``` ### Code style The code style is controlled by [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). Run to check that the code style is ok: From 29be19f9960d824bf16fe8d9e4de3c2943e2c09f Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 15:06:43 +0100 Subject: [PATCH 6/9] docs: update redirected links --- CHANGELOG.md | 2 +- README.md | 14 +++++++------- examples/create-react-app/README.md | 2 +- examples/next-appDir/README.md | 2 +- examples/next/README.md | 2 +- examples/preact/README.md | 2 +- examples/vite/README.md | 2 +- examples/webpack-based/README.md | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c75de6e8..867a4442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - The SDK api has changed to match changes introduced in V4 version of the agent. - Response field names follow the JavaScript Agent v4 API. For example, `visitorId` is now `visitor_id`, `requestId` is now `event_id`, and other response fields use snake_case. -- The default caching strategy has changed from `sessionStorage` caching to **no caching by default**, aligned with the underlying [JavaScript agent v4 default](https://docs.fingerprint.com/reference/js-agent-v4-start-function#cache). +- The default caching strategy has changed from `sessionStorage` caching to **no caching by default**, aligned with the underlying [JavaScript agent v4 default](https://docs.fingerprint.com/reference/js-agent-start-function#cache). ### Features diff --git a/README.md b/README.md index 4fbe201e..e8153a2b 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ coverage Current NPM version Monthly downloads from NPM - MIT license - Discord server + MIT license + Discord server Documentation

@@ -69,7 +69,7 @@ pnpm add @fingerprint/react ## Getting started -In order to identify visitors, you'll need a Fingerprint account (you can [sign up for free](https://dashboard.fingerprint.com/signup/)). +In order to identify visitors, you'll need a Fingerprint account (you can [sign up for free](https://dashboard.fingerprint.com/signup)). To get your API key and get started, see the [Fingerprint Quick Start Guide](https://docs.fingerprint.com/docs/quick-start-guide). ### 1. Wrap your application (or component) in ``. @@ -77,8 +77,8 @@ To get your API key and get started, see the [Fingerprint Quick Start Guide](htt - Set `apiKey` to your Fingerprint [Public API Key](https://dashboard.fingerprint.com/api-keys). - Set `region` if you have chosen a non-global [region](https://docs.fingerprint.com/docs/regions) during registration. - Set `endpoints` if you are using [one of our proxy integrations to increase accuracy](https://docs.fingerprint.com/docs/protecting-the-javascript-agent-from-adblockers) and effectiveness of visitor identification. -- You can use all the [start options](https://docs.fingerprint.com/reference/js-agent-v4-start-function#start-options) available in the JavaScript agent `start()` function. -- Caching is disabled by default. To enable caching, pass the JavaScript agent [`cache` start option](https://docs.fingerprint.com/reference/js-agent-v4-start-function#cache). +- You can use all the [start options](https://docs.fingerprint.com/reference/js-agent-start-function#start-options) available in the JavaScript agent `start()` function. +- Caching is disabled by default. To enable caching, pass the JavaScript agent [`cache` start option](https://docs.fingerprint.com/reference/js-agent-start-function#cache). ```jsx // src/index.js @@ -131,7 +131,7 @@ The `useVisitorData` hook also returns a `getData` method you can use to make an - You can pass `{ immediate: false }` to `useVisitorData` to disable automatic visitor identification on render. -Both `useVisitorData` and `getData` accept all the [get options](https://docs.fingerprint.com/reference/get-function#get-options) available in the JavaScript agent `get` function. +Both `useVisitorData` and `getData` accept all the [get options](https://docs.fingerprint.com/reference/js-agent-get-function#get-options) available in the JavaScript agent `get` function. The returned v4 visitor data uses raw response field names in snake_case, for example `visitor_id` and `event_id`. @@ -209,7 +209,7 @@ function App() { ## Error handling -The `getData` function throws errors directly from the JS Agent without changing them. See [JS Agent error handling](https://docs.fingerprint.com/reference/js-agent-v4-error-handling) for more details. +The `getData` function throws errors directly from the JS Agent without changing them. See [JS Agent error handling](https://docs.fingerprint.com/reference/js-agent-error-handling) for more details. ## API Reference diff --git a/examples/create-react-app/README.md b/examples/create-react-app/README.md index 3aaf039c..d0e1519e 100644 --- a/examples/create-react-app/README.md +++ b/examples/create-react-app/README.md @@ -9,7 +9,7 @@ In order to try out this example: To get the API key: - Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there. -- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup/). +- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies diff --git a/examples/next-appDir/README.md b/examples/next-appDir/README.md index 98842cbc..379d3290 100644 --- a/examples/next-appDir/README.md +++ b/examples/next-appDir/README.md @@ -13,7 +13,7 @@ In order to try out this example: To get the API key: - Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there. -- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup/). +- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies diff --git a/examples/next/README.md b/examples/next/README.md index 32b45d4d..1bf088d2 100644 --- a/examples/next/README.md +++ b/examples/next/README.md @@ -12,7 +12,7 @@ In order to try out this example: To get the API key: - Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there. -- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup/). +- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies diff --git a/examples/preact/README.md b/examples/preact/README.md index a2cb3894..4e5f6f74 100644 --- a/examples/preact/README.md +++ b/examples/preact/README.md @@ -10,7 +10,7 @@ In order to try out this example: To get the API key: - Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there. -- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup/). +- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies diff --git a/examples/vite/README.md b/examples/vite/README.md index c4eb7a27..71a6eb92 100644 --- a/examples/vite/README.md +++ b/examples/vite/README.md @@ -11,7 +11,7 @@ To try this example: 1. Create a `.env` or `.env.local` file in this directory. 2. Set `VITE_FPJS_PUBLIC_API_KEY` to your Fingerprint Public API key. -Find your API key in the Fingerprint Dashboard under [API Keys](https://dashboard.fingerprint.com/api-keys). If you do not have an account, [sign up for free](https://dashboard.fingerprint.com/signup/). +Find your API key in the Fingerprint Dashboard under [API Keys](https://dashboard.fingerprint.com/api-keys). If you do not have an account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies diff --git a/examples/webpack-based/README.md b/examples/webpack-based/README.md index b6ca7bfc..00f9debb 100644 --- a/examples/webpack-based/README.md +++ b/examples/webpack-based/README.md @@ -13,7 +13,7 @@ In order to try out this example: To get the API key: - Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there. -- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup/). +- If you don't have a Fingerprint account, [sign up for free](https://dashboard.fingerprint.com/signup). ### Installing dependencies From 7adbf10bf2aae95938f9e58821aeaee287f0cc12 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 15:28:18 +0100 Subject: [PATCH 7/9] docs: fix stale references and document dev scripts - Remove dead start:spa script targeting nonexistent examples/spa - Add react peer dependency (>=18) - Fix next-appDir port collision with next example (3002 -> 3003) - Align preact example env instructions with other examples - Document pnpm test:coverage and pnpm docs in contributing.md --- README.md | 2 +- contributing.md | 14 ++++++++++++++ examples/next-appDir/README.md | 2 +- examples/next-appDir/package.json | 2 +- examples/preact/README.md | 2 +- package.json | 4 +++- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e8153a2b..0c1a60e8 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ const root = ReactDOM.createRoot(document.getElementById('root')) // supports the same options as `start()` function. root.render( diff --git a/contributing.md b/contributing.md index 85110b9c..7825d994 100644 --- a/contributing.md +++ b/contributing.md @@ -63,12 +63,26 @@ To run tests you can use IDE instruments or just run: pnpm test ``` +To run tests once with a coverage report: + +```shell +pnpm test:coverage +``` + To check the distributive TypeScript declarations, build the project and run: ```shell pnpm test:dts ``` +### API reference docs + +The API reference is generated from the source with [TypeDoc](https://typedoc.org/). Regenerate it into the (git-ignored) `docs/` folder with: + +```shell +pnpm docs +``` + ### How to publish Releases are managed with [changesets](https://github.com/changesets/changesets). diff --git a/examples/next-appDir/README.md b/examples/next-appDir/README.md index 379d3290..43d6f0ca 100644 --- a/examples/next-appDir/README.md +++ b/examples/next-appDir/README.md @@ -31,4 +31,4 @@ pnpm --filter next-appDir dev ``` Runs the app in the development mode.\ -Open [http://localhost:3002](http://localhost:3002) to view it in the browser. +Open [http://localhost:3003](http://localhost:3003) to view it in the browser. diff --git a/examples/next-appDir/package.json b/examples/next-appDir/package.json index ce23f84e..954f1d31 100644 --- a/examples/next-appDir/package.json +++ b/examples/next-appDir/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev --port=3002", + "dev": "next dev --port=3003", "build": "next build", "start": "next start", "lint": "next lint" diff --git a/examples/preact/README.md b/examples/preact/README.md index 4e5f6f74..24c248ca 100644 --- a/examples/preact/README.md +++ b/examples/preact/README.md @@ -4,7 +4,7 @@ In order to try out this example: -1. Create a `.env` file in this directory. +1. Create a `.env` (or `.env.local`) file in this directory. 2. Set the `PREACT_APP_FPJS_PUBLIC_API_KEY` environment variable to the value of your Fingerprint Public API key. To get the API key: diff --git a/package.json b/package.json index c9a36f4d..fdfdf2a4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "prepare": "husky install", "watch": "vite build --watch", "build": "vite build", - "start:spa": "pnpm start --prefix=examples/spa", "lint": "eslint --ext .js,.ts,.tsx --ignore-path .gitignore --max-warnings 0 .", "lint:fix": "pnpm lint --fix", "test": "vitest", @@ -62,6 +61,9 @@ "@fingerprint/agent": "^4.0.0", "fast-deep-equal": "3.1.3" }, + "peerDependencies": { + "react": ">=18" + }, "devDependencies": { "@changesets/cli": "^2.30.0", "@commitlint/cli": "^19.2.0", From 5db8ef5479e990334bd1a8122179e42e32dffa36 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 16:08:44 +0100 Subject: [PATCH 8/9] ci: pin pnpm version via packageManager field The shared dx-team-toolkit workflow requires a pnpm version from package.json's packageManager key; it was missing, breaking all CI jobs (and main) at the Install pnpm step. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index fdfdf2a4..38cc87c7 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ }, "author": "FingerprintJS, Inc (https://fingerprint.com)", "license": "MIT", + "packageManager": "pnpm@10.32.1", "bugs": { "url": "https://github.com/fingerprintjs/react/issues" }, From 7c94e92f6e687d1d4d3fc0c865ba292b07653a87 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Tue, 14 Jul 2026 16:19:15 +0100 Subject: [PATCH 9/9] ci: adopt corepack and pnpm 11 (INTER-2314) Bump the packageManager pin from pnpm 10 to 11.13.0 (with corepack integrity hash) and add an allowBuilds allowlist, since pnpm 11 blocks dependency build scripts by default. esbuild (Vite build) is allowed; the core-js funding notices and legacy fsevents@1 native build stay disabled. Lockfile is unchanged (v9.0 is already valid under pnpm 11). Verified locally on pnpm 11.13.0: build, lint, test:dts, test:coverage. --- package.json | 2 +- pnpm-workspace.yaml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 38cc87c7..ec764b99 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ }, "author": "FingerprintJS, Inc (https://fingerprint.com)", "license": "MIT", - "packageManager": "pnpm@10.32.1", + "packageManager": "pnpm@11.13.0+sha512.88d94724d8f2e6c186744a5584c6e59ecac869ec7ba15e9cb4cd628e8dc7066820b2481d8ee3b51ea8da323a7378068aa58c556a3720d32b7c20a051d088363a", "bugs": { "url": "https://github.com/fingerprintjs/react/issues" }, diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c9e19fa1..4bc25c43 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,6 +2,12 @@ packages: - examples/* - ./ -onlyBuiltDependencies: - - core-js - - core-js-pure +# pnpm 11 blocks dependency build scripts by default. esbuild powers the Vite +# build, so allow it; the core-js scripts only print funding notices and the +# legacy fsevents@1 native build fails on modern Node (it is optional), so keep +# those disabled. +allowBuilds: + core-js: false + core-js-pure: false + esbuild: true + fsevents: false