diff --git a/packages/techdocs-common/src/stages/publish/awsS3.ts b/packages/techdocs-common/src/stages/publish/awsS3.ts index 9a4852df03..20e6bc424d 100644 --- a/packages/techdocs-common/src/stages/publish/awsS3.ts +++ b/packages/techdocs-common/src/stages/publish/awsS3.ts @@ -24,7 +24,7 @@ import { PublisherBase, PublishRequest, TechDocsMetadata } from './types'; import fs from 'fs-extra'; import { Readable } from 'stream'; import JSON5 from 'json5'; -import limiterFactory from 'p-limit'; +import createLimiter from 'p-limit'; const streamToBuffer = (stream: Readable): Promise => { return new Promise((resolve, reject) => { @@ -132,7 +132,7 @@ export class AwsS3Publish implements PublisherBase { // So collecting path of only the files is good enough. const allFilesToUpload = await getFileTreeRecursively(directory); - const limiter = limiterFactory(10); + const limiter = createLimiter(10); const uploadPromises: Array> = []; for (const filePath of allFilesToUpload) { // Remove the absolute path prefix of the source directory diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index 8a06a07cb0..8876007504 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -26,7 +26,7 @@ import { Config } from '@backstage/config'; import { getHeadersForFileExtension, getFileTreeRecursively } from './helpers'; import { PublisherBase, PublishRequest, TechDocsMetadata } from './types'; import JSON5 from 'json5'; -import limitFactory from 'p-limit'; +import createLimiter from 'p-limit'; export class GoogleGCSPublish implements PublisherBase { static async fromConfig( @@ -103,7 +103,7 @@ export class GoogleGCSPublish implements PublisherBase { // So collecting path of only the files is good enough. const allFilesToUpload = await getFileTreeRecursively(directory); - const limiter = limitFactory(10); + const limiter = createLimiter(10); const uploadPromises: Array> = []; allFilesToUpload.forEach(filePath => { // Remove the absolute path prefix of the source directory