Skip to content

Commit fd66590

Browse files
authored
chore: upgrade verkit to v0.5.0 and obug to v3.0.0 (#18248)
* chore: upgrade verkit to v0.5.0 * chore: upgrade obug to v3.0.0
1 parent 8ff435f commit fd66590

12 files changed

Lines changed: 36 additions & 29 deletions

File tree

‎.yarnrc.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ catalog:
1212
core-js-pure: ^3.48.0
1313
empathic: ^2.0.1
1414
flru: 1.0.2 # pinned
15-
obug: ^2.1.1
16-
verkit: ^0.3.2
15+
obug: ^3.0.0
16+
verkit: ^0.5.0
1717

1818
catalogs:
1919
dev:

‎packages/babel-core/test/config-ts-integration-tsx.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { loadPartialConfigSync } from "../lib/index.js";
22
import path from "node:path";
3-
import { isLess } from "verkit";
3+
import { isLessThan } from "verkit";
44
import { commonJS } from "$repo-utils";
55

66
const { __dirname, require } = commonJS(import.meta.url);
77

88
// We skip older versions of node testing for two reasons.
99
// 1. tsx and ts don't support the old version of node.
1010
// 2. In the old version of node, jest has been registered in `require.extensions`, which will cause babel to disable the transforming as expected.
11-
const shouldSkip = isLess(process.version, "18.0.0");
11+
const shouldSkip = isLessThan(process.version, "18.0.0");
1212

1313
(shouldSkip ? describe : describe.skip)(
1414
"@babel/core config with ts [dummy]",

‎packages/babel-helper-compilation-targets/src/debug.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isLess } from "verkit";
1+
import { isLessThan } from "verkit";
22
import { prettifyVersion } from "./pretty.ts";
33
import {
44
semverify,
@@ -28,7 +28,7 @@ export function getInclusionReasons(
2828
if (
2929
!targetIsUnreleased &&
3030
(minIsUnreleased ||
31-
isLess(targetVersion.toString(), semverify(minVersion)))
31+
isLessThan(targetVersion.toString(), semverify(minVersion)))
3232
) {
3333
result[env] = prettifyVersion(targetVersion);
3434
}

‎packages/babel-helper-compilation-targets/src/filter-items.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isGreater, isValid } from "verkit";
1+
import { isGreaterThan, isValid } from "verkit";
22

33
import pluginsCompatData from "@babel/compat-data/plugins" with { type: "json" };
44

@@ -46,7 +46,7 @@ export function targetsSupported(target: Targets, support: Targets) {
4646
);
4747
}
4848

49-
return isGreater(
49+
return isGreaterThan(
5050
semverify(lowestImplementedVersion),
5151
lowestTargetedVersion.toString(),
5252
);

‎packages/babel-helper-compilation-targets/src/utils.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isLess, isValid } from "verkit";
1+
import { isLessThan, isValid } from "verkit";
22
import { OptionValidator } from "@babel/helper-validator-option";
33
import { unreleasedLabels } from "./targets.ts";
44
import type { Target, Targets } from "./types.d.ts";
@@ -12,7 +12,7 @@ export function semverMin(
1212
first: string | undefined | null,
1313
second: string,
1414
): string {
15-
return first && isLess(first, second) ? first : second;
15+
return first && isLessThan(first, second) ? first : second;
1616
}
1717

1818
// Convert version to a semver value.

‎packages/babel-helper-create-class-features-plugin/src/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { types as t } from "@babel/core";
22
import type { PluginAPI, PluginObject, NodePath } from "@babel/core";
33

4-
import { isLess } from "verkit";
4+
import { isLessThan } from "verkit";
55

66
import {
77
buildPrivateNamesNodes,
@@ -113,7 +113,7 @@ export function createClassFeaturePlugin({
113113

114114
if (
115115
!file.get(versionKey) ||
116-
isLess(file.get(versionKey), PACKAGE_JSON.version)
116+
isLessThan(file.get(versionKey), PACKAGE_JSON.version)
117117
) {
118118
file.set(versionKey, PACKAGE_JSON.version);
119119
}

‎packages/babel-helper-create-regexp-features-plugin/src/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import rewritePattern from "regexpu-core";
22
import { types as t, type PluginObject, type NodePath } from "@babel/core";
33
import annotateAsPure from "@babel/helper-annotate-as-pure";
44

5-
import { isLess } from "verkit";
5+
import { isLessThan } from "verkit";
66

77
import {
88
featuresKey,
@@ -66,7 +66,7 @@ export function createRegExpFeaturePlugin({
6666

6767
if (
6868
!file.get(versionKey) ||
69-
isLess(file.get(versionKey), PACKAGE_JSON.version)
69+
isLessThan(file.get(versionKey), PACKAGE_JSON.version)
7070
) {
7171
file.set(versionKey, PACKAGE_JSON.version);
7272
}

‎packages/babel-helper-fixtures/src/index.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { clean, isLess } from "verkit";
1+
import { clean, isLessThan } from "verkit";
22
import path from "node:path";
33
import fs from "node:fs";
44
import { fileURLToPath } from "node:url";
@@ -283,7 +283,7 @@ function pushTask(
283283
);
284284
}
285285

286-
if (isLess(nodeVersion, minimumVersion)) {
286+
if (isLessThan(nodeVersion, minimumVersion)) {
287287
if (test.actual.code) {
288288
test.exec.code = undefined;
289289
} else {
@@ -304,7 +304,7 @@ function pushTask(
304304
);
305305
}
306306

307-
if (isLess(nodeVersion, minimumVersion)) {
307+
if (isLessThan(nodeVersion, minimumVersion)) {
308308
return;
309309
}
310310

‎packages/babel-preset-env/src/filter-items.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isLess } from "verkit";
1+
import { isLessThan } from "verkit";
22
import { minVersions } from "./available-plugins.ts";
33

44
export function addProposalSyntaxPlugins(
@@ -24,7 +24,7 @@ export function removeUnsupportedItems(
2424
items.forEach(item => {
2525
if (
2626
Object.hasOwn(minVersions, item) &&
27-
isLess(
27+
isLessThan(
2828
babelVersion,
2929
// @ts-expect-error we have checked minVersions[item] in has call
3030
minVersions[item],

‎packages/babel-preset-env/src/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isLess, normalize, type SemVer } from "verkit";
1+
import { isLessThan, normalize, type SemVer } from "verkit";
22
import { logPlugin } from "./debug.ts";
33
import {
44
addProposalSyntaxPlugins,
@@ -223,7 +223,7 @@ export default declarePreset((api, opts: Options) => {
223223
// @babel/core < 7.13.0 doesn't load targets (api.targets() always
224224
// returns {} thanks to @babel/helper-plugin-utils), so we always want
225225
// to fallback to the old targets behavior in this case.
226-
isLess(api.version, "7.13.0") ||
226+
isLessThan(api.version, "7.13.0") ||
227227
// If any browserslist-related option is specified, fallback to the old
228228
// behavior of not using the targets specified in the top-level options.
229229
opts.targets ||

0 commit comments

Comments
 (0)