Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update chai dependency from v4.5.0 to v6.0.1 with compatibility fixes#7558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromcopilot/fix-f156c391-4794-4fcc-b3ee-1282fc77c383

Conversation

Copy link

CopilotAI commentedSep 26, 2025
edited
Loading

This PR updates thechai testing library from version 4.5.0 to the latest version 6.0.1, addressing the breaking changes introduced in chai v6 while maintaining full backward compatibility for all existing tests.

Changes Made

Dependency Updates

  • Updatedchai from4.5.0 to6.0.1
  • Added npm package overrides to handlesinon-chai compatibility with chai v6

Breaking Changes Fixed

Chai v6 removed the default export, requiring updates to import patterns across the test suite:

Before (chai v4):

importchaifrom'chai';importsinonChaifrom'sinon-chai';chai.use(sinonChai);constexpect=chai.expect;chai.config.truncateThreshold=0;

After (chai v6):

import{expect,use,config}from'chai';importsinonChaifrom'sinon-chai';use(sinonChai);config.truncateThreshold=0;

Files Updated

  • 35 test files acrosstests/unit/ andtests/functional/ directories updated with new import patterns
  • tests/index.js updated with global chai setup for karma-sinon-chai compatibility
  • package.json updated with dependency version and compatibility overrides

Verification

All 760 unit tests continue to pass
Project builds successfully with no compilation errors
Linting passes with no ESLint violations
TypeScript compilation works correctly
Full API compatibility maintained - no changes needed to test logic

Benefits

  • Security: Latest version includes security patches and bug fixes
  • Performance: Chai v6 offers improved performance and better ES module support
  • Future-proof: Ready for modern JavaScript tooling and build systems
  • Maintainability: Up-to-date dependencies reduce technical debt

The upgrade maintains 100% backward compatibility in test APIs while leveraging chai v6's improvements and ensuring the project stays current with modern testing practices.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • android.clients.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4895 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-79234009 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1972766368291253251,10318285811106071434,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clients2.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clientservices.googleapis.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • example.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4895 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-79234009 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1972766368291253251,10318285811106071434,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • googlechromelabs.github.io
    • Triggering command:node install.js (dns block)
  • redirector.gvt1.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • video-dev.github.io
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4895 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-79234009 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1972766368291253251,10318285811106071434,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • www.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3476 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-66624510 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3373008153910166293,4754160006215805928,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-66624510 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=66624510 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3876 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-30438478 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,828982975387138809,2726887541092610406,262144 --disable-features=PaintHolding --variations-seed-version (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Update thechai dependency in thepackage.json file to version 6. Ensure that all tests usingchai are compatible with the new version and update any configurations or imports if necessary. Verify that the project builds successfully and all test cases pass after the update.

*This pull request was created as a result of the following prompt from Copilot chat.*> Update the `chai` dependency in the `package.json` file to version 6. Ensure that all tests using `chai` are compatible with the new version and update any configurations or imports if necessary. Verify that the project builds successfully and all test cases pass after the update.

✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: tjenkinson <3259993+tjenkinson@users.noreply.github.com>
CopilotAI changed the title[WIP] Update chai to version 6Update chai dependency from v4.5.0 to v6.0.1 with compatibility fixesSep 26, 2025
"babel-loader":"10.0.0",
"babel-plugin-transform-remove-console":"6.9.4",
"chai":"4.5.0",
"chai":"6.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

sinon-chai and chai need to be updated together. The renovate sinon-chai PR (#7563) is also failing because of the peer dependency. sinon-chai should be updated to "4.0.1".

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@robwalchrobwalchrobwalch requested changes

@tjenkinsontjenkinsonAwaiting requested review from tjenkinson

Requested changes must be addressed to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@robwalch@tjenkinson

[8]ページ先頭

©2009-2025 Movatter.jp