@expo/fingerprint
Advanced tools
Comparing version 0.5.0 to 0.6.0
{ | ||
"name": "@expo/fingerprint", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "A library to generate a fingerprint from a React Native project", | ||
@@ -58,3 +58,3 @@ "main": "build/index.js", | ||
}, | ||
"gitHead": "b723f0ff34034e748e8fb1fcd0464daedb56d6c3" | ||
"gitHead": "2763e9cc6f2317b40da73382fe2595f8deebff46" | ||
} |
@@ -5,4 +5,11 @@ # @expo/fingerprint | ||
## Usage | ||
## Table of Contents | ||
* [API Usage](#api-usage) | ||
* [CLI Usage](#cli-usage) | ||
* [Customizations](#customizations) | ||
* [Limitations](#limitations) | ||
## API Usage | ||
```ts | ||
@@ -14,6 +21,10 @@ import * as Fingerprint from '@expo/fingerprint'; | ||
### `async function createFingerprintAsync(projectRoot: string, options?: Options): Promise<Fingerprint>` | ||
### createFingerprintAsync | ||
Create a fingerprint from project | ||
```ts | ||
function createFingerprintAsync(projectRoot: string, options?: Options): Promise<Fingerprint>; | ||
``` | ||
Example: | ||
@@ -52,6 +63,10 @@ | ||
### `async function createProjectHashAsync(projectRoot: string, options?: Options): Promise<string>` | ||
### createProjectHashAsync | ||
Create a native hash value from project | ||
```ts | ||
function createProjectHashAsync(projectRoot: string, options?: Options): Promise<string>; | ||
``` | ||
Example: | ||
@@ -68,6 +83,10 @@ | ||
### `diffFingerprintChangesAsync(fingerprint: Fingerprint, projectRoot: string, options?: Options): Promise<FingerprintSource[]>` | ||
### diffFingerprintChangesAsync | ||
Differentiate given `fingerprint` with the current project fingerprint state | ||
Diff the given `fingerprint` with the current project fingerprint state | ||
```ts | ||
function diffFingerprintChangesAsync(fingerprint: Fingerprint, projectRoot: string, options?: Options): Promise<FingerprintSource[]>; | ||
``` | ||
Example: | ||
@@ -120,2 +139,10 @@ | ||
### diffFingerprints | ||
Find the diff between two fingerprints | ||
```ts | ||
function diffFingerprints(fingerprint1: Fingerprint, fingerprint2: Fingerprint): FingerprintSource[]; | ||
``` | ||
## CLI Usage | ||
@@ -135,5 +162,22 @@ | ||
## Customizations | ||
### Include or exclude extra files in the **.fingerprintignore** file | ||
Our default ignore paths, found here [`DEFAULT_IGNORE_PATHS`](https://github.com/expo/expo/blob/main/packages/%40expo/fingerprint/src/Options.ts#L9), make hashing fast and keep hashing results stable. If the default setup does not fit your workflow, you can add a **.fingerprintignore** file in your project root. It works like [**.gitignore**](https://git-scm.com/docs/gitignore#_pattern_format) but with some slight differences: We use `minimatch` for pattern matching with the [limitations](https://github.com/expo/expo/blob/9b9133c96f209b0616d1796aadae28913f8d012f/packages/%40expo/fingerprint/src/Fingerprint.types.ts#L46-L55). | ||
Here's how to use **.fingerprintignore**: To skip a whole folder but keep some files, you can do this: | ||
``` | ||
# Ignore the entire /app/ios folder | ||
/app/ios/**/* | ||
# But still keep /app/ios/Podfile and /app/ios/Podfile.lock | ||
!/app/ios/Podfile | ||
!/app/ios/Podfile.lock | ||
``` | ||
## Limitations | ||
## Limited support for [config-plugins raw functions](https://docs.expo.dev/config-plugins/plugins-and-mods/#raw-functions) | ||
### Limited support for [config-plugins raw functions](https://docs.expo.dev/config-plugins/plugins-and-mods/#raw-functions) | ||
@@ -140,0 +184,0 @@ When using config-plugins with raw functions, it's essential to be aware of certain limitations, particularly in the context of fingerprinting. Expo makes its best effort to generate fingerprints for changes made through config-plugins; however, raw functions pose specific challenges. Raw functions are not serializable as fingerprints, which means they cannot be directly used for generating unique hashes. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
90777
243
0