-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/3.2.4' into main
- Loading branch information
Showing
6 changed files
with
1,841 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ | |
/babel.config.json | ||
/rollup.config.js | ||
/.gitattributes | ||
/MIGRATING.md | ||
/CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Contribute to the project | ||
|
||
Pull requests are welcome. | ||
|
||
The project contains two main branches: | ||
|
||
- `main`: contains the latest released code; | ||
- `develop`: contains active development. | ||
|
||
Branches for new futures should be created based on `develop` branch. | ||
|
||
Branches for fixes should be created based on main `branch`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Migration guides | ||
|
||
## From v2 to v3 | ||
|
||
No migrations needed with this version. We just added `rollup` as build tool and added the browser build in our examples. | ||
|
||
## From v1 to v2 | ||
|
||
The first version of `categorize` used `yup` to validate users' input. With this, the library had two ways to categorize arrays: | ||
|
||
- a synchronous way using `categorizeSync` function; | ||
- and an asynchronous way using `categorize` function. | ||
|
||
With the second version, we removed `yup` library in order to become a zero-dependency library and did the validation manually. | ||
|
||
With this change we only have one way to categorize which is the sychronous way. So we removed the `categorizeSync` function and changed the `categorize` function to become a synchronous one. | ||
|
||
### Usage from v1 | ||
|
||
```js | ||
// asynchronous way | ||
const asyncResult = await categorize(animals, categories); | ||
// synchronous way | ||
const syncResult = categorizeSync(animals, categories); | ||
``` | ||
|
||
### Usage from v2 | ||
|
||
```js | ||
const result = categorize(animals, categories); | ||
``` |
Oops, something went wrong.