nerdbank-gitversioning 3.5.85-alpha → 3.5.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/asyncio.js CHANGED
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.mkdirIfNotExistAsync = exports.mkdirAsync = exports.existsAsync = void 0;
13
14
  const fs = require("fs");
14
15
  function existsAsync(path) {
15
16
  return new Promise(resolve => fs.exists(path, resolve));
@@ -22,7 +23,7 @@ function mkdirAsync(path) {
22
23
  reject(err);
23
24
  }
24
25
  else {
25
- resolve();
26
+ resolve(null);
26
27
  }
27
28
  }));
28
29
  }
package/asyncio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../ts/asyncio.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;AAEb,yBAAyB;AAEzB,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,IAAI,OAAO,CAAU,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC;AAFD,kCAEC;AAAA,CAAC;AAEF,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QAC9D,IAAI,GAAG,EAAE;YAAE,MAAM,CAAC,GAAG,CAAC,CAAC;SAAE;aAAM;YAAE,OAAO,EAAE,CAAA;SAAE;IAChD,CAAC,CAAC,CAAC,CAAC;AACR,CAAC;AAJD,gCAIC;AAED,SAAsB,oBAAoB,CAAC,IAAY;;QACnD,IAAI,CAAC,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE;YAC5B,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;SAC1B;IACL,CAAC;CAAA;AAJD,oDAIC","file":"asyncio.js","sourcesContent":["'use string';\r\n\r\nimport * as fs from 'fs';\r\n\r\nexport function existsAsync(path: string) {\r\n return new Promise<boolean>(resolve => fs.exists(path, resolve));\r\n};\r\n\r\nexport function mkdirAsync(path: string) {\r\n return new Promise<any>((resolve, reject) => fs.mkdir(path, err => {\r\n if (err) { reject(err); } else { resolve() }\r\n }));\r\n}\r\n\r\nexport async function mkdirIfNotExistAsync(path: string) {\r\n if (!(await existsAsync(path))) {\r\n await mkdirAsync(path);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../ts/asyncio.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;AAEb,yBAAyB;AAEzB,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,IAAI,OAAO,CAAU,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC;AAFD,kCAEC;AAAA,CAAC;AAEF,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QAC9D,IAAI,GAAG,EAAE;YAAE,MAAM,CAAC,GAAG,CAAC,CAAC;SAAE;aAAM;YAAE,OAAO,CAAC,IAAI,CAAC,CAAA;SAAE;IACpD,CAAC,CAAC,CAAC,CAAC;AACR,CAAC;AAJD,gCAIC;AAED,SAAsB,oBAAoB,CAAC,IAAY;;QACnD,IAAI,CAAC,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE;YAC5B,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;SAC1B;IACL,CAAC;CAAA;AAJD,oDAIC","file":"asyncio.js","sourcesContent":["'use string';\r\n\r\nimport * as fs from 'fs';\r\n\r\nexport function existsAsync(path: string) {\r\n return new Promise<boolean>(resolve => fs.exists(path, resolve));\r\n};\r\n\r\nexport function mkdirAsync(path: string) {\r\n return new Promise<any>((resolve, reject) => fs.mkdir(path, err => {\r\n if (err) { reject(err); } else { resolve(null) }\r\n }));\r\n}\r\n\r\nexport async function mkdirIfNotExistAsync(path: string) {\r\n if (!(await existsAsync(path))) {\r\n await mkdirAsync(path);\r\n }\r\n}\r\n"]}
package/asyncprocess.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execAsync = void 0;
3
4
  const cp = require("child_process");
4
5
  function execAsync(command, options) {
5
6
  return new Promise((resolve, reject) => cp.exec(command, options, (error, stdout, stderr) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../ts/asyncprocess.ts"],"names":[],"mappings":";;AAAA,oCAAoC;AAOpC,SAAgB,SAAS,CAAC,OAAe,EAAE,OAAwB;IAC/D,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QACrE,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM;YACH,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;SAC/C;IACL,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC;AATD,8BASC;AAAA,CAAC","file":"asyncprocess.js","sourcesContent":["import * as cp from 'child_process';\r\n\r\nexport interface IExecAsyncResult {\r\n stdout: string;\r\n stderr: string;\r\n}\r\n\r\nexport function execAsync(command: string, options?: cp.ExecOptions) {\r\n return new Promise<IExecAsyncResult>(\r\n (resolve, reject) => cp.exec(command, options, (error, stdout, stderr) => {\r\n if (error) {\r\n reject(error);\r\n } else {\r\n resolve({ stdout: stdout, stderr: stderr });\r\n }\r\n }));\r\n};\r\n"]}
1
+ {"version":3,"sources":["../ts/asyncprocess.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AAOpC,SAAgB,SAAS,CAAC,OAAe,EAAE,OAAwB;IAC/D,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QACrE,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM;YACH,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;SAC/C;IACL,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC;AATD,8BASC;AAAA,CAAC","file":"asyncprocess.js","sourcesContent":["import * as cp from 'child_process';\r\n\r\nexport interface IExecAsyncResult {\r\n stdout: string;\r\n stderr: string;\r\n}\r\n\r\nexport function execAsync(command: string, options?: cp.ExecOptions) {\r\n return new Promise<IExecAsyncResult>(\r\n (resolve, reject) => cp.exec(command, options, (error, stdout, stderr) => {\r\n if (error) {\r\n reject(error);\r\n } else {\r\n resolve({ stdout: stdout, stderr: stderr });\r\n }\r\n }));\r\n};\r\n"]}
package/core.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNbgvCommand = void 0;
3
4
  const path = require("path");
4
5
  const nbgvPath = 'nbgv.cli';
5
6
  function getNbgvCommand(dotnetCommand) {
package/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../ts/core.ts"],"names":[],"mappings":";;AACA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B,SAAgB,cAAc,CAAC,aAAsB;IACjD,IAAI,OAAO,GAAG,aAAa,IAAI,QAAQ,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IAC5F,OAAO,GAAG,OAAO,KAAK,OAAO,GAAG,CAAC;AACrC,CAAC;AAJD,wCAIC","file":"core.js","sourcesContent":["import * as fs from 'fs';\r\nimport * as path from 'path';\r\n\r\nconst nbgvPath = 'nbgv.cli';\r\n\r\nexport function getNbgvCommand(dotnetCommand?: string): string {\r\n var command = dotnetCommand || 'dotnet';\r\n const nbgvDll = path.join(__dirname, nbgvPath, \"tools\", \"netcoreapp3.1\", \"any\", \"nbgv.dll\");\r\n return `${command} \"${nbgvDll}\"`;\r\n}\r\n"]}
1
+ {"version":3,"sources":["../ts/core.ts"],"names":[],"mappings":";;;AACA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B,SAAgB,cAAc,CAAC,aAAsB;IACjD,IAAI,OAAO,GAAG,aAAa,IAAI,QAAQ,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IAC5F,OAAO,GAAG,OAAO,KAAK,OAAO,GAAG,CAAC;AACrC,CAAC;AAJD,wCAIC","file":"core.js","sourcesContent":["import * as fs from 'fs';\r\nimport * as path from 'path';\r\n\r\nconst nbgvPath = 'nbgv.cli';\r\n\r\nexport function getNbgvCommand(dotnetCommand?: string): string {\r\n var command = dotnetCommand || 'dotnet';\r\n const nbgvDll = path.join(__dirname, nbgvPath, \"tools\", \"netcoreapp3.1\", \"any\", \"nbgv.dll\");\r\n return `${command} \"${nbgvDll}\"`;\r\n}\r\n"]}
package/index.js CHANGED
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.resetPackageVersionPlaceholder = exports.setPackageVersion = exports.getVersion = void 0;
12
13
  const camelCase = require("camel-case");
13
14
  const asyncprocess_1 = require("./asyncprocess");
14
15
  const core_1 = require("./core");
@@ -20,7 +21,7 @@ const core_1 = require("./core");
20
21
  function getVersion(projectDirectory, dotnetCommand) {
21
22
  return __awaiter(this, void 0, void 0, function* () {
22
23
  projectDirectory = projectDirectory || '.';
23
- var versionText = yield asyncprocess_1.execAsync(`${core_1.getNbgvCommand(dotnetCommand)} get-version --format json`, { cwd: projectDirectory });
24
+ var versionText = yield (0, asyncprocess_1.execAsync)(`${(0, core_1.getNbgvCommand)(dotnetCommand)} get-version --format json`, { cwd: projectDirectory });
24
25
  if (versionText.stderr) {
25
26
  throw versionText.stderr;
26
27
  }
@@ -45,7 +46,7 @@ function setPackageVersion(packageDirectory, srcDirectory, dotnetCommand) {
45
46
  srcDirectory = srcDirectory || packageDirectory;
46
47
  const gitVersion = yield getVersion(srcDirectory, dotnetCommand);
47
48
  console.log(`Setting package version to ${gitVersion.npmPackageVersion}`);
48
- var result = yield asyncprocess_1.execAsync(`npm version ${gitVersion.npmPackageVersion} --no-git-tag-version --allow-same-version`, { cwd: packageDirectory });
49
+ var result = yield (0, asyncprocess_1.execAsync)(`npm version ${gitVersion.npmPackageVersion} --no-git-tag-version --allow-same-version`, { cwd: packageDirectory });
49
50
  if (result.stderr) {
50
51
  console.log(result.stderr);
51
52
  }
@@ -60,7 +61,7 @@ exports.setPackageVersion = setPackageVersion;
60
61
  function resetPackageVersionPlaceholder(srcDirectory) {
61
62
  return __awaiter(this, void 0, void 0, function* () {
62
63
  srcDirectory = srcDirectory || '.';
63
- var result = yield asyncprocess_1.execAsync(`npm version 0.0.0-placeholder --no-git-tag-version --allow-same-version`, { cwd: srcDirectory });
64
+ var result = yield (0, asyncprocess_1.execAsync)(`npm version 0.0.0-placeholder --no-git-tag-version --allow-same-version`, { cwd: srcDirectory });
64
65
  if (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AE,EAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACjJ,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;CAAA;AATD,8CASC;AAED;;;;GAIG;AACH,SAAsB,8BAA8B,CAAC,YAAqB;;QACtE,YAAY,GAAG,YAAY,IAAI,GAAG,CAAC;QACnC,IAAI,MAAM,GAAG,MAAM,wBAAS,CAAC,yEAAyE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;QAC/H,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;CAAA;AAND,wEAMC","file":"index.js","sourcesContent":["'use strict';\r\n\r\nimport * as camelCase from 'camel-case';\r\nimport { execAsync } from './asyncprocess';\r\nimport { getNbgvCommand } from './core';\r\n\r\n/**\r\n * The various aspects of a version that can be calculated.\r\n */\r\nexport interface IGitVersion {\r\n cloudBuildNumber: string,\r\n cloudBuildNumberEnabled: boolean,\r\n buildMetadataWithCommitId: string,\r\n assemblyVersion: string,\r\n assemblyFileVersion: string,\r\n assemblyInformationalVersion: string,\r\n publicRelease: boolean,\r\n prereleaseVersion: string,\r\n simpleVersion: string,\r\n buildNumber: string,\r\n majorMinorVersion: string,\r\n gitCommitId: string,\r\n gitCommitIdShort: string,\r\n versionHeight: string,\r\n version: string,\r\n cloudBuildVersionVarsEnabled: boolean,\r\n cloudBuildVersionVars: string,\r\n buildMetadata: string,\r\n buildMetadataFragment: string,\r\n nuGetPackageVersion: string,\r\n npmPackageVersion: string,\r\n semVer1: string,\r\n semVer2: string\r\n}\r\n\r\n/**\r\n * Gets an object describing various aspects of the version of a project.\r\n * @param projectDirectory The directory of the source code to get the version of.\r\n * @param dotnetCommand The location of the dotnet command line executable\r\n */\r\nexport async function getVersion(projectDirectory?: string, dotnetCommand?: string): Promise<IGitVersion> {\r\n projectDirectory = projectDirectory || '.';\r\n var versionText = await execAsync(`${getNbgvCommand(dotnetCommand)} get-version --format json`, { cwd: projectDirectory })\r\n if (versionText.stderr) {\r\n throw versionText.stderr;\r\n }\r\n\r\n var directResult = JSON.parse(versionText.stdout);\r\n var result = {};\r\n for (var field in directResult) {\r\n result[camelCase.camelCase(field)] = directResult[field];\r\n }\r\n\r\n return <IGitVersion>result;\r\n}\r\n\r\n/**\r\n * Sets an NPM package version based on the git height and version.json.\r\n * @param packageDirectory The directory of the package about to be published.\r\n * @param srcDirectory The directory of the source code behind the package, if different than the packageDirectory.\r\n * @param dotnetCommand The location of the dotnet command line executable\r\n */\r\nexport async function setPackageVersion(packageDirectory?: string, srcDirectory?: string, dotnetCommand?: string) {\r\n packageDirectory = packageDirectory || '.';\r\n srcDirectory = srcDirectory || packageDirectory;\r\n const gitVersion = await getVersion(srcDirectory, dotnetCommand);\r\n console.log(`Setting package version to ${gitVersion.npmPackageVersion}`);\r\n var result = await execAsync(`npm version ${gitVersion.npmPackageVersion} --no-git-tag-version --allow-same-version`, { cwd: packageDirectory });\r\n if (result.stderr) {\r\n console.log(result.stderr);\r\n }\r\n}\r\n\r\n/**\r\n * Sets the package version to 0.0.0-placeholder, so as to obviously indicate\r\n * that the version isn't set in the source code version of package.json.\r\n * @param srcDirectory The directory of the source code behind the package, if different.\r\n */\r\nexport async function resetPackageVersionPlaceholder(srcDirectory?: string) {\r\n srcDirectory = srcDirectory || '.';\r\n var result = await execAsync(`npm version 0.0.0-placeholder --no-git-tag-version --allow-same-version`, { cwd: srcDirectory });\r\n if (result.stderr) {\r\n console.log(result.stderr);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;AAEb,wCAAwC;AACxC,iDAA2C;AAC3C,iCAAwC;AA+BxC;;;;GAIG;AACH,SAAsB,UAAU,CAAC,gBAAyB,EAAE,aA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B;;QACtE,YAAY,GAAG,YAAY,IAAI,GAAG,CAAC;QACnC,IAAI,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,yEAAyE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;QAC/H,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;CAAA;AAND,wEAMC","file":"index.js","sourcesContent":["'use strict';\r\n\r\nimport * as camelCase from 'camel-case';\r\nimport { execAsync } from './asyncprocess';\r\nimport { getNbgvCommand } from './core';\r\n\r\n/**\r\n * The various aspects of a version that can be calculated.\r\n */\r\nexport interface IGitVersion {\r\n cloudBuildNumber: string,\r\n cloudBuildNumberEnabled: boolean,\r\n buildMetadataWithCommitId: string,\r\n assemblyVersion: string,\r\n assemblyFileVersion: string,\r\n assemblyInformationalVersion: string,\r\n publicRelease: boolean,\r\n prereleaseVersion: string,\r\n simpleVersion: string,\r\n buildNumber: string,\r\n majorMinorVersion: string,\r\n gitCommitId: string,\r\n gitCommitIdShort: string,\r\n versionHeight: string,\r\n version: string,\r\n cloudBuildVersionVarsEnabled: boolean,\r\n cloudBuildVersionVars: string,\r\n buildMetadata: string,\r\n buildMetadataFragment: string,\r\n nuGetPackageVersion: string,\r\n npmPackageVersion: string,\r\n semVer1: string,\r\n semVer2: string\r\n}\r\n\r\n/**\r\n * Gets an object describing various aspects of the version of a project.\r\n * @param projectDirectory The directory of the source code to get the version of.\r\n * @param dotnetCommand The location of the dotnet command line executable\r\n */\r\nexport async function getVersion(projectDirectory?: string, dotnetCommand?: string): Promise<IGitVersion> {\r\n projectDirectory = projectDirectory || '.';\r\n var versionText = await execAsync(`${getNbgvCommand(dotnetCommand)} get-version --format json`, { cwd: projectDirectory })\r\n if (versionText.stderr) {\r\n throw versionText.stderr;\r\n }\r\n\r\n var directResult = JSON.parse(versionText.stdout);\r\n var result = {};\r\n for (var field in directResult) {\r\n result[camelCase.camelCase(field)] = directResult[field];\r\n }\r\n\r\n return <IGitVersion>result;\r\n}\r\n\r\n/**\r\n * Sets an NPM package version based on the git height and version.json.\r\n * @param packageDirectory The directory of the package about to be published.\r\n * @param srcDirectory The directory of the source code behind the package, if different than the packageDirectory.\r\n * @param dotnetCommand The location of the dotnet command line executable\r\n */\r\nexport async function setPackageVersion(packageDirectory?: string, srcDirectory?: string, dotnetCommand?: string) {\r\n packageDirectory = packageDirectory || '.';\r\n srcDirectory = srcDirectory || packageDirectory;\r\n const gitVersion = await getVersion(srcDirectory, dotnetCommand);\r\n console.log(`Setting package version to ${gitVersion.npmPackageVersion}`);\r\n var result = await execAsync(`npm version ${gitVersion.npmPackageVersion} --no-git-tag-version --allow-same-version`, { cwd: packageDirectory });\r\n if (result.stderr) {\r\n console.log(result.stderr);\r\n }\r\n}\r\n\r\n/**\r\n * Sets the package version to 0.0.0-placeholder, so as to obviously indicate\r\n * that the version isn't set in the source code version of package.json.\r\n * @param srcDirectory The directory of the source code behind the package, if different.\r\n */\r\nexport async function resetPackageVersionPlaceholder(srcDirectory?: string) {\r\n srcDirectory = srcDirectory || '.';\r\n var result = await execAsync(`npm version 0.0.0-placeholder --no-git-tag-version --allow-same-version`, { cwd: srcDirectory });\r\n if (result.stderr) {\r\n console.log(result.stderr);\r\n }\r\n}\r\n"]}
package/main.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const core_1 = require("./core");
5
5
  const { spawn } = require('child_process');
6
6
  const { argv, exit } = require('process');
7
- const cp = spawn(`${core_1.getNbgvCommand()} ${argv.slice(2).join(' ')}`, { shell: true, stdio: "inherit" });
7
+ const cp = spawn(`${(0, core_1.getNbgvCommand)()} ${argv.slice(2).join(' ')}`, { shell: true, stdio: "inherit" });
8
8
  cp.once('exit', code => exit(code));
9
9
 
10
10
  //# sourceMappingURL=main.js.map
package/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../ts/main.ts"],"names":[],"mappings":";AAEA,YAAY,CAAC;;AAEb,iCAAwC;AAExC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAE1C,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,qBAAc,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;AACrG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA","file":"main.js","sourcesContent":["#!/usr/bin/env node\r\n\r\n'use strict';\r\n\r\nimport { getNbgvCommand } from \"./core\";\r\n\r\nconst { spawn } = require('child_process');\r\nconst { argv, exit } = require('process');\r\n\r\nconst cp = spawn(`${getNbgvCommand()} ${argv.slice(2).join(' ')}`, { shell: true, stdio: \"inherit\" })\r\ncp.once('exit', code => exit(code))\r\n"]}
1
+ {"version":3,"sources":["../ts/main.ts"],"names":[],"mappings":";AAEA,YAAY,CAAC;;AAEb,iCAAwC;AAExC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAE1C,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,IAAA,qBAAc,GAAE,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;AACrG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA","file":"main.js","sourcesContent":["#!/usr/bin/env node\r\n\r\n'use strict';\r\n\r\nimport { getNbgvCommand } from \"./core\";\r\n\r\nconst { spawn } = require('child_process');\r\nconst { argv, exit } = require('process');\r\n\r\nconst cp = spawn(`${getNbgvCommand()} ${argv.slice(2).join(' ')}`, { shell: true, stdio: \"inherit\" })\r\ncp.once('exit', code => exit(code))\r\n"]}
@@ -4150,12 +4150,6 @@
4150
4150
  Returns a span of the characters in this string.
4151
4151
  </summary>
4152
4152
  </member>
4153
- <member name="F:Windows.Win32.Constants.INVALID_HANDLE_VALUE">
4154
- <summary>There is no interactive user. The trust provider performs the verification action without the user's assistance.</summary>
4155
- <remarks>
4156
- <para><see href="https://docs.microsoft.com/windows/win32/api//wintrust/nf-wintrust-winverifytrustex">Learn more about this API from docs.microsoft.com</see>.</para>
4157
- </remarks>
4158
- </member>
4159
4153
  <member name="T:Windows.Win32.PInvoke">
4160
4154
  <content>
4161
4155
  Contains extern methods from "Kernel32.dll".
@@ -4237,5 +4231,11 @@
4237
4231
  <para><see href="https://docs.microsoft.com/windows/win32/api//fileapi/nf-fileapi-createfilew">Learn more about this API from docs.microsoft.com</see>.</para>
4238
4232
  </remarks>
4239
4233
  </member>
4234
+ <member name="F:Windows.Win32.Constants.INVALID_HANDLE_VALUE">
4235
+ <summary>There is no interactive user. The trust provider performs the verification action without the user's assistance.</summary>
4236
+ <remarks>
4237
+ <para><see href="https://docs.microsoft.com/windows/win32/api//wintrust/nf-wintrust-winverifytrustex">Learn more about this API from docs.microsoft.com</see>.</para>
4238
+ </remarks>
4239
+ </member>
4240
4240
  </members>
4241
4241
  </doc>
@@ -6,7 +6,7 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v3.1": {
9
- "nbgv/3.5.85-alpha": {
9
+ "nbgv/3.5.104": {
10
10
  "dependencies": {
11
11
  "CSharpIsNullAnalyzer": "0.1.300",
12
12
  "Microsoft.Build": "16.9.0",
@@ -125,21 +125,11 @@
125
125
  },
126
126
  "Microsoft.Build.Tasks.Git/1.1.1": {},
127
127
  "Microsoft.CSharp/4.4.1": {},
128
- "Microsoft.DotNet.PlatformAbstractions/2.1.0": {
129
- "dependencies": {
130
- "System.AppContext": "4.1.0",
131
- "System.Collections": "4.3.0",
132
- "System.IO": "4.3.0",
133
- "System.IO.FileSystem": "4.0.1",
134
- "System.Reflection.TypeExtensions": "4.1.0",
135
- "System.Runtime.Extensions": "4.3.0",
136
- "System.Runtime.InteropServices": "4.3.0",
137
- "System.Runtime.InteropServices.RuntimeInformation": "4.0.0"
138
- },
128
+ "Microsoft.DotNet.PlatformAbstractions/3.1.6": {
139
129
  "runtime": {
140
- "lib/netstandard1.3/Microsoft.DotNet.PlatformAbstractions.dll": {
141
- "assemblyVersion": "2.1.0.0",
142
- "fileVersion": "2.1.0.0"
130
+ "lib/netstandard2.0/Microsoft.DotNet.PlatformAbstractions.dll": {
131
+ "assemblyVersion": "3.1.6.0",
132
+ "fileVersion": "3.100.620.31604"
143
133
  }
144
134
  }
145
135
  },
@@ -373,17 +363,6 @@
373
363
  }
374
364
  }
375
365
  },
376
- "runtime.native.System/4.0.0": {
377
- "dependencies": {
378
- "Microsoft.NETCore.Platforms": "3.1.0",
379
- "Microsoft.NETCore.Targets": "1.1.0"
380
- }
381
- },
382
- "System.AppContext/4.1.0": {
383
- "dependencies": {
384
- "System.Runtime": "4.3.0"
385
- }
386
- },
387
366
  "System.Collections/4.3.0": {
388
367
  "dependencies": {
389
368
  "Microsoft.NETCore.Platforms": "3.1.0",
@@ -656,17 +635,6 @@
656
635
  "System.Runtime.Handles": "4.3.0"
657
636
  }
658
637
  },
659
- "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
660
- "dependencies": {
661
- "Microsoft.NETCore.Platforms": "3.1.0",
662
- "System.Reflection": "4.3.0",
663
- "System.Resources.ResourceManager": "4.3.0",
664
- "System.Runtime": "4.3.0",
665
- "System.Runtime.InteropServices": "4.3.0",
666
- "System.Threading": "4.0.11",
667
- "runtime.native.System": "4.0.0"
668
- }
669
- },
670
638
  "System.Runtime.Serialization.Primitives/4.1.1": {
671
639
  "dependencies": {
672
640
  "System.Resources.ResourceManager": "4.3.0",
@@ -871,25 +839,22 @@
871
839
  "System.Xml.ReaderWriter": "4.0.11"
872
840
  }
873
841
  },
874
- "Validation/2.5.5-beta": {
875
- "dependencies": {
876
- "System.Runtime.InteropServices": "4.3.0"
877
- },
842
+ "Validation/2.5.51": {
878
843
  "runtime": {
879
844
  "lib/netstandard2.0/Validation.dll": {
880
845
  "assemblyVersion": "2.5.0.0",
881
- "fileVersion": "2.5.5.44357"
846
+ "fileVersion": "2.5.51.3930"
882
847
  }
883
848
  }
884
849
  },
885
850
  "Nerdbank.GitVersioning.Core/1.0.0": {
886
851
  "dependencies": {
887
852
  "LibGit2Sharp": "0.27.0-preview-0158",
888
- "Microsoft.DotNet.PlatformAbstractions": "2.1.0",
853
+ "Microsoft.DotNet.PlatformAbstractions": "3.1.6",
889
854
  "Nerdbank.GitVersioning.LKG": "3.4.173-alpha",
890
855
  "Newtonsoft.Json": "9.0.1",
891
856
  "System.Text.Json": "4.7.2",
892
- "Validation": "2.5.5-beta"
857
+ "Validation": "2.5.51"
893
858
  },
894
859
  "runtime": {
895
860
  "NerdBank.GitVersioning.dll": {}
@@ -898,7 +863,7 @@
898
863
  }
899
864
  },
900
865
  "libraries": {
901
- "nbgv/3.5.85-alpha": {
866
+ "nbgv/3.5.104": {
902
867
  "type": "project",
903
868
  "serviceable": false,
904
869
  "sha512": ""
@@ -952,12 +917,12 @@
952
917
  "path": "microsoft.csharp/4.4.1",
953
918
  "hashPath": "microsoft.csharp.4.4.1.nupkg.sha512"
954
919
  },
955
- "Microsoft.DotNet.PlatformAbstractions/2.1.0": {
920
+ "Microsoft.DotNet.PlatformAbstractions/3.1.6": {
956
921
  "type": "package",
957
922
  "serviceable": true,
958
- "sha512": "sha512-9KPDwvb/hLEVXYruVHVZ8BkebC8j17DmPb56LnqRF74HqSPLjCkrlFUjOtFpQPA2DeADBRTI/e69aCfRBfrhxw==",
959
- "path": "microsoft.dotnet.platformabstractions/2.1.0",
960
- "hashPath": "microsoft.dotnet.platformabstractions.2.1.0.nupkg.sha512"
923
+ "sha512": "sha512-jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==",
924
+ "path": "microsoft.dotnet.platformabstractions/3.1.6",
925
+ "hashPath": "microsoft.dotnet.platformabstractions.3.1.6.nupkg.sha512"
961
926
  },
962
927
  "Microsoft.NETCore.Platforms/3.1.0": {
963
928
  "type": "package",
@@ -1120,20 +1085,6 @@
1120
1085
  "path": "nuget.versioning/5.11.0",
1121
1086
  "hashPath": "nuget.versioning.5.11.0.nupkg.sha512"
1122
1087
  },
1123
- "runtime.native.System/4.0.0": {
1124
- "type": "package",
1125
- "serviceable": true,
1126
- "sha512": "sha512-QfS/nQI7k/BLgmLrw7qm7YBoULEvgWnPI+cYsbfCVFTW8Aj+i8JhccxcFMu1RWms0YZzF+UHguNBK4Qn89e2Sg==",
1127
- "path": "runtime.native.system/4.0.0",
1128
- "hashPath": "runtime.native.system.4.0.0.nupkg.sha512"
1129
- },
1130
- "System.AppContext/4.1.0": {
1131
- "type": "package",
1132
- "serviceable": true,
1133
- "sha512": "sha512-3QjO4jNV7PdKkmQAVp9atA+usVnKRwI3Kx1nMwJ93T0LcQfx7pKAYk0nKz5wn1oP5iqlhZuy6RXOFdhr7rDwow==",
1134
- "path": "system.appcontext/4.1.0",
1135
- "hashPath": "system.appcontext.4.1.0.nupkg.sha512"
1136
- },
1137
1088
  "System.Collections/4.3.0": {
1138
1089
  "type": "package",
1139
1090
  "serviceable": true,
@@ -1344,13 +1295,6 @@
1344
1295
  "path": "system.runtime.interopservices/4.3.0",
1345
1296
  "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512"
1346
1297
  },
1347
- "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
1348
- "type": "package",
1349
- "serviceable": true,
1350
- "sha512": "sha512-hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng==",
1351
- "path": "system.runtime.interopservices.runtimeinformation/4.0.0",
1352
- "hashPath": "system.runtime.interopservices.runtimeinformation.4.0.0.nupkg.sha512"
1353
- },
1354
1298
  "System.Runtime.Serialization.Primitives/4.1.1": {
1355
1299
  "type": "package",
1356
1300
  "serviceable": true,
@@ -1484,12 +1428,12 @@
1484
1428
  "path": "system.xml.xdocument/4.0.11",
1485
1429
  "hashPath": "system.xml.xdocument.4.0.11.nupkg.sha512"
1486
1430
  },
1487
- "Validation/2.5.5-beta": {
1431
+ "Validation/2.5.51": {
1488
1432
  "type": "package",
1489
1433
  "serviceable": true,
1490
- "sha512": "sha512-gkn9Ie01C+APhcrlefSs74QNjy+kwI4N5FQxWX+2R/E4HqsF/IEDad6vHV/j3ujtZOthmZKcOrjxs+XwPxChlQ==",
1491
- "path": "validation/2.5.5-beta",
1492
- "hashPath": "validation.2.5.5-beta.nupkg.sha512"
1434
+ "sha512": "sha512-g/Aug7PVWaenlJ0QUyt/mEetngkQNsMCuNeRVXbcJED1nZS7JcK+GTU4kz3jcQ7bFuKfi8PF4ExXH7XSFNuSLQ==",
1435
+ "path": "validation/2.5.51",
1436
+ "hashPath": "validation.2.5.51.nupkg.sha512"
1493
1437
  },
1494
1438
  "Nerdbank.GitVersioning.Core/1.0.0": {
1495
1439
  "type": "project",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nerdbank-gitversioning",
3
- "version": "3.5.85-alpha",
3
+ "version": "3.5.104",
4
4
  "description": "Stamps your NPM packages with semver 2.0 compliant git commit specific version information.",
5
5
  "author": {
6
6
  "name": "Andrew Arnott",
@@ -25,19 +25,19 @@
25
25
  ],
26
26
  "devDependencies": {
27
27
  "@types/camel-case": "^1.2.1",
28
- "@types/node": "^13.11.0",
29
- "del": "^5.1.0",
28
+ "@types/node": "^17.0.30",
29
+ "del": "^6.0.0",
30
30
  "gulp": "^4.0.2",
31
- "gulp-cli": "^2.2.0",
32
- "gulp-sourcemaps": "2.6.5",
33
- "gulp-typescript": "^5.0.0",
31
+ "gulp-cli": "^2.3.0",
32
+ "gulp-sourcemaps": "3.0.0",
33
+ "gulp-typescript": "^5.0.1",
34
34
  "gulp-util": "^3.0.8",
35
- "merge2": "^1.3.0",
35
+ "merge2": "^1.4.1",
36
36
  "path": "^0.12.7",
37
- "typescript": "^3.3.1"
37
+ "typescript": "^4.6.4"
38
38
  },
39
39
  "dependencies": {
40
- "camel-case": "^4.1.1"
40
+ "camel-case": "^4.1.2"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "gulp"