mirror of
				https://github.com/pnpm/action-setup.git
				synced 2025-11-04 13:29:08 +08:00 
			
		
		
		
	Fix js-yaml usage
This commit is contained in:
		
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -1,5 +1,5 @@
 | 
				
			|||||||
import process from 'process'
 | 
					import process from 'process'
 | 
				
			||||||
import { safeLoad } from 'js-yaml'
 | 
					import { load } from 'js-yaml'
 | 
				
			||||||
import Ajv from 'ajv'
 | 
					import Ajv from 'ajv'
 | 
				
			||||||
import { getInput, error, InputOptions } from '@actions/core'
 | 
					import { getInput, error, InputOptions } from '@actions/core'
 | 
				
			||||||
import runInstallSchema from './run-install-input.schema.json'
 | 
					import runInstallSchema from './run-install-input.schema.json'
 | 
				
			||||||
@@ -21,10 +21,9 @@ const options: InputOptions = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function parseRunInstall(name: string): RunInstall[] {
 | 
					export function parseRunInstall(name: string): RunInstall[] {
 | 
				
			||||||
  const result: RunInstallInput = safeLoad(getInput(name, options)) as any
 | 
					  const result: RunInstallInput = load(getInput(name, options)) as any
 | 
				
			||||||
  const ajv = new Ajv({
 | 
					  const ajv = new Ajv({
 | 
				
			||||||
    allErrors: true,
 | 
					    allErrors: true,
 | 
				
			||||||
    async: false,
 | 
					 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
  const validate = ajv.compile(runInstallSchema)
 | 
					  const validate = ajv.compile(runInstallSchema)
 | 
				
			||||||
  if (!validate(result)) {
 | 
					  if (!validate(result)) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user