fix for webpack bundle

This commit is contained in:
Artur Stolear
2020-01-22 17:52:55 +02:00
parent 5ed9f1a870
commit ee69b451cc
11 changed files with 59 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,5 +2,5 @@ Versioning when using Git, solved. GitVersion looks at your Git history and work
It works with most branching strategies but has been designed mainly around GitFlow and GitHubFlow (pull request workflow). The calculated version numbers can then be accessed through variables such as `$(GitVersion.NuGetVersion)` and `$(GitVersion.SemVer)`. It is also very configurable to allow it to work with most release workflows!
![Build Task](https://raw.githubusercontent.com/GitTools/GitVersion/master/src/GitVersionVsixTask/images/build-task.png)
![Builds](https://raw.githubusercontent.com/GitTools/GitVersion/master/src/GitVersionVsixTask/images/builds.png)
![Build Task](https://raw.githubusercontent.com/GitTools/actions/master/dist/azure/images/build-task.png)
![Builds](https://raw.githubusercontent.com/GitTools/actions/master/dist/azure/images/builds.png)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
package-lock.json generated
View File

@@ -84,6 +84,12 @@
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ=="
},
"@types/semver-compare": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/semver-compare/-/semver-compare-1.0.1.tgz",
"integrity": "sha512-wx2LQVvKlEkhXp/HoKIZ/aSL+TvfJdKco8i0xJS3aR877mg4qBHzNT6+B5a61vewZHo79EdZavskGnRXEC2H6A==",
"dev": true
},
"@types/uuid": {
"version": "3.4.6",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.6.tgz",

View File

@@ -37,6 +37,7 @@
"devDependencies": {
"@types/node": "^13.1.8",
"@types/q": "^1.5.2",
"@types/semver-compare": "^1.0.1",
"@types/uuid": "^3.4.6",
"json-update": "^5.3.0",
"reflect-metadata": "^0.1.13",

View File

@@ -4,6 +4,7 @@ import * as os from "os";
import * as path from "path";
import * as semver from "semver";
import * as http from "typed-rest-client/HttpClient";
import cmp from "semver-compare";
import { inject, injectable } from "inversify";
@@ -184,7 +185,7 @@ class GitVersionTool implements IGitVersionTool {
return workDir.replace(/\\/g, "/");
}
private getArguments(workDir: string, options: IGitVersionOptions) {
private getArguments(workDir: string, options: IGitVersionOptions): string[] {
const args = [
workDir,
"/output",
@@ -220,8 +221,6 @@ class GitVersionTool implements IGitVersionTool {
}
}
const cmp = require("semver-compare");
@injectable()
class VersionManager implements IVersionManager {

View File

@@ -41,17 +41,14 @@ module.exports = (env) => {
search: /__webpack_require__\(.*\)\(resourceFile\)/,
replace: 'require(resourceFile)'
}, {
search: /path.join\(__dirname, 'lib.json'\)/,
replace: "path.resolve('lib.json')"
search: /call\(this, \"\/\"\)\)/gi,
replace: "call(this, __dirname))"
}, {
search: /let pkg.*'package.json'\)\);/,
replace: ''
}, {
search: /let userAgent = 'vsts-task-installer\/' \+ pkg.version;/,
replace: "let userAgent = 'vsts-task-installer'"
}, {
search: /tl.setResourcePath\(path.join\(__dirname, 'lib.json'\)\)/,
replace: "tl.setResourcePath(path.resolve('lib.json'))"
}]
}])
]