Skip to content

Commit

Permalink
Bump dependencies (#65)
Browse files Browse the repository at this point in the history
* Bump dependencies

* Add bump dependencies entry

* Fix for ESNext

* Add node-version: 22

* Add entry

---------

Co-authored-by: @compulim <@compulim>
Co-authored-by: William Wong <compulim@hotmail.com>
  • Loading branch information
compulim-workflow-bot[bot] and compulim authored Oct 13, 2024
1 parent fdb3230 commit 2167cd0
Show file tree
Hide file tree
Showing 11 changed files with 2,129 additions and 1,469 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
switch: [current]
uses: compulim/workflows/.github/workflows/pull-request-validation.yml@main
with:
node-version: 22 # Requires Node.js 22 for some tests.
package-name: iter-fest
skip-integration-test: false
switch: ${{ matrix.switch }}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `generatorWithLastValue`/`asyncGeneratorWithLastValue` will passthrough function calls to underlying `Generator`/`AsyncGenerator`, in PR [#65](https://github.com/compulim/iter-fest/pull/65)

### Changed

- Added [ESLint import/export syntax](https://npmjs.com/package/eslint-plugin-import), in PR [#43](https://github.com/compulim/iter-fest/pull/43)
- Added [`publint`](https://npmjs.com/package/publint), in PR [#45](https://github.com/compulim/iter-fest/pull/45)
- Bumped dependencies, in PR [#65](https://github.com/compulim/iter-fest/pull/65)
- Development dependencies
- [`@babel/preset-env@7.25.8`](https://npmjs.com/package/@babel/preset-env/v/7.25.8)
- [`@babel/preset-typescript@7.25.7`](https://npmjs.com/package/@babel/preset-typescript/v/7.25.7)
- [`@testing-library/react@16.0.1`](https://npmjs.com/package/@testing-library/react/v/16.0.1)
- [`@tsconfig/recommended@1.0.7`](https://npmjs.com/package/@tsconfig/recommended/v/1.0.7)
- [`@types/jest@29.5.13`](https://npmjs.com/package/@types/jest/v/29.5.13)
- [`@types/node@22.7.5`](https://npmjs.com/package/@types/node/v/22.7.5)
- [`@types/react@18.3.11`](https://npmjs.com/package/@types/react/v/18.3.11)
- [`@types/react-dom@18.3.1`](https://npmjs.com/package/@types/react-dom/v/18.3.1)
- [`@typescript-eslint/eslint-plugin@8.8.1`](https://npmjs.com/package/@typescript-eslint/eslint-plugin/v/8.8.1)
- [`@typescript-eslint/parser@8.8.1`](https://npmjs.com/package/@typescript-eslint/parser/v/8.8.1)
- [`core-js-pure@3.38.1`](https://npmjs.com/package/core-js-pure/v/3.38.1)
- [`esbuild@0.24.0`](https://npmjs.com/package/esbuild/v/0.24.0)
- [`eslint@9.12.0`](https://npmjs.com/package/eslint/v/9.12.0)
- [`eslint-plugin-import@2.31.0`](https://npmjs.com/package/eslint-plugin-import/v/2.31.0)
- [`eslint-plugin-prettier@5.2.1`](https://npmjs.com/package/eslint-plugin-prettier/v/5.2.1)
- [`eslint-plugin-react@7.37.1`](https://npmjs.com/package/eslint-plugin-react/v/7.37.1)
- [`mocha@10.7.3`](https://npmjs.com/package/mocha/v/10.7.3)
- [`prettier@3.3.3`](https://npmjs.com/package/prettier/v/3.3.3)
- [`sinon@19.0.2`](https://npmjs.com/package/sinon/v/19.0.2)
- [`tsup@8.3.0`](https://npmjs.com/package/tsup/v/8.3.0)
- [`typescript@5.6.3`](https://npmjs.com/package/typescript/v/5.6.3)

## [0.2.1] - 2024-07-05

Expand Down Expand Up @@ -70,6 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- First public release

[Unreleased]: https://github.com/compulim/iter-fest/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/compulim/iter-fest/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/compulim/iter-fest/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/compulim/iter-fest/releases/tag/v0.1.0
3,493 changes: 2,049 additions & 1,444 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"test": "npm run test --if-present --workspaces"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"eslint": "^9.12.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"prettier": "^3.2.5"
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"prettier": "^3.3.3"
}
}
6 changes: 3 additions & 3 deletions packages/integration-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"iter-fest": "^0.0.0-0"
},
"devDependencies": {
"core-js-pure": "^3.37.1",
"core-js-pure": "^3.38.1",
"expect": "^29.7.0",
"mocha": "^10.5.2",
"sinon": "^18.0.0"
"mocha": "^10.7.3",
"sinon": "^19.0.2"
},
"dependencies": {
"iter-fest": "^0.0.0-0"
Expand Down
22 changes: 11 additions & 11 deletions packages/iter-fest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,20 +552,20 @@
"core-js-pure": "^3.37.1"
},
"devDependencies": {
"@babel/preset-env": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@testing-library/react": "^16.0.0",
"@tsconfig/recommended": "^1.0.6",
"@babel/preset-env": "^7.25.8",
"@babel/preset-typescript": "^7.25.7",
"@testing-library/react": "^16.0.1",
"@tsconfig/recommended": "^1.0.7",
"@tsconfig/strictest": "^2.0.5",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.9",
"core-js-pure": "^3.37.1",
"esbuild": "^0.21.5",
"@types/jest": "^29.5.13",
"@types/node": "^22.7.5",
"core-js-pure": "^3.38.1",
"esbuild": "^0.24.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"publint": "^0.2.11",
"tsup": "^8.1.0",
"typescript": "^5.5.2"
"tsup": "^8.3.0",
"typescript": "^5.6.3"
}
}
14 changes: 14 additions & 0 deletions packages/iter-fest/src/asyncGeneratorWithLastValue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,17 @@ test('return in try-finally', async () => {
await expect(generator.next()).resolves.toEqual({ done: true, value: undefined });
expect(generator.lastValue()).toEqual(undefined);
});

test('passthrough asyncDispose', async () => {
const dispose = jest.fn();
const symbolAsyncDispose: typeof Symbol.asyncDispose = Symbol.asyncDispose || Symbol.for('Symbol.asyncDispose');

const generator = (async function* () {})();

// Currently, in Node.js 22.9.0, `Generator` does not have `asyncDispose` yet. We are ponyfilling it in.
generator[symbolAsyncDispose] || (generator[symbolAsyncDispose] = dispose);

await asyncGeneratorWithLastValue<number, void, void>(generator)[symbolAsyncDispose]?.();

expect(dispose).toHaveBeenCalledTimes(1);
});
1 change: 1 addition & 0 deletions packages/iter-fest/src/asyncGeneratorWithLastValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function asyncGeneratorWithLastValue<T = unknown, TReturn = any, TNext =
let lastValue: typeof STILL_ITERATING | TReturn = STILL_ITERATING;

const asyncGeneratorWithLastValue = {
...generator,
[Symbol.asyncIterator]() {
return asyncGeneratorWithLastValue;
},
Expand Down
10 changes: 10 additions & 0 deletions packages/iter-fest/src/generatorWithLastValue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,13 @@ test('return in try-finally', () => {
expect(generator.next()).toEqual({ done: true, value: undefined });
expect(generator.lastValue()).toEqual(undefined);
});

test('passthrough map', () => {
const generator = (function* () {
yield 1;
yield 2;
yield 3;
})();

expect(generator.reduce((sum, value) => sum + value, 0)).toBe(6);
});
1 change: 1 addition & 0 deletions packages/iter-fest/src/generatorWithLastValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function generatorWithLastValue<T = unknown, TReturn = any, TNext = unkno
let lastValue: typeof STILL_ITERATING | TReturn = STILL_ITERATING;

const generatorWithLastValue = {
...generator,
[Symbol.iterator]() {
return generatorWithLastValue;
},
Expand Down
8 changes: 4 additions & 4 deletions packages/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
},
"devDependencies": {
"@tsconfig/strictest": "^2.0.5",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"esbuild": "^0.21.5",
"typescript": "^5.5.2"
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"esbuild": "^0.24.0",
"typescript": "^5.6.3"
},
"dependencies": {
"iter-fest": "^0.0.0-0",
Expand Down

0 comments on commit 2167cd0

Please sign in to comment.