Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 3.17 KB

CONTRIBUTING.md

File metadata and controls

60 lines (36 loc) · 3.17 KB

Contributing to FingerprintJS Pro Azure Integration

Working with code

We prefer using pnpm for installing dependencies and running scripts.

For proposing changes, use the standard pull request approach. It's recommended to discuss fixes or new functionality in the Issues, first.

  • You cannot push directly into the main and develop branches.
  • Releases are created from the main branch. If you have the Azure Integration set up, it is running code from the main branch. Pull requests into the main branch are not accepted.
  • The develop branch functions as a candidate for the next release. Create your pull requests into this branch. The code in develop must always pass the tests.

How to build

  • After cloning the repository, run pnpm install to install dependencies.

  • Run pnpm build to build the project into the dist folder. The created dist/fingerprintjs-pro-azure-function/fingerprintjs-pro-azure-function.js and dist/fingerprintjs-pro-azure-function-management/fingerprintjs-pro-azure-function-management.js are meant to be deployed to Azure Functions.

How to deploy to Azure Functions

  1. Install the Azure CLI and sign in to Azure account according to the Sign in with Azure CLI guide.

  2. Install the Azure Functions Core Tools.

  3. Build the project.

  4. Go to the dist directory and run

    func azure functionapp publish <AppFunctionName>

    where <AppFunctionName> is a Azure Function App name in the Azure account.

You can invoke the function from your local environment using the start command in Azure Functions Core Tools.

How to run the function locally

  • Run pnpm start to run and debug the function locally via Azure Functions Core Tools.
  • You can run pnpm emulate-storage to locally emulate your Azure Storage account using Azurite.

Code style

Consistent code formatting is enforced by ESLint and Prettier. To check your code, run:

pnpm lint

You don't need to do this manually, CI runs the check automatically. To fix all auto-fixable issues at once, run:

pnpm lint:fix

Commit style

You are required to follow conventional commits rules.

How to release a new version

The integration is automatically released on every push to the main branch if there are relevant changes. The workflow must be approved by one of the maintainers, first.