@storm-software/git-tools 2.101.3 → 2.103.0

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/bin/git.js CHANGED
@@ -65313,6 +65313,7 @@ import childProcess from "node:child_process";
65313
65313
  // src/types.ts
65314
65314
  init_esm_shims();
65315
65315
  var DEFAULT_COMMIT_TYPES = {
65316
+ /* --- Bumps version when selected --- */
65316
65317
  chore: {
65317
65318
  description: "Other changes that don't modify src or test files",
65318
65319
  title: "Chore",
@@ -65323,36 +65324,16 @@ var DEFAULT_COMMIT_TYPES = {
65323
65324
  hidden: false
65324
65325
  }
65325
65326
  },
65326
- ci: {
65327
- description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
65328
- title: "Continuous Integration",
65329
- emoji: "\u{1F9F0} ",
65330
- semverBump: "patch",
65331
- changelog: {
65332
- title: "Continuous Integration",
65333
- hidden: false
65334
- }
65335
- },
65336
- deps: {
65337
- description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
65338
- title: "Dependencies",
65339
- emoji: "\u{1F4E6} ",
65327
+ fix: {
65328
+ description: "A change that resolves an issue previously identified with the package",
65329
+ title: "Bug Fix",
65330
+ emoji: "\u{1FAB2} ",
65340
65331
  semverBump: "patch",
65341
65332
  changelog: {
65342
- title: "Dependency Upgrades",
65333
+ title: "Bug Fixes",
65343
65334
  hidden: false
65344
65335
  }
65345
65336
  },
65346
- docs: {
65347
- description: "A change that only includes documentation updates",
65348
- title: "Documentation",
65349
- emoji: "\u{1F4DC} ",
65350
- semverBump: "none",
65351
- changelog: {
65352
- title: "Documentation",
65353
- hidden: true
65354
- }
65355
- },
65356
65337
  feat: {
65357
65338
  description: "A change that adds a new feature to the package",
65358
65339
  title: "Feature",
@@ -65363,23 +65344,13 @@ var DEFAULT_COMMIT_TYPES = {
65363
65344
  hidden: false
65364
65345
  }
65365
65346
  },
65366
- fix: {
65367
- description: "A change that resolves an issue previously identified with the package",
65368
- title: "Bug Fix",
65369
- emoji: "\u{1FAB2} ",
65347
+ ci: {
65348
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
65349
+ title: "Continuous Integration",
65350
+ emoji: "\u{1F9F0} ",
65370
65351
  semverBump: "patch",
65371
65352
  changelog: {
65372
- title: "Bug Fixes",
65373
- hidden: false
65374
- }
65375
- },
65376
- perf: {
65377
- description: "A code change that improves performance",
65378
- title: "Performance Improvement",
65379
- emoji: "\u23F1\uFE0F ",
65380
- semverBump: "none",
65381
- changelog: {
65382
- title: "Performance Improvements",
65353
+ title: "Continuous Integration",
65383
65354
  hidden: false
65384
65355
  }
65385
65356
  },
@@ -65389,27 +65360,38 @@ var DEFAULT_COMMIT_TYPES = {
65389
65360
  emoji: "\u{1F9EA} ",
65390
65361
  semverBump: "patch",
65391
65362
  changelog: {
65392
- title: "Code Improvements",
65363
+ title: "Source Code Improvements",
65393
65364
  hidden: false
65394
65365
  }
65395
65366
  },
65396
- revert: {
65397
- description: "Revert a previously committed change",
65398
- title: "Revert",
65399
- emoji: "\u{1F5D1}\uFE0F ",
65367
+ style: {
65368
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
65369
+ title: "Style Improvements",
65370
+ emoji: "\u{1F48E} ",
65400
65371
  semverBump: "patch",
65401
65372
  changelog: {
65402
- title: "Reverts",
65373
+ title: "Style Improvements",
65403
65374
  hidden: false
65404
65375
  }
65405
65376
  },
65406
- style: {
65407
- description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
65408
- title: "Styling",
65409
- emoji: "\u{1F48E} ",
65410
- semverBump: "minor",
65377
+ perf: {
65378
+ description: "A code change that improves performance",
65379
+ title: "Performance Improvement",
65380
+ emoji: "\u23F1\uFE0F ",
65381
+ semverBump: "patch",
65382
+ changelog: {
65383
+ title: "Performance Improvements",
65384
+ hidden: false
65385
+ }
65386
+ },
65387
+ /* --- Does not bump version when selected --- */
65388
+ docs: {
65389
+ description: "A change that only includes documentation updates",
65390
+ title: "Documentation",
65391
+ emoji: "\u{1F4DC} ",
65392
+ semverBump: "none",
65411
65393
  changelog: {
65412
- title: "Styling",
65394
+ title: "Documentation",
65413
65395
  hidden: false
65414
65396
  }
65415
65397
  },
@@ -65423,16 +65405,30 @@ var DEFAULT_COMMIT_TYPES = {
65423
65405
  hidden: true
65424
65406
  }
65425
65407
  },
65426
- types: {
65427
- description: "Changes that affect the project's type definitions",
65428
- title: "Type Definition",
65429
- emoji: "\u{1F4D3} ",
65430
- semverBump: "minor",
65408
+ /* --- Not included in commitlint but included in changelog --- */
65409
+ deps: {
65410
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
65411
+ title: "Dependencies",
65412
+ emoji: "\u{1F4E6} ",
65413
+ hidden: true,
65414
+ semverBump: "patch",
65431
65415
  changelog: {
65432
- title: "Type Definitions",
65416
+ title: "Dependency Upgrades",
65433
65417
  hidden: false
65434
65418
  }
65435
65419
  },
65420
+ /* --- Not included in commitlint or changelog --- */
65421
+ build: {
65422
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
65423
+ title: "Build",
65424
+ emoji: "\u{1F6E0} ",
65425
+ hidden: true,
65426
+ semverBump: "none",
65427
+ changelog: {
65428
+ title: "Build",
65429
+ hidden: true
65430
+ }
65431
+ },
65436
65432
  release: {
65437
65433
  description: "Publishing a commit containing a newly released version",
65438
65434
  title: "Publish Release",
@@ -65450,7 +65446,10 @@ var DEFAULT_COMMIT_QUESTIONS = {
65450
65446
  type: "select",
65451
65447
  title: "Commit Type",
65452
65448
  description: "Select the commit type that best describes your changes",
65453
- enum: DEFAULT_COMMIT_TYPES,
65449
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
65450
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
65451
+ return ret;
65452
+ }, {}),
65454
65453
  defaultValue: "chore",
65455
65454
  maxLength: 20,
65456
65455
  minLength: 3
@@ -80893,7 +80892,7 @@ import { createNxReleaseConfig, defaultCreateReleaseProvider, handleNxReleaseCon
80893
80892
  import { deepMergeJson } from "nx/src/command-line/release/config/deep-merge-json";
80894
80893
  import { filterReleaseGroups } from "nx/src/command-line/release/config/filter-release-groups";
80895
80894
  import { readRawVersionPlans, setResolvedVersionPlansOnGroups } from "nx/src/command-line/release/config/version-plans";
80896
- import { getCommitHash, getFirstGitCommit, getGitDiff, getLatestGitTagForPattern, gitAdd, gitPush, gitTag, parseCommits, parseGitCommit } from "nx/src/command-line/release/utils/git";
80895
+ import { getCommitHash, getFirstGitCommit, getGitDiff, getLatestGitTagForPattern, gitAdd, gitPush, parseCommits, parseGitCommit } from "nx/src/command-line/release/utils/git";
80897
80896
  import { createOrUpdateGithubRelease, getGitHubRepoData } from "nx/src/command-line/release/utils/github";
80898
80897
  import { launchEditor } from "nx/src/command-line/release/utils/launch-editor";
80899
80898
  import { printAndFlushChanges } from "nx/src/command-line/release/utils/print-changes";
@@ -80982,6 +80981,44 @@ function parseChangelogMarkdown(contents) {
80982
80981
  }
80983
80982
  __name(parseChangelogMarkdown, "parseChangelogMarkdown");
80984
80983
 
80984
+ // src/utilities/git-utils.ts
80985
+ init_esm_shims();
80986
+ import { execCommand } from "nx/src/command-line/release/utils/exec-command.js";
80987
+ async function gitTag({ tag, message: message2, additionalArgs, dryRun, verbose, logFn }) {
80988
+ logFn = logFn || console.log;
80989
+ const commandArgs = [
80990
+ "tag",
80991
+ // Create an annotated tag (recommended for releases here: https://git-scm.com/docs/git-tag)
80992
+ "--annotate",
80993
+ "--sign",
80994
+ tag,
80995
+ "--message",
80996
+ message2 || tag
80997
+ ];
80998
+ if (additionalArgs) {
80999
+ if (Array.isArray(additionalArgs)) {
81000
+ commandArgs.push(...additionalArgs);
81001
+ } else {
81002
+ commandArgs.push(...additionalArgs.split(" "));
81003
+ }
81004
+ }
81005
+ if (verbose) {
81006
+ logFn(dryRun ? `Would tag the current commit in git with the following command, but --dry-run was set:` : `Tagging the current commit in git with the following command:`);
81007
+ logFn(`git ${commandArgs.join(" ")}`);
81008
+ }
81009
+ if (dryRun) {
81010
+ return "";
81011
+ }
81012
+ try {
81013
+ return await execCommand("git", commandArgs);
81014
+ } catch (err) {
81015
+ throw new Error(`Unexpected error when creating tag ${tag}:
81016
+
81017
+ ${err}`);
81018
+ }
81019
+ }
81020
+ __name(gitTag, "gitTag");
81021
+
80985
81022
  // src/release/changelog-renderer.ts
80986
81023
  init_esm_shims();
80987
81024
 
@@ -85470,7 +85507,7 @@ function formatGithubReleaseNotes(releaseVersion2, content, projectName, workspa
85470
85507
  if (!workspaceConfig) {
85471
85508
  return content;
85472
85509
  }
85473
- return `![${titleCase(workspaceConfig.organization)}](${workspaceConfig.release.banner})
85510
+ return `![${titleCase(workspaceConfig.organization)?.replaceAll(" ", "-")}](${workspaceConfig.release.banner})
85474
85511
  ${workspaceConfig.release.header || ""}
85475
85512
 
85476
85513
  # ${projectName ? `${titleCase(projectName)} ` : ""}v${releaseVersion2.rawVersion}
@@ -85502,6 +85539,9 @@ var DEFAULT_RELEASE_GROUP_CONFIG = {
85502
85539
  projectsRelationship: "independent",
85503
85540
  releaseTagPattern: "{projectName}@{version}",
85504
85541
  changelog: {
85542
+ git: {
85543
+ tag: true
85544
+ },
85505
85545
  createRelease: "github",
85506
85546
  entryWhenNoChanges: false,
85507
85547
  file: "{projectRoot}/CHANGELOG.md",
@@ -85523,6 +85563,9 @@ var DEFAULT_RELEASE_GROUP_CONFIG = {
85523
85563
  var DEFAULT_RELEASE_CONFIG = {
85524
85564
  conventionalCommits: DEFAULT_CONVENTIONAL_COMMITS_CONFIG2,
85525
85565
  changelog: {
85566
+ git: {
85567
+ tag: true
85568
+ },
85526
85569
  automaticFromRef: true,
85527
85570
  workspaceChangelog: false,
85528
85571
  projectChangelogs: {
@@ -85557,7 +85600,7 @@ import { getGeneratorInformation } from "nx/src/command-line/generate/generator-
85557
85600
  import { createNxReleaseConfig as createNxReleaseConfig2, handleNxReleaseConfigError as handleNxReleaseConfigError2 } from "nx/src/command-line/release/config/config.js";
85558
85601
  import { filterReleaseGroups as filterReleaseGroups2 } from "nx/src/command-line/release/config/filter-release-groups.js";
85559
85602
  import { batchProjectsByGeneratorConfig } from "nx/src/command-line/release/utils/batch-projects-by-generator-config.js";
85560
- import { gitAdd as gitAdd2, gitTag as gitTag2 } from "nx/src/command-line/release/utils/git.js";
85603
+ import { gitAdd as gitAdd2 } from "nx/src/command-line/release/utils/git.js";
85561
85604
  import { printDiff } from "nx/src/command-line/release/utils/print-changes.js";
85562
85605
  import { resolveNxJsonConfigErrorMessage as resolveNxJsonConfigErrorMessage2 } from "nx/src/command-line/release/utils/resolve-nx-json-error-message.js";
85563
85606
  import { commitChanges as commitChanges2, createCommitMessageValues as createCommitMessageValues2, createGitTagValues as createGitTagValues2, handleDuplicateGitTags as handleDuplicateGitTags2 } from "nx/src/command-line/release/utils/shared.js";
@@ -85676,7 +85719,7 @@ async function releaseVersion(config, args) {
85676
85719
  if (args.gitTag ?? nxReleaseConfig?.version.git.tag) {
85677
85720
  writeInfo("Tagging commit with git", config);
85678
85721
  for (const tag of gitTagValues2) {
85679
- await gitTag2({
85722
+ await gitTag({
85680
85723
  tag,
85681
85724
  message: args.gitTagMessage || nxReleaseConfig?.version.git.tagMessage,
85682
85725
  additionalArgs: args.gitTagArgs || nxReleaseConfig?.version.git.tagArgs,
@@ -85771,7 +85814,7 @@ async function releaseVersion(config, args) {
85771
85814
  if (args.gitTag ?? nxReleaseConfig?.version.git.tag) {
85772
85815
  writeInfo("Tagging commit with git", config);
85773
85816
  for (const tag of gitTagValues) {
85774
- await gitTag2({
85817
+ await gitTag({
85775
85818
  tag,
85776
85819
  message: args.gitTagMessage || nxReleaseConfig?.version.git.tagMessage,
85777
85820
  additionalArgs: args.gitTagArgs || nxReleaseConfig?.version.git.tagArgs,
@@ -85928,7 +85971,6 @@ var runRelease = /* @__PURE__ */ __name(async (config, options) => {
85928
85971
  deleteVersionPlans: false,
85929
85972
  stageChanges: true,
85930
85973
  gitCommit: false,
85931
- gitTag: false,
85932
85974
  nxReleaseConfig
85933
85975
  });
85934
85976
  await releaseChangelog({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_COMMIT_QUESTIONS,
3
3
  DEFAULT_COMMIT_TYPES
4
- } from "./chunk-WEKKNQBE.js";
4
+ } from "./chunk-TFEV2FZY.js";
5
5
 
6
6
  // src/release/config.ts
7
7
  var DEFAULT_CONVENTIONAL_COMMITS_CONFIG = {
@@ -12,6 +12,9 @@ var DEFAULT_RELEASE_GROUP_CONFIG = {
12
12
  projectsRelationship: "independent",
13
13
  releaseTagPattern: "{projectName}@{version}",
14
14
  changelog: {
15
+ git: {
16
+ tag: true
17
+ },
15
18
  createRelease: "github",
16
19
  entryWhenNoChanges: false,
17
20
  file: "{projectRoot}/CHANGELOG.md",
@@ -33,6 +36,9 @@ var DEFAULT_RELEASE_GROUP_CONFIG = {
33
36
  var DEFAULT_RELEASE_CONFIG = {
34
37
  conventionalCommits: DEFAULT_CONVENTIONAL_COMMITS_CONFIG,
35
38
  changelog: {
39
+ git: {
40
+ tag: true
41
+ },
36
42
  automaticFromRef: true,
37
43
  workspaceChangelog: false,
38
44
  projectChangelogs: {
@@ -3,6 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/types.ts
5
5
  var DEFAULT_COMMIT_TYPES = {
6
+ /* --- Bumps version when selected --- */
6
7
  chore: {
7
8
  description: "Other changes that don't modify src or test files",
8
9
  title: "Chore",
@@ -13,36 +14,16 @@ var DEFAULT_COMMIT_TYPES = {
13
14
  hidden: false
14
15
  }
15
16
  },
16
- ci: {
17
- description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
18
- title: "Continuous Integration",
19
- emoji: "\u{1F9F0} ",
20
- semverBump: "patch",
21
- changelog: {
22
- title: "Continuous Integration",
23
- hidden: false
24
- }
25
- },
26
- deps: {
27
- description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
28
- title: "Dependencies",
29
- emoji: "\u{1F4E6} ",
17
+ fix: {
18
+ description: "A change that resolves an issue previously identified with the package",
19
+ title: "Bug Fix",
20
+ emoji: "\u{1FAB2} ",
30
21
  semverBump: "patch",
31
22
  changelog: {
32
- title: "Dependency Upgrades",
23
+ title: "Bug Fixes",
33
24
  hidden: false
34
25
  }
35
26
  },
36
- docs: {
37
- description: "A change that only includes documentation updates",
38
- title: "Documentation",
39
- emoji: "\u{1F4DC} ",
40
- semverBump: "none",
41
- changelog: {
42
- title: "Documentation",
43
- hidden: true
44
- }
45
- },
46
27
  feat: {
47
28
  description: "A change that adds a new feature to the package",
48
29
  title: "Feature",
@@ -53,23 +34,13 @@ var DEFAULT_COMMIT_TYPES = {
53
34
  hidden: false
54
35
  }
55
36
  },
56
- fix: {
57
- description: "A change that resolves an issue previously identified with the package",
58
- title: "Bug Fix",
59
- emoji: "\u{1FAB2} ",
37
+ ci: {
38
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
39
+ title: "Continuous Integration",
40
+ emoji: "\u{1F9F0} ",
60
41
  semverBump: "patch",
61
42
  changelog: {
62
- title: "Bug Fixes",
63
- hidden: false
64
- }
65
- },
66
- perf: {
67
- description: "A code change that improves performance",
68
- title: "Performance Improvement",
69
- emoji: "\u23F1\uFE0F ",
70
- semverBump: "none",
71
- changelog: {
72
- title: "Performance Improvements",
43
+ title: "Continuous Integration",
73
44
  hidden: false
74
45
  }
75
46
  },
@@ -79,27 +50,38 @@ var DEFAULT_COMMIT_TYPES = {
79
50
  emoji: "\u{1F9EA} ",
80
51
  semverBump: "patch",
81
52
  changelog: {
82
- title: "Code Improvements",
53
+ title: "Source Code Improvements",
83
54
  hidden: false
84
55
  }
85
56
  },
86
- revert: {
87
- description: "Revert a previously committed change",
88
- title: "Revert",
89
- emoji: "\u{1F5D1}\uFE0F ",
57
+ style: {
58
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
59
+ title: "Style Improvements",
60
+ emoji: "\u{1F48E} ",
90
61
  semverBump: "patch",
91
62
  changelog: {
92
- title: "Reverts",
63
+ title: "Style Improvements",
93
64
  hidden: false
94
65
  }
95
66
  },
96
- style: {
97
- description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
98
- title: "Styling",
99
- emoji: "\u{1F48E} ",
100
- semverBump: "minor",
67
+ perf: {
68
+ description: "A code change that improves performance",
69
+ title: "Performance Improvement",
70
+ emoji: "\u23F1\uFE0F ",
71
+ semverBump: "patch",
101
72
  changelog: {
102
- title: "Styling",
73
+ title: "Performance Improvements",
74
+ hidden: false
75
+ }
76
+ },
77
+ /* --- Does not bump version when selected --- */
78
+ docs: {
79
+ description: "A change that only includes documentation updates",
80
+ title: "Documentation",
81
+ emoji: "\u{1F4DC} ",
82
+ semverBump: "none",
83
+ changelog: {
84
+ title: "Documentation",
103
85
  hidden: false
104
86
  }
105
87
  },
@@ -113,16 +95,30 @@ var DEFAULT_COMMIT_TYPES = {
113
95
  hidden: true
114
96
  }
115
97
  },
116
- types: {
117
- description: "Changes that affect the project's type definitions",
118
- title: "Type Definition",
119
- emoji: "\u{1F4D3} ",
120
- semverBump: "minor",
98
+ /* --- Not included in commitlint but included in changelog --- */
99
+ deps: {
100
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
101
+ title: "Dependencies",
102
+ emoji: "\u{1F4E6} ",
103
+ hidden: true,
104
+ semverBump: "patch",
121
105
  changelog: {
122
- title: "Type Definitions",
106
+ title: "Dependency Upgrades",
123
107
  hidden: false
124
108
  }
125
109
  },
110
+ /* --- Not included in commitlint or changelog --- */
111
+ build: {
112
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
113
+ title: "Build",
114
+ emoji: "\u{1F6E0} ",
115
+ hidden: true,
116
+ semverBump: "none",
117
+ changelog: {
118
+ title: "Build",
119
+ hidden: true
120
+ }
121
+ },
126
122
  release: {
127
123
  description: "Publishing a commit containing a newly released version",
128
124
  title: "Publish Release",
@@ -140,7 +136,10 @@ var DEFAULT_COMMIT_QUESTIONS = {
140
136
  type: "select",
141
137
  title: "Commit Type",
142
138
  description: "Select the commit type that best describes your changes",
143
- enum: DEFAULT_COMMIT_TYPES,
139
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
140
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
141
+ return ret;
142
+ }, {}),
144
143
  defaultValue: "chore",
145
144
  maxLength: 20,
146
145
  minLength: 3
@@ -3,6 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/types.ts
5
5
  var DEFAULT_COMMIT_TYPES = {
6
+ /* --- Bumps version when selected --- */
6
7
  chore: {
7
8
  description: "Other changes that don't modify src or test files",
8
9
  title: "Chore",
@@ -13,36 +14,16 @@ var DEFAULT_COMMIT_TYPES = {
13
14
  hidden: false
14
15
  }
15
16
  },
16
- ci: {
17
- description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
18
- title: "Continuous Integration",
19
- emoji: "\u{1F9F0} ",
20
- semverBump: "patch",
21
- changelog: {
22
- title: "Continuous Integration",
23
- hidden: false
24
- }
25
- },
26
- deps: {
27
- description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
28
- title: "Dependencies",
29
- emoji: "\u{1F4E6} ",
17
+ fix: {
18
+ description: "A change that resolves an issue previously identified with the package",
19
+ title: "Bug Fix",
20
+ emoji: "\u{1FAB2} ",
30
21
  semverBump: "patch",
31
22
  changelog: {
32
- title: "Dependency Upgrades",
23
+ title: "Bug Fixes",
33
24
  hidden: false
34
25
  }
35
26
  },
36
- docs: {
37
- description: "A change that only includes documentation updates",
38
- title: "Documentation",
39
- emoji: "\u{1F4DC} ",
40
- semverBump: "none",
41
- changelog: {
42
- title: "Documentation",
43
- hidden: true
44
- }
45
- },
46
27
  feat: {
47
28
  description: "A change that adds a new feature to the package",
48
29
  title: "Feature",
@@ -53,23 +34,13 @@ var DEFAULT_COMMIT_TYPES = {
53
34
  hidden: false
54
35
  }
55
36
  },
56
- fix: {
57
- description: "A change that resolves an issue previously identified with the package",
58
- title: "Bug Fix",
59
- emoji: "\u{1FAB2} ",
37
+ ci: {
38
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
39
+ title: "Continuous Integration",
40
+ emoji: "\u{1F9F0} ",
60
41
  semverBump: "patch",
61
42
  changelog: {
62
- title: "Bug Fixes",
63
- hidden: false
64
- }
65
- },
66
- perf: {
67
- description: "A code change that improves performance",
68
- title: "Performance Improvement",
69
- emoji: "\u23F1\uFE0F ",
70
- semverBump: "none",
71
- changelog: {
72
- title: "Performance Improvements",
43
+ title: "Continuous Integration",
73
44
  hidden: false
74
45
  }
75
46
  },
@@ -79,27 +50,38 @@ var DEFAULT_COMMIT_TYPES = {
79
50
  emoji: "\u{1F9EA} ",
80
51
  semverBump: "patch",
81
52
  changelog: {
82
- title: "Code Improvements",
53
+ title: "Source Code Improvements",
83
54
  hidden: false
84
55
  }
85
56
  },
86
- revert: {
87
- description: "Revert a previously committed change",
88
- title: "Revert",
89
- emoji: "\u{1F5D1}\uFE0F ",
57
+ style: {
58
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
59
+ title: "Style Improvements",
60
+ emoji: "\u{1F48E} ",
90
61
  semverBump: "patch",
91
62
  changelog: {
92
- title: "Reverts",
63
+ title: "Style Improvements",
93
64
  hidden: false
94
65
  }
95
66
  },
96
- style: {
97
- description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
98
- title: "Styling",
99
- emoji: "\u{1F48E} ",
100
- semverBump: "minor",
67
+ perf: {
68
+ description: "A code change that improves performance",
69
+ title: "Performance Improvement",
70
+ emoji: "\u23F1\uFE0F ",
71
+ semverBump: "patch",
101
72
  changelog: {
102
- title: "Styling",
73
+ title: "Performance Improvements",
74
+ hidden: false
75
+ }
76
+ },
77
+ /* --- Does not bump version when selected --- */
78
+ docs: {
79
+ description: "A change that only includes documentation updates",
80
+ title: "Documentation",
81
+ emoji: "\u{1F4DC} ",
82
+ semverBump: "none",
83
+ changelog: {
84
+ title: "Documentation",
103
85
  hidden: false
104
86
  }
105
87
  },
@@ -113,16 +95,30 @@ var DEFAULT_COMMIT_TYPES = {
113
95
  hidden: true
114
96
  }
115
97
  },
116
- types: {
117
- description: "Changes that affect the project's type definitions",
118
- title: "Type Definition",
119
- emoji: "\u{1F4D3} ",
120
- semverBump: "minor",
98
+ /* --- Not included in commitlint but included in changelog --- */
99
+ deps: {
100
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
101
+ title: "Dependencies",
102
+ emoji: "\u{1F4E6} ",
103
+ hidden: true,
104
+ semverBump: "patch",
121
105
  changelog: {
122
- title: "Type Definitions",
106
+ title: "Dependency Upgrades",
123
107
  hidden: false
124
108
  }
125
109
  },
110
+ /* --- Not included in commitlint or changelog --- */
111
+ build: {
112
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
113
+ title: "Build",
114
+ emoji: "\u{1F6E0} ",
115
+ hidden: true,
116
+ semverBump: "none",
117
+ changelog: {
118
+ title: "Build",
119
+ hidden: true
120
+ }
121
+ },
126
122
  release: {
127
123
  description: "Publishing a commit containing a newly released version",
128
124
  title: "Publish Release",
@@ -140,7 +136,10 @@ var DEFAULT_COMMIT_QUESTIONS = {
140
136
  type: "select",
141
137
  title: "Commit Type",
142
138
  description: "Select the commit type that best describes your changes",
143
- enum: DEFAULT_COMMIT_TYPES,
139
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
140
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
141
+ return ret;
142
+ }, {}),
144
143
  defaultValue: "chore",
145
144
  maxLength: 20,
146
145
  minLength: 3