Skip to content

Commit 5be587a

Browse files
refactor!: remove deprecated versionUtils (#4648)
* refactor!: remove deprecated versionUtils * Update CHANGELOG.md Co-authored-by: Maël Nison <[email protected]>
1 parent d7733d0 commit 5be587a

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.yarn/versions/2c936507.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
releases:
2+
"@yarnpkg/plugin-version": major
3+
4+
declined:
5+
- "@yarnpkg/cli"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ The following changes only affect people writing Yarn plugins:
4141

4242
- `npmConfigUtils.getAuditRegistry` no longer takes a `Manifest` as its first argument.
4343

44+
- `versionUtils.{fetchBase,fetchRoot,fetchChangedFiles}` have been moved from `@yarnpkg/plugin-version` to `@yarnpkg/plugin-git`. Use `gitUtils.{fetchBase,fetchRoot,fetchChangedFiles}` instead.
45+
4446
### Installs
4547

4648
- The `pnpm` linker avoids creating symlinks that lead to loops on the file system, by moving them higher up in the directory structure.

packages/plugin-version/sources/versionUtils.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ import {UsageError}
66
import omit from 'lodash/omit';
77
import semver from 'semver';
88

9-
/**
10-
* @deprecated Use `gitUtils.fetchBase` instead
11-
*/
12-
export const fetchBase = gitUtils.fetchBase;
13-
14-
/**
15-
* @deprecated Use `gitUtils.fetchRoot` instead
16-
*/
17-
export const fetchRoot = gitUtils.fetchRoot;
18-
19-
/**
20-
* @deprecated Use `gitUtils.fetchChangedFiles` instead
21-
*/
22-
export const fetchChangedFiles = gitUtils.fetchChangedFiles;
23-
249
// 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)
2510
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-]+)*)?$/;
2611

0 commit comments

Comments
 (0)