mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 01:03:33 +00:00 
			
		
		
		
	add major support
This commit is contained in:
		
							parent
							
								
									9b82ea39ef
								
							
						
					
					
						commit
						ccbc0aae4e
					
				
							
								
								
									
										4
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -73416,6 +73416,10 @@ function evaluateVersions(versions, versionSpec) {
 | 
			
		||||
    core.debug(`evaluating ${versions.length} versions`);
 | 
			
		||||
    core.debug(`version 1 is ${versions[0]}`);
 | 
			
		||||
    core.debug(`version spec is ${versionSpec}`);
 | 
			
		||||
    versionSpec =
 | 
			
		||||
        versionSpec.includes('nightly') && !semver.valid(versionSpec.split('-')[0])
 | 
			
		||||
            ? versionSpec.split('-')[0]
 | 
			
		||||
            : versionSpec;
 | 
			
		||||
    versions = versions.sort((a, b) => {
 | 
			
		||||
        if (semver.gt(a, b)) {
 | 
			
		||||
            return 1;
 | 
			
		||||
 | 
			
		||||
@ -353,6 +353,10 @@ function evaluateVersions(versions: string[], versionSpec: string): string {
 | 
			
		||||
  core.debug(`evaluating ${versions.length} versions`);
 | 
			
		||||
  core.debug(`version 1 is ${versions[0]}`);
 | 
			
		||||
  core.debug(`version spec is ${versionSpec}`);
 | 
			
		||||
  versionSpec =
 | 
			
		||||
    versionSpec.includes('nightly') && !semver.valid(versionSpec.split('-')[0])
 | 
			
		||||
      ? versionSpec.split('-')[0]
 | 
			
		||||
      : versionSpec;
 | 
			
		||||
  versions = versions.sort((a, b) => {
 | 
			
		||||
    if (semver.gt(a, b)) {
 | 
			
		||||
      return 1;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user