mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 07:16:22 +07:00 
			
		
		
		
	Update dependencies
Update to Jest 27 Set sourceMap to true in tsconfig.json
This commit is contained in:
		| @ -32,7 +32,8 @@ export async function getCommand( | ||||
|  */ | ||||
| export async function getToolVersion(version: string): Promise<string> { | ||||
|   // semver_regex - https://semver.org/ | ||||
|   const semver_regex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; | ||||
|   const semver_regex = | ||||
|     /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; | ||||
|   const composer_regex = /^stable$|^preview$|^snapshot$|^v?[1|2]$/; | ||||
|   version = version.replace(/[><=^]*/, ''); | ||||
|   switch (true) { | ||||
| @ -215,8 +216,10 @@ export async function getSymfonyUri( | ||||
|  */ | ||||
| export async function addComposer(tools_list: string[]): Promise<string[]> { | ||||
|   const regex_any = /^composer($|:.*)/; | ||||
|   const regex_valid = /^composer:?($|preview$|snapshot$|v?[1-2]$|v?\d+\.\d+\.\d+[\w-]*$)/; | ||||
|   const regex_composer1_tools = /hirak|prestissimo|narrowspark|composer-prefetcher/; | ||||
|   const regex_valid = | ||||
|     /^composer:?($|preview$|snapshot$|v?[1-2]$|v?\d+\.\d+\.\d+[\w-]*$)/; | ||||
|   const regex_composer1_tools = | ||||
|     /hirak|prestissimo|narrowspark|composer-prefetcher/; | ||||
|   const matches: string[] = tools_list.filter(tool => regex_valid.test(tool)); | ||||
|   let composer = 'composer'; | ||||
|   tools_list = tools_list.filter(tool => !regex_any.test(tool)); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur