mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-25 21:13:04 +07:00
Bump version to 2.14.0
Add config to generate types Fix build error in install.ts after TypeScript upgrade Minor refactor in install.test.ts Add bugs, directories, files and types entries in package.json Update Node.js dependencies Update SECURITY.md
This commit is contained in:
parent
35bc046b26
commit
a34eeedd37
3
.github/SECURITY.md
vendored
3
.github/SECURITY.md
vendored
@ -7,7 +7,7 @@ The following versions of this project are supported for security updates.
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 1.11.x | :white_check_mark: |
|
||||
| 2.11.x | :white_check_mark: |
|
||||
| 2.14.x | :white_check_mark: |
|
||||
|
||||
## Supported PHP Versions
|
||||
|
||||
@ -18,6 +18,7 @@ This security policy only applies to the latest patches of the following PHP ver
|
||||
| 7.3 | :white_check_mark: |
|
||||
| 7.4 | :white_check_mark: |
|
||||
| 8.0 | :white_check_mark: |
|
||||
| 8.1 | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
@ -17,25 +17,11 @@ jest.mock('../src/install', () => ({
|
||||
const ini_values_csv: string = process.env['ini-values'] || '';
|
||||
const coverage_driver: string = process.env['coverage'] || '';
|
||||
let tools_csv: string = process.env['tools'] || '';
|
||||
const pecl: string = process.env['pecl'] || '';
|
||||
if (pecl == 'true') {
|
||||
tools_csv = 'pecl, ' + tools_csv;
|
||||
}
|
||||
|
||||
let script = 'initial script ' + filename + version + os_version;
|
||||
if (tools_csv) {
|
||||
script += 'add_tool';
|
||||
}
|
||||
if (extension_csv) {
|
||||
script += 'install extensions';
|
||||
}
|
||||
if (coverage_driver) {
|
||||
script += 'set coverage driver';
|
||||
}
|
||||
if (ini_values_csv) {
|
||||
script += 'edit php.ini';
|
||||
}
|
||||
|
||||
script += tools_csv ? 'add_tool' : '';
|
||||
script += extension_csv ? 'install extensions' : '';
|
||||
script += coverage_driver ? 'set coverage driver' : '';
|
||||
script += ini_values_csv ? 'edit php.ini' : '';
|
||||
return script;
|
||||
}
|
||||
),
|
||||
|
9
dist/index.js
vendored
9
dist/index.js
vendored
@ -424,8 +424,7 @@ const extensions = __importStar(__nccwpck_require__(390));
|
||||
const tools = __importStar(__nccwpck_require__(740));
|
||||
const utils = __importStar(__nccwpck_require__(918));
|
||||
async function getScript(filename, version, os_version) {
|
||||
const name = 'setup-php';
|
||||
const url = 'https://setup-php.com/support';
|
||||
const url = 'https://setup-php.com/sponsor';
|
||||
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
|
||||
const extension_csv = await utils.getInput('extensions', false);
|
||||
const ini_values_csv = await utils.getInput('ini-values', false);
|
||||
@ -442,8 +441,8 @@ async function getScript(filename, version, os_version) {
|
||||
if (ini_values_csv) {
|
||||
script += await config.addINIValues(ini_values_csv, os_version);
|
||||
}
|
||||
script += '\n' + (await utils.stepLog('Support this project', os_version));
|
||||
script += '\n' + (await utils.addLog('$tick', name, url, os_version));
|
||||
script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os_version));
|
||||
script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os_version));
|
||||
return await utils.writeScript(filename, script);
|
||||
}
|
||||
exports.getScript = getScript;
|
||||
@ -459,7 +458,7 @@ async function run() {
|
||||
const tool = await utils.scriptTool(os_version);
|
||||
const script = os_version + (await utils.scriptExtension(os_version));
|
||||
const location = await getScript(script, version, os_version);
|
||||
await exec_1.exec(await utils.joins(tool, location, version, __dirname));
|
||||
await (0, exec_1.exec)(await utils.joins(tool, location, version, __dirname));
|
||||
}
|
||||
else {
|
||||
core.setFailed('Unable to get the PHP version');
|
||||
|
1456
package-lock.json
generated
1456
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@ -1,14 +1,24 @@
|
||||
{
|
||||
"name": "setup-php",
|
||||
"version": "2.13.0",
|
||||
"version": "2.14.0",
|
||||
"private": false,
|
||||
"description": "Setup PHP for use with GitHub Actions",
|
||||
"main": "lib/install.js",
|
||||
"types": "lib/install.d.ts",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__",
|
||||
"src": "src"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "eslint **/*.ts --cache --fix",
|
||||
"format": "prettier --write **/*.ts && git add .",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint **/src/*.ts --cache --fix",
|
||||
"format": "prettier --write **/src/*.ts && git add .",
|
||||
"format-check": "prettier --check **/src/*.ts",
|
||||
"release": "ncc build -o dist && git add -f dist/",
|
||||
"test": "jest"
|
||||
},
|
||||
@ -31,21 +41,24 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.0.1",
|
||||
"@types/node": "^16.7.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||
"@typescript-eslint/parser": "^4.29.2",
|
||||
"@vercel/ncc": "^0.29.2",
|
||||
"@types/node": "^16.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.31.0",
|
||||
"@typescript-eslint/parser": "^4.31.0",
|
||||
"@vercel/ncc": "^0.31.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.24.1",
|
||||
"eslint-plugin-import": "^2.24.2",
|
||||
"eslint-plugin-jest": "^24.4.0",
|
||||
"eslint-plugin-prettier": "^3.4.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^27.0.6",
|
||||
"jest-circus": "^27.0.6",
|
||||
"prettier": "^2.3.2",
|
||||
"jest": "^27.1.1",
|
||||
"jest-circus": "^27.1.1",
|
||||
"prettier": "^2.4.0",
|
||||
"ts-jest": "^27.0.5",
|
||||
"typescript": "^4.3.5"
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/shivammathur/setup-php/issues"
|
||||
},
|
||||
"husky": {
|
||||
"skipCI": true,
|
||||
|
@ -18,8 +18,7 @@ export async function getScript(
|
||||
version: string,
|
||||
os_version: string
|
||||
): Promise<string> {
|
||||
const name = 'setup-php';
|
||||
const url = 'https://setup-php.com/support';
|
||||
const url = 'https://setup-php.com/sponsor';
|
||||
// taking inputs
|
||||
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
|
||||
const extension_csv: string = await utils.getInput('extensions', false);
|
||||
@ -29,7 +28,6 @@ export async function getScript(
|
||||
|
||||
let script: string = await utils.readFile(filename, 'src/scripts');
|
||||
script += await tools.addTools(tools_csv, version, os_version);
|
||||
|
||||
if (extension_csv) {
|
||||
script += await extensions.addExtension(extension_csv, version, os_version);
|
||||
}
|
||||
@ -39,9 +37,8 @@ export async function getScript(
|
||||
if (ini_values_csv) {
|
||||
script += await config.addINIValues(ini_values_csv, os_version);
|
||||
}
|
||||
|
||||
script += '\n' + (await utils.stepLog('Support this project', os_version));
|
||||
script += '\n' + (await utils.addLog('$tick', name, url, os_version));
|
||||
script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os_version));
|
||||
script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os_version));
|
||||
|
||||
return await utils.writeScript(filename, script);
|
||||
}
|
||||
@ -70,7 +67,7 @@ export async function run(): Promise<void> {
|
||||
core.setFailed('Unable to get the PHP version');
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
core.setFailed((error as Error).message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"ES2020"
|
||||
|
Loading…
Reference in New Issue
Block a user