mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 12:13:35 +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;
 | 
					    matcher.factory = exports.semverVersionMatcherFactory;
 | 
				
			||||||
    return matcher;
 | 
					    return matcher;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
// export const canaryRangeVersionMatcherFactory = (
 | 
					exports.nightlyV8MatcherFactory = (version, distribution) => {
 | 
				
			||||||
//   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) => {
 | 
					 | 
				
			||||||
    const { range, includePrerelease } = createRangePreRelease(version, distribution);
 | 
					    const { range, includePrerelease } = createRangePreRelease(version, distribution);
 | 
				
			||||||
    const matcher = (potential) => exports.distributionOf(potential) === distribution &&
 | 
					    const matcher = (potential) => exports.distributionOf(potential) === distribution &&
 | 
				
			||||||
        semver.satisfies(potential.replace(distribution, `${distribution}.`), range, { includePrerelease: includePrerelease });
 | 
					        semver.satisfies(potential.replace(distribution, `${distribution}.`), range, { includePrerelease: includePrerelease });
 | 
				
			||||||
    matcher.factory = exports.nightlyRangeVersionMatcherFactory;
 | 
					    matcher.factory = exports.nightlyV8MatcherFactory;
 | 
				
			||||||
    return matcher;
 | 
					    return matcher;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
exports.splitVersionSpec = (versionSpec) => versionSpec.split(/-(.*)/s);
 | 
					exports.splitVersionSpec = (versionSpec) => versionSpec.split(/-(.*)/s);
 | 
				
			||||||
@ -73283,9 +73267,9 @@ function versionMatcherFactory(versionSpec) {
 | 
				
			|||||||
    if (validVersion) {
 | 
					    if (validVersion) {
 | 
				
			||||||
        switch (exports.distributionOf(versionSpec)) {
 | 
					        switch (exports.distributionOf(versionSpec)) {
 | 
				
			||||||
            case Distributions.CANARY:
 | 
					            case Distributions.CANARY:
 | 
				
			||||||
                return exports.nightlyRangeVersionMatcherFactory(versionSpec, Distributions.CANARY);
 | 
					                return exports.nightlyV8MatcherFactory(versionSpec, Distributions.CANARY);
 | 
				
			||||||
            case Distributions.NIGHTLY:
 | 
					            case Distributions.NIGHTLY:
 | 
				
			||||||
                return exports.nightlyRangeVersionMatcherFactory(versionSpec, Distributions.NIGHTLY);
 | 
					                return exports.nightlyV8MatcherFactory(versionSpec, Distributions.NIGHTLY);
 | 
				
			||||||
            case Distributions.RC:
 | 
					            case Distributions.RC:
 | 
				
			||||||
            case Distributions.DEFAULT:
 | 
					            case Distributions.DEFAULT:
 | 
				
			||||||
                return exports.semverVersionMatcherFactory(versionSpec);
 | 
					                return exports.semverVersionMatcherFactory(versionSpec);
 | 
				
			||||||
 | 
				
			|||||||
@ -63,24 +63,7 @@ export const semverVersionMatcherFactory = (range: string): VersionMatcher => {
 | 
				
			|||||||
  return matcher;
 | 
					  return matcher;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// export const canaryRangeVersionMatcherFactory = (
 | 
					export const nightlyV8MatcherFactory = (
 | 
				
			||||||
//   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 = (
 | 
					 | 
				
			||||||
  version: string,
 | 
					  version: string,
 | 
				
			||||||
  distribution: string
 | 
					  distribution: string
 | 
				
			||||||
): VersionMatcher => {
 | 
					): VersionMatcher => {
 | 
				
			||||||
@ -95,7 +78,7 @@ export const nightlyRangeVersionMatcherFactory = (
 | 
				
			|||||||
      range!,
 | 
					      range!,
 | 
				
			||||||
      {includePrerelease: includePrerelease}
 | 
					      {includePrerelease: includePrerelease}
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  matcher.factory = nightlyRangeVersionMatcherFactory;
 | 
					  matcher.factory = nightlyV8MatcherFactory;
 | 
				
			||||||
  return matcher;
 | 
					  return matcher;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -132,12 +115,12 @@ export function versionMatcherFactory(versionSpec: string): VersionMatcher {
 | 
				
			|||||||
  if (validVersion) {
 | 
					  if (validVersion) {
 | 
				
			||||||
    switch (distributionOf(versionSpec)) {
 | 
					    switch (distributionOf(versionSpec)) {
 | 
				
			||||||
      case Distributions.CANARY:
 | 
					      case Distributions.CANARY:
 | 
				
			||||||
        return nightlyRangeVersionMatcherFactory(
 | 
					        return nightlyV8MatcherFactory(
 | 
				
			||||||
          versionSpec,
 | 
					          versionSpec,
 | 
				
			||||||
          Distributions.CANARY
 | 
					          Distributions.CANARY
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
      case Distributions.NIGHTLY:
 | 
					      case Distributions.NIGHTLY:
 | 
				
			||||||
        return nightlyRangeVersionMatcherFactory(
 | 
					        return nightlyV8MatcherFactory(
 | 
				
			||||||
          versionSpec,
 | 
					          versionSpec,
 | 
				
			||||||
          Distributions.NIGHTLY
 | 
					          Distributions.NIGHTLY
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user