diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d3f5ea30 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +## How to run integration tests locally + +1. Change working directory to patronum sources `cd patronum` +2. Install dependencies for patronum via yarn v1: `yarn` +3. Build patronum with specific name: `LIBRARY_NAME=@effector/patronum yarn build` +4. Remove all dependencies: `rm -rf node_modules` +5. Go to the integration directory (cra or custom): `cd integration/cra` +6. Install dependencies for this package: `yarn` +7. Add prebuilt patronum to local package: `yarn add ../../dist` +8. Run tests `yarn test` + +> Note: be careful NOT to commit `babel-plugin-factories.json` with changed library name `@effector/patronum` + +When work is done, please remove `@effector/patronum` from integration packages via `yarn remove @effector/patronum`, else CI can be broken. diff --git a/README.md b/README.md index 68282216..940a0526 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) ![Node.js CI](https://github.com/effector/patronum/workflows/Node.js%20CI/badge.svg) [![Rate on Openbase](https://badges.openbase.com/js/rating/patronum.svg)](https://openbase.com/js/patronum?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) - ☄️ Effector operators library delivering modularity and convenience ## Table of contents @@ -40,6 +39,8 @@ ## Usage +> Please, review documentation for YOUR version of patronum not the latest. Find and open tag/release for your version. + ```bash npm install patronum # or @@ -55,8 +56,6 @@ import { inFlight } from 'patronum/in-flight'; Also use can import it from index: -> Be careful, with this import method, all functions can be at your bundle - ```ts import { delay, inFlight } from 'patronum'; ``` @@ -71,13 +70,21 @@ import { status, splitMap, combineEvents } from 'patronum/macro'; > Warning: babel-plugin-macros do not support `import * as name`! +Since release of patronum@2.0.0 it is required to use babel-plugin-macros@3.0.0 or higher. + +Please note, that react-scripts@4.0.3 and older **uses outdated version** of this plugin - you can either use [yarn resolutions](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/) or use react-scripts@5.0.0 or higher. + ## Migration guide +### v2.0.0 + +Removed support of effector v21. Now the minimum supported version is `v22.1.2`. + ### v0.110 From `v0.110.0` patronum removed support of effector v20. Now minimum supported version is `v21.4`. -Please, before upgrade review release notes of [`effector v21`](https://github.com/zerobias/effector/releases/tag/effector%4021.0.0). +Please, before upgrade review release notes of [`effector v21`](https://github.com/effector/effector/releases/tag/effector%4021.0.0). ### v0.100 @@ -191,8 +198,8 @@ trigger(4); [Method documentation & API](/src/interval) ```ts -import { createStore, createEvent } from 'effector' -import { interval } from 'patronum' +import { createStore, createEvent } from 'effector'; +import { interval } from 'patronum'; const startCounter = createEvent(); const stopCounter = createEvent(); @@ -201,15 +208,15 @@ const $counter = createStore(0); const { tick } = interval({ timeout: 500, start: startCounter, - stop: stopCounter + stop: stopCounter, }); $counter.on(tick, (number) => number + 1); -$counter.watch(value => console.log("COUNTER", value)); +$counter.watch((value) => console.log('COUNTER', value)); startCounter(); -setTimeout(() => stopCounter(), 5000) +setTimeout(() => stopCounter(), 5000); ``` [Try it](https://share.effector.dev/EOVzc3df) diff --git a/SECURITY.md b/SECURITY.md index 9de26fd2..91e8c70e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,18 +1,14 @@ # Security Policy - +| `0.x` | :x: | +| `1.x` | :white_check_mark: | +| `2.x` | :white_check_mark: | ## Reporting a Vulnerability diff --git a/src/babel-plugin-factories.json b/src/babel-plugin-factories.json index a8a32830..6614a669 100644 --- a/src/babel-plugin-factories.json +++ b/src/babel-plugin-factories.json @@ -7,6 +7,7 @@ "patronum/delay", "patronum/every", "patronum/in-flight", + "patronum/interval", "patronum/pending", "patronum/reshape", "patronum/snapshot", @@ -23,6 +24,7 @@ "delay": "delay", "every": "every", "inFlight": "in-flight", + "interval": "interval", "pending": "pending", "reshape": "reshape", "snapshot": "snapshot",