Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade deps #973

Merged
merged 15 commits into from
Dec 27, 2023
Merged
25 changes: 25 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
root: true,

rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
// Unused variables are fine if they start with an underscore
{ args: "all", argsIgnorePattern: "^_.*", varsIgnorePattern: "^_.*" },
],
},

overrides: [
{
files: ["test/**"],

// Special config for test files
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
},
},
],
};
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ jobs:
matrix:
node-version: [
# From https://github.com/nodejs/Release
'12.x', # EoL 2022-04-30
'14.x', # EoL 2023-04-30
'16.x', # EoL 2023-09-11
'18.x', # EoL 2025-04-30
'latest', # EoL 2026-04-30
"16.x", # EoL 2023-09-11
"18.x", # EoL 2025-04-30
"20.x", # EoL 2026-04-30
"latest",
]

steps:
Expand Down
11 changes: 1 addition & 10 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"printWidth": 120,
"tabWidth": 4,
"singleQuote": true,

"overrides": [
{
"files": "*.yml",
"options": { "tabWidth": 2 }
}
]
"printWidth": 120
}
104 changes: 55 additions & 49 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
## v2.2.0

- Move to ESM by default
- Drop support for node 12.x and 14.x
(they probably still work, but they're EoL)

## v2.1.2

- Improve tree-shakability when used in bundlers
- Improve tree-shakability when used in bundlers

## v2.1.1

- Improve documentation
- Fix a bug in `reduce()` in a very small edge case
- Improve documentation
- Fix a bug in `reduce()` in a very small edge case

## v2.1.0

The following functions retain richer type information about their arguments:

- `ifilter()`
- `filter()`
- `partition()`
- `ifilter()`
- `filter()`
- `partition()`

For example, TypeScript will now know the following:

```ts
const items = [3, 'hi', -7, 'foo', 13];
const items = [3, "hi", -7, "foo", 13];

function isNum(value: unknown): value is number {
return typeof value === 'number';
return typeof value === "number";
}

const numbers: number[] = filter(items, isNum); // ✅
Expand All @@ -31,25 +37,25 @@ const [numbers, strings] = partition(items, isNum); // ✅
// number[]
```

- Add new `find(iterable, pred)` function, which is almost the same as
`first(iterable, pred)` but behaves slightly more intuitive in the case
where no predicate function is given.
- Add new `find(iterable, pred)` function, which is almost the same as
`first(iterable, pred)` but behaves slightly more intuitive in the case
where no predicate function is given.

- Fix bug in `chunked()` with `size=1`
- Fix bug in `chunked()` with `size=1`

## v2.0.0

**Breaking changes:**

- Rewritten source code in TypeScript (instead of Flow)
- Modern ESM and CJS dual exports (fully tree-shakable when using ESM)
- Massively [reduced bundle size](https://bundlephobia.com/package/[email protected])
- Targeted ES2015 (instead of ES5)
- Support only TypeScript versions >= 4.3
- Drop Flow support\*
- Drop Node 10.x support
- `icompact`, `compact`, and `compactObject` functions will now also remove
`null` values, not only `undefined`
- Rewritten source code in TypeScript (instead of Flow)
- Modern ESM and CJS dual exports (fully tree-shakable when using ESM)
- Massively [reduced bundle size](https://bundlephobia.com/package/[email protected])
- Targeted ES2015 (instead of ES5)
- Support only TypeScript versions >= 4.3
- Drop Flow support\*
- Drop Node 10.x support
- `icompact`, `compact`, and `compactObject` functions will now also remove
`null` values, not only `undefined`

(\*: I'm still open to bundling Flow types within this package, but only if
that can be supported in a maintenance-free way, for example by using a script
Expand All @@ -58,97 +64,97 @@ add support for that, I'm open to pull requests! 🙏 )

## v1.7.1

- Add missing re-export of `islice` at the top level
- Add missing re-export of `islice` at the top level

## v1.7.0

- TypeScript support!
- Declare official support for Node 16.x
- Drop support for Node 13.x (unstable release)
- TypeScript support!
- Declare official support for Node 16.x
- Drop support for Node 13.x (unstable release)

## v1.6.1

- Include an error code with every FlowFixMe suppression
(Flow 0.132.x compatibility)
- Include an error code with every FlowFixMe suppression
(Flow 0.132.x compatibility)

## v1.6.0

- New itertool: `heads()`
- New itertool: `heads()`

## v1.5.4

- Export `roundrobin()` at the top level
- Export `roundrobin()` at the top level

## v1.5.3

- Fix bug in `chunked()` when input is exactly dividable
- Fix bug in `chunked()` when input is exactly dividable

## v1.5.2

- Export `count()` function at the top level 🤦‍♂️
- Export `count()` function at the top level 🤦‍♂️

## v1.5.1

- Internal change to make the code Flow 0.105.x compatible. Basically stops
using array spreads (`[...things]`) in favor of `Array.from()`.
- Internal change to make the code Flow 0.105.x compatible. Basically stops
using array spreads (`[...things]`) in favor of `Array.from()`.

## v1.5.0

- Remove direct code dependency on `regenerator-runtime` (let `@babel/runtime`
manage it)
- Remove direct code dependency on `regenerator-runtime` (let `@babel/runtime`
manage it)

## v1.4.0

- Switch to Babel 7
- Switch to Babel 7

## v1.3.2

- Export `filter` at the top level
- Export `filter` at the top level

## v1.3.1

- New build system
- Cleaner NPM package contents
- New build system
- Cleaner NPM package contents

## v1.3.0

- Drop support for Node 7
- Drop support for Node 7

## v1.2.2

- Make itertools.js fully [Flow Strict](https://flow.org/en/docs/strict/)
- Make itertools.js fully [Flow Strict](https://flow.org/en/docs/strict/)

## v1.2.1

- Export `permutations()` at the top-level
- Export `permutations()` at the top-level

## v1.2.0

- Add port of `groupby()` function (see #87, thanks @sgenoud!)
- Add port of `groupby()` function (see #87, thanks @sgenoud!)

## v1.1.6

- declare library to be side effect free (to help optimize webpack v4 builds)
- declare library to be side effect free (to help optimize webpack v4 builds)

## v1.1.5

- Include regenerator runtime via babel-runtime
- Include regenerator runtime via babel-runtime

## v1.1.4

- Make `regenerator-runtime` a normal runtime dependency
- Make `regenerator-runtime` a normal runtime dependency

## v1.1.3

- Lower required version of `regenerator-runtime`
- Lower required version of `regenerator-runtime`

## v1.1.2

- Properly declare dependency on `regenerator-runtime`
- Properly declare dependency on `regenerator-runtime`

## v1.1.1

- Fix bug in `cycle()` with infinite inputs
- Fix bug in `cycle()` with infinite inputs

## v1.1.0

Expand Down
Loading