@atlaskit/dependency-version-analytics 1.1.0 → 1.2.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/CHANGELOG.md +6 -0
- package/README.md +5 -3
- package/dist/cjs/cli.js +52 -17
- package/dist/cjs/commands/populate-historic-data/index.js +2 -2
- package/dist/cjs/commands/populate-historic-data/lib/dependency-store.js +227 -451
- package/dist/cjs/commands/populate-historic-data/package.js +30 -73
- package/dist/cjs/commands/populate-historic-data/product.js +129 -289
- package/dist/cjs/commands/populate-historic-data/util/allowed-scopes.js +15 -0
- package/dist/cjs/commands/populate-historic-data/util/generate-csv.js +16 -21
- package/dist/cjs/constants.js +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/util/analytics.js +77 -102
- package/dist/cjs/util/get-file-history-from-git.js +4 -4
- package/dist/cjs/util/get-package-version-history.js +5 -5
- package/dist/cjs/util/git.js +75 -205
- package/dist/cjs/util/statlas.js +27 -97
- package/dist/cjs/util/yarn.js +40 -101
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/cli.js +10 -4
- package/dist/es2019/commands/populate-historic-data/lib/dependency-store.js +6 -4
- package/dist/es2019/commands/populate-historic-data/package.js +4 -2
- package/dist/es2019/commands/populate-historic-data/product.js +8 -6
- package/dist/es2019/commands/populate-historic-data/util/allowed-scopes.js +7 -0
- package/dist/es2019/commands/populate-historic-data/util/generate-csv.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/cli.js +8 -3
- package/dist/esm/commands/populate-historic-data/lib/dependency-store.js +20 -15
- package/dist/esm/commands/populate-historic-data/package.js +20 -17
- package/dist/esm/commands/populate-historic-data/product.js +45 -42
- package/dist/esm/commands/populate-historic-data/util/allowed-scopes.js +11 -0
- package/dist/esm/commands/populate-historic-data/util/generate-csv.js +1 -1
- package/dist/esm/util/analytics.js +4 -3
- package/dist/esm/util/git.js +14 -13
- package/dist/esm/util/statlas.js +8 -7
- package/dist/esm/util/yarn.js +6 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/populate-historic-data/lib/dependency-store.d.ts +3 -2
- package/dist/types/commands/populate-historic-data/types.d.ts +3 -2
- package/dist/types/commands/populate-historic-data/util/allowed-scopes.d.ts +2 -0
- package/dist/types/commands/populate-historic-data/util/generate-csv.d.ts +2 -2
- package/package.json +2 -2
- package/report.api.md +1 -0
- package/tmp/api-report-tmp.d.ts +1 -0
- package/tokenize-arg-string.ts +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
5
6
|
import { DEFAULT_TAG } from '../../constants';
|
|
6
7
|
import chalk from 'chalk';
|
|
7
8
|
import { createUpgradeEvent, sendAnalytics } from '../../util/analytics';
|
|
@@ -11,6 +12,7 @@ import { generateCSV } from './util/generate-csv';
|
|
|
11
12
|
import { assert } from '../../util/assert';
|
|
12
13
|
import { DependencyStore } from './lib/dependency-store';
|
|
13
14
|
import getPackageVersionHistoryAndTags from '../../util/get-package-version-history';
|
|
15
|
+
import { getSupportedScopes } from './util/allowed-scopes';
|
|
14
16
|
var getUpgradeEventsFromPkgChange = function getUpgradeEventsFromPkgChange(oldDeps, newDeps, _ref) {
|
|
15
17
|
var date = _ref.date,
|
|
16
18
|
commitHash = _ref.commitHash;
|
|
@@ -57,9 +59,9 @@ var getUpgradeEventsFromPkgChange = function getUpgradeEventsFromPkgChange(oldDe
|
|
|
57
59
|
return [].concat(_toConsumableArray(addOrUpgradeEvents), _toConsumableArray(removeEvents));
|
|
58
60
|
};
|
|
59
61
|
var getEventsFromHistory = /*#__PURE__*/function () {
|
|
60
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(packageChangesLog, prevRunHash, _ref8) {
|
|
62
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(packageChangesLog, prevRunHash, _ref8, supportedScopes) {
|
|
61
63
|
var cwd, allPackageChanges, allUpgradeEvents, dependencyStore, dependencies, i, item, newDependencies, packageChange, upgradeEvents, _allUpgradeEvents;
|
|
62
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
64
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
63
65
|
while (1) {
|
|
64
66
|
switch (_context2.prev = _context2.next) {
|
|
65
67
|
case 0:
|
|
@@ -67,7 +69,7 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
67
69
|
allPackageChanges = [];
|
|
68
70
|
allUpgradeEvents = [];
|
|
69
71
|
assert(packageChangesLog.all.length > 0, '');
|
|
70
|
-
dependencyStore = new DependencyStore(cwd);
|
|
72
|
+
dependencyStore = new DependencyStore(cwd, supportedScopes);
|
|
71
73
|
_context2.next = 7;
|
|
72
74
|
return dependencyStore.initialise(prevRunHash);
|
|
73
75
|
case 7:
|
|
@@ -80,7 +82,7 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
80
82
|
}
|
|
81
83
|
item = packageChangesLog.all[i];
|
|
82
84
|
if (allPackageChanges.length > 0) {
|
|
83
|
-
dependencies = allPackageChanges[allPackageChanges.length - 1].
|
|
85
|
+
dependencies = allPackageChanges[allPackageChanges.length - 1].deps;
|
|
84
86
|
}
|
|
85
87
|
_context2.next = 14;
|
|
86
88
|
return dependencyStore.update(item);
|
|
@@ -88,7 +90,7 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
88
90
|
newDependencies = _context2.sent;
|
|
89
91
|
packageChange = {
|
|
90
92
|
date: new Date(item.date).toISOString(),
|
|
91
|
-
|
|
93
|
+
deps: newDependencies
|
|
92
94
|
};
|
|
93
95
|
upgradeEvents = getUpgradeEventsFromPkgChange(dependencies, newDependencies, {
|
|
94
96
|
date: packageChange.date,
|
|
@@ -105,10 +107,10 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
105
107
|
case 21:
|
|
106
108
|
_context2.next = 23;
|
|
107
109
|
return Promise.all(allUpgradeEvents.map( /*#__PURE__*/function () {
|
|
108
|
-
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(upgradeEvent) {
|
|
110
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(upgradeEvent) {
|
|
109
111
|
var _distTags$hotfix, _distTags$latest, _distTags$next;
|
|
110
112
|
var getPackageTags, distTags;
|
|
111
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
113
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
112
114
|
while (1) {
|
|
113
115
|
switch (_context.prev = _context.next) {
|
|
114
116
|
case 0:
|
|
@@ -133,7 +135,7 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
133
135
|
}
|
|
134
136
|
}, _callee);
|
|
135
137
|
}));
|
|
136
|
-
return function (
|
|
138
|
+
return function (_x5) {
|
|
137
139
|
return _ref10.apply(this, arguments);
|
|
138
140
|
};
|
|
139
141
|
}()));
|
|
@@ -150,17 +152,17 @@ var getEventsFromHistory = /*#__PURE__*/function () {
|
|
|
150
152
|
}
|
|
151
153
|
}, _callee2);
|
|
152
154
|
}));
|
|
153
|
-
return function getEventsFromHistory(_x, _x2, _x3) {
|
|
155
|
+
return function getEventsFromHistory(_x, _x2, _x3, _x4) {
|
|
154
156
|
return _ref9.apply(this, arguments);
|
|
155
157
|
};
|
|
156
158
|
}();
|
|
157
|
-
function getSinceRef(
|
|
159
|
+
function getSinceRef(_x6) {
|
|
158
160
|
return _getSinceRef.apply(this, arguments);
|
|
159
161
|
}
|
|
160
162
|
function _getSinceRef() {
|
|
161
|
-
_getSinceRef = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(flags) {
|
|
163
|
+
_getSinceRef = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(flags) {
|
|
162
164
|
var meta, tag, tagExists;
|
|
163
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
165
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
164
166
|
while (1) {
|
|
165
167
|
switch (_context3.prev = _context3.next) {
|
|
166
168
|
case 0:
|
|
@@ -204,13 +206,13 @@ function _getSinceRef() {
|
|
|
204
206
|
}));
|
|
205
207
|
return _getSinceRef.apply(this, arguments);
|
|
206
208
|
}
|
|
207
|
-
export default function populateProduct(
|
|
209
|
+
export default function populateProduct(_x7) {
|
|
208
210
|
return _populateProduct.apply(this, arguments);
|
|
209
211
|
}
|
|
210
212
|
function _populateProduct() {
|
|
211
|
-
_populateProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(flags) {
|
|
212
|
-
var cwd, sinceRef, log, _yield$getEventsFromH, allPackageChanges, allUpgradeEvents, csv, currentCommit;
|
|
213
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
213
|
+
_populateProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(flags) {
|
|
214
|
+
var cwd, sinceRef, log, supportedScopes, _yield$getEventsFromH, allPackageChanges, allUpgradeEvents, csv, currentCommit;
|
|
215
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
214
216
|
while (1) {
|
|
215
217
|
switch (_context4.prev = _context4.next) {
|
|
216
218
|
case 0:
|
|
@@ -233,74 +235,75 @@ function _populateProduct() {
|
|
|
233
235
|
return getChangesSince(sinceRef);
|
|
234
236
|
case 11:
|
|
235
237
|
log = _context4.sent;
|
|
238
|
+
supportedScopes = getSupportedScopes(flags.includeRestrictedScopes);
|
|
236
239
|
if (!(log.all.length === 0)) {
|
|
237
|
-
_context4.next =
|
|
240
|
+
_context4.next = 16;
|
|
238
241
|
break;
|
|
239
242
|
}
|
|
240
243
|
console.log("No package.json changes found since '".concat(sinceRef, "'."));
|
|
241
244
|
return _context4.abrupt("return");
|
|
242
|
-
case
|
|
243
|
-
_context4.next =
|
|
245
|
+
case 16:
|
|
246
|
+
_context4.next = 18;
|
|
244
247
|
return getEventsFromHistory(log, sinceRef, {
|
|
245
248
|
cwd: cwd
|
|
246
|
-
});
|
|
247
|
-
case
|
|
249
|
+
}, supportedScopes);
|
|
250
|
+
case 18:
|
|
248
251
|
_yield$getEventsFromH = _context4.sent;
|
|
249
252
|
allPackageChanges = _yield$getEventsFromH.allPackageChanges;
|
|
250
253
|
allUpgradeEvents = _yield$getEventsFromH.allUpgradeEvents;
|
|
251
254
|
if (!flags.csv) {
|
|
252
|
-
_context4.next =
|
|
255
|
+
_context4.next = 25;
|
|
253
256
|
break;
|
|
254
257
|
}
|
|
255
258
|
csv = generateCSV(allPackageChanges);
|
|
256
259
|
console.log(csv);
|
|
257
260
|
return _context4.abrupt("return");
|
|
258
|
-
case
|
|
261
|
+
case 25:
|
|
259
262
|
if (!flags.dryRun) {
|
|
260
|
-
_context4.next =
|
|
263
|
+
_context4.next = 28;
|
|
261
264
|
break;
|
|
262
265
|
}
|
|
263
266
|
console.log(JSON.stringify(allUpgradeEvents));
|
|
264
267
|
return _context4.abrupt("return");
|
|
265
|
-
case
|
|
268
|
+
case 28:
|
|
266
269
|
if (!(allUpgradeEvents.length > 0)) {
|
|
267
|
-
_context4.next =
|
|
270
|
+
_context4.next = 33;
|
|
268
271
|
break;
|
|
269
272
|
}
|
|
270
|
-
_context4.next =
|
|
273
|
+
_context4.next = 31;
|
|
271
274
|
return sendAnalytics(allUpgradeEvents, {
|
|
272
275
|
dev: flags.dev,
|
|
273
276
|
limit: flags.limit,
|
|
274
277
|
product: flags.product,
|
|
275
278
|
skipPrompt: !flags.interactive
|
|
276
279
|
});
|
|
277
|
-
case
|
|
278
|
-
_context4.next =
|
|
280
|
+
case 31:
|
|
281
|
+
_context4.next = 34;
|
|
279
282
|
break;
|
|
280
|
-
case 32:
|
|
281
|
-
console.log("Found no AK dependency changes since last run from ref \"".concat(sinceRef, "\"'"));
|
|
282
283
|
case 33:
|
|
284
|
+
console.log("Found no dependency changes from supported scopes ".concat(supportedScopes.join(', '), " since last run from ref \"").concat(sinceRef, "\"'"));
|
|
285
|
+
case 34:
|
|
283
286
|
if (!flags.statlas) {
|
|
284
|
-
_context4.next =
|
|
287
|
+
_context4.next = 43;
|
|
285
288
|
break;
|
|
286
289
|
}
|
|
287
|
-
_context4.next =
|
|
290
|
+
_context4.next = 37;
|
|
288
291
|
return getHash('HEAD');
|
|
289
|
-
case
|
|
292
|
+
case 37:
|
|
290
293
|
currentCommit = _context4.sent;
|
|
291
|
-
_context4.next =
|
|
294
|
+
_context4.next = 40;
|
|
292
295
|
return statlas.uploadMeta(flags.product, currentCommit);
|
|
293
|
-
case
|
|
296
|
+
case 40:
|
|
294
297
|
console.log('Finished');
|
|
295
|
-
_context4.next =
|
|
298
|
+
_context4.next = 47;
|
|
296
299
|
break;
|
|
297
|
-
case
|
|
300
|
+
case 43:
|
|
298
301
|
console.log('Updating tag to current commit...');
|
|
299
|
-
_context4.next =
|
|
302
|
+
_context4.next = 46;
|
|
300
303
|
return tagCommit(DEFAULT_TAG);
|
|
301
|
-
case 45:
|
|
302
|
-
console.log("Finished. Run 'git push origin tag ".concat(sinceRef, "'."));
|
|
303
304
|
case 46:
|
|
305
|
+
console.log("Finished. Run 'git push origin tag ".concat(sinceRef, "'."));
|
|
306
|
+
case 47:
|
|
304
307
|
case "end":
|
|
305
308
|
return _context4.stop();
|
|
306
309
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var defaultScopes = ['@atlaskit', '@atlassian', '@atlassiansox'];
|
|
2
|
+
export var getSupportedScopes = function getSupportedScopes() {
|
|
3
|
+
var enableNonAtlaskitPackages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
4
|
+
return enableNonAtlaskitPackages ? defaultScopes : ['@atlaskit'];
|
|
5
|
+
};
|
|
6
|
+
export var isPackageFromSupportedScopes = function isPackageFromSupportedScopes(packageName) {
|
|
7
|
+
var supportedScopes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultScopes;
|
|
8
|
+
return supportedScopes.some(function (scope) {
|
|
9
|
+
return packageName.startsWith(scope);
|
|
10
|
+
});
|
|
11
|
+
};
|
|
@@ -5,7 +5,7 @@ export var generateCSV = function generateCSV(packageChanges) {
|
|
|
5
5
|
packageChanges.forEach(function (packageChange) {
|
|
6
6
|
var firstColumn = csvData[0];
|
|
7
7
|
var currentRow = firstColumn.push(packageChange.date) - 1;
|
|
8
|
-
Object.entries(packageChange.
|
|
8
|
+
Object.entries(packageChange.deps).forEach(function (_ref) {
|
|
9
9
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
10
10
|
name = _ref2[0],
|
|
11
11
|
version = _ref2[1].version;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
7
|
import chalk from 'chalk';
|
|
@@ -85,9 +86,9 @@ export function sendAnalytics(_x, _x2) {
|
|
|
85
86
|
return _sendAnalytics.apply(this, arguments);
|
|
86
87
|
}
|
|
87
88
|
function _sendAnalytics() {
|
|
88
|
-
_sendAnalytics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(analyticsEvents, _ref3) {
|
|
89
|
+
_sendAnalytics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(analyticsEvents, _ref3) {
|
|
89
90
|
var dev, limit, product, skipPrompt, analyticsEnv, eventsToSend, client, answers, promises;
|
|
90
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
91
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
91
92
|
while (1) {
|
|
92
93
|
switch (_context.prev = _context.next) {
|
|
93
94
|
case 0:
|
package/dist/esm/util/git.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
5
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
// @ts-ignore
|
|
@@ -12,9 +13,9 @@ export function getChangesSince(_x) {
|
|
|
12
13
|
return _getChangesSince.apply(this, arguments);
|
|
13
14
|
}
|
|
14
15
|
function _getChangesSince() {
|
|
15
|
-
_getChangesSince = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(since) {
|
|
16
|
+
_getChangesSince = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(since) {
|
|
16
17
|
var revisionRange, listLogSummary;
|
|
17
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
19
|
while (1) {
|
|
19
20
|
switch (_context.prev = _context.next) {
|
|
20
21
|
case 0:
|
|
@@ -91,8 +92,8 @@ export function tagCommit(_x2) {
|
|
|
91
92
|
return _tagCommit.apply(this, arguments);
|
|
92
93
|
}
|
|
93
94
|
function _tagCommit() {
|
|
94
|
-
_tagCommit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(tag) {
|
|
95
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
95
|
+
_tagCommit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(tag) {
|
|
96
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
96
97
|
while (1) {
|
|
97
98
|
switch (_context2.prev = _context2.next) {
|
|
98
99
|
case 0:
|
|
@@ -110,9 +111,9 @@ export function doesTagExist(_x3) {
|
|
|
110
111
|
return _doesTagExist.apply(this, arguments);
|
|
111
112
|
}
|
|
112
113
|
function _doesTagExist() {
|
|
113
|
-
_doesTagExist = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(tag) {
|
|
114
|
+
_doesTagExist = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(tag) {
|
|
114
115
|
var tags;
|
|
115
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
116
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
116
117
|
while (1) {
|
|
117
118
|
switch (_context3.prev = _context3.next) {
|
|
118
119
|
case 0:
|
|
@@ -134,9 +135,9 @@ export function refetchTag(_x4) {
|
|
|
134
135
|
return _refetchTag.apply(this, arguments);
|
|
135
136
|
}
|
|
136
137
|
function _refetchTag() {
|
|
137
|
-
_refetchTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(tag) {
|
|
138
|
+
_refetchTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(tag) {
|
|
138
139
|
var fetchTagResult;
|
|
139
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
140
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
140
141
|
while (1) {
|
|
141
142
|
switch (_context4.prev = _context4.next) {
|
|
142
143
|
case 0:
|
|
@@ -187,8 +188,8 @@ export function getHash(_x5) {
|
|
|
187
188
|
return _getHash.apply(this, arguments);
|
|
188
189
|
}
|
|
189
190
|
function _getHash() {
|
|
190
|
-
_getHash = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(ref) {
|
|
191
|
-
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
191
|
+
_getHash = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ref) {
|
|
192
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
192
193
|
while (1) {
|
|
193
194
|
switch (_context5.prev = _context5.next) {
|
|
194
195
|
case 0:
|
|
@@ -210,11 +211,11 @@ export function getFiles(_x6, _x7) {
|
|
|
210
211
|
return _getFiles.apply(this, arguments);
|
|
211
212
|
}
|
|
212
213
|
function _getFiles() {
|
|
213
|
-
_getFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(ref, glob) {
|
|
214
|
+
_getFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(ref, glob) {
|
|
214
215
|
var opts,
|
|
215
216
|
result,
|
|
216
217
|
_args6 = arguments;
|
|
217
|
-
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
218
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
218
219
|
while (1) {
|
|
219
220
|
switch (_context6.prev = _context6.next) {
|
|
220
221
|
case 0:
|
package/dist/esm/util/statlas.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
4
|
import fetch from 'node-fetch';
|
|
4
5
|
var STATLAS_BASE_URL = 'https://statlas.prod.atl-paas.net/af-product-analytics';
|
|
5
6
|
export function getMeta(_x) {
|
|
6
7
|
return _getMeta.apply(this, arguments);
|
|
7
8
|
}
|
|
8
9
|
function _getMeta() {
|
|
9
|
-
_getMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(product) {
|
|
10
|
+
_getMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
10
11
|
var response;
|
|
11
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
12
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
12
13
|
while (1) {
|
|
13
14
|
switch (_context.prev = _context.next) {
|
|
14
15
|
case 0:
|
|
@@ -38,9 +39,9 @@ function retrieveJSON(_x2) {
|
|
|
38
39
|
return _retrieveJSON.apply(this, arguments);
|
|
39
40
|
}
|
|
40
41
|
function _retrieveJSON() {
|
|
41
|
-
_retrieveJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(filepath) {
|
|
42
|
+
_retrieveJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(filepath) {
|
|
42
43
|
var response, json;
|
|
43
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
44
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
44
45
|
while (1) {
|
|
45
46
|
switch (_context2.prev = _context2.next) {
|
|
46
47
|
case 0:
|
|
@@ -75,9 +76,9 @@ function uploadJSON(_x3, _x4) {
|
|
|
75
76
|
return _uploadJSON.apply(this, arguments);
|
|
76
77
|
}
|
|
77
78
|
function _uploadJSON() {
|
|
78
|
-
_uploadJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(filepath, json) {
|
|
79
|
+
_uploadJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(filepath, json) {
|
|
79
80
|
var res;
|
|
80
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
81
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
81
82
|
while (1) {
|
|
82
83
|
switch (_context3.prev = _context3.next) {
|
|
83
84
|
case 0:
|
package/dist/esm/util/yarn.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
5
|
import path from 'path';
|
|
5
6
|
import debugModule from 'debug';
|
|
6
7
|
import micromatch from 'micromatch';
|
|
@@ -11,9 +12,9 @@ export function getWorkspaceGlobs(_x, _x2) {
|
|
|
11
12
|
return _getWorkspaceGlobs.apply(this, arguments);
|
|
12
13
|
}
|
|
13
14
|
function _getWorkspaceGlobs() {
|
|
14
|
-
_getWorkspaceGlobs = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ref, cwd) {
|
|
15
|
+
_getWorkspaceGlobs = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ref, cwd) {
|
|
15
16
|
var file, rootPackageJsonFile, workspaces, workspacePackages;
|
|
16
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17
18
|
while (1) {
|
|
18
19
|
switch (_context.prev = _context.next) {
|
|
19
20
|
case 0:
|
|
@@ -67,9 +68,9 @@ export function getWorkspacePaths(_x3, _x4, _x5) {
|
|
|
67
68
|
return _getWorkspacePaths.apply(this, arguments);
|
|
68
69
|
}
|
|
69
70
|
function _getWorkspacePaths() {
|
|
70
|
-
_getWorkspacePaths = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(ref, workspaceGlobs, cwd) {
|
|
71
|
+
_getWorkspacePaths = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ref, workspaceGlobs, cwd) {
|
|
71
72
|
var workspacePackageJsons, matchedWorkspaces;
|
|
72
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
73
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
73
74
|
while (1) {
|
|
74
75
|
switch (_context2.prev = _context2.next) {
|
|
75
76
|
case 0:
|
package/dist/esm/version.json
CHANGED
|
@@ -13,7 +13,8 @@ export declare class DependencyStore {
|
|
|
13
13
|
/** Set of workspace globs. Used to verify that a package.json is a valid workspace */
|
|
14
14
|
private workspaceGlobs;
|
|
15
15
|
private initialised;
|
|
16
|
-
|
|
16
|
+
private supportedScopes;
|
|
17
|
+
constructor(cwd: string | undefined, supportedScopes: string[]);
|
|
17
18
|
/** Scans the repo for dependencies at the specified git ref and return the flattened dependency map */
|
|
18
19
|
initialise(gitRef: string | undefined): Promise<DependencyMap>;
|
|
19
20
|
/** Updates the repo dependency store based on the changes in `logItem`.
|
|
@@ -32,7 +33,7 @@ export declare class DependencyStore {
|
|
|
32
33
|
private updateWorkspaces;
|
|
33
34
|
private addDependency;
|
|
34
35
|
private removeDependency;
|
|
35
|
-
private
|
|
36
|
+
private getSupportedDependencies;
|
|
36
37
|
private static getMinimumVersion;
|
|
37
38
|
private static transformDepName;
|
|
38
39
|
private static transformDepVersion;
|
|
@@ -5,6 +5,7 @@ export declare type PopulateHistoricDataFlags = {
|
|
|
5
5
|
dryRun: boolean;
|
|
6
6
|
limit?: number;
|
|
7
7
|
interactive: boolean;
|
|
8
|
+
includeRestrictedScopes?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare type DependencyMap = {
|
|
10
11
|
[name: string]: {
|
|
@@ -12,7 +13,7 @@ export declare type DependencyMap = {
|
|
|
12
13
|
type: DependencyType;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
|
-
export declare type
|
|
16
|
-
|
|
16
|
+
export declare type PackageChange = {
|
|
17
|
+
deps: DependencyMap;
|
|
17
18
|
date: string;
|
|
18
19
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageChange } from '../types';
|
|
2
2
|
/** Generates a CSV of product package changes over time */
|
|
3
|
-
export declare const generateCSV: (packageChanges:
|
|
3
|
+
export declare const generateCSV: (packageChanges: PackageChange[]) => string;
|