diff --git a/.depcheckrc b/.depcheckrc index 2deb8e6ab3..14cd02eff8 100644 --- a/.depcheckrc +++ b/.depcheckrc @@ -1,2 +1,2 @@ -ignores: ["filenamify", "mocha", "rimraf", "sinon", "uuid"] +ignores: ["filenamify", "mocha", "p-map", "rimraf", "sinon", "uuid"] ignorePatterns: [".eslintrc.json", "lib"] diff --git a/libraries/botbuilder-azure-blobs/package.json b/libraries/botbuilder-azure-blobs/package.json index 0e34526d4b..9bb90266e1 100644 --- a/libraries/botbuilder-azure-blobs/package.json +++ b/libraries/botbuilder-azure-blobs/package.json @@ -30,16 +30,17 @@ "@azure/storage-blob": "^12.24.0", "botbuilder-core": "4.1.6", "botbuilder-stdlib": "4.1.6", - "p-map": "^4.0.0", + "p-map": "^7.0.3", "zod": "^3.23.8", "@azure/core-http": "^3.0.4" }, "scripts": { "build": "tsc -b", "build-docs": "typedoc --theme markdown --entryPoint botbuilder-azure-blobs --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\botbuilder-azure-blobs .\\lib\\index.d.ts --hideGenerator --name \"Bot Builder SDK - Azure Blobs\" --readme none", - "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", + "clean": "rimraf _ts3.4 lib vendors tsconfig.tsbuildinfo", "depcheck": "depcheck --config ../../.depcheckrc", "lint": "eslint . --config ../../eslint.config.cjs", + "prebuild": "tsup ./node_modules/p-map/*.js --format cjs --dts --out-dir vendors/p-map --clean --sourcemap", "postbuild": "downlevel-dts lib _ts3.4/lib --checksum", "test": "yarn build && nyc mocha --check-leaks tests", "test:compat": "api-extractor run --verbose" @@ -47,6 +48,7 @@ "files": [ "_ts3.4", "lib", - "src" + "src", + "vendors" ] } diff --git a/libraries/botbuilder-azure-blobs/src/blobsStorage.ts b/libraries/botbuilder-azure-blobs/src/blobsStorage.ts index 8b6825d89c..3ebe584dcb 100644 --- a/libraries/botbuilder-azure-blobs/src/blobsStorage.ts +++ b/libraries/botbuilder-azure-blobs/src/blobsStorage.ts @@ -3,7 +3,7 @@ import * as z from 'zod'; import StreamConsumers from 'stream/consumers'; -import pmap from 'p-map'; +import pmap from '../vendors/p-map'; import { AnonymousCredential, ContainerClient, diff --git a/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts b/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts index af31ec7e7c..1b69a77d15 100644 --- a/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts +++ b/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts @@ -3,7 +3,7 @@ import * as z from 'zod'; import StreamConsumers from 'stream/consumers'; -import pmap from 'p-map'; +import pmap from '../vendors/p-map'; import { Activity, PagedResult, TranscriptInfo, TranscriptStore } from 'botbuilder-core'; import { maybeCast } from 'botbuilder-stdlib'; import { sanitizeBlobKey } from './sanitizeBlobKey'; diff --git a/libraries/botbuilder-azure-blobs/tests/blobsTranscriptStore.test.js b/libraries/botbuilder-azure-blobs/tests/blobsTranscriptStore.test.js index 96dc2157d5..98bb093da2 100644 --- a/libraries/botbuilder-azure-blobs/tests/blobsTranscriptStore.test.js +++ b/libraries/botbuilder-azure-blobs/tests/blobsTranscriptStore.test.js @@ -2,7 +2,7 @@ // Licensed under the MIT License. const assert = require('assert'); -const pmap = require('p-map'); +const pmap = require('../vendors/p-map'); const { BlobsTranscriptStore } = require('../'); const connectionString = process.env.AZURE_BLOB_STORAGE_CONNECTION_STRING; diff --git a/libraries/botbuilder-azure/package.json b/libraries/botbuilder-azure/package.json index 57cb715a4b..302d3eaf86 100644 --- a/libraries/botbuilder-azure/package.json +++ b/libraries/botbuilder-azure/package.json @@ -35,7 +35,7 @@ "botbuilder": "4.1.6", "botbuilder-stdlib": "4.1.6", "lodash": "^4.17.20", - "p-map": "^4.0.0" + "p-map": "^7.0.3" }, "devDependencies": { "fs-extra": "^11.2.0", @@ -46,9 +46,10 @@ "build": "tsc -b", "build-docs": "typedoc --theme markdown --entryPoint botbuilder-azure --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\botbuilder-azure .\\lib\\index.d.ts --hideGenerator --name \"Bot Builder SDK - Azure\" --readme none", "build:rollup": "yarn clean && yarn build && api-extractor run --verbose --local", - "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", + "clean": "rimraf _ts3.4 lib vendors tsconfig.tsbuildinfo", "depcheck": "depcheck --config ../../.depcheckrc", "lint": "eslint . --config ../../eslint.config.cjs", + "prebuild": "tsup ./node_modules/p-map/*.js --format cjs --dts --out-dir vendors/p-map --clean --sourcemap", "postbuild": "downlevel-dts lib _ts3.4/lib --checksum", "test": "yarn build && nyc mocha tests/", "test:compat": "api-extractor run --verbose" @@ -56,6 +57,7 @@ "files": [ "_ts3.4", "lib", - "src" + "src", + "vendors" ] } diff --git a/libraries/botbuilder-azure/src/azureBlobTranscriptStore.ts b/libraries/botbuilder-azure/src/azureBlobTranscriptStore.ts index c6fb1879ef..ce143459ef 100644 --- a/libraries/botbuilder-azure/src/azureBlobTranscriptStore.ts +++ b/libraries/botbuilder-azure/src/azureBlobTranscriptStore.ts @@ -17,7 +17,7 @@ import { Activity, PagedResult, TranscriptInfo, TranscriptStore } from 'botbuild import { maybeCast } from 'botbuilder-stdlib'; import { escape } from 'querystring'; import StreamConsumers from 'stream/consumers'; -import pmap from 'p-map'; +import pmap from '../vendors/p-map'; import { BlobStorageSettings } from './blobStorage'; const ContainerNameCheck = new RegExp('^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$'); diff --git a/libraries/botbuilder-repo-utils/package.json b/libraries/botbuilder-repo-utils/package.json index 8fa9531004..64d37710f8 100644 --- a/libraries/botbuilder-repo-utils/package.json +++ b/libraries/botbuilder-repo-utils/package.json @@ -15,8 +15,7 @@ "fast-glob": "^3.3.2", "lodash": "^4.17.20", "minimatch": "^9.0.5", - "minimist": "^1.2.6", - "p-map": "^4.0.0" + "minimist": "^1.2.6" }, "devDependencies": { "@types/minimist": "^1.2.5", diff --git a/package.json b/package.json index 50db8395d9..995ef75365 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,15 @@ "nohoist": [ "**/@types/selenium-webdriver", "botbuilder/filenamify", + "botbuilder-azure/p-map", + "botbuilder-azure-blobs/p-map", "adaptive-expressions/d3-format" ], "nohoistComments": { "**/@types/selenium-webdriver": "This package is excluded from the root @types folder as it requires ES2015+, whereas some BotBuilder libraries support ES5+.", "botbuilder/filenamify": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", + "botbuilder-azure/p-map": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", + "botbuilder-azure-blobs/p-map": "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." } }, diff --git a/yarn.lock b/yarn.lock index 59d35d3abe..968090bdf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8685,7 +8685,7 @@ foreground-child@^2.0.0: cross-spawn "^7.0.0" signal-exit "^3.0.2" -foreground-child@^3.1.0: +foreground-child@^3.1.0, foreground-child@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== @@ -11970,9 +11970,9 @@ nwsapi@^2.2.12: integrity sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ== nyc@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.0.0.tgz#d8943407584242a448a70290b15bb72207fac9fd" - integrity sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg== + version "17.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.1.0.tgz#b6349a401a62ffeb912bd38ea9a018839fdb6eb1" + integrity sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -11981,7 +11981,7 @@ nyc@^17.0.0: decamelize "^1.2.0" find-cache-dir "^3.2.0" find-up "^4.1.0" - foreground-child "^2.0.0" + foreground-child "^3.3.0" get-package-type "^0.1.0" glob "^7.1.6" istanbul-lib-coverage "^3.0.0" @@ -12314,6 +12314,11 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" +p-map@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-7.0.3.tgz#7ac210a2d36f81ec28b736134810f7ba4418cdb6" + integrity sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA== + p-retry@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-6.2.0.tgz#8d6df01af298750009691ce2f9b3ad2d5968f3bd"