Skip to content

Commit c3edb8a

Browse files
authored
Merge pull request #45 from github/dg-update-dev-deps
Update dev deps
2 parents e2db160 + 099bb49 commit c3edb8a

18 files changed

+1621
-509
lines changed

package-lock.json

+1,574-462
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@
3232
},
3333
"prettier": "@github/prettier-config",
3434
"devDependencies": {
35-
"@github/prettier-config": "^0.0.4",
36-
"@types/node": "^20.3.1",
37-
"@typescript-eslint/eslint-plugin": "^5.11.0",
38-
"@typescript-eslint/parser": "^5.11.0",
39-
"chai": "^4.3.0",
35+
"@github/prettier-config": "^0.0.6",
36+
"@types/node": "^20.5.7",
37+
"@typescript-eslint/eslint-plugin": "^6.5.0",
38+
"@typescript-eslint/parser": "^6.5.0",
39+
"chai": "^4.3.8",
4040
"chromium": "^3.0.3",
41-
"eslint": "^8.8.0",
42-
"eslint-plugin-github": "^4.1.1",
43-
"karma": "^6.1.1",
41+
"eslint": "^8.48.0",
42+
"eslint-plugin-github": "^4.10.0",
43+
"karma": "^6.4.2",
4444
"karma-chai": "^0.1.0",
4545
"karma-chai-spies": "^0.1.4",
46-
"karma-chrome-launcher": "^3.1.0",
46+
"karma-chrome-launcher": "^3.2.0",
4747
"karma-mocha": "^2.0.1",
4848
"karma-mocha-reporter": "^2.2.5",
49-
"mocha": "^9.2.0",
50-
"tslib": "^2.1.0",
51-
"typescript": "^5.1.3"
49+
"mocha": "^10.2.0",
50+
"tslib": "^2.6.2",
51+
"typescript": "^5.2.2"
5252
}
5353
}

src/aggregateerror.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ export class AggregateError extends Error {
77
Object.defineProperty(this, 'errors', {
88
value: Array.from(errors),
99
configurable: true,
10-
writable: true
10+
writable: true,
1111
})
1212
if (options.cause) {
1313
Object.defineProperty(this, 'cause', {
1414
value: options.cause,
1515
configurable: true,
16-
writable: true
16+
writable: true,
1717
})
1818
}
1919
}

src/array-findlast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function arrayFindLast<T>(
22
this: T[],
33
pred: (this: T[], value: T, i: number, array: T[]) => boolean,
4-
recv = this
4+
recv = this,
55
): T | void {
66
for (let i = this.length - 1; i >= 0; i -= 1) {
77
if (pred.call(recv, this[i], i, this)) return this[i]

src/array-findlastindex.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function arrayFindLastIndex<T>(
22
this: T[],
33
pred: (this: T[], value: T, i: number, array: T[]) => boolean,
4-
recv = this
4+
recv = this,
55
): number {
66
for (let i = this.length - 1; i >= 0; i -= 1) {
77
if (pred.call(recv, this[i], i, this)) return i
@@ -24,7 +24,7 @@ export function apply(): void {
2424
const defn = {
2525
value: arrayFindLastIndex,
2626
writable: true,
27-
configurable: true
27+
configurable: true,
2828
}
2929
Object.defineProperty(Array.prototype, 'findLastIndex', defn)
3030
}

src/event-abortsignal.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export function addEventListenerWithAbortSignal(
33
this: EventTarget,
44
type: string,
55
callback: EventListenerOrEventListenerObject | null,
6-
options?: AddEventListenerOptions | boolean
6+
options?: AddEventListenerOptions | boolean,
77
): void {
88
if (typeof options === 'object' && 'signal' in options && options.signal instanceof AbortSignal) {
99
if (options.signal.aborted) return
@@ -23,7 +23,7 @@ declare global {
2323
export function isSupported(): boolean {
2424
let signalSupported = false
2525
const setSignalSupported = () => (signalSupported = true)
26-
// eslint-disable-next-line @typescript-eslint/no-empty-function
26+
2727
function noop() {}
2828
const options = Object.create({}, {signal: {get: setSignalSupported}})
2929
try {

src/form-requestsubmit.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function requestSubmit(
22
this: HTMLFormElement,
3-
submitter: HTMLButtonElement | HTMLInputElement | null = null
3+
submitter: HTMLButtonElement | HTMLInputElement | null = null,
44
): void {
55
const event = new SubmitEvent('submit', {bubbles: true, cancelable: true, submitter})
66
let input
@@ -9,7 +9,7 @@ export function requestSubmit(
99
type: 'hidden',
1010
hidden: true,
1111
name: submitter.name,
12-
value: submitter.value
12+
value: submitter.value,
1313
})
1414
this.append(input)
1515
}

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const polyfills = {
7474
requestIdleCallback,
7575
stringReplaceAll,
7676
arrayFindLast,
77-
arrayFindLastIndex
77+
arrayFindLastIndex,
7878
}
7979

8080
export function isSupported() {

src/object-hasown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function apply(): void {
2727
Object.defineProperty(Object, 'hasOwn', {
2828
value: objectHasOwn,
2929
configurable: true,
30-
writable: true
30+
writable: true,
3131
})
3232
}
3333
}

src/promise-allsettled.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export function promiseAllSettled<T extends readonly unknown[] | []>(
2-
values: T
2+
values: T,
33
): Promise<{-readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>}> {
44
return Promise.all(
55
values.map(p =>
66
// eslint-disable-next-line github/no-then
77
Promise.resolve(p).then(
88
(value: unknown) => ({status: 'fulfilled', value}),
9-
(reason: unknown) => ({status: 'rejected', reason})
10-
)
11-
)
9+
(reason: unknown) => ({status: 'rejected', reason}),
10+
),
11+
),
1212
) as unknown as Promise<{-readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>}>
1313
}
1414

src/requestidlecallback.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export function requestIdleCallback(callback: IdleRequestCallback, options: Idle
1313
didTimeout: false,
1414
timeRemaining() {
1515
return Math.max(0, maxDeadline - (Date.now() - start))
16-
}
16+
},
1717
},
1818
'didTimeout',
1919
{
2020
get() {
2121
return Date.now() - start > timeout
22-
}
23-
}
22+
},
23+
},
2424
)
2525
return window.setTimeout(() => {
2626
callback(deadline)

src/string-replaceall.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function stringReplaceAll(
22
this: string,
33
searchValue: RegExp | string,
4-
replaceValue: ((substring: string, ...args: unknown[]) => string) | string
4+
replaceValue: ((substring: string, ...args: unknown[]) => string) | string,
55
): string {
66
if (searchValue instanceof RegExp) return this.replace(searchValue, replaceValue as unknown as string)
77
let pos = -1

test/array-findlast.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ describe('arrayFindLast', () => {
2323
expect(_arr).to.equal(arr)
2424
expect(v).to.equal(arr[i])
2525
},
26-
recv
27-
)
26+
recv,
27+
),
2828
)
2929
})
3030
})

test/array-findlastindex.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ describe('arrayFindLastIndex', () => {
2323
expect(_arr).to.equal(arr)
2424
expect(v).to.equal(arr[i])
2525
},
26-
recv
27-
)
26+
recv,
27+
),
2828
)
2929
})
3030
})

test/crypto-randomuuid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('randomUUID', () => {
1111

1212
it('returns a UUID string', async () => {
1313
expect(randomUUID()).to.match(
14-
/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/
14+
/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
1515
)
1616
expect(randomUUID()).to.not.equal(randomUUID())
1717
})

test/karma.config.cjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function (config) {
66
frameworks: ['mocha', 'chai'],
77
files: [
88
{pattern: 'lib/*.js', type: 'module', included: false},
9-
{pattern: 'test/*', type: 'module', included: true}
9+
{pattern: 'test/*', type: 'module', included: true},
1010
],
1111
reporters: ['mocha'],
1212
reportSlowerThan: 50,
@@ -19,8 +19,8 @@ module.exports = function (config) {
1919
concurrency: Infinity,
2020
client: {
2121
mocha: {
22-
timeout: 100
23-
}
24-
}
22+
timeout: 100,
23+
},
24+
},
2525
})
2626
}

test/navigator-clipboard.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ describe('navigator clipboard', () => {
2727
await clipboardWrite([
2828
new globalThis.ClipboardItem({
2929
'foo/bar': 'horrible',
30-
'text/plain': Promise.resolve('foo')
31-
})
30+
'text/plain': Promise.resolve('foo'),
31+
}),
3232
])
3333
expect(calls).to.have.lengthOf(1)
3434
expect(calls[0]).to.eql(['foo'])
@@ -40,12 +40,12 @@ describe('navigator clipboard', () => {
4040
await clipboardWrite([
4141
new globalThis.ClipboardItem({
4242
'foo/bar': 'horrible',
43-
'text/plain': Promise.resolve('multiple-pass')
43+
'text/plain': Promise.resolve('multiple-pass'),
4444
}),
4545
new globalThis.ClipboardItem({
4646
'foo/bar': 'multiple-fail',
47-
'text/plain': Promise.resolve('multiple-fail')
48-
})
47+
'text/plain': Promise.resolve('multiple-fail'),
48+
}),
4949
])
5050
expect(calls).to.have.lengthOf(1)
5151
expect(calls[0]).to.eql(['multiple-pass'])

test/promise-allsettled.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ describe('Promise.allSettled', () => {
1212
it('returns list of Promise value/rejections', async () => {
1313
expect(
1414
// eslint-disable-next-line prefer-promise-reject-errors
15-
await promiseAllSettled([Promise.resolve(1), Promise.reject(2), Promise.resolve(3), Promise.reject(4)])
15+
await promiseAllSettled([Promise.resolve(1), Promise.reject(2), Promise.resolve(3), Promise.reject(4)]),
1616
).to.eql([
1717
{status: 'fulfilled', value: 1},
1818
{status: 'rejected', reason: 2},
1919
{status: 'fulfilled', value: 3},
20-
{status: 'rejected', reason: 4}
20+
{status: 'rejected', reason: 4},
2121
])
2222
})
2323
})

0 commit comments

Comments
 (0)