Skip to content

Commit fd15c49

Browse files
DavertMikclaude
andcommitted
fix(deps): bump axios, @xmldom/xmldom and mocha to patched versions
Closes #5731. mocha 12 pulls serialize-javascript 7 (GHSA-5c6j-r48x-rmvq, GHSA-qj8w-gfj5-8c6v). Uses caret ranges so patch releases flow through. mocha 12 is ESM with named exports, so internal imports were updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b3ef767 commit fd15c49

11 files changed

Lines changed: 20 additions & 22 deletions

File tree

‎lib/mocha/cli.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import mocha from 'mocha'
2-
const { reporters: { Base } } = mocha
1+
import { reporters } from 'mocha'
2+
const { Base } = reporters
33
import ms from 'ms'
44
import figures from 'figures'
55
import { readFileSync } from 'fs'

‎lib/mocha/index.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import Suite from 'mocha/lib/suite.js'
2-
import Test from 'mocha/lib/test.js'
1+
import { Suite, Test } from 'mocha'
32
import { BeforeHook, AfterHook, BeforeSuiteHook, AfterSuiteHook } from './hooks.js'
43

54
export {

‎lib/mocha/suite.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MochaSuite from 'mocha/lib/suite.js'
1+
import { Suite as MochaSuite } from 'mocha'
22
/**
33
* @typedef {import('mocha')} Mocha
44
*/

‎lib/mocha/test.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import Test from 'mocha/lib/test.js'
2-
import Suite from 'mocha/lib/suite.js'
1+
import { Suite, Test } from 'mocha'
32
import { genTestId, serializeError, clearString, relativeDir } from '../utils.js'
43
import Step from '../step/base.js'
54
import { enhanceMochaSuite } from './suite.js'

‎lib/mocha/ui.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { createTest } from './test.js'
77
import { createSuite } from './suite.js'
88
import { HookConfig, AfterSuiteHook, AfterHook, BeforeSuiteHook, BeforeHook } from './hooks.js'
99
import { initMochaGlobals } from '../globals.js'
10-
import common from 'mocha/lib/interfaces/common.js'
10+
import { createCommon } from 'mocha/lib/interfaces/common.js'
1111
import container from '../container.js'
1212
import store from '../store.js'
1313

@@ -49,7 +49,7 @@ export default function (suite) {
4949
let afterEachHooksAreLoaded
5050

5151
suite.on('pre-require', (context, file, mocha) => {
52-
const cmn = common(suites, context, mocha)
52+
const cmn = createCommon(suites, context, mocha)
5353

5454
const addScenario = function (title, opts = {}, fn) {
5555
const suite = suites[0]
@@ -74,7 +74,7 @@ export default function (suite) {
7474
context.BeforeAll = cmn.before
7575
context.AfterAll = cmn.after
7676

77-
context.run = mocha.options.delay && common.runWithSuite(suite)
77+
context.run = mocha.options.delay && cmn.runWithSuite(suite)
7878
/**
7979
* Describe a "suite" with the given `title`
8080
* and callback `fn` containing nested suites

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
"@cucumber/gherkin": "38.0.0",
101101
"@cucumber/messages": "32.3.1",
102102
"@modelcontextprotocol/sdk": "^1.26.0",
103-
"@xmldom/xmldom": "0.9.10",
103+
"@xmldom/xmldom": "^0.9.12",
104104
"acorn": "8.15.0",
105105
"ai": "7.0.132",
106106
"arrify": "3.0.0",
107-
"axios": "1.16.1",
107+
"axios": "^1.20.0",
108108
"chalk": "4.1.2",
109109
"cheerio": "^1.0.0",
110110
"chokidar": "^5.0.0",
@@ -127,7 +127,7 @@
127127
"lodash.merge": "4.6.2",
128128
"lodash.shuffle": "4.2.0",
129129
"mkdirp": "3.0.1",
130-
"mocha": "11.7.5",
130+
"mocha": "^12.0.3",
131131
"monocart-coverage-reports": "2.12.12",
132132
"ms": "2.1.3",
133133
"multer": "^2.0.2",
@@ -160,7 +160,7 @@
160160
"@wdio/sauce-service": "9.12.5",
161161
"@wdio/selenium-standalone-service": "8.15.0",
162162
"@wdio/utils": "9.23.3",
163-
"@xmldom/xmldom": "0.9.10",
163+
"@xmldom/xmldom": "^0.9.12",
164164
"bunosh": "latest",
165165
"chai": "^6.2.1",
166166
"chai-as-promised": "^8.0.2",

‎test/unit/circular_reference_test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect } from 'chai'
22
import { safeStringify, truncateString } from '../../lib/utils.js'
33
import { createTest } from '../../lib/mocha/test.js'
44
import { createSuite } from '../../lib/mocha/suite.js'
5-
import MochaSuite from 'mocha/lib/suite.js'
5+
import { Suite as MochaSuite } from 'mocha'
66

77
describe('Circular Reference Handling', function () {
88
describe('safeStringify utility', function () {

‎test/unit/data/ui_test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai'
2-
import Mocha from 'mocha/lib/mocha.js'
3-
import Suite from 'mocha/lib/suite.js'
2+
import Mocha from 'mocha'
3+
import { Suite } from 'mocha'
44
import makeUI from '../../../lib/mocha/ui.js'
55
import addData from '../../../lib/data/context.js'
66
import DataTable from '../../../lib/data/table.js'

‎test/unit/mocha/retry_integration_test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from 'chai'
22
import { createTest } from '../../../lib/mocha/test.js'
33
import { createSuite } from '../../../lib/mocha/suite.js'
4-
import MochaSuite from 'mocha/lib/suite.js'
4+
import { Suite as MochaSuite } from 'mocha'
55
import retryEnhancer from '../../../lib/listener/retryEnhancer.js'
66
import event from '../../../lib/event.js'
77

‎test/unit/mocha/test_clone_test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { expect } from 'chai'
22
import { createTest, cloneTest } from '../../../lib/mocha/test.js'
33
import { createSuite } from '../../../lib/mocha/suite.js'
4-
import MochaSuite from 'mocha/lib/suite.js'
5-
import Test from 'mocha/lib/test.js'
4+
import { Suite as MochaSuite } from 'mocha'
5+
import { Test } from 'mocha'
66
import retryEnhancer from '../../../lib/listener/retryEnhancer.js'
77
import event from '../../../lib/event.js'
88

0 commit comments

Comments
 (0)