From 9dc1e78c7ea91af73ca4b8d0212302f37db0489e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Wed, 18 Oct 2023 15:59:04 +0200 Subject: [PATCH 1/3] update assertion-error --- lib/chai.js | 2 +- lib/chai/assertion.js | 2 +- lib/chai/core/assertions.js | 2 +- lib/chai/interface/assert.js | 2 +- lib/chai/interface/expect.js | 2 +- lib/chai/interface/should.js | 2 +- lib/chai/utils/expectTypes.js | 2 +- package-lock.json | 10 +++++----- package.json | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/chai.js b/lib/chai.js index 5a994e54..fa3a0cf0 100644 --- a/lib/chai.js +++ b/lib/chai.js @@ -5,7 +5,7 @@ */ import * as util from './chai/utils/index.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; import {config} from './chai/config.js'; import './chai/core/assertions.js'; import {expect} from './chai/interface/expect.js'; diff --git a/lib/chai/assertion.js b/lib/chai/assertion.js index 24a4fb1f..417a8a47 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -6,7 +6,7 @@ */ import {config} from './config.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; import * as util from './utils/index.js'; /*! diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 76b7641b..ed857cb2 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -6,7 +6,7 @@ */ import {Assertion} from '../assertion.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; import * as _ from '../utils/index.js'; const {flag} = _; diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index fed7a54a..2ce98696 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -6,7 +6,7 @@ import {Assertion} from '../assertion.js'; import {flag, inspect} from '../utils/index.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; /** * ### assert(expression, message) diff --git a/lib/chai/interface/expect.js b/lib/chai/interface/expect.js index 20caf3b6..72e05f6e 100644 --- a/lib/chai/interface/expect.js +++ b/lib/chai/interface/expect.js @@ -5,7 +5,7 @@ */ import {Assertion} from '../assertion.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; function expect(val, message) { return new Assertion(val, message); diff --git a/lib/chai/interface/should.js b/lib/chai/interface/should.js index 841788fd..8269a58b 100644 --- a/lib/chai/interface/should.js +++ b/lib/chai/interface/should.js @@ -5,7 +5,7 @@ */ import {Assertion} from '../assertion.js'; -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; function loadShould () { // explicitly define this method as function as to have it's name to include as `ssfi` diff --git a/lib/chai/utils/expectTypes.js b/lib/chai/utils/expectTypes.js index f0a206f4..4a80d06a 100644 --- a/lib/chai/utils/expectTypes.js +++ b/lib/chai/utils/expectTypes.js @@ -18,7 +18,7 @@ * @api public */ -import AssertionError from 'assertion-error'; +import {AssertionError} from 'assertion-error'; import {flag} from './flag.js'; import {type} from './type-detect.js'; diff --git a/package-lock.json b/package-lock.json index 7aabed6a..eb6f1f85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.0-alpha.1", "license": "MIT", "dependencies": { - "assertion-error": "^1.1.0", + "assertion-error": "^2.0.0", "check-error": "^2.0.0", "deep-eql": "^5.0.0", "loupe": "^3.0.0", @@ -977,11 +977,11 @@ } }, "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.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.0.tgz", + "integrity": "sha512-Q0en67fcMTcBp1xn4DTYasTSKD4KAo86UhA6lr+c6neaz2gelKi5ILIqLcYl9JGWkGGbooYLs2iGQv7v1e83AA==", "engines": { - "node": "*" + "node": ">=12" } }, "node_modules/async": { diff --git a/package.json b/package.json index 92512c32..12928a68 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "node": ">=12" }, "dependencies": { - "assertion-error": "^1.1.0", + "assertion-error": "^2.0.0", "check-error": "^2.0.0", "deep-eql": "^5.0.0", "loupe": "^3.0.0", From 2e8e90322314e6cc9b3653fb472e7940a978dc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Wed, 18 Oct 2023 20:07:19 +0200 Subject: [PATCH 2/3] update `assertion-error` once more --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb6f1f85..64bec601 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.0-alpha.1", "license": "MIT", "dependencies": { - "assertion-error": "^2.0.0", + "assertion-error": "^2.0.1", "check-error": "^2.0.0", "deep-eql": "^5.0.0", "loupe": "^3.0.0", @@ -977,9 +977,9 @@ } }, "node_modules/assertion-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.0.tgz", - "integrity": "sha512-Q0en67fcMTcBp1xn4DTYasTSKD4KAo86UhA6lr+c6neaz2gelKi5ILIqLcYl9JGWkGGbooYLs2iGQv7v1e83AA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "engines": { "node": ">=12" } diff --git a/package.json b/package.json index 12928a68..f7f989ef 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "node": ">=12" }, "dependencies": { - "assertion-error": "^2.0.0", + "assertion-error": "^2.0.1", "check-error": "^2.0.0", "deep-eql": "^5.0.0", "loupe": "^3.0.0", From 5e1ab74be1ca0c0d2d324d8b677c8c59763cc178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Sat, 21 Oct 2023 14:54:06 +0200 Subject: [PATCH 3/3] update expected string in test --- test/globalErr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/globalErr.js b/test/globalErr.js index 78107db1..c3871eca 100644 --- a/test/globalErr.js +++ b/test/globalErr.js @@ -161,7 +161,7 @@ describe('globalErr', function () { it('should throw if object val\'s props are not included in error object', function () { err(function () { err(function () { throw new Err('cat') }, {text: 'cat'}); - }, /expected AssertionError{ message: 'cat', …\(2\) } to have property \'text\'/); + }, /expected AssertionError: cat to have property \'text\'/); err(function () { err(function () { throw new Err('cat') }, {message: 'dog'});