@atlaskit/dependency-version-analytics 1.6.3 → 1.6.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/dependency-version-analytics
2
2
 
3
+ ## 1.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#68766](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68766) [`da0d4d88ccc6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da0d4d88ccc6) - added logs to debug issue related to UPMI-247
8
+
3
9
  ## 1.6.3
4
10
 
5
11
  ### Patch Changes
@@ -104,11 +104,14 @@ async function getSinceRef(flags) {
104
104
  }
105
105
  }
106
106
  async function populateProduct(flags) {
107
+ console.log('running populateProduct with flags: ', flags);
107
108
  if (flags.cwd) {
108
109
  process.chdir(flags.cwd);
109
110
  }
110
111
  const sinceRef = flags.reset ? undefined : await getSinceRef(flags);
112
+ console.log('sinceRef: ', sinceRef);
111
113
  const log = await (0, _git.getChangesSince)(sinceRef);
114
+ console.log('log: ', log);
112
115
  const supportedScopes = (0, _allowedScopes.getSupportedScopes)(flags.includeRestrictedScopes);
113
116
  const supportedPackages = flags.supportedPackages ? JSON.parse(flags.supportedPackages) : [];
114
117
  console.log(`Supported packages ${supportedPackages.length} and scopes ${supportedScopes}`);
@@ -67,7 +67,7 @@ function createUpgradeEvent(name, version, previousVersion, date, optionalEventA
67
67
  }
68
68
  });
69
69
  return {
70
- cliVersion: "1.6.3",
70
+ cliVersion: "1.6.4",
71
71
  dependencyName: name,
72
72
  versionString: eventVersion,
73
73
  major: parsedVersion ? `${parsedVersion.major}` : null,
@@ -15,7 +15,7 @@ var _simpleGit = _interopRequireDefault(require("simple-git"));
15
15
  var _assert = require("./assert");
16
16
  async function getChangesSince(since) {
17
17
  const revisionRange = since ? [`${since}..`] : [];
18
- const listLogSummary = await (0, _simpleGit.default)().log([
18
+ const logArgument = [
19
19
  // Only commits on mainline master
20
20
  '--first-parent',
21
21
  // Show merge commit contents
@@ -27,7 +27,10 @@ async function getChangesSince(since) {
27
27
  // Make +- graph width as small as possible to maximise filename length
28
28
  '--stat-graph-width=1', ...revisionRange,
29
29
  // Any commit that modifies a package.json in any directory
30
- ':(glob)**/package.json']);
30
+ ':(glob)**/package.json'];
31
+ console.log('logArgument: ', logArgument);
32
+ const listLogSummary = await (0, _simpleGit.default)().log(logArgument);
33
+ console.log('listLogSummary: ', listLogSummary);
31
34
  return {
32
35
  ...listLogSummary,
33
36
  all: listLogSummary.all.map(logLine => parseLogLine(logLine))
@@ -95,11 +95,14 @@ async function getSinceRef(flags) {
95
95
  }
96
96
  }
97
97
  export default async function populateProduct(flags) {
98
+ console.log('running populateProduct with flags: ', flags);
98
99
  if (flags.cwd) {
99
100
  process.chdir(flags.cwd);
100
101
  }
101
102
  const sinceRef = flags.reset ? undefined : await getSinceRef(flags);
103
+ console.log('sinceRef: ', sinceRef);
102
104
  const log = await getChangesSince(sinceRef);
105
+ console.log('log: ', log);
103
106
  const supportedScopes = getSupportedScopes(flags.includeRestrictedScopes);
104
107
  const supportedPackages = flags.supportedPackages ? JSON.parse(flags.supportedPackages) : [];
105
108
  console.log(`Supported packages ${supportedPackages.length} and scopes ${supportedScopes}`);
@@ -59,7 +59,7 @@ export function createUpgradeEvent(name, version, previousVersion, date, optiona
59
59
  }
60
60
  });
61
61
  return {
62
- cliVersion: "1.6.3",
62
+ cliVersion: "1.6.4",
63
63
  dependencyName: name,
64
64
  versionString: eventVersion,
65
65
  major: parsedVersion ? `${parsedVersion.major}` : null,
@@ -2,7 +2,7 @@ import git from 'simple-git';
2
2
  import { assert } from './assert';
3
3
  export async function getChangesSince(since) {
4
4
  const revisionRange = since ? [`${since}..`] : [];
5
- const listLogSummary = await git().log([
5
+ const logArgument = [
6
6
  // Only commits on mainline master
7
7
  '--first-parent',
8
8
  // Show merge commit contents
@@ -14,7 +14,10 @@ export async function getChangesSince(since) {
14
14
  // Make +- graph width as small as possible to maximise filename length
15
15
  '--stat-graph-width=1', ...revisionRange,
16
16
  // Any commit that modifies a package.json in any directory
17
- ':(glob)**/package.json']);
17
+ ':(glob)**/package.json'];
18
+ console.log('logArgument: ', logArgument);
19
+ const listLogSummary = await git().log(logArgument);
20
+ console.log('listLogSummary: ', listLogSummary);
18
21
  return {
19
22
  ...listLogSummary,
20
23
  all: listLogSummary.all.map(logLine => parseLogLine(logLine))
@@ -182,42 +182,45 @@ function _populateProduct() {
182
182
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
183
183
  while (1) switch (_context3.prev = _context3.next) {
184
184
  case 0:
185
+ console.log('running populateProduct with flags: ', flags);
185
186
  if (flags.cwd) {
186
187
  process.chdir(flags.cwd);
187
188
  }
188
189
  if (!flags.reset) {
189
- _context3.next = 5;
190
+ _context3.next = 6;
190
191
  break;
191
192
  }
192
193
  _context3.t0 = undefined;
193
- _context3.next = 8;
194
+ _context3.next = 9;
194
195
  break;
195
- case 5:
196
- _context3.next = 7;
196
+ case 6:
197
+ _context3.next = 8;
197
198
  return getSinceRef(flags);
198
- case 7:
199
- _context3.t0 = _context3.sent;
200
199
  case 8:
200
+ _context3.t0 = _context3.sent;
201
+ case 9:
201
202
  sinceRef = _context3.t0;
202
- _context3.next = 11;
203
+ console.log('sinceRef: ', sinceRef);
204
+ _context3.next = 13;
203
205
  return getChangesSince(sinceRef);
204
- case 11:
206
+ case 13:
205
207
  log = _context3.sent;
208
+ console.log('log: ', log);
206
209
  supportedScopes = getSupportedScopes(flags.includeRestrictedScopes);
207
210
  supportedPackages = flags.supportedPackages ? JSON.parse(flags.supportedPackages) : [];
208
211
  console.log("Supported packages ".concat(supportedPackages.length, " and scopes ").concat(supportedScopes));
209
212
  if (!(log.all.length === 0)) {
210
- _context3.next = 18;
213
+ _context3.next = 21;
211
214
  break;
212
215
  }
213
216
  console.log("No package.json changes found since '".concat(sinceRef, "'."));
214
217
  return _context3.abrupt("return");
215
- case 18:
216
- _context3.next = 20;
218
+ case 21:
219
+ _context3.next = 23;
217
220
  return getEventsFromHistory(log, sinceRef, {
218
221
  subWorkDir: flags.subWorkDir
219
222
  }, supportedScopes, supportedPackages);
220
- case 20:
223
+ case 23:
221
224
  _yield$getEventsFromH = _context3.sent;
222
225
  allPackageChanges = _yield$getEventsFromH.allPackageChanges;
223
226
  allUpgradeEvents = _yield$getEventsFromH.allUpgradeEvents;
@@ -225,53 +228,53 @@ function _populateProduct() {
225
228
  console.log("Found no dependency changes from supported scopes ".concat(supportedScopes.join(', '), " since last run from ref \"").concat(sinceRef, "\"'"));
226
229
  }
227
230
  if (!flags.csv) {
228
- _context3.next = 28;
231
+ _context3.next = 31;
229
232
  break;
230
233
  }
231
234
  csv = generateCSV(allPackageChanges);
232
235
  console.log('Generated csv: ', csv);
233
236
  return _context3.abrupt("return");
234
- case 28:
237
+ case 31:
235
238
  if (!flags.dryRun) {
236
- _context3.next = 31;
239
+ _context3.next = 34;
237
240
  break;
238
241
  }
239
242
  console.log('All upgrade events: ', JSON.stringify(allUpgradeEvents));
240
243
  return _context3.abrupt("return");
241
- case 31:
244
+ case 34:
242
245
  if (!(allUpgradeEvents.length > 0)) {
243
- _context3.next = 34;
246
+ _context3.next = 37;
244
247
  break;
245
248
  }
246
- _context3.next = 34;
249
+ _context3.next = 37;
247
250
  return sendAnalytics(allUpgradeEvents, {
248
251
  dev: flags.dev,
249
252
  limit: flags.limit,
250
253
  product: flags.product,
251
254
  skipPrompt: !flags.interactive
252
255
  });
253
- case 34:
256
+ case 37:
254
257
  if (!flags.statlas) {
255
- _context3.next = 43;
258
+ _context3.next = 46;
256
259
  break;
257
260
  }
258
- _context3.next = 37;
261
+ _context3.next = 40;
259
262
  return getHash('HEAD');
260
- case 37:
263
+ case 40:
261
264
  currentCommit = _context3.sent;
262
- _context3.next = 40;
265
+ _context3.next = 43;
263
266
  return statlas.uploadMeta(flags.product, currentCommit);
264
- case 40:
267
+ case 43:
265
268
  console.log('Finished');
266
- _context3.next = 47;
269
+ _context3.next = 50;
267
270
  break;
268
- case 43:
271
+ case 46:
269
272
  console.log('Updating tag to current commit...');
270
- _context3.next = 46;
273
+ _context3.next = 49;
271
274
  return tagCommit(DEFAULT_TAG);
272
- case 46:
275
+ case 49:
273
276
  console.log("Finished. Run 'git push origin tag ".concat(sinceRef, "'."));
274
- case 47:
277
+ case 50:
275
278
  case "end":
276
279
  return _context3.stop();
277
280
  }
@@ -66,7 +66,7 @@ export function createUpgradeEvent(name, version, previousVersion, date) {
66
66
  }
67
67
  });
68
68
  return _objectSpread({
69
- cliVersion: "1.6.3",
69
+ cliVersion: "1.6.4",
70
70
  dependencyName: name,
71
71
  versionString: eventVersion,
72
72
  major: parsedVersion ? "".concat(parsedVersion.major) : null,
@@ -11,13 +11,12 @@ export function getChangesSince(_x) {
11
11
  }
12
12
  function _getChangesSince() {
13
13
  _getChangesSince = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(since) {
14
- var revisionRange, listLogSummary;
14
+ var revisionRange, logArgument, listLogSummary;
15
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
16
  while (1) switch (_context.prev = _context.next) {
17
17
  case 0:
18
18
  revisionRange = since ? ["".concat(since, "..")] : [];
19
- _context.next = 3;
20
- return git().log([
19
+ logArgument = [
21
20
  // Only commits on mainline master
22
21
  '--first-parent',
23
22
  // Show merge commit contents
@@ -29,15 +28,19 @@ function _getChangesSince() {
29
28
  // Make +- graph width as small as possible to maximise filename length
30
29
  '--stat-graph-width=1'].concat(revisionRange, [
31
30
  // Any commit that modifies a package.json in any directory
32
- ':(glob)**/package.json']));
33
- case 3:
31
+ ':(glob)**/package.json']);
32
+ console.log('logArgument: ', logArgument);
33
+ _context.next = 5;
34
+ return git().log(logArgument);
35
+ case 5:
34
36
  listLogSummary = _context.sent;
37
+ console.log('listLogSummary: ', listLogSummary);
35
38
  return _context.abrupt("return", _objectSpread(_objectSpread({}, listLogSummary), {}, {
36
39
  all: listLogSummary.all.map(function (logLine) {
37
40
  return parseLogLine(logLine);
38
41
  })
39
42
  }));
40
- case 5:
43
+ case 8:
41
44
  case "end":
42
45
  return _context.stop();
43
46
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/dependency-version-analytics",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Tool to pull atlaskit version history from a repo",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",