Bump version to 1.8.8

This commit is contained in:
Shivam Mathur 2020-05-13 22:00:42 +05:30
parent 90a6d88c24
commit 41329810ef
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
8 changed files with 1617 additions and 790 deletions

View File

@ -1,11 +1,12 @@
{ {
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "auto",
"parser": "typescript",
"printWidth": 80, "printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true, "semi": true,
"singleQuote": true, "singleQuote": true,
"tabWidth": 2,
"trailingComma": "none", "trailingComma": "none",
"bracketSpacing": false, "useTabs": false
"arrowParens": "avoid", }
"parser": "typescript"
}

View File

@ -29,7 +29,9 @@ describe('Utils tests', () => {
it('checking asyncForEach', async () => { it('checking asyncForEach', async () => {
const array: Array<string> = ['a', 'b', 'c']; const array: Array<string> = ['a', 'b', 'c'];
let concat = ''; let concat = '';
await utils.asyncForEach(array, async function(str: string): Promise<void> { await utils.asyncForEach(array, async function (
str: string
): Promise<void> {
concat += str; concat += str;
}); });
expect(concat).toBe('abc'); expect(concat).toBe('abc');
@ -68,7 +70,10 @@ describe('Utils tests', () => {
const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || ''; const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || '';
const script_path: string = path.join(runner_dir, 'test.sh'); const script_path: string = path.join(runner_dir, 'test.sh');
await utils.writeScript('test.sh', testString); 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()); expect(testString).toBe(data.toString());
}); });
await cleanup(script_path); await cleanup(script_path);

2335
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "1.8.7", "version": "1.8.8",
"private": false, "private": false,
"description": "Setup PHP for use with GitHub Actions", "description": "Setup PHP for use with GitHub Actions",
"main": "dist/index.js", "main": "dist/index.js",
@ -24,28 +24,28 @@
"author": "shivammathur", "author": "shivammathur",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.3", "@actions/core": "^1.2.4",
"@actions/exec": "^1.0.3", "@actions/exec": "^1.0.4",
"@actions/io": "^1.0.2", "@actions/io": "^1.0.2",
"fs": "0.0.1-security" "fs": "0.0.1-security"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^25.2.1", "@types/jest": "^25.2.1",
"@types/node": "^13.11.1", "@types/node": "^14.0.1",
"@typescript-eslint/eslint-plugin": "^2.27.0", "@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.27.0", "@typescript-eslint/parser": "^2.33.0",
"@zeit/ncc": "^0.22.1", "@zeit/ncc": "^0.22.1",
"eslint": "^6.8.0", "eslint": "^7.0.0",
"eslint-config-prettier": "^6.10.1", "eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.2", "eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.8.2", "eslint-plugin-jest": "^23.11.0",
"eslint-plugin-prettier": "^3.1.2", "eslint-plugin-prettier": "^3.1.3",
"husky": "^4.2.3", "husky": "^4.2.5",
"jest": "^25.3.0", "jest": "^26.0.1",
"jest-circus": "^25.3.0", "jest-circus": "^26.0.1",
"prettier": "^1.19.1", "prettier": "^2.0.5",
"ts-jest": "^25.3.1", "ts-jest": "^25.5.1",
"typescript": "^3.8.3" "typescript": "^3.9.2"
}, },
"husky": { "husky": {
"skipCI": true, "skipCI": true,

View File

@ -10,7 +10,7 @@ export async function addINIValuesUnix(
): Promise<string> { ): Promise<string> {
const ini_values: Array<string> = await utils.CSVArray(ini_values_csv); const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
let script = '\n'; let script = '\n';
await utils.asyncForEach(ini_values, async function(line: string) { await utils.asyncForEach(ini_values, async function (line: string) {
script += script +=
(await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n'; (await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n';
}); });
@ -27,7 +27,7 @@ export async function addINIValuesWindows(
): Promise<string> { ): Promise<string> {
const ini_values: Array<string> = await utils.CSVArray(ini_values_csv); const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
let script = '\n'; let script = '\n';
await utils.asyncForEach(ini_values, async function(line: string) { await utils.asyncForEach(ini_values, async function (line: string) {
script += script +=
(await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n'; (await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
}); });

View File

@ -15,7 +15,7 @@ export async function addExtensionDarwin(
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let 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 version_extension: string = version + extension;
const [extension_name, stability]: string[] = extension.split('-'); const [extension_name, stability]: string[] = extension.split('-');
const ext_prefix = await utils.getExtensionPrefix(extension_name); const ext_prefix = await utils.getExtensionPrefix(extension_name);
@ -96,7 +96,7 @@ export async function addExtensionWindows(
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let script = '\n';
await utils.asyncForEach(extensions, async function(extension: string) { await utils.asyncForEach(extensions, async function (extension: string) {
const [extension_name, stability]: string[] = extension.split('-'); const [extension_name, stability]: string[] = extension.split('-');
const version_extension: string = version + extension; const version_extension: string = version + extension;
switch (true) { switch (true) {
@ -153,7 +153,7 @@ export async function addExtensionLinux(
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let 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 version_extension: string = version + extension;
const [extension_name, stability]: string[] = extension.split('-'); const [extension_name, stability]: string[] = extension.split('-');
const ext_prefix = await utils.getExtensionPrefix(extension_name); const ext_prefix = await utils.getExtensionPrefix(extension_name);

View File

@ -303,7 +303,7 @@ export async function getCleanedToolsList(
let tools_list: string[] = await utils.CSVArray(tools_csv); let tools_list: string[] = await utils.CSVArray(tools_csv);
tools_list = await addComposer(tools_list); tools_list = await addComposer(tools_list);
tools_list = tools_list tools_list = tools_list
.map(function(extension: string) { .map(function (extension: string) {
return extension return extension
.trim() .trim()
.replace(/robmorgan\/|hirak\/|narrowspark\/automatic-/, ''); .replace(/robmorgan\/|hirak\/|narrowspark\/automatic-/, '');
@ -396,7 +396,7 @@ export async function addTools(
): Promise<string> { ): Promise<string> {
let script = '\n' + (await utils.stepLog('Setup Tools', os_version)); let script = '\n' + (await utils.stepLog('Setup Tools', os_version));
const tools_list: Array<string> = await getCleanedToolsList(tools_csv); 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_data: {name: string; version: string} = await parseTool(release);
const tool: string = tool_data.name; const tool: string = tool_data.name;
const version: string = tool_data.version; const version: string = tool_data.version;

View File

@ -186,7 +186,7 @@ export async function extensionArray(
default: default:
return extension_csv return extension_csv
.split(',') .split(',')
.map(function(extension: string) { .map(function (extension: string) {
return extension return extension
.trim() .trim()
.toLowerCase() .toLowerCase()
@ -211,7 +211,7 @@ export async function CSVArray(values_csv: string): Promise<Array<string>> {
default: default:
return values_csv return values_csv
.split(',') .split(',')
.map(function(value: string) { .map(function (value: string) {
return value.trim(); return value.trim();
}) })
.filter(Boolean); .filter(Boolean);