You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error Handling The code does not handle potential errors when accessing properties of returnValue which might be undefined or not an object. This can lead to runtime errors. Consider adding checks to ensure returnValue is an object before attempting to access its properties.
Mutation of Input The method getKeySegments uses the shift method which mutates the array. This could lead to unexpected behavior if the array is used elsewhere after being passed to this method. Consider using a non-mutating approach to iterate over array elements.
Ensure consistent and correct syntax for accessing array elements in JSON strings
It seems that the syntax for accessing array elements in the target string is inconsistent. In JSON, typically array elements should be accessed using square brackets. The use of ${array.0} might not be interpreted correctly depending on the execution context. It's recommended to use a consistent and correct syntax for accessing array elements.
-"target": "This is a test string ${array.0}",+"target": "This is a test string ${array[0]}",
Apply this suggestion
Suggestion importance[1-10]: 10
Why: The suggestion correctly identifies an inconsistency in the syntax for accessing array elements, which could lead to runtime errors. Ensuring consistent and correct syntax is crucial for code reliability.
10
Possible bug
Add a check to ensure returnValue is an object before property access in the get method
Consider checking if returnValue is an object before attempting to access properties on it in the get method. This will prevent runtime errors if returnValue is not an object.
-returnValue = returnValue[segment]+if (typeof returnValue === 'object' && returnValue !== null) {+ returnValue = returnValue[segment]+} else {+ throw new Error('Attempted to access a property on a non-object.')+}
Apply this suggestion
Suggestion importance[1-10]: 9
Why: This suggestion addresses a potential runtime error by ensuring returnValue is an object before accessing its properties, which is crucial for preventing crashes.
9
Add error handling for undefined returnValue in the has method
Add error handling for undefined returnValue in the has method to prevent accessing properties of undefined.
Why: This suggestion adds necessary error handling to prevent accessing properties of undefined, which is important for robustness and preventing runtime errors.
8
Enhancement
Update the side-code-export dependency version to align with other package updates
The version dependency for side-code-export remains at ^4.0.11 while other related packages are updated to 4.0.13. It's advisable to keep dependency versions aligned to avoid potential compatibility issues and to ensure that all components benefit from the latest fixes and features.
Why: Aligning dependency versions helps avoid compatibility issues and ensures that all components benefit from the latest updates. This is a good practice for maintaining a stable and up-to-date codebase.
8
Best practice
Replace shift() with a for-loop to avoid modifying the segments array directly
To avoid potential memory leaks or unexpected behavior, replace segments.shift() with a for-loop iteration over segments in the set method.
-const segment = segments.shift()!+for (const segment of segments) {+ if (segments.length === 1) break;+ if (!returnValue[segment]) {+ returnValue[segment] = {}+ }+ returnValue = returnValue[segment]+}
Apply this suggestion
Suggestion importance[1-10]: 7
Why: This suggestion improves code readability and avoids potential side effects by not modifying the segments array directly, which is a good practice.
7
Restrict the version range of commander to patch updates only to minimize risk of breaking changes
The dependencies @seleniumhq/side-model and @seleniumhq/side-runtime are updated to 4.0.13, but the commander package version uses a caret (^) which might introduce breaking changes in future minor releases. Consider using a tilde (~) to restrict updates to patch releases only, which are less likely to introduce breaking changes.
Why: While restricting updates to patch versions can minimize the risk of breaking changes, it may also prevent beneficial updates. This suggestion is a good practice but not critical.
7
Maintainability
Lock side-code-export to a specific patch version for increased stability
The side-code-export dependency is pinned to a specific minor version using a caret (^), which could lead to automatic updates that introduce unexpected changes. It might be safer to lock this dependency to a specific patch version, especially if stability is a concern.
Why: Locking dependencies to a specific patch version can increase stability but may also prevent important updates. This suggestion is useful for maintaining stability but is not crucial.
The action failed because the test preprocessors.spec.ts failed. The test failed due to the following reasons:
The function interpolateString did not return the expected value.
Specifically, the test expected interpolateString('${a}', variables) to return 'undefined' when the variable a was set to undefined, but it did not.
Relevant error logs:
1: ##[group]Operating System2: Ubuntu
...
175: .../node_modules/@bazel/hide-bazel-files postinstall: Done176: .../node_modules/@bazel/typescript postinstall: Done177: .../node_modules/electron postinstall$ node install.js178: .../node_modules/electron postinstall$ node install.js179: .../node_modules/electron-chromedriver install$ node ./download-chromedriver.js180: .../node_modules/electron postinstall: Done181: .../node_modules/electron postinstall: Done182: .../node_modules/electron-chromedriver install: Done183: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'184: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'185: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'186: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'187: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'188: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'189: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'190: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'191: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'192: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/side-code-export/dist/bin.js'193: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/side-code-export/dist/bin.js'194: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/side-code-export/dist/bin.js'195: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/side-code-export/dist/bin.js'196: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/side-code-export/dist/bin.js'197: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/side-code-export/dist/bin.js'198: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/side-code-export/dist/bin.js'199: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/side-code-export/dist/bin.js'200: WARN Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/side-code-export/dist/bin.js'
...
295: packages/selenium-ide build:webpack: @ ./src/browser/windows/Splash/renderer.tsx 39:31-59296: packages/selenium-ide build:webpack: �[1m�[33mWARNING�[39m�[22m in �[1m../side-model/dist/I18N/index.js�[39m�[22m �[1m�[32m36:82-92�[39m�[22m297: packages/selenium-ide build:webpack: �[1mCritical dependency: the request of a dependency is an expression�[39m�[22m298: packages/selenium-ide build:webpack: @ ../side-model/dist/index.js 38:13-30299: packages/selenium-ide build:webpack: @ ./src/browser/I18N/en/index.ts 4:21-54300: packages/selenium-ide build:webpack: @ ./src/browser/I18N/keys.ts 6:29-44301: packages/selenium-ide build:webpack: @ ./src/browser/windows/Splash/renderer.tsx 39:31-59302: packages/selenium-ide build:webpack: 2 warnings have detailed information that is not shown.303: packages/selenium-ide build:webpack: Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
...
335: packages/selenium-ide build:webpack: �[1mCritical dependency: the request of a dependency is an expression�[39m�[22m336: packages/selenium-ide build:webpack: @ ../side-model/dist/index.js 38:13-30337: packages/selenium-ide build:webpack: @ ../side-api/dist/models/state/index.js 18:21-54338: packages/selenium-ide build:webpack: @ ../side-api/dist/models/index.js 18:13-31339: packages/selenium-ide build:webpack: @ ../side-api/dist/index.js 49:13-32340: packages/selenium-ide build:webpack: @ ./src/browser/api/index.ts 7:19-50 19:17-48341: packages/selenium-ide build:webpack: @ ./src/browser/windows/PlaybackWindow/preload.ts 6:30-52342: packages/selenium-ide build:webpack: 2 warnings have detailed information that is not shown.343: packages/selenium-ide build:webpack: Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
...
370: packages/selenium-ide build:webpack: �[1mCritical dependency: the request of a dependency is an expression�[39m�[22m371: packages/selenium-ide build:webpack: @ ../side-model/dist/index.js 38:13-30372: packages/selenium-ide build:webpack: @ ../side-api/dist/models/state/index.js 18:21-54373: packages/selenium-ide build:webpack: @ ../side-api/dist/models/index.js 18:13-31374: packages/selenium-ide build:webpack: @ ../side-api/dist/index.js 49:13-32375: packages/selenium-ide build:webpack: @ ./src/browser/api/bidi.ts 7:19-50 19:17-48376: packages/selenium-ide build:webpack: @ ./src/browser/windows/PlaybackWindowBidi/preload.ts 6:31-58377: packages/selenium-ide build:webpack: 2 warnings have detailed information that is not shown.378: packages/selenium-ide build:webpack: Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
...
440: packages/selenium-ide build:webpack: �[1m�[33mWARNING�[39m�[22m in �[1m./src/main/session/controllers/System/index.ts�[39m�[22m �[1m�[32m77:114-124�[39m�[22m441: packages/selenium-ide build:webpack: �[1mCritical dependency: the request of a dependency is an expression�[39m�[22m442: packages/selenium-ide build:webpack: @ ./src/main/session/index.ts 20:33-64443: packages/selenium-ide build:webpack: @ ./src/main/index.ts 11:34-54444: packages/selenium-ide build:webpack: �[1m�[33mWARNING�[39m�[22m in �[1m../../node_modules/.pnpm/v8-compile-cache@2.3.0/node_modules/v8-compile-cache/v8-compile-cache.js�[39m�[22m �[1m�[32m153:42-49�[39m�[22m445: packages/selenium-ide build:webpack: �[1mCritical dependency: require function is used in a way in which dependencies cannot be statically extracted�[39m�[22m446: packages/selenium-ide build:webpack: @ ./src/main/index.ts 6:0-27447: packages/selenium-ide build:webpack: 6 warnings have detailed information that is not shown.448: packages/selenium-ide build:webpack: Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
...
660: PASS packages/side-migrate/__tests__/migrations/title.spec.ts661: PASS packages/side-migrate/__tests__/migrations/pause.spec.ts662: PASS packages/side-runtime/src/__tests__/callstack.spec.ts663: PASS packages/side-runner/src/__tests__/config.spec.ts664: PASS packages/side-migrate/__tests__/migrate.spec.ts665: PASS packages/get-driver/src/__tests__/index.spec.ts666: PASS packages/browser-info/src/__tests__/index.spec.ts667: PASS packages/side-runtime/src/__tests__/webdriver.spec.ts (44.775 s)668: Summary of all failing tests
...
674: 129 | it('should interpolate false values', () => {675: 130 | variables.set('a', undefined)676: > 131 | expect(interpolateString('${a}', variables)).toBe('undefined')677: | ^678: 132 | variables.set('a', null)679: 133 | expect(interpolateString('${a}', variables)).toBe('null')680: 134 | variables.set('a', false)681: at Object.<anonymous> (src/__tests__/preprocessors.spec.ts:131:50)682: Test Suites: 1 failed, 31 passed, 32 total683: Tests: 1 failed, 11 skipped, 326 passed, 338 total684: Snapshots: 12 passed, 12 total685: Time: 45.064 s686: Ran all test suites in 5 projects.687: ##[error]Process completed with exit code 1.
✨ CI feedback usage guide:
The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
The tool analyzes the failed checks and provides several feedbacks:
Failed stage
Failed test name
Failure summary
Relevant error logs
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.
Configuration options
enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.
See more information about the checks tool in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement, Tests
Description
Variablesclass to support nested key handling inget,set, andhasmethods.tests/examples/echo.side.Changes walkthrough 📝
1 files
variables.ts
Add support for nested key handling in Variables classpackages/side-runtime/src/variables.ts
getKeySegmentsstatic method to split keys into segments.get,set, andhasmethods to handle nested keys.21 files
package.json
Bump version to 4.0.13packages/browser-info/package.json
package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-csharp-commons/package.json
@seleniumhq/side-modeldependency version.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-csharp-nunit/package.json
@seleniumhq/code-export-csharp-commonsand@seleniumhq/side-modeldependency versions.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-csharp-xunit/package.json
@seleniumhq/code-export-csharp-commonsand@seleniumhq/side-modeldependency versions.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-java-junit/package.json
@seleniumhq/side-modeldependency version.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-javascript-mocha/package.json
@seleniumhq/side-modeldependency version.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-python-pytest/package.json
@seleniumhq/side-modeldependency version.package.json
Bump version to 4.0.13 and update dependenciespackages/code-export-ruby-rspec/package.json
@seleniumhq/side-modeldependency version.package.json
Bump version to 4.0.13packages/get-driver/package.json
package.json
Bump version to 4.0.1-beta.15 and update dependenciespackages/selenium-ide/package.json
@seleniumhqdependencies to version 4.0.13.package.json
Bump version to 4.0.13 and update dependenciespackages/side-api/package.json
@seleniumhqdependencies to version 4.0.13.package.json
Bump version to 4.0.13 and update dependenciespackages/side-code-export/package.json
@seleniumhq/side-modeland@seleniumhq/side-runtimedependencyversions.
package.json
Bump version to 4.0.13packages/side-commons/package.json
package.json
Bump version to 4.0.13 and update dependenciespackages/side-example-suite/package.json
@seleniumhq/code-export-python-pytestand@seleniumhq/side-apidependency versions.
package.json
Bump version to 4.0.13packages/side-migrate/package.json
package.json
Bump version to 4.0.13packages/side-model/package.json
package.json
Bump version to 4.0.13 and update dependenciespackages/side-runner/package.json
@seleniumhq/side-modeland@seleniumhq/side-runtimedependencyversions.
package.json
Bump version to 4.0.13 and update dependenciespackages/side-runtime/package.json
@seleniumhqdependencies to version 4.0.13.package.json
Bump version to 4.0.13packages/side-testkit/package.json
package.json
Bump version to 4.0.13 and update dependenciespackages/webdriver-testkit/package.json
@seleniumhq/browser-infoand@seleniumhq/get-driverdependencyversions.
pnpm-lock.yaml
Update pnpm lock file with new dependency versionspnpm-lock.yaml
@seleniumhqdependencies to version 4.0.13.1 files
echo.side
Add tests for array and nested key handlingtests/examples/echo.side