mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 06:43:35 +00:00 
			
		
		
		
	bump cache version
This commit is contained in:
		
							parent
							
								
									8f7008bbe6
								
							
						
					
					
						commit
						b67cbdb47c
					
				@ -135,7 +135,7 @@ describe('cache-restore', () => {
 | 
				
			|||||||
        await restoreCache(packageManager);
 | 
					        await restoreCache(packageManager);
 | 
				
			||||||
        expect(hashFilesSpy).toHaveBeenCalled();
 | 
					        expect(hashFilesSpy).toHaveBeenCalled();
 | 
				
			||||||
        expect(infoSpy).toHaveBeenCalledWith(
 | 
					        expect(infoSpy).toHaveBeenCalledWith(
 | 
				
			||||||
          `Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}`
 | 
					          `Cache restored from key: node-cache-${platform}-${packageManager}-v2-${fileHash}`
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        expect(infoSpy).not.toHaveBeenCalledWith(
 | 
					        expect(infoSpy).not.toHaveBeenCalledWith(
 | 
				
			||||||
          `${packageManager} cache is not found`
 | 
					          `${packageManager} cache is not found`
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -71152,7 +71152,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0,
 | 
				
			|||||||
    if (!fileHash) {
 | 
					    if (!fileHash) {
 | 
				
			||||||
        throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
 | 
					        throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`;
 | 
					    const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`;
 | 
				
			||||||
    core.debug(`primary key is ${primaryKey}`);
 | 
					    core.debug(`primary key is ${primaryKey}`);
 | 
				
			||||||
    core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
 | 
					    core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
 | 
				
			||||||
    const cacheKey = yield cache.restoreCache([cachePath], primaryKey);
 | 
					    const cacheKey = yield cache.restoreCache([cachePath], primaryKey);
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,6 @@ import {State} from './constants';
 | 
				
			|||||||
import {
 | 
					import {
 | 
				
			||||||
  getCacheDirectoryPath,
 | 
					  getCacheDirectoryPath,
 | 
				
			||||||
  getPackageManagerInfo,
 | 
					  getPackageManagerInfo,
 | 
				
			||||||
  getPackageManagerWorkingDir,
 | 
					 | 
				
			||||||
  PackageManagerInfo
 | 
					  PackageManagerInfo
 | 
				
			||||||
} from './cache-utils';
 | 
					} from './cache-utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -37,7 +36,7 @@ export const restoreCache = async (
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`;
 | 
					  const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`;
 | 
				
			||||||
  core.debug(`primary key is ${primaryKey}`);
 | 
					  core.debug(`primary key is ${primaryKey}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  core.saveState(State.CachePrimaryKey, primaryKey);
 | 
					  core.saveState(State.CachePrimaryKey, primaryKey);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user