Skip to content

Commit 3689e14

Browse files
authored
Update (#21)
* Modernize to ESM-only, require Node >=22, simplify code * Update dependencies
1 parent e0f1830 commit 3689e14

9 files changed

Lines changed: 173 additions & 198 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: Node.js CI
52

63
on:
@@ -15,7 +12,7 @@ jobs:
1512

1613
strategy:
1714
matrix:
18-
node-version: [18.x, 20.x, 22.x]
15+
node-version: [22.x, 24.x, 25.x]
1916

2017
steps:
2118
- uses: actions/checkout@v4

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test/
22
coverage/
3-
jest.config.js
43
.gitattributes
54
package-lock.json
65
.github/

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@
22

33
Join two iterables (e.g. arrays) of objects by a common (user-defined) key, similarly to how SQL JOIN, LEFT JOIN and FULL JOIN work.
44

5-
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
6-
75
## Installation
86

97
```sh
108
npm install array-join
119
```
1210

13-
or
14-
15-
```sh
16-
yarn add array-join
17-
```
18-
1911
## Usage
2012

2113
`join(leftCollection, rightCollection, getLeftKey, getRightKey, getResultItem)`
@@ -141,14 +133,19 @@ will include non-matching items from both collections
141133
{
142134
left: { id: 3, name: 'Alice' },
143135
right: undefined
144-
}
136+
},
145137
{
146138
left: undefined,
147-
right:{ personId: 4, address: { city: 'London', country: 'UK' } }
139+
right: { personId: 4, address: { city: 'London', country: 'UK' } }
148140
}
149141
]
150142
```
151143
144+
## Breaking changes in version 4
145+
146+
- ESM-only package (CommonJS is no longer supported)
147+
- Minimum Node.js version is 22
148+
152149
## Breaking changes in version 3
153150
154151
- Rewritten on TypeScript (which ensures typings to be correct)

jest.config.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)