@atlaskit/dependency-version-analytics 0.4.1 → 1.0.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/cli.js +4 -18
  3. package/dist/cjs/commands/populate-historic-data/index.js +0 -3
  4. package/dist/cjs/commands/populate-historic-data/lib/dependency-store.js +24 -141
  5. package/dist/cjs/commands/populate-historic-data/package.js +3 -27
  6. package/dist/cjs/commands/populate-historic-data/product.js +15 -88
  7. package/dist/cjs/commands/populate-historic-data/util/generate-csv.js +4 -16
  8. package/dist/cjs/index.js +0 -2
  9. package/dist/cjs/util/analytics.js +0 -38
  10. package/dist/cjs/util/assert.js +0 -1
  11. package/dist/cjs/util/env-with-guard.js +0 -2
  12. package/dist/cjs/util/get-file-history-from-git.js +0 -5
  13. package/dist/cjs/util/get-package-version-history.js +0 -6
  14. package/dist/cjs/util/git.js +20 -58
  15. package/dist/cjs/util/statlas.js +0 -25
  16. package/dist/cjs/util/yarn.js +0 -32
  17. package/dist/cjs/version.json +1 -1
  18. package/dist/es2019/cli.js +4 -8
  19. package/dist/es2019/commands/populate-historic-data/lib/dependency-store.js +24 -73
  20. package/dist/es2019/commands/populate-historic-data/package.js +0 -8
  21. package/dist/es2019/commands/populate-historic-data/product.js +4 -22
  22. package/dist/es2019/commands/populate-historic-data/util/generate-csv.js +2 -9
  23. package/dist/es2019/util/analytics.js +4 -19
  24. package/dist/es2019/util/env-with-guard.js +0 -1
  25. package/dist/es2019/util/get-file-history-from-git.js +2 -3
  26. package/dist/es2019/util/get-package-version-history.js +0 -4
  27. package/dist/es2019/util/git.js +29 -24
  28. package/dist/es2019/util/statlas.js +0 -6
  29. package/dist/es2019/util/yarn.js +2 -11
  30. package/dist/es2019/version.json +1 -1
  31. package/dist/esm/cli.js +6 -12
  32. package/dist/esm/commands/populate-historic-data/lib/dependency-store.js +27 -131
  33. package/dist/esm/commands/populate-historic-data/package.js +3 -20
  34. package/dist/esm/commands/populate-historic-data/product.js +15 -72
  35. package/dist/esm/commands/populate-historic-data/util/generate-csv.js +4 -13
  36. package/dist/esm/util/analytics.js +2 -28
  37. package/dist/esm/util/env-with-guard.js +0 -1
  38. package/dist/esm/util/get-file-history-from-git.js +2 -3
  39. package/dist/esm/util/get-package-version-history.js +0 -4
  40. package/dist/esm/util/git.js +21 -50
  41. package/dist/esm/util/statlas.js +0 -19
  42. package/dist/esm/util/yarn.js +0 -19
  43. package/dist/esm/version.json +1 -1
  44. package/package.json +4 -4
  45. package/report.api.md +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/dependency-version-analytics
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`7913f15625c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7913f15625c) - Upgraded @atlassiansox/analytics-node-client from 2.2.1 to 3.2.1
8
+
9
+ ## 0.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`f7f61c05062`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f7f61c05062) - The 'debug' dependency was updated from 2.2 to 4.3.4
14
+
3
15
  ## 0.4.1
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/cli.js CHANGED
@@ -1,24 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.run = run;
9
-
10
8
  var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
11
-
12
9
  var _chalk = _interopRequireDefault(require("chalk"));
13
-
14
10
  var _meow = _interopRequireDefault(require("meow"));
15
-
16
11
  var _populateHistoricData = require("./commands/populate-historic-data");
17
-
18
12
  /// <reference lib="es2017.object" />
13
+
19
14
  // prettier-ignore
20
15
  var HELP_MSG = "\n".concat(_chalk.default.green('Global options'), "\n ").concat(_chalk.default.yellow('--dev'), " Send analytics to dev analytics pipeline instead of prod\n ").concat(_chalk.default.yellow('--dryRun'), " Performs a dry run, prints analytics events to console in JSON format instead of sending them\n ").concat(_chalk.default.yellow('--limit'), " Limit the number of events sent, used for validation purposes\n ").concat(_chalk.default.yellow('--no-interactive'), " Disable any interactive prompts\n\n").concat(_chalk.default.yellow.bold('[populate-product] <product>'), "\n Sends analytics events for atlaskit dependency versions changes in package.json.\n\n Detects changes since the last time the tool was run by storing the last run in either statlas (--statlas flag) or using the\n 'atlaskit-dependency-version-analytics-last-run' git tag.\n If running the tool for the first time (last run does not exist), --reset must be used to detect changes since the beginning of the repo.\n\n ").concat(_chalk.default.green('Options'), "\n ").concat(_chalk.default.yellow('--csv'), " Prints AK dependency history in CSV format\n ").concat(_chalk.default.yellow('--reset'), " Reset change detection to detect changes from the beginning of time\n ").concat(_chalk.default.yellow('--tag'), " Specify a different tag to mark when the tool was last run\n ").concat(_chalk.default.yellow('--statlas'), " Use statlas rather than git tags for storing and sourcing last run info\n\n ").concat(_chalk.default.green('Examples'), "\n ").concat(_chalk.default.dim('$ atlaskit-version-analytics populate-product jira'), "\n\n").concat(_chalk.default.yellow.bold('[populate-package] <package>'), "\n Sends analytics events for published versions of the specified atlaskit package.\n\n ").concat(_chalk.default.green('Options'), "\n ").concat(_chalk.default.yellow('--since'), " Only publish versions since the following JS date string (exclusive)\n\n ").concat(_chalk.default.green('Examples'), "\n ").concat(_chalk.default.dim('$ atlaskit-version-analytics populate-package @atlaskit/button'), "\n");
21
-
22
16
  function run(_ref) {
23
17
  var dev = _ref.dev;
24
18
  var cli = (0, _meow.default)(HELP_MSG, {
@@ -54,21 +48,16 @@ function run(_ref) {
54
48
  }
55
49
  }
56
50
  });
57
-
58
51
  var _cli$input = (0, _toArray2.default)(cli.input),
59
- command = _cli$input[0],
60
- inputs = _cli$input.slice(1);
61
-
52
+ command = _cli$input[0],
53
+ inputs = _cli$input.slice(1);
62
54
  var limit = cli.flags.limit != null ? +cli.flags.limit : undefined;
63
-
64
55
  if (command === 'populate-product') {
65
56
  var product = inputs[0];
66
-
67
57
  if (!product) {
68
58
  console.error(_chalk.default.red('Must pass a product parameter'));
69
59
  process.exit(1);
70
60
  }
71
-
72
61
  return (0, _populateHistoricData.populateProduct)({
73
62
  csv: cli.flags.csv || false,
74
63
  dev: dev || cli.flags.dev || false,
@@ -82,12 +71,10 @@ function run(_ref) {
82
71
  });
83
72
  } else if (command === 'populate-package') {
84
73
  var pkg = inputs[0];
85
-
86
74
  if (!pkg) {
87
75
  console.error(_chalk.default.red('Must pass a package parameter'));
88
76
  process.exit(1);
89
77
  }
90
-
91
78
  return (0, _populateHistoricData.populatePackage)({
92
79
  dev: dev || cli.flags.dev || false,
93
80
  dryRun: cli.flags.dryRun || false,
@@ -97,8 +84,7 @@ function run(_ref) {
97
84
  since: cli.flags.since
98
85
  });
99
86
  }
100
- /* eslint-disable no-console */
101
-
102
87
 
88
+ /* eslint-disable no-console */
103
89
  return Promise.resolve(console.log(cli.help));
104
90
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -17,7 +16,5 @@ Object.defineProperty(exports, "populateProduct", {
17
16
  return _product.default;
18
17
  }
19
18
  });
20
-
21
19
  var _product = _interopRequireDefault(require("./product"));
22
-
23
20
  var _package = _interopRequireDefault(require("./package"));