@carbon/cli 11.30.0 → 11.32.0-rc.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/cli",
3
3
  "description": "Task automation for working with the Carbon Design System",
4
- "version": "11.30.0",
4
+ "version": "11.32.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
7
7
  "carbon-cli": "./bin/carbon-cli.js"
@@ -32,7 +32,7 @@
32
32
  "@ibm/telemetry-js": "^1.5.0",
33
33
  "@octokit/plugin-retry": "^3.0.7",
34
34
  "@octokit/plugin-throttling": "^4.0.0",
35
- "@octokit/rest": "^19.0.0",
35
+ "@octokit/rest": "^22.0.0",
36
36
  "@rollup/plugin-babel": "^6.0.0",
37
37
  "@rollup/plugin-commonjs": "^28.0.3",
38
38
  "@rollup/plugin-node-resolve": "^15.0.0",
@@ -47,7 +47,7 @@
47
47
  "klaw-sync": "^6.0.0",
48
48
  "lodash.template": "^4.5.0",
49
49
  "prettier": "^3.3.3",
50
- "prettier-config-carbon": "^0.11.0",
50
+ "prettier-config-carbon": "^0.12.0",
51
51
  "progress-estimator": "^0.3.0",
52
52
  "remark": "^10.0.1",
53
53
  "replace-in-file": "^7.0.0",
@@ -56,5 +56,5 @@
56
56
  "typescript-config-carbon": "^0.5.0",
57
57
  "yargs": "^17.0.1"
58
58
  },
59
- "gitHead": "cb7123ed19a2c216e5b9774e58c12af68407abd3"
59
+ "gitHead": "babd7a9692f8c0595b67877417d7ebf915e19b20"
60
60
  }
@@ -23,31 +23,45 @@ const logger = createLogger('changelog');
23
23
  * v10.5.1..master or v10.5.0..v10.5.1
24
24
  * @returns {void}
25
25
  */
26
- async function changelog({ range }) {
27
- displayBanner();
28
-
29
- logger.start('Fetching latest git information from upstream');
26
+ async function changelog({ range, noPrompt = false }) {
27
+ if (!noPrompt) {
28
+ displayBanner();
29
+ logger.start('Fetching latest git information from upstream');
30
+ }
30
31
  await fetchLatestFromUpstream();
31
- logger.stop();
32
+ if (!noPrompt) {
33
+ logger.stop();
34
+ }
32
35
 
33
- logger.start('Getting a list of all packages in the project');
36
+ if (!noPrompt) {
37
+ logger.start('Getting a list of all packages in the project');
38
+ }
34
39
  const packages = await getPackages();
35
- logger.stop();
40
+ if (!noPrompt) {
41
+ logger.stop();
42
+ }
36
43
 
37
44
  const [lastTag, tag] = range.split('..');
38
- logger.start(`Generating a changelog for range: ${range}`);
45
+ if (!noPrompt) {
46
+ logger.start(`Generating a changelog for range: ${range}`);
47
+ }
39
48
  const changelog = await generate(packages, lastTag, tag);
40
- logger.stop();
49
+ if (!noPrompt) {
50
+ logger.stop();
51
+ }
41
52
 
42
- const { copy } = await prompt([
43
- {
44
- type: 'confirm',
45
- name: 'copy',
46
- message: 'Would you like to copy the changelog to your clipboard?',
47
- },
48
- ]);
53
+ let response;
54
+ if (!noPrompt) {
55
+ response = await prompt([
56
+ {
57
+ type: 'confirm',
58
+ name: 'copy',
59
+ message: 'Would you like to copy the changelog to your clipboard?',
60
+ },
61
+ ]);
62
+ }
49
63
 
50
- if (copy) {
64
+ if (response?.copy) {
51
65
  clipboard.writeSync(changelog);
52
66
  console.log('Done!');
53
67
  } else {
@@ -63,6 +77,13 @@ module.exports = {
63
77
  describe: 'the git tag range to generate a changelog for',
64
78
  type: 'string',
65
79
  });
80
+ yargs.options({
81
+ n: {
82
+ alias: 'noPrompt',
83
+ describe: 'disables copy to clipboard prompt',
84
+ type: 'boolean',
85
+ },
86
+ });
66
87
  },
67
88
  handler: changelog,
68
89
  };