From b21a4d5d69db3fa32a7c8692039b0a53d941fcf0 Mon Sep 17 00:00:00 2001 From: Paul Soporan Date: Wed, 20 Jul 2022 06:42:31 +0300 Subject: [PATCH 1/2] refactor!: remove deprecated versionUtils --- .yarn/versions/2c936507.yml | 5 +++++ CHANGELOG.md | 2 ++ packages/plugin-version/sources/versionUtils.ts | 15 --------------- 3 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 .yarn/versions/2c936507.yml diff --git a/.yarn/versions/2c936507.yml b/.yarn/versions/2c936507.yml new file mode 100644 index 000000000000..b60235c0a761 --- /dev/null +++ b/.yarn/versions/2c936507.yml @@ -0,0 +1,5 @@ +releases: + "@yarnpkg/plugin-version": major + +declined: + - "@yarnpkg/cli" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5342d15ef535..7a179af6b2fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ The following changes only affect people writing Yarn plugins: - `npmConfigUtils.getAuditRegistry` no longer takes a `Manifest` as its first argument. +- `versionUtils.{fetchBase,fetchRoot,fetchChangedFiles}` have been removed. Use `gitUtils.{fetchBase,fetchRoot,fetchChangedFiles}` instead. + ### Installs - The `pnpm` linker avoids creating symlinks that lead to loops on the file system, by moving them higher up in the directory structure. diff --git a/packages/plugin-version/sources/versionUtils.ts b/packages/plugin-version/sources/versionUtils.ts index c008b295416c..09d68c94a531 100644 --- a/packages/plugin-version/sources/versionUtils.ts +++ b/packages/plugin-version/sources/versionUtils.ts @@ -6,21 +6,6 @@ import {UsageError} import omit from 'lodash/omit'; import semver from 'semver'; -/** - * @deprecated Use `gitUtils.fetchBase` instead - */ -export const fetchBase = gitUtils.fetchBase; - -/** - * @deprecated Use `gitUtils.fetchRoot` instead - */ -export const fetchRoot = gitUtils.fetchRoot; - -/** - * @deprecated Use `gitUtils.fetchChangedFiles` instead - */ -export const fetchChangedFiles = gitUtils.fetchChangedFiles; - // Basically we only support auto-upgrading the ranges that are very simple (^x.y.z, ~x.y.z, >=x.y.z, and of course x.y.z) const SUPPORTED_UPGRADE_REGEXP = /^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/; From 71b9bbd36690bf69046c6a2245c4a35219033aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Wed, 20 Jul 2022 09:53:13 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a179af6b2fa..153d30a264a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,7 @@ The following changes only affect people writing Yarn plugins: - `npmConfigUtils.getAuditRegistry` no longer takes a `Manifest` as its first argument. -- `versionUtils.{fetchBase,fetchRoot,fetchChangedFiles}` have been removed. Use `gitUtils.{fetchBase,fetchRoot,fetchChangedFiles}` instead. +- `versionUtils.{fetchBase,fetchRoot,fetchChangedFiles}` have been moved from `@yarnpkg/plugin-version` to `@yarnpkg/plugin-git`. Use `gitUtils.{fetchBase,fetchRoot,fetchChangedFiles}` instead. ### Installs