From 86695889bb7ac5b2c026a02e4bc43de58da4e875 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 21:28:36 +0000 Subject: [PATCH 1/8] Chore(deps-dev): Bump chai from 4.3.7 to 5.3.1 Bumps [chai](https://github.com/chaijs/chai) from 4.3.7 to 5.3.1. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/v4.3.7...v5.3.1) --- updated-dependencies: - dependency-name: chai dependency-version: 5.3.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 139 ++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 55 insertions(+), 86 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c82aece..34f43958 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "devDependencies": { "browserify": "^17.0.1", - "chai": "^4.3.6", + "chai": "^5.3.1", "eslint": "^8.20.0", "eslint-config-google": "^0.14.0", "mocha": "^11.7.1", @@ -1185,12 +1185,12 @@ } }, "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "engines": { - "node": "*" + "node": ">=12" } }, "node_modules/available-typed-arrays": { @@ -1630,21 +1630,19 @@ "license": "CC-BY-4.0" }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.1.tgz", + "integrity": "sha512-48af6xm9gQK8rhIcOxWwdGzIervm8BVTin+yRp9HEvU20BtVZ2lBywlIJBzwaDtvo0FvjeL7QdCADoUoqIbV3A==", "dev": true, "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=18" } }, "node_modules/chalk": { @@ -1664,12 +1662,12 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true, "engines": { - "node": "*" + "node": ">= 16" } }, "node_modules/chokidar": { @@ -1930,13 +1928,10 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, "engines": { "node": ">=6" } @@ -2643,15 +2638,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -3572,13 +3558,10 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", + "integrity": "sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==", + "dev": true }, "node_modules/lru-cache": { "version": "5.1.1", @@ -4391,12 +4374,12 @@ "license": "ISC" }, "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", "dev": true, "engines": { - "node": "*" + "node": ">= 14.16" } }, "node_modules/pbkdf2": { @@ -6490,9 +6473,9 @@ } }, "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true }, "available-typed-arrays": { @@ -6828,18 +6811,16 @@ "dev": true }, "chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.1.tgz", + "integrity": "sha512-48af6xm9gQK8rhIcOxWwdGzIervm8BVTin+yRp9HEvU20BtVZ2lBywlIJBzwaDtvo0FvjeL7QdCADoUoqIbV3A==", "dev": true, "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" } }, "chalk": { @@ -6853,9 +6834,9 @@ } }, "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true }, "chokidar": { @@ -7072,13 +7053,10 @@ "dev": true }, "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true }, "deep-is": { "version": "0.1.4", @@ -7598,12 +7576,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, "get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -8266,13 +8238,10 @@ } }, "loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", + "integrity": "sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==", + "dev": true }, "lru-cache": { "version": "5.1.1", @@ -8904,9 +8873,9 @@ } }, "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", "dev": true }, "pbkdf2": { diff --git a/package.json b/package.json index 5ea7073e..e3b9a2fa 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "devDependencies": { "browserify": "^17.0.1", - "chai": "^4.3.6", + "chai": "^5.3.1", "eslint": "^8.20.0", "eslint-config-google": "^0.14.0", "mocha": "^11.7.1", From 43111d8f53cba5c73bfc266f4487f221f2611a5a Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 22 Aug 2025 07:20:12 +0200 Subject: [PATCH 2/8] Chai package is now published as an ES module ? --- testing/unittest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/unittest.js b/testing/unittest.js index dc17ecc0..169ad7df 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -1,4 +1,4 @@ -const { expect } = require('chai') +const { expect } = await import('chai') const sinon = require('sinon') const { doInitFilter, doFilter } = require('../src/pytest_html/scripts/filter.js') const { doInitSort, doSort } = require('../src/pytest_html/scripts/sort.js') From 56ac4b43e3649f875a36a42b1ffc4560c39669bb Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 22 Aug 2025 07:29:03 +0200 Subject: [PATCH 3/8] common js solution --- testing/unittest.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/unittest.js b/testing/unittest.js index 169ad7df..9069d105 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -1,10 +1,13 @@ -const { expect } = await import('chai') const sinon = require('sinon') const { doInitFilter, doFilter } = require('../src/pytest_html/scripts/filter.js') const { doInitSort, doSort } = require('../src/pytest_html/scripts/sort.js') const dataModule = require('../src/pytest_html/scripts/datamanager.js') const storageModule = require('../src/pytest_html/scripts/storage.js') +let expect +(async () => { + ({ expect } = await import('chai')) +})() const setTestData = () => { const jsonData = { From f9d2c4be424c1606bb39c2765a591e4201a73499 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 05:29:16 +0000 Subject: [PATCH 4/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- testing/unittest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/unittest.js b/testing/unittest.js index 9069d105..73f480ac 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -6,7 +6,7 @@ const storageModule = require('../src/pytest_html/scripts/storage.js') let expect (async () => { - ({ expect } = await import('chai')) + ({ expect } = await import('chai')) })() const setTestData = () => { From a255cd5697923533f5006ed632281a3fad27da1d Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 22 Aug 2025 07:30:34 +0200 Subject: [PATCH 5/8] anoter try --- testing/unittest.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/testing/unittest.js b/testing/unittest.js index 73f480ac..a8142656 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -1,13 +1,10 @@ +import { expect } from 'chai' const sinon = require('sinon') const { doInitFilter, doFilter } = require('../src/pytest_html/scripts/filter.js') const { doInitSort, doSort } = require('../src/pytest_html/scripts/sort.js') const dataModule = require('../src/pytest_html/scripts/datamanager.js') const storageModule = require('../src/pytest_html/scripts/storage.js') -let expect -(async () => { - ({ expect } = await import('chai')) -})() const setTestData = () => { const jsonData = { From 18dbf3ae7f46378594e920754e12e2b070715b54 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 22 Aug 2025 07:33:07 +0200 Subject: [PATCH 6/8] module --- .eslintrc.json | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 02244542..ee4a471c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,8 @@ "google" ], "parserOptions": { - "ecmaVersion": "latest" + "ecmaVersion": "latest", + "sourceType": "module" }, "rules": { "array-bracket-spacing": "error", diff --git a/package.json b/package.json index e3b9a2fa..0005ce3d 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,6 @@ "nyc": "^17.1.0", "sass": "^1.90.0", "sinon": "^21.0.0" - } + }, + "type": "module" } From 67d2a37a6eb44aeb5e98675d3e8b1885289081f2 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 22 Aug 2025 21:09:51 +0200 Subject: [PATCH 7/8] ES import --- testing/unittest.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/unittest.js b/testing/unittest.js index a8142656..4e7f7063 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -1,9 +1,9 @@ import { expect } from 'chai' -const sinon = require('sinon') -const { doInitFilter, doFilter } = require('../src/pytest_html/scripts/filter.js') -const { doInitSort, doSort } = require('../src/pytest_html/scripts/sort.js') -const dataModule = require('../src/pytest_html/scripts/datamanager.js') -const storageModule = require('../src/pytest_html/scripts/storage.js') +import sinon from 'sinon'; +import { doInitFilter, doFilter } from '../src/pytest_html/scripts/filter.js'; +import { doInitSort, doSort } from '../src/pytest_html/scripts/sort.js'; +import * as dataModule from '../src/pytest_html/scripts/datamanager.js'; +import * as storageModule from '../src/pytest_html/scripts/storage.js'; const setTestData = () => { From 05cb1d325f20376879b50d10c5ca607ca1926945 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 19:11:55 +0000 Subject: [PATCH 8/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- testing/unittest.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/unittest.js b/testing/unittest.js index 4e7f7063..64e987bc 100644 --- a/testing/unittest.js +++ b/testing/unittest.js @@ -1,9 +1,9 @@ import { expect } from 'chai' -import sinon from 'sinon'; -import { doInitFilter, doFilter } from '../src/pytest_html/scripts/filter.js'; -import { doInitSort, doSort } from '../src/pytest_html/scripts/sort.js'; -import * as dataModule from '../src/pytest_html/scripts/datamanager.js'; -import * as storageModule from '../src/pytest_html/scripts/storage.js'; +import sinon from 'sinon' +import { doInitFilter, doFilter } from '../src/pytest_html/scripts/filter.js' +import { doInitSort, doSort } from '../src/pytest_html/scripts/sort.js' +import * as dataModule from '../src/pytest_html/scripts/datamanager.js' +import * as storageModule from '../src/pytest_html/scripts/storage.js' const setTestData = () => {