Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump: Update chai package #4844

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .depcheckrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ignores: ["filenamify", "mocha", "rimraf", "sinon", "uuid"]
ignores: ["chai", "filenamify", "mocha", "rimraf", "sinon", "uuid"]
ignorePatterns: [".eslintrc.json", "lib"]
6 changes: 4 additions & 2 deletions libraries/botbuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"chai": "^4.5.0",
"chai": "^5.1.2",
"lodash": "^4.17.20",
"nock": "^13.5.5",
"node-mocks-http": "^1.16.0"
Expand All @@ -55,7 +55,9 @@
"clean": "rimraf _ts3.4 lib vendors tsconfig.tsbuildinfo",
"depcheck": "depcheck --config ../../.depcheckrc",
"lint": "eslint . --config ../../eslint.config.cjs",
"prebuild": "tsup ./node_modules/filenamify/*.js --format cjs --dts --out-dir vendors/filenamify --clean --sourcemap",
"prebuild": "yarn prebuild-filenamify && yarn prebuild-chai",
"prebuild-filenamify": "tsup ./node_modules/filenamify/*.js --format cjs --dts --out-dir vendors/filenamify --clean --sourcemap",
"prebuild-chai": "tsup ./node_modules/chai/*.js --format cjs --dts --out-dir vendors/chai --clean --sourcemap --target es2020 --external jiti --external @web/dev-server-rollup --external @rollup/plugin-commonjs",
"postbuild": "downlevel-dts lib _ts3.4/lib --checksum",
"test": "npm-run-all build test:mocha",
"test:compat": "api-extractor run --verbose",
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder/tests/cloudAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const assert = require('assert');
const httpMocks = require('node-mocks-http');
const net = require('net');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const sinon = require('sinon');
const {
AuthenticationConfiguration,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require('assert');
const { Socket } = require('net');

const { expect } = require('chai');
const { expect } = require('../../vendors/chai');
const { spy } = require('sinon');
const { ActivityHandler, ActivityTypes, StatusCodes, TurnContext } = require('botbuilder-core');

Expand Down
8 changes: 5 additions & 3 deletions libraries/botframework-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"ws": "^7.5.10"
},
"devDependencies": {
"chai": "^4.5.0"
"chai": "^5.1.2"
},
"scripts": {
"build": "npm-run-all -p build:lib build:browser",
Expand All @@ -45,9 +45,10 @@
"build:browser:run": "tsup --config ../../tsup/browser.config.ts --define.entry src/index-browser.ts --define.outfile lib/index-browser.js --dts",
"build:lib": "tsc -p tsconfig.json",
"build:rollup": "yarn clean && yarn build && api-extractor run --verbose --local",
"clean": "rimraf _ts3.4 lib",
"clean": "rimraf _ts3.4 lib vendors",
"depcheck": "depcheck --config ../../.depcheckrc",
"lint": "eslint .",
"prebuild": "tsup ./node_modules/chai/*.js --format cjs --dts --out-dir vendors/chai --clean --sourcemap --target es2020 --external jiti --external @web/dev-server-rollup --external @rollup/plugin-commonjs",
"postbuild": "downlevel-dts lib _ts3.4/lib --checksum",
"test": "npm-run-all build test:mocha",
"test:compat": "api-extractor run --verbose",
Expand All @@ -60,6 +61,7 @@
"files": [
"_ts3.4",
"lib",
"src"
"src",
"vendors"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { CancelDisassembler } = require('../lib/disassemblers');
const { PayloadSender } = require('../lib/payloadTransport');
const { PayloadTypes } = require('../lib/payloads');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { PayloadAssembler } = require('../lib/assemblers');
const { PayloadTypes } = require('../lib/payloads/payloadTypes');
const { StreamManager } = require('../lib/payloads/streamManager');
const { SubscribableStream } = require('../lib/subscribableStream');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

class TestPayloadAssembler {
constructor(content) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { HeaderSerializer, PayloadTypes } = require('../lib/payloads');
const { PayloadConstants } = require('../lib/payloads/payloadConstants');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('HeaderSerializer', function () {
it('serializes and deserializes correctly', function () {
Expand Down
2 changes: 1 addition & 1 deletion libraries/botframework-streaming/tests/NamedPipe.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const assert = require('assert');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { expectEventually } = require('./helpers/expectEventually');
const { NamedPipeClient, NamedPipeServer, StreamingRequest } = require('../lib');
const { NamedPipeTransport } = require('../lib/namedPipe');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { FauxSock, FauxSocket, TestRequest, waitFor } = require('./helpers');
const { NodeWebSocket } = require('../');
const { randomBytes } = require('crypto');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { FauxSocket, TestRequest } = require('./helpers');
const { NodeWebSocket, NodeWebSocketFactory } = require('..');
const { randomBytes } = require('crypto');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { SubscribableStream } = require('../lib/subscribableStream');
const { PayloadTypes, StreamManager } = require('../lib/payloads');
const { PayloadAssembler } = require('../lib/assemblers');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

const streamManager = new StreamManager();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { SubscribableStream } = require('../lib/subscribableStream');
const { PayloadAssemblerManager, PayloadTypes, StreamManager } = require('../lib/payloads');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

const streamManager = new StreamManager();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { SubscribableStream } = require('..');
const { PayloadReceiver, PayloadSender } = require('../lib/payloadTransport');
const { PayloadAssemblerManager, PayloadTypes, StreamManager } = require('../lib/payloads');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const sinon = require('sinon');

class FauxSock {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const RequestHandler = require('../lib/requestHandler');
const Response = require('../lib/streamingResponse');
const Request = require('../lib/streamingRequest');
const StreamManager = require('../lib/payloads/streamManager');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const sinon = require('sinon');

class TestRequestHandler extends RequestHandler.RequestHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { RequestManager } = require('../lib/payloads');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { expectEventually } = require('./helpers');

const REQUEST_ID = '123';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { HttpContent, StreamingRequest, StreamingResponse, SubscribableStream } = require('..');
const { PayloadSender } = require('../lib/payloadTransport');
const { SendOperations } = require('../lib/payloads');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('SendOperations', function () {
it('constructs a new instance', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { PayloadAssembler } = require('../lib/assemblers');
const { PayloadTypes, StreamManager } = require('../lib/payloads');
const { SubscribableStream } = require('..');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('StreamManager', function () {
it('properly constructs a new instance', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const StreamingRequest = require('../lib/streamingRequest');
const HttpContent = require('../lib/httpContentStream');
const SubscribableStream = require('../lib/subscribableStream');
const chai = require('chai');
const chai = require('../vendors/chai');
const expect = chai.expect;

describe('Streaming Extensions Request tests', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { HttpContent, StreamingResponse, SubscribableStream } = require('..');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('Streaming Extensions Response Tests', function () {
it('can set the response body', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SubscribableStream } = require('../lib/subscribableStream');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('Streaming Extensions Stream Tests', function () {
it('throws on invalid encoding types', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { PayloadConstants } = require('../lib/payloads/payloadConstants');
const { expect } = require('chai');
const { expect } = require('../vendors/chai');

describe('PayloadConstants', function () {
it('has the proper value for MaxPayloadLength', function () {
Expand Down
2 changes: 1 addition & 1 deletion libraries/botframework-streaming/tests/WebSocket.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { spy } = require('sinon');

const { BrowserWebSocket } = require('../lib/index-browser');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require('chai');
const { expect } = require('../vendors/chai');
const { Server } = require('ws');
const { spy, stub } = require('sinon');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

const { expect } = require('chai');
const { expect } = require('../../vendors/chai');

// chai-as-promised is not actively maintained, we need to build something simple.

Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
],
"nohoist": [
"**/@types/selenium-webdriver",
"adaptive-expressions/d3-format",
"botbuilder/filenamify",
"adaptive-expressions/d3-format"
"botbuilder/chai",
"botframework-streaming/chai"
],
"nohoistComments": {
"**/@types/selenium-webdriver": "This package is excluded from the root @types folder as it requires ES2015+, whereas some BotBuilder libraries support ES5+.",
"adaptive-expressions/d3-format": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.",
"botbuilder/filenamify": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.",
"adaptive-expressions/d3-format": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only."
"botbuilder/chai": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.",
"botframework-streaming/chai": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only."
}
},
"scripts": {
Expand Down
69 changes: 39 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5443,11 +5443,16 @@ assert@^2.1.0:
object.assign "^4.1.4"
util "^0.12.5"

[email protected], assertion-error@^1.1.0:
[email protected]:
version "1.1.0"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==

assertion-error@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7"
integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==

assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
Expand Down Expand Up @@ -6220,18 +6225,16 @@ chai-nightwatch@^0.5.3:
dependencies:
assertion-error "1.1.0"

chai@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8"
integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==
dependencies:
assertion-error "^1.1.0"
check-error "^1.0.3"
deep-eql "^4.1.3"
get-func-name "^2.0.2"
loupe "^2.3.6"
pathval "^1.1.1"
type-detect "^4.1.0"
chai@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/chai/-/chai-5.1.2.tgz#3afbc340b994ae3610ca519a6c70ace77ad4378d"
integrity sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==
dependencies:
assertion-error "^2.0.1"
check-error "^2.1.1"
deep-eql "^5.0.1"
loupe "^3.1.0"
pathval "^2.0.0"

chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
Expand Down Expand Up @@ -6283,12 +6286,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=

check-error@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694"
integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==
dependencies:
get-func-name "^2.0.2"
check-error@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc"
integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==

[email protected]:
version "3.5.3"
Expand Down Expand Up @@ -7048,12 +7049,10 @@ [email protected]:
dependencies:
type-detect "^4.0.0"

deep-eql@^4.1.3:
version "4.1.4"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7"
integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==
dependencies:
type-detect "^4.0.0"
deep-eql@^5.0.1:
version "5.0.2"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341"
integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==

deep-equal@^2.0.5:
version "2.2.3"
Expand Down Expand Up @@ -7545,7 +7544,7 @@ emoji-regex@^9.2.2:
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==

encodeurl@~2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -8857,7 +8856,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-func-name@^2.0.1, get-func-name@^2.0.2:
get-func-name@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41"
integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==
Expand Down Expand Up @@ -10803,13 +10802,18 @@ loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"

loupe@^2.3.6, loupe@^2.3.7:
loupe@^2.3.7:
version "2.3.7"
resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697"
integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==
dependencies:
get-func-name "^2.0.1"

loupe@^3.1.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/loupe/-/loupe-3.1.2.tgz#c86e0696804a02218f2206124c45d8b15291a240"
integrity sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==

lru-cache@^10.2.0:
version "10.4.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
Expand Down Expand Up @@ -12510,11 +12514,16 @@ path-type@^5.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"
integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==

[email protected], pathval@^1.1.1:
[email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d"
integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==

pathval@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.0.tgz#7e2550b422601d4f6b8e26f1301bc8f15a741a25"
integrity sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==

pbkdf2@^3.0.3:
version "3.1.1"
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94"
Expand Down Expand Up @@ -15548,7 +15557,7 @@ value-or-function@^4.0.0:
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==

vasync@^2.2.0:
version "2.2.0"
Expand Down
Loading