mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 07:33:34 +00:00 
			
		
		
		
	resolve SymbolicLink
This commit is contained in:
		
							parent
							
								
									69b2dd252e
								
							
						
					
					
						commit
						cf0fe2d347
					
				@ -23,8 +23,10 @@ describe('cache-utils', () => {
 | 
				
			|||||||
  let isFeatureAvailable: jest.SpyInstance;
 | 
					  let isFeatureAvailable: jest.SpyInstance;
 | 
				
			||||||
  let info: jest.SpyInstance;
 | 
					  let info: jest.SpyInstance;
 | 
				
			||||||
  let warningSpy: jest.SpyInstance;
 | 
					  let warningSpy: jest.SpyInstance;
 | 
				
			||||||
 | 
					  let fsRealPathSyncSpy: jest.SpyInstance;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  beforeEach(() => {
 | 
					  beforeEach(() => {
 | 
				
			||||||
 | 
					    console.log('::stop-commands::stoptoken');
 | 
				
			||||||
    process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');
 | 
					    process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');
 | 
				
			||||||
    debugSpy = jest.spyOn(core, 'debug');
 | 
					    debugSpy = jest.spyOn(core, 'debug');
 | 
				
			||||||
    debugSpy.mockImplementation(msg => {});
 | 
					    debugSpy.mockImplementation(msg => {});
 | 
				
			||||||
@ -35,7 +37,23 @@ describe('cache-utils', () => {
 | 
				
			|||||||
    isFeatureAvailable = jest.spyOn(cache, 'isFeatureAvailable');
 | 
					    isFeatureAvailable = jest.spyOn(cache, 'isFeatureAvailable');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    getCommandOutputSpy = jest.spyOn(utils, 'getCommandOutput');
 | 
					    getCommandOutputSpy = jest.spyOn(utils, 'getCommandOutput');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    fsRealPathSyncSpy = jest.spyOn(fs, 'realpathSync');
 | 
				
			||||||
 | 
					    fsRealPathSyncSpy.mockImplementation(dirName => {
 | 
				
			||||||
 | 
					      return dirName;
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  afterEach(() => {
 | 
				
			||||||
 | 
					    jest.resetAllMocks();
 | 
				
			||||||
 | 
					    jest.clearAllMocks();
 | 
				
			||||||
 | 
					    //jest.restoreAllMocks();
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  afterAll(async () => {
 | 
				
			||||||
 | 
					    console.log('::stoptoken::');
 | 
				
			||||||
 | 
					    jest.restoreAllMocks();
 | 
				
			||||||
 | 
					  }, 100000);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  describe('getPackageManagerInfo', () => {
 | 
					  describe('getPackageManagerInfo', () => {
 | 
				
			||||||
    it.each<[string, PackageManagerInfo | null]>([
 | 
					    it.each<[string, PackageManagerInfo | null]>([
 | 
				
			||||||
 | 
				
			|||||||
@ -95,6 +95,8 @@ describe('setup-node', () => {
 | 
				
			|||||||
        res = <INodeVersion[]>nodeTestDistRc;
 | 
					        res = <INodeVersion[]>nodeTestDistRc;
 | 
				
			||||||
      } else if (url.includes('/nightly')) {
 | 
					      } else if (url.includes('/nightly')) {
 | 
				
			||||||
        res = <INodeVersion[]>nodeTestDistNightly;
 | 
					        res = <INodeVersion[]>nodeTestDistNightly;
 | 
				
			||||||
 | 
					      } else if (url.includes('/v8-canary')) {
 | 
				
			||||||
 | 
					        res = <INodeVersion[]>nodeV8CanaryTestDist;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        res = <INodeVersion[]>nodeTestDist;
 | 
					        res = <INodeVersion[]>nodeTestDist;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							@ -60532,6 +60532,7 @@ const getProjectDirectoriesFromCacheDependencyPath = (cacheDependencyPath) => __
 | 
				
			|||||||
    const existingDirectories = cacheDependenciesPaths
 | 
					    const existingDirectories = cacheDependenciesPaths
 | 
				
			||||||
        .map(path_1.default.dirname)
 | 
					        .map(path_1.default.dirname)
 | 
				
			||||||
        .filter(util_1.unique())
 | 
					        .filter(util_1.unique())
 | 
				
			||||||
 | 
					        .map(dirName => fs_1.default.realpathSync(dirName))
 | 
				
			||||||
        .filter(directory => fs_1.default.lstatSync(directory).isDirectory());
 | 
					        .filter(directory => fs_1.default.lstatSync(directory).isDirectory());
 | 
				
			||||||
    if (!existingDirectories.length)
 | 
					    if (!existingDirectories.length)
 | 
				
			||||||
        core.warning(`No existing directories found containing cache-dependency-path="${cacheDependencyPath}"`);
 | 
					        core.warning(`No existing directories found containing cache-dependency-path="${cacheDependencyPath}"`);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -71324,6 +71324,7 @@ const getProjectDirectoriesFromCacheDependencyPath = (cacheDependencyPath) => __
 | 
				
			|||||||
    const existingDirectories = cacheDependenciesPaths
 | 
					    const existingDirectories = cacheDependenciesPaths
 | 
				
			||||||
        .map(path_1.default.dirname)
 | 
					        .map(path_1.default.dirname)
 | 
				
			||||||
        .filter(util_1.unique())
 | 
					        .filter(util_1.unique())
 | 
				
			||||||
 | 
					        .map(dirName => fs_1.default.realpathSync(dirName))
 | 
				
			||||||
        .filter(directory => fs_1.default.lstatSync(directory).isDirectory());
 | 
					        .filter(directory => fs_1.default.lstatSync(directory).isDirectory());
 | 
				
			||||||
    if (!existingDirectories.length)
 | 
					    if (!existingDirectories.length)
 | 
				
			||||||
        core.warning(`No existing directories found containing cache-dependency-path="${cacheDependencyPath}"`);
 | 
					        core.warning(`No existing directories found containing cache-dependency-path="${cacheDependencyPath}"`);
 | 
				
			||||||
 | 
				
			|||||||
@ -144,6 +144,7 @@ const getProjectDirectoriesFromCacheDependencyPath = async (
 | 
				
			|||||||
  const existingDirectories: string[] = cacheDependenciesPaths
 | 
					  const existingDirectories: string[] = cacheDependenciesPaths
 | 
				
			||||||
    .map(path.dirname)
 | 
					    .map(path.dirname)
 | 
				
			||||||
    .filter(unique())
 | 
					    .filter(unique())
 | 
				
			||||||
 | 
					    .map(dirName => fs.realpathSync(dirName))
 | 
				
			||||||
    .filter(directory => fs.lstatSync(directory).isDirectory());
 | 
					    .filter(directory => fs.lstatSync(directory).isDirectory());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!existingDirectories.length)
 | 
					  if (!existingDirectories.length)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user