diff --git a/package.json b/package.json index 55db3b4ab3d..6f8cd1e2be3 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "fs-extra": "^11.1.0", "globby": "^11.0.4", "json-schema-to-typescript": "^11.0.3", - "latest-version": "^5.1.0", + "latest-version": "^7.0.0", "listr": "^0.14.2", "listr-inquirer": "^0.1.0", "markdown-link-validator": "^1.0.1", diff --git a/release/tasks/get-packages.ts b/release/tasks/get-packages.ts index ec6f8717e5a..23180c1ba2b 100644 --- a/release/tasks/get-packages.ts +++ b/release/tasks/get-packages.ts @@ -1,7 +1,6 @@ import * as path from 'path'; import * as globby from 'globby'; -import latest from 'latest-version'; import { Context, Reference } from '../@types/custom'; import { debug } from '../lib/utils'; @@ -96,6 +95,8 @@ export const getPackages = (ignoredPackages: string[]) => { * them later via `ctx.packages`. * Get the latest published version if any. */ + const { default: latest } = await import('latest-version'); + for (const [, pkg] of ctx.packages) { pkg.references = pkg.references.map((reference) => { return pathToName.get(reference)!;