diff --git a/DETAILS.md b/DETAILS.md index b5dcf0c..2ae606e 100644 --- a/DETAILS.md +++ b/DETAILS.md @@ -102,6 +102,8 @@ ts-node options location | false | | Location of the ts-node options. If you lea ## Release Notes +* 3.2.1 (22(09/2017) + * Replacing `[]` brackets to `()` parenthesis in the title of the result summary section. * 3.2.0 (22/09/2017) * Support `[]` brackets in the display name of the task. * 3.1.0 (21/09/2017) diff --git a/GitVersion.yml b/GitVersion.yml index 8042638..54c7f7e 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,2 +1,2 @@ -next-version: 3.2.0 +next-version: 3.2.1 assembly-informational-format: '{SemVer}' diff --git a/README.md b/README.md index 0ce94c5..ce46ba0 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ ts-node options location | false | | Location of the ts-node options. If you lea ## Release Notes +* 3.2.1 (22(09/2017) + * Replacing `[]` brackets to `()` parenthesis in the title of the result summary section. * 3.2.0 (22/09/2017) * Support `[]` brackets in the display name of the task. * 3.1.0 (21/09/2017) diff --git a/package-lock.json b/package-lock.json index 8fd921b..ea478dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wepback-vsts-extension", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f589bba..d2ab25d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wepback-vsts-extension", - "version": "3.2.0", + "version": "3.2.1", "description": "webpack Visual Studio Team System (VSTS) Extension", "main": "index.js", "scripts": { diff --git a/tasks/webpack-build-task/package-lock.json b/tasks/webpack-build-task/package-lock.json index 39fb665..c52e2c8 100644 --- a/tasks/webpack-build-task/package-lock.json +++ b/tasks/webpack-build-task/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-build-task", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/tasks/webpack-build-task/package.json b/tasks/webpack-build-task/package.json index da10da9..bdd4026 100644 --- a/tasks/webpack-build-task/package.json +++ b/tasks/webpack-build-task/package.json @@ -1,6 +1,6 @@ { "name": "webpack-build-task", - "version": "3.2.0", + "version": "3.2.1", "description": "Webpack build task for Visual Studio Team System (VSTS)", "main": "index.js", "scripts": {}, diff --git a/tasks/webpack-build-task/summarySectionBuilder/index.ts b/tasks/webpack-build-task/summarySectionBuilder/index.ts index 090622f..67916ec 100644 --- a/tasks/webpack-build-task/summarySectionBuilder/index.ts +++ b/tasks/webpack-build-task/summarySectionBuilder/index.ts @@ -6,8 +6,7 @@ import { IWebpackCompilationResult } from "../webpackCompiler"; const generateWebpackResultFilename = (workingFolder: string, taskDisplayName: string) => { const webpackResultFilenamePostfix = ".webpack.result.md"; - const filename = filenamify(taskDisplayName).replace(/\[/g, "(").replace(/\]/g, ")").trim(); - return path.join(workingFolder, `${filename}${webpackResultFilenamePostfix}`); + return path.join(workingFolder, `${filenamify(taskDisplayName).trim()}${webpackResultFilenamePostfix}`); }; const createWebpackResultMarkdownFile = ( @@ -18,13 +17,15 @@ const createWebpackResultMarkdownFile = ( console.log("webpack summary section markdown file creation is started"); - const webpackResultFilename = generateWebpackResultFilename(workingFolder, taskDisplayName); + const fixedTaskDisplayName = taskDisplayName.replace(/\[/g, "(").replace(/\]/g, ")").trim(); + + const webpackResultFilename = generateWebpackResultFilename(workingFolder, fixedTaskDisplayName); const resultFileContent = `
${result.toString(webpackConfiguration)}
`; tl.writeFile(webpackResultFilename, resultFileContent); console.log(`webpack sumamry section markdown file is created with the name '${webpackResultFilename}'`); - console.log(`##vso[task.addattachment type=Distributedtask.Core.Summary;name=${taskDisplayName} result;]${webpackResultFilename}`); + console.log(`##vso[task.addattachment type=Distributedtask.Core.Summary;name=${fixedTaskDisplayName} result;]${webpackResultFilename}`); }; export { diff --git a/tasks/webpack-build-task/task.json b/tasks/webpack-build-task/task.json index e8cb4cb..b5e75e6 100644 --- a/tasks/webpack-build-task/task.json +++ b/tasks/webpack-build-task/task.json @@ -17,7 +17,7 @@ "version": { "Major": 3, "Minor": 2, - "Patch": 0 + "Patch": 1 }, "minimumAgentVersion": "1.95.0", "groups": [ diff --git a/tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInFilename.ts b/tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInTaskName.ts similarity index 85% rename from tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInFilename.ts rename to tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInTaskName.ts index 49bbe55..2360408 100644 --- a/tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInFilename.ts +++ b/tasks/webpack-build-task/tests/mockRunnerDefinitions/shouldReplaceBracketsToParenthesisInTaskName.ts @@ -9,7 +9,7 @@ runTestTask({ }; }, toString: (config: any) => { - return "shouldReplaceBracketsToParenthesisInFilename"; + return "shouldReplaceBracketsToParenthesisInTaskName"; } }, taskDisplayName: "webpack [something in brackets]", diff --git a/tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInFilename.ts b/tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInTaskName.ts similarity index 90% rename from tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInFilename.ts rename to tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInTaskName.ts index e2d5197..a1445bc 100644 --- a/tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInFilename.ts +++ b/tasks/webpack-build-task/tests/shouldReplaceBracketsToParenthesisInTaskName.ts @@ -5,14 +5,14 @@ import { assert } from "chai"; const mockRunnerDefinitions = "mockRunnerDefinitions"; export const executeTest = (done: MochaDone) => { - const testPath = path.join(__dirname, mockRunnerDefinitions, "shouldReplaceBracketsToParenthesisInFilename.js"); + const testPath = path.join(__dirname, mockRunnerDefinitions, "shouldReplaceBracketsToParenthesisInTaskName.js"); const testRunner = new MockTestRunner(testPath); testRunner.run(); assert.isTrue(testRunner.succeeded, "task should be succeeded"); assert.isFalse(testRunner.failed, "task should be not failed"); - const resultFileIsAttached = testRunner.stdOutContained("##vso[task.addattachment type=Distributedtask.Core.Summary;name=webpack [something in brackets] result;]"); + const resultFileIsAttached = testRunner.stdOutContained("##vso[task.addattachment type=Distributedtask.Core.Summary;name=webpack (something in brackets) result;]"); assert.isTrue(resultFileIsAttached, "result file should be attached"); const resultFilenameConverted = testRunner.stdOutContained("webpack (something in brackets).webpack.result.md"); diff --git a/tasks/webpack-build-task/tests/suite.ts b/tasks/webpack-build-task/tests/suite.ts index fc6b9ce..fcc5cd8 100644 --- a/tasks/webpack-build-task/tests/suite.ts +++ b/tasks/webpack-build-task/tests/suite.ts @@ -11,7 +11,7 @@ import * as shouldGenerateMarkdownFileInCaseOfASuccessfulRun from "./shouldGener import * as shouldLogInformationAboutTheProcess from "./shouldLogInformationAboutTheProcess"; import * as shouldPartiallySucceedIfNoErrorsButAtLeastOneWarning from "./shouldPartiallySucceedIfNoErrorsButAtLeastOneWarning"; import * as shouldPartiallySucceedIfThereAreErrorsButTreatedAsWarning from "./shouldPartiallySucceedIfThereAreErrorsButTreatedAsWarning"; -import * as shouldReplaceBracketsToParenthesisInFilename from "./shouldReplaceBracketsToParenthesisInFilename"; +import * as shouldReplaceBracketsToParenthesisInTaskName from "./shouldReplaceBracketsToParenthesisInTaskName"; import * as shouldReportErrorDetailInCaseOfWebpackBuildFailure from "./shouldReportErrorDetailInCaseOfWebpackBuildFailure"; import * as shouldSucceedIfNoDisplayNameDefined from "./shouldSucceedIfNoDisplayNameDefined"; import * as shouldSucceedIfNoErrorsAndWarnings from "./shouldSucceedIfNoErrorsAndWarnings"; @@ -95,8 +95,8 @@ describe("webpack build task", () => { shouldPartiallySucceedIfThereAreErrorsButTreatedAsWarning.executeTest); it( - "should replace brackets to parenthesis in filename", - shouldReplaceBracketsToParenthesisInFilename.executeTest + "should replace brackets to parenthesis in task name", + shouldReplaceBracketsToParenthesisInTaskName.executeTest ); it( diff --git a/vss-extension.json b/vss-extension.json index 1bcf6b6..e1632b6 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "webpack-vsts-extension", - "version": "3.2.0", + "version": "3.2.1", "name": "webpack", "description": "bundle your assets, scripts, images, styles", "publisher": "Dealogic",