Skip to content

Commit 49e47d3

Browse files
dependabot[bot]cursoragentjonathanKingston
authored
build(deps-dev): bump the typescript group across 1 directory with 4 updates (#2089)
* Checkpoint before follow-up message Co-authored-by: jkingston <[email protected]> * Checkpoint before follow-up message Co-authored-by: jkingston <[email protected]> * Auto-commit pending changes before rebase - PR/MR synchronize --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: jkingston <[email protected]>
1 parent 0525fb7 commit 49e47d3

File tree

9 files changed

+188
-1822
lines changed

9 files changed

+188
-1822
lines changed

injected/integration-test/cookie.spec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ test.describe('Cookie protection tests', () => {
1010
document.cookie = 'test=1; expires=Wed, 21 Aug 2040 20:00:00 UTC;';
1111
// wait for a tick, as cookie modification happens in a promise
1212
await new Promise((resolve) => setTimeout(resolve, 1));
13-
// @ts-expect-error - cookieStore API types are missing here
1413
// eslint-disable-next-line no-undef
1514
return cookieStore.get('test');
1615
});
17-
expect(result.name).toEqual('test');
18-
expect(result.value).toEqual('1');
19-
expect(result.expires).toBeLessThan(Date.now() + 605_000_000);
16+
expect(result?.name).toEqual('test');
17+
expect(result?.value).toEqual('1');
18+
// @ts-expect-error - expires exists at runtime but not in CookieListItem type
19+
expect(result?.expires).toBeLessThan(Date.now() + 605_000_000);
2020
});
2121

2222
test('non-string cookie values do not bypass protection', async ({ page }) => {
@@ -32,13 +32,13 @@ test.describe('Cookie protection tests', () => {
3232
};
3333
// wait for a tick, as cookie modification happens in a promise
3434
await new Promise((resolve) => setTimeout(resolve, 1));
35-
// @ts-expect-error - cookieStore API types are missing here
3635
// eslint-disable-next-line no-undef
3736
return cookieStore.get('a');
3837
});
39-
expect(result.name).toEqual('a');
40-
expect(result.value).toEqual('b');
41-
expect(result.expires).toBeLessThan(Date.now() + 605_000_000);
38+
expect(result?.name).toEqual('a');
39+
expect(result?.value).toEqual('b');
40+
// @ts-expect-error - expires exists at runtime but not in CookieListItem type
41+
expect(result?.expires).toBeLessThan(Date.now() + 605_000_000);
4242
});
4343

4444
test('Erroneous values do not throw', async ({ page }) => {
@@ -54,12 +54,12 @@ test.describe('Cookie protection tests', () => {
5454

5555
// wait for a tick, as cookie modification happens in a promise
5656
await new Promise((resolve) => setTimeout(resolve, 1));
57-
// @ts-expect-error - cookieStore API types are missing here
5857
// eslint-disable-next-line no-undef
5958
return cookieStore.get('a');
6059
});
61-
expect(result.name).toEqual('a');
62-
expect(result.value).toEqual('b');
63-
expect(result.expires).toBeLessThan(Date.now() + 605_000_000);
60+
expect(result?.name).toEqual('a');
61+
expect(result?.value).toEqual('b');
62+
// @ts-expect-error - expires exists at runtime but not in CookieListItem type
63+
expect(result?.expires).toBeLessThan(Date.now() + 605_000_000);
6464
});
6565
});

injected/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
"devDependencies": {
3838
"@canvas/image-data": "^1.1.0",
3939
"@fingerprintjs/fingerprintjs": "^5.0.1",
40-
"@types/chrome": "^0.1.1",
40+
"@types/chrome": "^0.1.32",
4141
"@types/jasmine": "^5.1.13",
42-
"@types/node": "^24.1.0",
42+
"@types/node": "^24.10.1",
4343
"@typescript-eslint/eslint-plugin": "^8.48.1",
4444
"fast-check": "^4.4.0",
4545
"jasmine": "^5.13.0",

injected/src/features/navigator-interface.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { DDGPromise } from '../utils';
22
import ContentFeature from '../content-feature';
33
import { createPageWorldBridge } from './message-bridge/create-page-world-bridge.js';
44

5+
/**
6+
* @import { MessagingInterface } from "./message-bridge/schema.js"
7+
*/
8+
59
const store = {};
610

711
export default class NavigatorInterface extends ContentFeature {
@@ -33,7 +37,6 @@ export default class NavigatorInterface extends ContentFeature {
3337
return DDGPromise.resolve(true);
3438
},
3539
/**
36-
* @import { MessagingInterface } from "./message-bridge/schema.js"
3740
* @param {string} featureName
3841
* @return {MessagingInterface}
3942
* @throws {Error}

injected/src/features/web-compat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,8 @@ export class WebCompat extends ContentFeature {
725725
playbackState = 'none';
726726

727727
setActionHandler() {}
728-
setCameraActive() {}
729-
setMicrophoneActive() {}
728+
async setCameraActive() {}
729+
async setMicrophoneActive() {}
730730
setPositionState() {}
731731
}
732732

injected/unit-test/content-feature.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,10 @@ describe('ContentFeature class', () => {
508508
expect(object.someProp).toBe('someValue');
509509
const newDesc = Object.getOwnPropertyDescriptor(object, 'someProp');
510510
expect(newDesc).toBeDefined();
511-
// @ts-expect-error - this must be defined
511+
// @ts-expect-error - this must be defined, and setting to null for test
512512
newDesc.get = null;
513+
// @ts-expect-error testing edge case with null value
513514
expect(newDesc).toEqual({
514-
// @ts-expect-error get is overridden
515515
get: null,
516516
set: undefined,
517517
enumerable: true,
@@ -531,11 +531,11 @@ describe('ContentFeature class', () => {
531531
expect((object.someProp = 'someValue')).toBe('someValue');
532532
const newDesc = Object.getOwnPropertyDescriptor(object, 'someProp');
533533
expect(newDesc).toBeDefined();
534-
// @ts-expect-error - this must be defined
534+
// @ts-expect-error - this must be defined, and setting to null for test
535535
newDesc.set = null;
536+
// @ts-expect-error testing edge case with null value
536537
expect(newDesc).toEqual({
537538
get: undefined,
538-
// @ts-expect-error set is overridden
539539
set: null,
540540
enumerable: true,
541541
configurable: true,

injected/unit-test/wrapper-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ describe('Shim API', () => {
2020
return 123;
2121
}
2222

23-
setCameraActive() {}
24-
setMicrophoneActive() {}
23+
async setCameraActive() {}
24+
async setMicrophoneActive() {}
2525
setPositionState() {}
2626
};
2727
definePropertyFn = spyOn(Object, 'defineProperty').and.callThrough();

messaging/lib/webkit.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ export class WebkitMessagingTransport {
129129
});
130130

131131
const cipher = new this.globals.Uint8Array([...ciphertext, ...tag]);
132-
const decrypted = await this.decrypt(cipher, key, iv);
132+
const decrypted = await this.decrypt(
133+
/** @type {BufferSource} */ (/** @type {unknown} */ (cipher)),
134+
/** @type {BufferSource} */ (/** @type {unknown} */ (key)),
135+
iv,
136+
);
133137
return this.globals.JSONparse(decrypted || '{}');
134138
} catch (e) {
135139
// re-throw when the error is just a 'MissingHandler'

0 commit comments

Comments
 (0)