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

[WIP] Update dependencies #368

Merged
merged 15 commits into from
Sep 26, 2023
8,877 changes: 3,380 additions & 5,497 deletions dist/autofill-debug.js

Large diffs are not rendered by default.

5,924 changes: 1,807 additions & 4,117 deletions dist/autofill.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions jest-test-environment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Environment = require('jest-environment-jsdom')
const { TestEnvironment } = require('jest-environment-jsdom')

module.exports = class CustomTestEnvironment extends Environment {
module.exports = class CustomTestEnvironment extends TestEnvironment {
async setup () {
await super.setup()
if (typeof this.global.TextEncoder === 'undefined') {
Expand Down
12,399 changes: 5,841 additions & 6,558 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 28 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,46 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@babel/core": "^7.17.8",
"@babel/eslint-parser": "^7.18.2",
"@babel/preset-env": "^7.16.11",
"@babel/core": "^7.23.0",
"@babel/eslint-parser": "^7.22.15",
"@babel/preset-env": "^7.22.20",
"@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#1.3.0",
"@playwright/test": "^1.32.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.36",
"asana": "^1.0.0",
"babel-jest": "^27.5.1",
"@playwright/test": "^1.38.1",
"@types/jest": "^29.5.5",
"@types/node": "^18.17.19",
"asana": "^1.0.2",
"babel-jest": "^29.7.0",
"babelify": "^10.0.0",
"eslint": "^7.32.0",
"eslint": "^8.50.0",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"fast-check": "^2.25.0",
"grunt": "^1.5.2",
"grunt": "^1.6.1",
"grunt-babel": "^8.0.0",
"grunt-browserify": "^6.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-eslint": "^24.0.0",
"grunt-eslint": "^24.3.0",
"grunt-exec": "^3.0.0",
"jest": "^27.5.1",
"jest-chrome": "^0.7.2",
"jest-html-reporter": "^3.4.2",
"json-schema-to-typescript": "^11.0.2",
"http-server": "^14.1.1",
"jest": "^29.7.0",
"jest-chrome": "^0.8.0",
"jest-environment-jsdom": "^29.7.0",
"jest-html-reporter": "^3.10.2",
"json-schema-to-typescript": "^13.1.1",
"load-grunt-tasks": "^5.1.0",
"markdown-it": "^13.0.1",
"playwright": "^1.31.2",
"playwright": "^1.38.1",
"through2": "^4.0.2",
"ts-to-zod": "^1.13.1",
"typescript": "^4.7.2",
"zod": "^3.16.0",
"http-server": "^14.1.1"
"ts-to-zod": "^3.1.3",
"typescript": "^5.2.2",
"zod": "^3.22.2"
},
"dependencies": {}
"overrides": {
"jest-chrome": {
"jest": "$jest"
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed because jest-chrome is set to be dependent to jest 27, but it's not actually necessary. They've already merged the necessary change but haven't released (it's been a few months), so this is temporary.

}
14 changes: 7 additions & 7 deletions packages/device-api/lib/device-api-call.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*/
export class DeviceApiCall {
/** @type {string} */
method= 'unknown';
method = 'unknown'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bunch of linting updates.

/**
* An optional 'id' - used to indicate if a request requires a response.
* @type {string|null}
*/
id = null;
id = null
/** @type {Params | null | undefined} */
paramsValidator = null;
paramsValidator = null
/** @type {Result | null | undefined} */
resultValidator = null;
resultValidator = null
/** @type {import("zod").infer<Params>} */
params
/**
Expand All @@ -24,15 +24,15 @@ export class DeviceApiCall {
* @deprecated this is here to aid migration, should be removed ASAP
* @type {boolean}
*/
throwOnResultKeysMissing = true;
throwOnResultKeysMissing = true
/**
* New messages should be in a particular format, eg: { success: T },
* but you can set this to false if you want to access the result as-is,
* without any unwrapping logic
* @deprecated this is here to aid migration, should be removed ASAP
* @type {boolean}
*/
unwrapResult = true;
unwrapResult = true
/**
* @param {import("zod").infer<Params>} data
*/
Expand Down Expand Up @@ -142,7 +142,7 @@ export class DeviceApiCallError extends Error {}
*/
export class SchemaValidationError extends Error {
/** @type {import("zod").ZodIssue[]} */
validationErrors = [];
validationErrors = []

/**
* @param {import("zod").ZodIssue[]} errors
Expand Down
2 changes: 1 addition & 1 deletion packages/device-api/lib/device-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class DeviceApiTransport {
*/
export class DeviceApi {
/** @type {DeviceApiTransport} */
transport;
transport
/** @param {DeviceApiTransport} transport */
constructor (transport) {
this.transport = transport
Expand Down
12 changes: 6 additions & 6 deletions packages/device-api/tests/zod-rpc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('device-api', () => {
describe('can send new messages', () => {
it('when there is no validation', async () => {
class T1 extends DeviceApiCall {
method = 'abc';
method = 'abc'
}
const { handler, transport } = testIo()
await handler.notify(new T1(null))
Expand All @@ -47,8 +47,8 @@ describe('device-api', () => {
it('when there is params validation', async () => {
expect.assertions(2)
class T1 extends DeviceApiCall {
method = 'abc';
paramsValidator = z.string();
method = 'abc'
paramsValidator = z.string()
}
const { handler, transport } = testIo()
try {
Expand All @@ -64,8 +64,8 @@ describe('device-api', () => {
it('when there is result validation', async () => {
expect.assertions(2)
class T1 extends DeviceApiCall {
method = 'abc';
resultValidator = z.string();
method = 'abc'
resultValidator = z.string()
}
const { handler, transport } = testIo()
try {
Expand All @@ -85,7 +85,7 @@ describe('device-api', () => {
}
const handler = new DeviceApi(transport)
class T1 extends DeviceApiCall {
method = 'abc';
method = 'abc'
resultValidator = z.object({
success: z.string().optional(),
error: z.object({ message: z.string() })
Expand Down
Loading