mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 07:16:22 +07:00 
			
		
		
		
	Bump version to 2.22.0
Bump Node.js dependencies
This commit is contained in:
		
							
								
								
									
										57
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -1413,7 +1413,6 @@ const file_command_1 = __nccwpck_require__(717); | ||||
| const utils_1 = __nccwpck_require__(5278); | ||||
| const os = __importStar(__nccwpck_require__(2037)); | ||||
| const path = __importStar(__nccwpck_require__(1017)); | ||||
| const uuid_1 = __nccwpck_require__(5840); | ||||
| const oidc_utils_1 = __nccwpck_require__(8041); | ||||
| /** | ||||
|  * The code to exit an action | ||||
| @ -1443,20 +1442,9 @@ function exportVariable(name, val) { | ||||
|     process.env[name] = convertedVal; | ||||
|     const filePath = process.env['GITHUB_ENV'] || ''; | ||||
|     if (filePath) { | ||||
|         const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|         // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. | ||||
|         if (name.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|         } | ||||
|         if (convertedVal.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|         } | ||||
|         const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; | ||||
|         file_command_1.issueCommand('ENV', commandValue); | ||||
|     } | ||||
|     else { | ||||
|         command_1.issueCommand('set-env', { name }, convertedVal); | ||||
|         return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); | ||||
|     } | ||||
|     command_1.issueCommand('set-env', { name }, convertedVal); | ||||
| } | ||||
| exports.exportVariable = exportVariable; | ||||
| /** | ||||
| @ -1474,7 +1462,7 @@ exports.setSecret = setSecret; | ||||
| function addPath(inputPath) { | ||||
|     const filePath = process.env['GITHUB_PATH'] || ''; | ||||
|     if (filePath) { | ||||
|         file_command_1.issueCommand('PATH', inputPath); | ||||
|         file_command_1.issueFileCommand('PATH', inputPath); | ||||
|     } | ||||
|     else { | ||||
|         command_1.issueCommand('add-path', {}, inputPath); | ||||
| @ -1514,7 +1502,10 @@ function getMultilineInput(name, options) { | ||||
|     const inputs = getInput(name, options) | ||||
|         .split('\n') | ||||
|         .filter(x => x !== ''); | ||||
|     return inputs; | ||||
|     if (options && options.trimWhitespace === false) { | ||||
|         return inputs; | ||||
|     } | ||||
|     return inputs.map(input => input.trim()); | ||||
| } | ||||
| exports.getMultilineInput = getMultilineInput; | ||||
| /** | ||||
| @ -1547,8 +1538,12 @@ exports.getBooleanInput = getBooleanInput; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||||
| function setOutput(name, value) { | ||||
|     const filePath = process.env['GITHUB_OUTPUT'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     process.stdout.write(os.EOL); | ||||
|     command_1.issueCommand('set-output', { name }, value); | ||||
|     command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.setOutput = setOutput; | ||||
| /** | ||||
| @ -1677,7 +1672,11 @@ exports.group = group; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||||
| function saveState(name, value) { | ||||
|     command_1.issueCommand('save-state', { name }, value); | ||||
|     const filePath = process.env['GITHUB_STATE'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.saveState = saveState; | ||||
| /** | ||||
| @ -1743,13 +1742,14 @@ var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     return result; | ||||
| }; | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| exports.issueCommand = void 0; | ||||
| exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; | ||||
| // We use any as a valid input type | ||||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||||
| const fs = __importStar(__nccwpck_require__(7147)); | ||||
| const os = __importStar(__nccwpck_require__(2037)); | ||||
| const uuid_1 = __nccwpck_require__(5840); | ||||
| const utils_1 = __nccwpck_require__(5278); | ||||
| function issueCommand(command, message) { | ||||
| function issueFileCommand(command, message) { | ||||
|     const filePath = process.env[`GITHUB_${command}`]; | ||||
|     if (!filePath) { | ||||
|         throw new Error(`Unable to find environment variable for file command ${command}`); | ||||
| @ -1761,7 +1761,22 @@ function issueCommand(command, message) { | ||||
|         encoding: 'utf8' | ||||
|     }); | ||||
| } | ||||
| exports.issueCommand = issueCommand; | ||||
| exports.issueFileCommand = issueFileCommand; | ||||
| function prepareKeyValueMessage(key, value) { | ||||
|     const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|     const convertedValue = utils_1.toCommandValue(value); | ||||
|     // These should realistically never happen, but just in case someone finds a | ||||
|     // way to exploit uuid generation let's not allow keys or values that contain | ||||
|     // the delimiter. | ||||
|     if (key.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     if (convertedValue.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; | ||||
| } | ||||
| exports.prepareKeyValueMessage = prepareKeyValueMessage; | ||||
| //# sourceMappingURL=file-command.js.map | ||||
|  | ||||
| /***/ }), | ||||
|  | ||||
							
								
								
									
										2608
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2608
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										24
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								package.json
									
									
									
									
									
								
							| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "setup-php", | ||||
|   "version": "2.21.2", | ||||
|   "version": "2.22.0", | ||||
|   "private": false, | ||||
|   "description": "Setup PHP for use with GitHub Actions", | ||||
|   "main": "lib/install.js", | ||||
| @ -34,28 +34,28 @@ | ||||
|   "author": "shivammathur", | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/core": "^1.9.1", | ||||
|     "@actions/core": "^1.10.0", | ||||
|     "@actions/exec": "^1.1.1", | ||||
|     "@actions/io": "^1.1.2" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^28.1.7", | ||||
|     "@types/node": "^18.7.6", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.33.1", | ||||
|     "@typescript-eslint/parser": "^5.33.1", | ||||
|     "@types/jest": "^29.1.2", | ||||
|     "@types/node": "^18.8.4", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.40.0", | ||||
|     "@typescript-eslint/parser": "^5.40.0", | ||||
|     "@vercel/ncc": "^0.34.0", | ||||
|     "eslint": "^8.22.0", | ||||
|     "eslint": "^8.25.0", | ||||
|     "eslint-config-prettier": "^8.5.0", | ||||
|     "eslint-plugin-import": "^2.26.0", | ||||
|     "eslint-plugin-jest": "^26.8.3", | ||||
|     "eslint-plugin-jest": "^27.1.1", | ||||
|     "eslint-plugin-prettier": "^4.2.1", | ||||
|     "jest": "^28.1.3", | ||||
|     "jest-circus": "^28.1.3", | ||||
|     "jest": "^29.1.2", | ||||
|     "jest-circus": "^29.1.2", | ||||
|     "nock": "^13.2.9", | ||||
|     "prettier": "^2.7.1", | ||||
|     "simple-git-hooks": "^2.8.0", | ||||
|     "ts-jest": "^28.0.8", | ||||
|     "typescript": "^4.7.4" | ||||
|     "ts-jest": "^29.0.3", | ||||
|     "typescript": "^4.8.4" | ||||
|   }, | ||||
|   "bugs": { | ||||
|     "url": "https://github.com/shivammathur/setup-php/issues" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur