mirror of
https://github.com/actions/setup-node
synced 2025-04-19 14:43:12 +00:00
remove unused code
This commit is contained in:
parent
3533caf801
commit
b372056939
24
dist/setup/index.js
vendored
24
dist/setup/index.js
vendored
@ -73237,27 +73237,11 @@ exports.semverVersionMatcherFactory = (range) => {
|
||||
matcher.factory = exports.semverVersionMatcherFactory;
|
||||
return matcher;
|
||||
};
|
||||
// export const canaryRangeVersionMatcherFactory = (
|
||||
// version: string
|
||||
// ): VersionMatcher => {
|
||||
// const {range, includePrerelease} = createRangePreRelease(
|
||||
// version,
|
||||
// Distributions.CANARY
|
||||
// )!;
|
||||
// const matcher = (potential: string): boolean =>
|
||||
// semver.satisfies(
|
||||
// potential.replace(Distributions.CANARY, `${Distributions.CANARY}.`),
|
||||
// range!,
|
||||
// {includePrerelease: includePrerelease}
|
||||
// );
|
||||
// matcher.factory = canaryRangeVersionMatcherFactory;
|
||||
// return matcher;
|
||||
// };
|
||||
exports.nightlyRangeVersionMatcherFactory = (version, distribution) => {
|
||||
exports.nightlyV8MatcherFactory = (version, distribution) => {
|
||||
const { range, includePrerelease } = createRangePreRelease(version, distribution);
|
||||
const matcher = (potential) => exports.distributionOf(potential) === distribution &&
|
||||
semver.satisfies(potential.replace(distribution, `${distribution}.`), range, { includePrerelease: includePrerelease });
|
||||
matcher.factory = exports.nightlyRangeVersionMatcherFactory;
|
||||
matcher.factory = exports.nightlyV8MatcherFactory;
|
||||
return matcher;
|
||||
};
|
||||
exports.splitVersionSpec = (versionSpec) => versionSpec.split(/-(.*)/s);
|
||||
@ -73283,9 +73267,9 @@ function versionMatcherFactory(versionSpec) {
|
||||
if (validVersion) {
|
||||
switch (exports.distributionOf(versionSpec)) {
|
||||
case Distributions.CANARY:
|
||||
return exports.nightlyRangeVersionMatcherFactory(versionSpec, Distributions.CANARY);
|
||||
return exports.nightlyV8MatcherFactory(versionSpec, Distributions.CANARY);
|
||||
case Distributions.NIGHTLY:
|
||||
return exports.nightlyRangeVersionMatcherFactory(versionSpec, Distributions.NIGHTLY);
|
||||
return exports.nightlyV8MatcherFactory(versionSpec, Distributions.NIGHTLY);
|
||||
case Distributions.RC:
|
||||
case Distributions.DEFAULT:
|
||||
return exports.semverVersionMatcherFactory(versionSpec);
|
||||
|
@ -63,24 +63,7 @@ export const semverVersionMatcherFactory = (range: string): VersionMatcher => {
|
||||
return matcher;
|
||||
};
|
||||
|
||||
// export const canaryRangeVersionMatcherFactory = (
|
||||
// version: string
|
||||
// ): VersionMatcher => {
|
||||
// const {range, includePrerelease} = createRangePreRelease(
|
||||
// version,
|
||||
// Distributions.CANARY
|
||||
// )!;
|
||||
// const matcher = (potential: string): boolean =>
|
||||
// semver.satisfies(
|
||||
// potential.replace(Distributions.CANARY, `${Distributions.CANARY}.`),
|
||||
// range!,
|
||||
// {includePrerelease: includePrerelease}
|
||||
// );
|
||||
// matcher.factory = canaryRangeVersionMatcherFactory;
|
||||
// return matcher;
|
||||
// };
|
||||
|
||||
export const nightlyRangeVersionMatcherFactory = (
|
||||
export const nightlyV8MatcherFactory = (
|
||||
version: string,
|
||||
distribution: string
|
||||
): VersionMatcher => {
|
||||
@ -95,7 +78,7 @@ export const nightlyRangeVersionMatcherFactory = (
|
||||
range!,
|
||||
{includePrerelease: includePrerelease}
|
||||
);
|
||||
matcher.factory = nightlyRangeVersionMatcherFactory;
|
||||
matcher.factory = nightlyV8MatcherFactory;
|
||||
return matcher;
|
||||
};
|
||||
|
||||
@ -132,12 +115,12 @@ export function versionMatcherFactory(versionSpec: string): VersionMatcher {
|
||||
if (validVersion) {
|
||||
switch (distributionOf(versionSpec)) {
|
||||
case Distributions.CANARY:
|
||||
return nightlyRangeVersionMatcherFactory(
|
||||
return nightlyV8MatcherFactory(
|
||||
versionSpec,
|
||||
Distributions.CANARY
|
||||
);
|
||||
case Distributions.NIGHTLY:
|
||||
return nightlyRangeVersionMatcherFactory(
|
||||
return nightlyV8MatcherFactory(
|
||||
versionSpec,
|
||||
Distributions.NIGHTLY
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user