@expo/fingerprint
A library to generate a fingerprint from a React Native project
Last updated 2 years ago by tsapeta .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @expo/fingerprint 
SYNC missed versions from official npm registry.

@expo/fingerprint

A library to generate a fingerprint from a React Native project

Usage

import * as Fingerprint from '@expo/fingerprint';

await Fingerprint.createFingerprintAsync('/projectRoot');

async function createFingerprintAsync(projectRoot: string, options?: Options): Promise<Fingerprint>

Create a fingerprint from project

Example:

const fingerprint = await createFingerprintAsync('/app');
console.log(fingerprint);
{
  "sources": [
    {
      "type": "file",
      "filePath": "app.json",
      "reasons": ["expoConfig"],
      "hash": "378083de0c6e6bb6caf8fb72df658b0b26fb29ef"
    },
    {
      "type": "file",
      "filePath": "eas.json",
      "reasons": ["easBuild"],
      "hash": "f723802b6ea916d1a6c4767b2299cc81ddb22eb4"
    },
    {
      "type": "dir",
      "filePath": "node_modules/expo",
      "reasons": ["expoAutolinkingIos", "expoAutolinkingAndroid", "bareRncliAutolinking"],
      "hash": "1faee4057fa943300905750b51c3b0cbf05f4b0d"
    }
  ],
  "hash": "bf8a3b08935f056270b1688333b02f1ef5fa25bf"
}

async function createProjectHashAsync(projectRoot: string, options?: Options): Promise<string>

Create a native hash value from project

Example:

const hash = await createProjectHashAsync('/app');
console.log(hash);
bf8a3b08935f056270b1688333b02f1ef5fa25bf

diffFingerprintChangesAsync(fingerprint: Fingerprint, projectRoot: string, options?: Options): Promise<FingerprintSource[]>

Differentiate given fingerprint with the current project fingerprint state

Example:

const fingerprint = {
  sources: [
    {
      type: 'file',
      filePath: 'app.json',
      reasons: ['expoConfig'],
      hash: '378083de0c6e6bb6caf8fb72df658b0b26fb29ef',
    },
    {
      type: 'file',
      filePath: 'eas.json',
      reasons: ['easBuild'],
      hash: 'f723802b6ea916d1a6c4767b2299cc81ddb22eb4',
    },
    {
      type: 'dir',
      filePath: 'node_modules/expo',
      reasons: ['expoAutolinkingIos', 'expoAutolinkingAndroid', 'bareRncliAutolinking'],
      hash: '1faee4057fa943300905750b51c3b0cbf05f4b0d',
    },
  ],
  hash: 'bf8a3b08935f056270b1688333b02f1ef5fa25bf',
};
const result = await diffFingerprintChangesAsync(fingerprint, '/app');
console.log(result);
[
  {
    "filePath": "ios",
    "hash": "e4190c0af9142fe4add4842777d9aec713213cd4",
    "reasons": ["bareNativeDir"],
    "type": "dir"
  },
  {
    "filePath": "app.json",
    "hash": "9ff1b51ca9b9435e8b849bcc82e3900d70f0feee",
    "reasons": ["expoConfig"],
    "type": "file"
  }
]

CLI Usage

npx @expo/fingerprint /path/to/projectRoot

Current Tags

  • 0.11.0-canary-20240904-69100c1                                ...           canary (2 months ago)
  • 0.10.3                                ...           latest (3 months ago)
  • 0.10.3                                ...           next (3 months ago)
  • 0.6.0                                ...           sdk-50 (a year ago)
  • 0.8.0                                ...           sdk-51 (6 months ago)

61 Versions

  • 0.11.0-canary-20240904-69100c1                                ...           2 months ago
  • 0.11.0-canary-20240814-ce0f7d5                                ...           3 months ago
  • 0.10.3                                ...           3 months ago
  • 0.10.2                                ...           4 months ago
  • 0.9.1-canary-20240719-83ee47b                                ...           4 months ago
  • 0.10.1                                ...           4 months ago
  • 0.9.1-canary-20240628-1ba8152                                ...           5 months ago
  • 0.9.1-canary-20240627-1402f4b                                ...           5 months ago
  • 0.9.1-canary-20240625-2333e70                                ...           5 months ago
  • 0.10.0                                ...           5 months ago
  • 0.9.0                                ...           5 months ago
  • 0.8.0                                ...           6 months ago
  • 0.7.1                                ...           7 months ago
  • 0.7.0                                ...           7 months ago
  • 0.0.1-canary-20240418-8d74597                                ...           7 months ago
  • 0.0.1-canary-20240415-cca04d8                                ...           7 months ago
  • 0.0.1-canary-20240415-0868fc4                                ...           7 months ago
  • 0.6.1                                ...           7 months ago
  • 0.0.1-canary-20240411-55a0085                                ...           7 months ago
  • 0.0.1-canary-20240411-33a7dc1                                ...           7 months ago
  • 0.0.1-canary-20240406-a4950c7                                ...           7 months ago
  • 0.0.1-canary-20240405-cdfd9c1                                ...           7 months ago
  • 0.0.1-canary-20240404-e2b8743                                ...           7 months ago
  • 0.0.1-canary-20240328-24ecc5e                                ...           8 months ago
  • 0.0.1-canary-20240327-a7302d9                                ...           8 months ago
  • 0.0.1-canary-20240320-8a10e09                                ...           8 months ago
  • 0.0.1-canary-20240318-dd8f245                                ...           8 months ago
  • 0.0.1-canary-20240318-af634b1                                ...           8 months ago
  • 0.0.1-canary-20240318-53194f5                                ...           8 months ago
  • 0.0.1-canary-20240315-ce71005                                ...           8 months ago
  • 0.0.1-canary-20240308-6715875                                ...           8 months ago
  • 0.0.1-canary-20240305-e60019e                                ...           8 months ago
  • 0.0.1-canary-20240228-7cee619                                ...           9 months ago
  • 0.0.1-canary-20240222-c729a13                                ...           9 months ago
  • 0.0.1-canary-20240109-93608d8                                ...           10 months ago
  • 0.6.0                                ...           a year ago
  • 0.0.1-canary-20231205-250b31f                                ...           a year ago
  • 0.0.1-canary-20231130-c8a9bf9                                ...           a year ago
  • 0.0.1-canary-20231130-ede75a7-1                                ...           a year ago
  • 0.0.1-canary-20231130-ede75a7                                ...           a year ago
  • 0.0.1-canary-20231129-c0ec023                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.0.1-canary-20231125-d600e44                                ...           a year ago
  • 0.0.0-canary-20231123-1b19f96-1                                ...           a year ago
  • 0.0.0-canary-20231123-1b19f96                                ...           a year ago
  • 0.0.0-canary-20231122-1af9191                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (13)

© 2010 - cnpmjs.org x YWFE | Home | YWFE