Skip to content

Commit ada422d

Browse files
committed
Merge branch 'main' into switch-eventtarget
2 parents 4ac94dd + 5e40017 commit ada422d

File tree

14 files changed

+4303
-1422
lines changed

14 files changed

+4303
-1422
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
node-version:
1313
- 25
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-node@v4
15+
- uses: actions/checkout@v5
16+
- uses: actions/setup-node@v5
1717
with:
1818
node-version: ${{ matrix.node-version }}
1919
- run: npm install

bench.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import Benchmark, {type Deferred, type Event} from 'benchmark';
22
import PQueue from './source/index.js';
33

4-
const suite = new Benchmark.Suite();
4+
const suite = new Benchmark.Suite() as Benchmark.Suite;
55

66
// Benchmark typings aren't up to date, let's help out manually
77
type Resolvable = Deferred & {resolve: () => void};
88

9-
suite
9+
(suite as any)
1010
.add('baseline', {
1111
defer: true,
1212

@@ -57,11 +57,11 @@ suite
5757
},
5858
})
5959
.on('cycle', (event: Event) => {
60-
console.log(String(event.target));
60+
console.log(String(event.target as any));
6161
})
62-
.on('complete', function () {
62+
.on('complete', function (this: any) {
6363
// @ts-expect-error benchmark typings incorrect
64-
console.log(`Fastest is ${(this as Benchmark.Suite).filter('fastest').map('name') as string}`);
64+
console.log(`Fastest is ${this.filter('fastest').map('name') as string}`);
6565
})
6666
.run({
6767
async: true,

package.json

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p-queue",
3-
"version": "8.1.0",
3+
"version": "9.0.0",
44
"description": "Promise queue with concurrency control",
55
"license": "MIT",
66
"repository": "sindresorhus/p-queue",
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"build": "del-cli dist && tsc",
19-
"test": "xo && ava && del-cli dist && tsc && tsd",
19+
"test": "xo && node --import=tsx/esm --test test/*.ts && del-cli dist && tsc && tsd",
2020
"bench": "node --import=tsx/esm bench.ts",
2121
"prepublishOnly": "del-cli dist && tsc"
2222
},
@@ -48,42 +48,34 @@
4848
],
4949
"dependencies": {
5050
"eventemitter3": "^5.0.1",
51-
"p-timeout": "^6.1.2"
51+
"p-timeout": "^7.0.0"
5252
},
5353
"devDependencies": {
54-
"@sindresorhus/tsconfig": "^5.0.0",
54+
"@sindresorhus/tsconfig": "^8.0.1",
5555
"@types/benchmark": "^2.1.5",
56-
"@types/node": "^20.10.4",
57-
"ava": "^5.3.1",
56+
"@types/node": "^24.5.1",
5857
"benchmark": "^2.1.4",
59-
"del-cli": "^5.1.0",
58+
"del-cli": "^6.0.0",
6059
"delay": "^6.0.0",
6160
"in-range": "^3.0.0",
62-
"p-defer": "^4.0.0",
63-
"random-int": "^3.0.0",
61+
"p-defer": "^4.0.1",
62+
"random-int": "^3.1.0",
6463
"time-span": "^5.1.0",
65-
"tsd": "^0.29.0",
66-
"tsx": "^4.6.2",
67-
"typescript": "^5.3.3",
68-
"xo": "^0.56.0"
69-
},
70-
"ava": {
71-
"workerThreads": false,
72-
"files": [
73-
"test/**"
74-
],
75-
"extensions": {
76-
"ts": "module"
77-
},
78-
"nodeArguments": [
79-
"--import=tsx/esm"
80-
]
64+
"tsd": "^0.33.0",
65+
"tsx": "^4.20.5",
66+
"typescript": "^5.9.2",
67+
"xo": "^1.2.2"
8168
},
8269
"xo": {
8370
"rules": {
8471
"@typescript-eslint/member-ordering": "off",
8572
"@typescript-eslint/no-floating-promises": "off",
86-
"@typescript-eslint/no-invalid-void-type": "off"
73+
"@typescript-eslint/no-unsafe-call": "off",
74+
"@typescript-eslint/no-unsafe-assignment": "off",
75+
"@typescript-eslint/no-unsafe-return": "off",
76+
"@typescript-eslint/no-unsafe-argument": "off",
77+
"@typescript-eslint/prefer-promise-reject-errors": "off",
78+
"ava/no-import-test-files": "off"
8779
}
8880
}
8981
}

0 commit comments

Comments
 (0)