Skip to content

Semantic release plugin for fetching native SDK dependency version identifiers

License

Notifications You must be signed in to change notification settings

fingerprintjs/semantic-release-native-dependency-plugin

Repository files navigation

Semantic Release Plugin: Native Dependency Version Retriever

Note This repository isn’t part of our core product.

Overview

This plugin retrieves native dependency version information from iOS and/or Android projects and integrates it into the semantic release workflow generate notes steps.

  • Extracts dependency versions from podspec json file (iOS) and/or Gradle task output (Android)
  • Ensures version consistency in release notes
  • Automates version retrieval for better release documentation

Installation

pnpm add -D @fingerprintjs/semantic-release-native-dependency-plugin

Usage

Add the plugin to your .releaserc configuration:

{
  "plugins": [
    ...,
    [
      "@fingerprintjs/semantic-release-native-dependency-plugin",
      {
        "heading": "Supported Native SDK Version Range",
        "platforms": {
          "iOS": {
            "podSpecJsonPath": "RNFingerprintjsPro.podspec.json",
            "dependencyName": "FingerprintPro",
            "displayName": "Fingerprint iOS SDK"
          },
          "android": {
            "path": "android",
            "gradleTaskName": "printFingerprintNativeSDKVersion",
            "displayName": "Fingerprint Android SDK"
          }
        }
      }
    ]
  ]
}

Plugin Configuration Reference

Key Type Default Description
heading string Native Dependencies Optional h3 heading shown before listing platform specific version ranges.
platforms object Top-level object defining configuration for each platform.
platforms.iOS object Configuration for the iOS dependency version resolution.
platforms.iOS.podSpecJsonPath string Path to the PODSPEC json file containing iOS dependency metadata.
platforms.iOS.dependencyName string Name of the dependency to extract the version.
platforms.iOS.displayName string iOS Name for the iOS dependency shown in release notes.
platforms.android object Configuration for the Android dependency version resolution.
platforms.android.path string Relative path to the Android project directory which contains `build.gradle.
platforms.android.gradleTaskName string Name of the custom Gradle task that outputs the dependency version.
platforms.android.displayName string android Name for the Android dependency shown in release notes.

Note: You can configure one or both platforms depending on your project needs. At least one platform (iOS or android) must be configured. The plugin will throw an error if both are omitted.

How It Works

  • The plugin reads version information from podspec json file (iOS) and/or a custom Gradle task output (Android).
  • It automatically includes the extracted versions in the release notes.
  • Helps maintain transparency about dependency versions used in each release.

Example generated release notes:

## 3.4.0 (https://github.com/.../compare/v3.3.1...v3.4.0) (2025-04-10)

### Features

* example feat release ([018455b](https://github.com/.../commit/...))

### Supported Native SDK Version Range

* Fingerprint Android SDK Version Range: `>= 2.7.0 and < 3.0.0`
* Fingerprint iOS SDK Version Range: `>= 2.7.0 and < 3.0.0`

Requirements

  • Node.js 20.8.1 or higher
  • Semantic Release configured in your project

Contribution & Development

We welcome contributions! To get started with development:

Development Environment

  • Node.js 20.8.1 or higher required
  • Uses pnpm as the package manager
  • Code follows ESLint and Prettier configurations
  • Uses Husky and Lint-Staged for pre-commit checks
  • Jest for testing
  • Commitizen for conventional commits

Setup

  1. Clone the repository
    git clone https://github.com/fingerprintjs/semantic-release-native-dependency-plugin.git
    cd semantic-release-native-dependency-plugin
  2. Install dependencies
    pnpm install
  3. Integrate git hooks
    pnpm prepare

Development Workflow

  • Start development mode with live rebuilds:
    pnpm start
    or build the project manually:
    pnpm build
  • Run tests:
    pnpm test
    pnpm test:coverage # run tests with coverage report
  • Lint and format code:
    pnpm lint
    pnpm lint:fix # auto fix issues
  • Run type checks:
    pnpm typecheck
  • Generate documentation:
    pnpm docs

License

MIT

About

Semantic release plugin for fetching native SDK dependency version identifiers

Resources

License

Stars

Watchers

Forks

Packages

No packages published