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 is no specific playground for this library, but you can develop it with fingerprintjs-pro-react, just link this package with the pnpm link <spa-directory>
. You need to build the project before testing the integration.
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 to fix code style mistakes (not all mistakes can be fixed automatically):
pnpm lint:fix
Tests 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
We follow Conventional Commits for committing changes. We use git hooks to check that the commit message is correct.
The library is automatically released and published to NPM on every push to the main branch if there are relevant changes. The workflow must be approved by one of the maintainers, first.
We use typedoc to generate docs. To generate docs run:
pnpm docs
The docs will be generated into ./docs directory.
The docs are automatically deployed to Github Pages on every push to the main branch.