We prefer using pnpm for installing dependencies and running scripts.
The main branch is locked for the push action. For proposing changes, use the standard pull request approach. It's recommended to discuss fixes or new functionality in the Issues, first.
There are 4 demo pages for this integration:
- 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. - 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. - In
/examples/next-appDir
folder. It is the same demo built with NextJS, but with newapp
directory approach. You can find more info about configuration and starting demo in the readme. - In
/examples/preact
folder. It is a demo built with Preact. You can find more info about configuration and starting demo in the readme. - In
/examples/webpack-based
folder. It is a simple demo built with raw webpack.
If you want to test integration with fingerprintjs-pro-spa, just link the package with the pnpm link <spa-directory>
.
❗ Build projects before testing integration. First build fingerprintjs-pro-spa
, then fingerprintjs-pro-react
, and then start spa example app.
Just run:
pnpm build
The code style is controlled by ESLint and Prettier. Run to check that the code style is ok:
pnpm lint
You aren't required to run the check manually, the CI will do it. Run the following command to fix style issues (not all issues can be fixed automatically):
pnpm lint:fix
Tests are located in __tests__
folder and run by jest in jsdom environment.
To run tests you can use IDE instruments or just run:
pnpm test
To check the distributive TypeScript declarations, build the project and run:
pnpm test:dts
The library is automatically released and published to NPM on every push to the main branch if there are relevant changes using semantic-release with following plugins:
- @semantic-release/commit-analyzer
- @semantic-release/release-notes-generator
- @semantic-release/changelog
- @semantic-release/npm
- @semantic-release/github
The workflow must be approved by one of the maintainers, first.