mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-21 19:31:06 +07:00
Bump version to 2.2.0
This commit is contained in:
parent
3ec1728de8
commit
d10d1e249b
@ -1,11 +1,12 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": false,
|
||||
"endOfLine": "auto",
|
||||
"parser": "typescript",
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": false,
|
||||
"arrowParens": "avoid",
|
||||
"parser": "typescript"
|
||||
}
|
||||
"useTabs": false
|
||||
}
|
@ -29,7 +29,9 @@ describe('Utils tests', () => {
|
||||
it('checking asyncForEach', async () => {
|
||||
const array: Array<string> = ['a', 'b', 'c'];
|
||||
let concat = '';
|
||||
await utils.asyncForEach(array, async function(str: string): Promise<void> {
|
||||
await utils.asyncForEach(array, async function (
|
||||
str: string
|
||||
): Promise<void> {
|
||||
concat += str;
|
||||
});
|
||||
expect(concat).toBe('abc');
|
||||
@ -68,7 +70,10 @@ describe('Utils tests', () => {
|
||||
const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || '';
|
||||
const script_path: string = path.join(runner_dir, 'test.sh');
|
||||
await utils.writeScript('test.sh', testString);
|
||||
await fs.readFile(script_path, function(error: Error | null, data: Buffer) {
|
||||
await fs.readFile(script_path, function (
|
||||
error: Error | null,
|
||||
data: Buffer
|
||||
) {
|
||||
expect(testString).toBe(data.toString());
|
||||
});
|
||||
await cleanup(script_path);
|
||||
|
119
dist/index.js
vendored
119
dist/index.js
vendored
@ -952,14 +952,27 @@ class ExecState extends events.EventEmitter {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addMatchers = void 0;
|
||||
const path = __importStar(__webpack_require__(622));
|
||||
const utils = __importStar(__webpack_require__(163));
|
||||
const io = __importStar(__webpack_require__(1));
|
||||
@ -996,14 +1009,27 @@ module.exports = require("child_process");
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.suppressOutput = exports.getExtensionPrefix = exports.CSVArray = exports.extensionArray = exports.writeScript = exports.readScript = exports.addLog = exports.stepLog = exports.log = exports.color = exports.asyncForEach = exports.getInput = void 0;
|
||||
const fs = __importStar(__webpack_require__(747));
|
||||
const path = __importStar(__webpack_require__(622));
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
@ -1558,14 +1584,27 @@ exports.getState = getState;
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addTools = exports.addPackage = exports.addDevTools = exports.addArchive = exports.getCleanedToolsList = exports.addComposer = exports.getWpCliUrl = exports.getSymfonyUri = exports.getDeployerUrl = exports.getPharUrl = exports.addPhive = exports.getCodeceptionUri = exports.getCodeceptionUriBuilder = exports.getUri = exports.parseTool = exports.getToolVersion = exports.getCommand = void 0;
|
||||
const utils = __importStar(__webpack_require__(163));
|
||||
/**
|
||||
* Function to get command to setup tools
|
||||
@ -2042,14 +2081,27 @@ module.exports = require("path");
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addCoverage = exports.disableCoverage = exports.addCoveragePCOV = exports.addCoverageXdebug = void 0;
|
||||
const utils = __importStar(__webpack_require__(163));
|
||||
const extensions = __importStar(__webpack_require__(911));
|
||||
const config = __importStar(__webpack_require__(641));
|
||||
@ -2168,14 +2220,27 @@ exports.addCoverage = addCoverage;
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addINIValues = exports.addINIValuesWindows = exports.addINIValuesUnix = void 0;
|
||||
const utils = __importStar(__webpack_require__(163));
|
||||
/**
|
||||
* Add script to set custom ini values for unix
|
||||
@ -2251,14 +2316,27 @@ exports.addINIValues = addINIValues;
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.run = exports.build = void 0;
|
||||
const exec_1 = __webpack_require__(986);
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
const config = __importStar(__webpack_require__(641));
|
||||
@ -2556,14 +2634,27 @@ module.exports = require("fs");
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addExtension = exports.addExtensionLinux = exports.addExtensionWindows = exports.addExtensionDarwin = void 0;
|
||||
const path = __importStar(__webpack_require__(622));
|
||||
const utils = __importStar(__webpack_require__(163));
|
||||
/**
|
||||
|
2421
package-lock.json
generated
2421
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-php",
|
||||
"version": "2.1.4",
|
||||
"version": "2.2.0",
|
||||
"private": false,
|
||||
"description": "Setup PHP for use with GitHub Actions",
|
||||
"main": "dist/index.js",
|
||||
@ -24,28 +24,28 @@
|
||||
"author": "shivammathur",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.3",
|
||||
"@actions/exec": "^1.0.3",
|
||||
"@actions/core": "^1.2.4",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"@actions/io": "^1.0.2",
|
||||
"fs": "0.0.1-security"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.2.1",
|
||||
"@types/node": "^13.11.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
||||
"@typescript-eslint/parser": "^2.27.0",
|
||||
"@types/node": "^14.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||
"@typescript-eslint/parser": "^2.33.0",
|
||||
"@zeit/ncc": "^0.22.1",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.10.1",
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-jest": "^23.8.2",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"husky": "^4.2.3",
|
||||
"jest": "^25.3.0",
|
||||
"jest-circus": "^25.3.0",
|
||||
"prettier": "^1.19.1",
|
||||
"ts-jest": "^25.3.1",
|
||||
"typescript": "^3.8.3"
|
||||
"eslint-plugin-jest": "^23.11.0",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "^26.0.1",
|
||||
"jest-circus": "^26.0.1",
|
||||
"prettier": "^2.0.5",
|
||||
"ts-jest": "^25.5.1",
|
||||
"typescript": "^3.9.2"
|
||||
},
|
||||
"husky": {
|
||||
"skipCI": true,
|
||||
|
@ -10,7 +10,7 @@ export async function addINIValuesUnix(
|
||||
): Promise<string> {
|
||||
const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
|
||||
let script = '\n';
|
||||
await utils.asyncForEach(ini_values, async function(line: string) {
|
||||
await utils.asyncForEach(ini_values, async function (line: string) {
|
||||
script +=
|
||||
(await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n';
|
||||
});
|
||||
@ -27,7 +27,7 @@ export async function addINIValuesWindows(
|
||||
): Promise<string> {
|
||||
const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
|
||||
let script = '\n';
|
||||
await utils.asyncForEach(ini_values, async function(line: string) {
|
||||
await utils.asyncForEach(ini_values, async function (line: string) {
|
||||
script +=
|
||||
(await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
|
||||
});
|
||||
|
@ -16,7 +16,7 @@ export async function addExtensionDarwin(
|
||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||
let add_script = '\n';
|
||||
let remove_script = '\n';
|
||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||
await utils.asyncForEach(extensions, async function (extension: string) {
|
||||
const version_extension: string = version + extension;
|
||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||
@ -128,7 +128,7 @@ export async function addExtensionWindows(
|
||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||
let add_script = '\n';
|
||||
let remove_script = '\n';
|
||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||
await utils.asyncForEach(extensions, async function (extension: string) {
|
||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||
const version_extension: string = version + extension;
|
||||
let matches: RegExpExecArray;
|
||||
@ -220,7 +220,7 @@ export async function addExtensionLinux(
|
||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||
let add_script = '\n';
|
||||
let remove_script = '\n';
|
||||
await utils.asyncForEach(extensions, async function(extension: string) {
|
||||
await utils.asyncForEach(extensions, async function (extension: string) {
|
||||
const version_extension: string = version + extension;
|
||||
const [ext_name, ext_version]: string[] = extension.split('-');
|
||||
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||
|
@ -324,7 +324,7 @@ export async function getCleanedToolsList(
|
||||
let tools_list: string[] = await utils.CSVArray(tools_csv);
|
||||
tools_list = await addComposer(tools_list);
|
||||
tools_list = tools_list
|
||||
.map(function(extension: string) {
|
||||
.map(function (extension: string) {
|
||||
return extension
|
||||
.trim()
|
||||
.replace(
|
||||
@ -420,7 +420,7 @@ export async function addTools(
|
||||
): Promise<string> {
|
||||
let script = '\n' + (await utils.stepLog('Setup Tools', os_version));
|
||||
const tools_list: Array<string> = await getCleanedToolsList(tools_csv);
|
||||
await utils.asyncForEach(tools_list, async function(release: string) {
|
||||
await utils.asyncForEach(tools_list, async function (release: string) {
|
||||
const tool_data: {name: string; version: string} = await parseTool(release);
|
||||
const tool: string = tool_data.name;
|
||||
const version: string = tool_data.version;
|
||||
|
@ -186,7 +186,7 @@ export async function extensionArray(
|
||||
default:
|
||||
return extension_csv
|
||||
.split(',')
|
||||
.map(function(extension: string) {
|
||||
.map(function (extension: string) {
|
||||
return extension
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
@ -211,7 +211,7 @@ export async function CSVArray(values_csv: string): Promise<Array<string>> {
|
||||
default:
|
||||
return values_csv
|
||||
.split(',')
|
||||
.map(function(value: string) {
|
||||
.map(function (value: string) {
|
||||
return value.trim();
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user