From f8d6c364d2d41bbc1024410f555c17819262312f Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Fri, 8 Nov 2024 12:45:42 -0500 Subject: [PATCH] chore: fix format and minor jsdoc comments --- javascript/grid-ui/package.json | 6 +- .../bidi/browsingContext.js | 3 +- .../bidi/continueRequestParameters.js | 2 +- .../node/selenium-webdriver/bidi/filterBy.js | 2 +- .../selenium-webdriver/bidi/logEntries.js | 4 +- .../selenium-webdriver/bidi/protocolValue.js | 4 +- .../node/selenium-webdriver/bidi/storage.js | 12 +--- pnpm-lock.yaml | 56 +++++++++---------- 8 files changed, 41 insertions(+), 48 deletions(-) diff --git a/javascript/grid-ui/package.json b/javascript/grid-ui/package.json index b9cddc4eaa9e8..ca39d5fd49049 100644 --- a/javascript/grid-ui/package.json +++ b/javascript/grid-ui/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "dependencies": { - "@apollo/client": "3.11.8", + "@apollo/client": "3.11.9", "@emotion/react": "11.13.3", "@emotion/styled": "11.13.0", "@mui/icons-material": "5.15.18", @@ -16,10 +16,10 @@ "@types/react-dom": "18.2.22", "@types/react-modal": "3.16.3", "@types/react-router-dom": "5.3.3", - "graphql": "16.8.1", + "graphql": "16.9.0", "graphql.macro": "1.4.2", "path-browserify": "1.0.1", - "pretty-ms": "9.0.0", + "pretty-ms": "9.1.0", "react": "18.3.1", "react-dom": "18.3.1", "react-modal": "3.16.1", diff --git a/javascript/node/selenium-webdriver/bidi/browsingContext.js b/javascript/node/selenium-webdriver/bidi/browsingContext.js index 9a32004c14d15..ea930ca45360a 100644 --- a/javascript/node/selenium-webdriver/bidi/browsingContext.js +++ b/javascript/node/selenium-webdriver/bidi/browsingContext.js @@ -156,8 +156,7 @@ class BrowsingContext { method: 'browsingContext.create', params: Object.fromEntries(parameters), } - const res = await this.bidi.send(params) - return res + return await this.bidi.send(params) } /** diff --git a/javascript/node/selenium-webdriver/bidi/continueRequestParameters.js b/javascript/node/selenium-webdriver/bidi/continueRequestParameters.js index 622fd35846670..31e5f472abdaa 100644 --- a/javascript/node/selenium-webdriver/bidi/continueRequestParameters.js +++ b/javascript/node/selenium-webdriver/bidi/continueRequestParameters.js @@ -47,7 +47,7 @@ class ContinueRequestParameters { * Sets the cookies for the request. * * @param {Header[]} cookieHeaders - An array of cookie headers. - * @returns {continueRequestParameters} - The current instance of the ContinueRequestParameters for chaining. + * @returns {ContinueRequestParameters} - The current instance of the ContinueRequestParameters for chaining. * @throws {Error} - If a cookie header is not an instance of Header. */ cookies(cookieHeaders) { diff --git a/javascript/node/selenium-webdriver/bidi/filterBy.js b/javascript/node/selenium-webdriver/bidi/filterBy.js index 0c93f35ea2d2b..5d32d46131022 100644 --- a/javascript/node/selenium-webdriver/bidi/filterBy.js +++ b/javascript/node/selenium-webdriver/bidi/filterBy.js @@ -21,7 +21,7 @@ class FilterBy { } static logLevel(level) { - if (level === undefined || (level != undefined && !['debug', 'error', 'info', 'warning'].includes(level))) { + if (level === undefined || (level !== undefined && !['debug', 'error', 'info', 'warning'].includes(level))) { throw Error( `Please pass valid log level. Valid log levels are 'debug', 'error', 'info' and 'warning'. Received: ${level}`, ) diff --git a/javascript/node/selenium-webdriver/bidi/logEntries.js b/javascript/node/selenium-webdriver/bidi/logEntries.js index cba08adb77424..ff15e0c8dfb79 100644 --- a/javascript/node/selenium-webdriver/bidi/logEntries.js +++ b/javascript/node/selenium-webdriver/bidi/logEntries.js @@ -21,12 +21,13 @@ const { Source } = require('./scriptTypes') /** * Represents a base log entry. - * Desribed in https://w3c.github.io/webdriver-bidi/#types-log-logentry. + * Described in https://w3c.github.io/webdriver-bidi/#types-log-logentry. */ class BaseLogEntry { /** * Creates a new instance of BaseLogEntry. * @param {string} level - The log level. + * @param {source} source - Script Source * @param {string} text - The log source. * @param {string} text - The log text. * @param {number} timeStamp - The log timestamp. @@ -86,6 +87,7 @@ class GenericLogEntry extends BaseLogEntry { /** * Creates an instance of GenericLogEntry. * @param {string} level - The log level. + * @param {source} source - Script Source * @param {string} text - The log text. * @param {Date} timeStamp - The log timestamp. * @param {string} type - The log type. diff --git a/javascript/node/selenium-webdriver/bidi/protocolValue.js b/javascript/node/selenium-webdriver/bidi/protocolValue.js index 4bfb27aa221ab..18a0e67fb8c9f 100644 --- a/javascript/node/selenium-webdriver/bidi/protocolValue.js +++ b/javascript/node/selenium-webdriver/bidi/protocolValue.js @@ -145,7 +145,7 @@ class LocalValue { /** * Creates a new LocalValue object from the passed object. * - * @param {Object} map - The object. + * @param {Object} object - The object. * @returns {LocalValue} - The created LocalValue object. */ static createObjectValue(object) { @@ -431,7 +431,7 @@ class ChannelValue { } } - if (resultOwnership != undefined) { + if (resultOwnership !== undefined) { if (['root', 'none'].includes(resultOwnership)) { this.resultOwnership = resultOwnership } else { diff --git a/javascript/node/selenium-webdriver/bidi/storage.js b/javascript/node/selenium-webdriver/bidi/storage.js index 86eba93eef656..0289495ef7bec 100644 --- a/javascript/node/selenium-webdriver/bidi/storage.js +++ b/javascript/node/selenium-webdriver/bidi/storage.js @@ -138,11 +138,7 @@ class Storage { Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'userContext') && Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'sourceOrigin') ) { - let partitionKey = new PartitionKey( - response.result.partitionKey.userContext, - response.result.partitionKey.sourceOrigin, - ) - return partitionKey + return new PartitionKey(response.result.partitionKey.userContext, response.result.partitionKey.sourceOrigin) } } } @@ -182,11 +178,7 @@ class Storage { Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'userContext') && Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'sourceOrigin') ) { - let partitionKey = new PartitionKey( - response.result.partitionKey.userContext, - response.result.partitionKey.sourceOrigin, - ) - return partitionKey + return new PartitionKey(response.result.partitionKey.userContext, response.result.partitionKey.sourceOrigin) } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f99a692e4df29..7ad1e348f4198 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ importers: javascript/grid-ui: dependencies: '@apollo/client': - specifier: 3.11.8 - version: 3.11.8(@types/react@18.2.72)(graphql@16.8.1)(react-dom@18.3.1)(react@18.3.1) + specifier: 3.11.9 + version: 3.11.9(@types/react@18.2.72)(graphql@16.9.0)(react-dom@18.3.1)(react@18.3.1) '@emotion/react': specifier: 11.13.3 version: 11.13.3(@types/react@18.2.72)(react@18.3.1) @@ -47,17 +47,17 @@ importers: specifier: 5.3.3 version: 5.3.3 graphql: - specifier: 16.8.1 - version: 16.8.1 + specifier: 16.9.0 + version: 16.9.0 graphql.macro: specifier: 1.4.2 - version: 1.4.2(@babel/core@7.26.0)(graphql@16.8.1) + version: 1.4.2(@babel/core@7.26.0)(graphql@16.9.0) path-browserify: specifier: 1.0.1 version: 1.0.1 pretty-ms: - specifier: 9.0.0 - version: 9.0.0 + specifier: 9.1.0 + version: 9.1.0 react: specifier: 18.3.1 version: 18.3.1 @@ -182,8 +182,8 @@ packages: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - /@apollo/client@3.11.8(@types/react@18.2.72)(graphql@16.8.1)(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-CgG1wbtMjsV2pRGe/eYITmV5B8lXUCYljB2gB/6jWTFQcrvirUVvKg7qtFdjYkQSFbIffU1IDyxgeaN81eTjbA==} + /@apollo/client@3.11.9(@types/react@18.2.72)(graphql@16.9.0)(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-aQ6VL+CPO1G4DLS/3FelfA+nl+ZQCP5qeN1NS6J8xh9wumUM/2W1ccneqCYmbTMDtoSunxE1BV2W6u0FF4axwQ==} peerDependencies: graphql: ^15.0.0 || ^16.0.0 graphql-ws: ^5.5.5 @@ -200,12 +200,12 @@ packages: subscriptions-transport-ws: optional: true dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) '@wry/caches': 1.0.1 '@wry/equality': 0.5.7 '@wry/trie': 0.5.0 - graphql: 16.8.1 - graphql-tag: 2.12.6(graphql@16.8.1) + graphql: 16.9.0 + graphql-tag: 2.12.6(graphql@16.9.0) hoist-non-react-statics: 3.3.2 optimism: 0.18.0 prop-types: 15.8.1 @@ -913,12 +913,12 @@ packages: resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} dev: false - /@graphql-typed-document-node/core@3.2.0(graphql@16.8.1): + /@graphql-typed-document-node/core@3.2.0(graphql@16.9.0): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - graphql: 16.8.1 + graphql: 16.9.0 dev: false /@humanfs/core@0.19.1: @@ -1926,8 +1926,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001678 - electron-to-chromium: 1.5.52 + caniuse-lite: 1.0.30001679 + electron-to-chromium: 1.5.55 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -1986,8 +1986,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001678: - resolution: {integrity: sha512-RR+4U/05gNtps58PEBDZcPWTgEO2MBeoPZ96aQcjmfkBWRIDfN451fW2qyDA9/+HohLLIL5GqiMwA+IB1pWarw==} + /caniuse-lite@1.0.30001679: + resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==} /catharsis@0.9.0: resolution: {integrity: sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==} @@ -2409,8 +2409,8 @@ packages: jake: 10.9.2 dev: false - /electron-to-chromium@1.5.52: - resolution: {integrity: sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ==} + /electron-to-chromium@1.5.55: + resolution: {integrity: sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==} /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -3477,31 +3477,31 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /graphql-tag@2.12.6(graphql@16.8.1): + /graphql-tag@2.12.6(graphql@16.9.0): resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} engines: {node: '>=10'} peerDependencies: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - graphql: 16.8.1 + graphql: 16.9.0 tslib: 2.8.1 dev: false - /graphql.macro@1.4.2(@babel/core@7.26.0)(graphql@16.8.1): + /graphql.macro@1.4.2(@babel/core@7.26.0)(graphql@16.9.0): resolution: {integrity: sha512-vcIaStPgS65gp5i1M3DSBimNVkyus0Z7k4VObWAyZS319tKlpX/TEIJSWTgOZU5k8dn4RRzGoS/elQhX2E6yBw==} dependencies: '@babel/template': 7.25.9 babel-literal-to-ast: 2.1.0(@babel/core@7.26.0) babel-plugin-macros: 2.8.0 - graphql-tag: 2.12.6(graphql@16.8.1) + graphql-tag: 2.12.6(graphql@16.9.0) transitivePeerDependencies: - '@babel/core' - graphql - supports-color dev: false - /graphql@16.8.1: - resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} + /graphql@16.9.0: + resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} dev: false @@ -4737,8 +4737,8 @@ packages: react-is: 18.3.1 dev: false - /pretty-ms@9.0.0: - resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} + /pretty-ms@9.1.0: + resolution: {integrity: sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==} engines: {node: '>=18'} dependencies: parse-ms: 4.0.0