@atlaskit/dependency-version-analytics 1.0.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 +12 -0
- package/README.md +7 -4
- 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 +31 -71
- package/dist/cjs/commands/populate-historic-data/product.js +130 -253
- 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 +82 -94
- package/dist/cjs/util/get-file-history-from-git.js +4 -4
- package/dist/cjs/util/get-package-version-history.js +11 -7
- 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 +11 -6
- package/dist/es2019/commands/populate-historic-data/product.js +25 -7
- 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/util/analytics.js +13 -0
- package/dist/es2019/util/get-package-version-history.js +7 -3
- 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 +27 -21
- package/dist/esm/commands/populate-historic-data/product.js +121 -81
- 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 +19 -5
- package/dist/esm/util/get-package-version-history.js +7 -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/dist/types/types.d.ts +7 -0
- package/dist/types/util/analytics.d.ts +2 -1
- package/dist/types/util/get-package-version-history.d.ts +7 -3
- package/package.json +2 -2
- package/report.api.md +5 -0
- package/tmp/api-report-tmp.d.ts +5 -0
- package/tokenize-arg-string.ts +0 -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;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -12,7 +12,14 @@ export declare type UpgradeEvent = {
|
|
|
12
12
|
upgradeType: UpgradeType;
|
|
13
13
|
upgradeSubType: UpgradeSubType;
|
|
14
14
|
cliVersion: string;
|
|
15
|
+
latestTag: string | null;
|
|
16
|
+
nextTag: string | null;
|
|
17
|
+
hotfixTag: string | null;
|
|
18
|
+
rcTag: string | null;
|
|
15
19
|
dependencyType?: DependencyType;
|
|
16
20
|
historical?: boolean;
|
|
17
21
|
commitHash?: string;
|
|
18
22
|
};
|
|
23
|
+
export declare type DistTagsType = {
|
|
24
|
+
[tag: string]: string;
|
|
25
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { UpgradeEvent, DependencyType } from '../types';
|
|
1
|
+
import { UpgradeEvent, DependencyType, DistTagsType } from '../types';
|
|
2
2
|
export declare function createUpgradeEvent(name: string, version: string | undefined, previousVersion: string | undefined, date: string, optionalArgs?: {
|
|
3
3
|
commitHash?: string;
|
|
4
4
|
dependencyType?: DependencyType;
|
|
5
5
|
historical?: boolean;
|
|
6
|
+
tags?: DistTagsType;
|
|
6
7
|
}): UpgradeEvent | null;
|
|
7
8
|
export declare function sendAnalytics(analyticsEvents: UpgradeEvent[], { dev, limit, product, skipPrompt, }: {
|
|
8
9
|
dev?: boolean;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { DistTagsType } from '../types';
|
|
2
|
+
export declare type PackageVersionHistoryAndTagsType = {
|
|
3
|
+
time: {
|
|
4
|
+
[version: string]: string;
|
|
5
|
+
};
|
|
6
|
+
'dist-tags': DistTagsType;
|
|
3
7
|
};
|
|
4
|
-
export default function
|
|
8
|
+
export default function getPackageVersionHistoryAndTags(packageName: string): Promise<PackageVersionHistoryAndTagsType>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dependency-version-analytics",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Tool to pull atlaskit version history from a repo",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"typescript": "4.5.5"
|
|
45
45
|
},
|
|
46
46
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
47
|
-
}
|
|
47
|
+
}
|
package/report.api.md
CHANGED
|
@@ -31,6 +31,7 @@ type PopulateHistoricDataFlags = {
|
|
|
31
31
|
dryRun: boolean;
|
|
32
32
|
limit?: number;
|
|
33
33
|
interactive: boolean;
|
|
34
|
+
includeRestrictedScopes?: boolean;
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
// @public (undocumented)
|
|
@@ -83,6 +84,10 @@ export type UpgradeEvent = {
|
|
|
83
84
|
upgradeType: UpgradeType;
|
|
84
85
|
upgradeSubType: UpgradeSubType;
|
|
85
86
|
cliVersion: string;
|
|
87
|
+
latestTag: null | string;
|
|
88
|
+
nextTag: null | string;
|
|
89
|
+
hotfixTag: null | string;
|
|
90
|
+
rcTag: null | string;
|
|
86
91
|
dependencyType?: DependencyType;
|
|
87
92
|
historical?: boolean;
|
|
88
93
|
commitHash?: string;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ type PopulateHistoricDataFlags = {
|
|
|
16
16
|
dryRun: boolean;
|
|
17
17
|
limit?: number;
|
|
18
18
|
interactive: boolean;
|
|
19
|
+
includeRestrictedScopes?: boolean;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
// @public (undocumented)
|
|
@@ -58,6 +59,10 @@ export type UpgradeEvent = {
|
|
|
58
59
|
upgradeType: UpgradeType;
|
|
59
60
|
upgradeSubType: UpgradeSubType;
|
|
60
61
|
cliVersion: string;
|
|
62
|
+
latestTag: null | string;
|
|
63
|
+
nextTag: null | string;
|
|
64
|
+
hotfixTag: null | string;
|
|
65
|
+
rcTag: null | string;
|
|
61
66
|
dependencyType?: DependencyType;
|
|
62
67
|
historical?: boolean;
|
|
63
68
|
commitHash?: string;
|
|
File without changes
|