From 48d53df670bda571a86b6cbbb8f757423374a26b Mon Sep 17 00:00:00 2001 From: Richard Guerre Date: Thu, 22 Jun 2023 10:31:01 +0800 Subject: [PATCH] Published 1.7.0 --- docs/README.md | 15 ++++++++++++++- docs/modules.md | 10 +++++----- package.json | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5a05b54..fcaea51 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,12 +2,25 @@ use-relay-mock-environment / [Modules](modules.md) # use-relay-mock-environment -A super easy way to test Relay Components in Storybook or in dummy pages. +Next-level auto mocking for Relay components. Minimal code required. + +Instead of having to specify resolvers for each individual field or going with the default (i.e. ``), this hook will automatically guess what type/category each field is and will use [faker.js](https://www.npmjs.com/package/faker) to generate fake data for you. Letting you focus on what matters most, which is building great UI/UX. [![Version](https://img.shields.io/npm/v/use-relay-mock-environment.svg)](https://npmjs.org/package/use-relay-mock-environment) [![Downloads/week](https://img.shields.io/npm/dw/use-relay-mock-environment.svg)](https://npmjs.org/package/use-relay-mock-environment) [![License](https://img.shields.io/npm/l/use-relay-mock-environment.svg)](https://github.com/richardguerre/use-relay-mock-environment/blob/master/package.json) +## Installation +Install the library and relay-test-utils. Make sure you use the relay-test-utils version corresponding to your react-relay. + +``` +yarn add -D use-relay-mock-environment relay-test-utils +``` +OR +``` +npm i --save-dev use-relay-mock-environment relay-test-utils +``` + ## How does it work? The hook does three main things: diff --git a/docs/modules.md b/docs/modules.md index 7b21ee6..dfb2a7b 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -41,7 +41,7 @@ const mockData = { #### Defined in -[src/index.ts:100](https://github.com/richardguerre/use-relay-mock-environment/blob/9aa610b/src/index.ts#L100) +[src/index.ts:100](https://github.com/richardguerre/use-relay-mock-environment/blob/58b13e4/src/index.ts#L100) ___ @@ -73,7 +73,7 @@ You can specify one or more of the following: #### Defined in -[src/index.ts:29](https://github.com/richardguerre/use-relay-mock-environment/blob/9aa610b/src/index.ts#L29) +[src/index.ts:29](https://github.com/richardguerre/use-relay-mock-environment/blob/58b13e4/src/index.ts#L29) ___ @@ -85,7 +85,7 @@ Same as the `RelayMockOptions` below. #### Defined in -[src/index.ts:242](https://github.com/richardguerre/use-relay-mock-environment/blob/9aa610b/src/index.ts#L242) +[src/index.ts:242](https://github.com/richardguerre/use-relay-mock-environment/blob/58b13e4/src/index.ts#L242) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[src/index.ts:106](https://github.com/richardguerre/use-relay-mock-environment/blob/9aa610b/src/index.ts#L106) +[src/index.ts:106](https://github.com/richardguerre/use-relay-mock-environment/blob/58b13e4/src/index.ts#L106) ## Functions @@ -169,4 +169,4 @@ a function that is the `useRelayMockEnvironment()` React hook. Read more about i #### Defined in -[src/index.ts:264](https://github.com/richardguerre/use-relay-mock-environment/blob/9aa610b/src/index.ts#L264) +[src/index.ts:264](https://github.com/richardguerre/use-relay-mock-environment/blob/58b13e4/src/index.ts#L264) diff --git a/package.json b/package.json index b35c21d..ef639a6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.6.0", + "version": "1.7.0", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts",