@atlaskit/dependency-version-analytics 0.3.4 → 0.3.7
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 +20 -0
- package/dist/cjs/util/git.js +9 -9
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/util/git.js +5 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/util/git.js +5 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/populate-historic-data/__fixtures__/git.d.ts +2 -2
- package/dist/types/commands/populate-historic-data/lib/dependency-store.d.ts +2 -2
- package/dist/types/util/git.d.ts +4 -14
- package/package.json +3 -3
- package/typings/analytics-node-client.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/dependency-version-analytics
|
|
2
2
|
|
|
3
|
+
## 0.3.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5c45b17200d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c45b17200d) - Bumping dependencies via Renovate:
|
|
8
|
+
|
|
9
|
+
- simple-git
|
|
10
|
+
|
|
11
|
+
## 0.3.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`4d32baaa06a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d32baaa06a) - Major bump inquirer to latest
|
|
16
|
+
|
|
17
|
+
## 0.3.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`99ef999a39f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/99ef999a39f) - Renovate Bot upgraded simple-git from ^1.130.0 to 2.48.0
|
|
22
|
+
|
|
3
23
|
## 0.3.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/util/git.js
CHANGED
|
@@ -21,7 +21,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
21
21
|
|
|
22
22
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _simpleGit = _interopRequireDefault(require("simple-git"));
|
|
25
25
|
|
|
26
26
|
var _assert = require("./assert");
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ function _getChangesSince() {
|
|
|
42
42
|
case 0:
|
|
43
43
|
revisionRange = since ? ["".concat(since, "..")] : [];
|
|
44
44
|
_context.next = 3;
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, _simpleGit.default)().log([// Only commits on mainline master
|
|
46
46
|
'--first-parent', // Show merge commit contents
|
|
47
47
|
'-m', // Reverse the order
|
|
48
48
|
'--reverse', // Show filename changes - simple-git parses --stat flag but not --name-only unfortunately
|
|
@@ -119,7 +119,7 @@ function _tagCommit() {
|
|
|
119
119
|
while (1) {
|
|
120
120
|
switch (_context2.prev = _context2.next) {
|
|
121
121
|
case 0:
|
|
122
|
-
return _context2.abrupt("return", (0,
|
|
122
|
+
return _context2.abrupt("return", (0, _simpleGit.default)().tag(['-f', tag]));
|
|
123
123
|
|
|
124
124
|
case 1:
|
|
125
125
|
case "end":
|
|
@@ -143,7 +143,7 @@ function _doesTagExist() {
|
|
|
143
143
|
switch (_context3.prev = _context3.next) {
|
|
144
144
|
case 0:
|
|
145
145
|
_context3.next = 2;
|
|
146
|
-
return (0,
|
|
146
|
+
return (0, _simpleGit.default)().tags((0, _defineProperty2.default)({}, tag, null));
|
|
147
147
|
|
|
148
148
|
case 2:
|
|
149
149
|
tags = _context3.sent;
|
|
@@ -172,7 +172,7 @@ function _refetchTag() {
|
|
|
172
172
|
case 0:
|
|
173
173
|
_context4.prev = 0;
|
|
174
174
|
_context4.next = 3;
|
|
175
|
-
return (0,
|
|
175
|
+
return (0, _simpleGit.default)().tag(['-d', tag]);
|
|
176
176
|
|
|
177
177
|
case 3:
|
|
178
178
|
_context4.next = 9;
|
|
@@ -192,7 +192,7 @@ function _refetchTag() {
|
|
|
192
192
|
case 9:
|
|
193
193
|
_context4.prev = 9;
|
|
194
194
|
_context4.next = 12;
|
|
195
|
-
return (0,
|
|
195
|
+
return (0, _simpleGit.default)().fetch(['origin', 'tag', tag]);
|
|
196
196
|
|
|
197
197
|
case 12:
|
|
198
198
|
fetchTagResult = _context4.sent;
|
|
@@ -235,7 +235,7 @@ function _getHash() {
|
|
|
235
235
|
while (1) {
|
|
236
236
|
switch (_context5.prev = _context5.next) {
|
|
237
237
|
case 0:
|
|
238
|
-
return _context5.abrupt("return", (0,
|
|
238
|
+
return _context5.abrupt("return", (0, _simpleGit.default)().revparse([ref]));
|
|
239
239
|
|
|
240
240
|
case 1:
|
|
241
241
|
case "end":
|
|
@@ -249,7 +249,7 @@ function _getHash() {
|
|
|
249
249
|
|
|
250
250
|
function showFile(ref, filename) {
|
|
251
251
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
252
|
-
return (0,
|
|
252
|
+
return (0, _simpleGit.default)(opts.cwd || process.cwd()).show(["".concat(ref, ":").concat(filename)]);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
function getFiles(_x6, _x7) {
|
|
@@ -267,7 +267,7 @@ function _getFiles() {
|
|
|
267
267
|
case 0:
|
|
268
268
|
opts = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
|
|
269
269
|
_context6.next = 3;
|
|
270
|
-
return (0,
|
|
270
|
+
return (0, _simpleGit.default)(opts.cwd || process.cwd()).raw(['grep', '--name-only', '', ref, '--', ":(glob)".concat(glob)]);
|
|
271
271
|
|
|
272
272
|
case 3:
|
|
273
273
|
result = _context6.sent;
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/util/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
|
-
import git from 'simple-git
|
|
2
|
+
import git from 'simple-git';
|
|
3
3
|
import { assert } from './assert';
|
|
4
4
|
export async function getChangesSince(since) {
|
|
5
5
|
const revisionRange = since ? [`${since}..`] : [];
|
|
@@ -67,7 +67,7 @@ export async function doesTagExist(tag) {
|
|
|
67
67
|
}
|
|
68
68
|
export async function refetchTag(tag) {
|
|
69
69
|
try {
|
|
70
|
-
await git().
|
|
70
|
+
await git().tag(['-d', tag]);
|
|
71
71
|
} catch (e) {
|
|
72
72
|
// Ignore tag not found errors
|
|
73
73
|
if (!/tag.*not found/.test(e.message)) {
|
|
@@ -78,7 +78,7 @@ export async function refetchTag(tag) {
|
|
|
78
78
|
let fetchTagResult;
|
|
79
79
|
|
|
80
80
|
try {
|
|
81
|
-
fetchTagResult = await git().
|
|
81
|
+
fetchTagResult = await git().fetch(['origin', 'tag', tag]);
|
|
82
82
|
} catch (e) {
|
|
83
83
|
// Ignore can't find tag in remote errors
|
|
84
84
|
if (!/Couldn't find remote ref refs\/tags\//.test(e.message)) {
|
|
@@ -91,10 +91,10 @@ export async function refetchTag(tag) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export async function getHash(ref) {
|
|
94
|
-
return git().
|
|
94
|
+
return git().revparse([ref]);
|
|
95
95
|
}
|
|
96
96
|
export function showFile(ref, filename, opts = {}) {
|
|
97
|
-
return git(opts.cwd || process.cwd()).
|
|
97
|
+
return git(opts.cwd || process.cwd()).show([`${ref}:${filename}`]);
|
|
98
98
|
}
|
|
99
99
|
export async function getFiles(ref, glob, opts = {}) {
|
|
100
100
|
const result = await git(opts.cwd || process.cwd()).raw(['grep', '--name-only', '', ref, '--', `:(glob)${glob}`]);
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/util/git.js
CHANGED
|
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
8
|
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; }
|
|
9
9
|
|
|
10
10
|
// @ts-ignore
|
|
11
|
-
import git from 'simple-git
|
|
11
|
+
import git from 'simple-git';
|
|
12
12
|
import { assert } from './assert';
|
|
13
13
|
export function getChangesSince(_x) {
|
|
14
14
|
return _getChangesSince.apply(this, arguments);
|
|
@@ -153,7 +153,7 @@ function _refetchTag() {
|
|
|
153
153
|
case 0:
|
|
154
154
|
_context4.prev = 0;
|
|
155
155
|
_context4.next = 3;
|
|
156
|
-
return git().
|
|
156
|
+
return git().tag(['-d', tag]);
|
|
157
157
|
|
|
158
158
|
case 3:
|
|
159
159
|
_context4.next = 9;
|
|
@@ -173,7 +173,7 @@ function _refetchTag() {
|
|
|
173
173
|
case 9:
|
|
174
174
|
_context4.prev = 9;
|
|
175
175
|
_context4.next = 12;
|
|
176
|
-
return git().
|
|
176
|
+
return git().fetch(['origin', 'tag', tag]);
|
|
177
177
|
|
|
178
178
|
case 12:
|
|
179
179
|
fetchTagResult = _context4.sent;
|
|
@@ -216,7 +216,7 @@ function _getHash() {
|
|
|
216
216
|
while (1) {
|
|
217
217
|
switch (_context5.prev = _context5.next) {
|
|
218
218
|
case 0:
|
|
219
|
-
return _context5.abrupt("return", git().
|
|
219
|
+
return _context5.abrupt("return", git().revparse([ref]));
|
|
220
220
|
|
|
221
221
|
case 1:
|
|
222
222
|
case "end":
|
|
@@ -230,7 +230,7 @@ function _getHash() {
|
|
|
230
230
|
|
|
231
231
|
export function showFile(ref, filename) {
|
|
232
232
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
233
|
-
return git(opts.cwd || process.cwd()).
|
|
233
|
+
return git(opts.cwd || process.cwd()).show(["".concat(ref, ":").concat(filename)]);
|
|
234
234
|
}
|
|
235
235
|
export function getFiles(_x6, _x7) {
|
|
236
236
|
return _getFiles.apply(this, arguments);
|
package/dist/esm/version.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const generateLogs: (fileChanges: string[][]) =>
|
|
1
|
+
import type { LogResult } from 'simple-git';
|
|
2
|
+
export declare const generateLogs: (fileChanges: string[][]) => LogResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Workspace code */
|
|
2
2
|
import { DependencyMap } from '../types';
|
|
3
|
-
import {
|
|
3
|
+
import type { DefaultLogFields, ListLogLine } from 'simple-git';
|
|
4
4
|
/**
|
|
5
5
|
* Stores the state of atlaskit dependencies in a repository
|
|
6
6
|
*/
|
|
@@ -19,7 +19,7 @@ export declare class DependencyStore {
|
|
|
19
19
|
/** Updates the repo dependency store based on the changes in `logItem`.
|
|
20
20
|
* Returns the updated flattened dependencies
|
|
21
21
|
*/
|
|
22
|
-
update(logItem:
|
|
22
|
+
update(logItem: DefaultLogFields & ListLogLine): Promise<DependencyMap>;
|
|
23
23
|
/** Retrieve a flattened list of p repo dependencies.
|
|
24
24
|
* If multiple versions of a dependency exist, the lowest version is returned.
|
|
25
25
|
* If the dependency is listed under multiple dependency types, 'dependencies' is prioritised over 'devDependencies'
|
package/dist/types/util/git.d.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare type ListLogLine = {
|
|
4
|
-
hash: string;
|
|
5
|
-
date: string;
|
|
6
|
-
message: string;
|
|
7
|
-
refs: string;
|
|
8
|
-
body: string;
|
|
9
|
-
author_name: string;
|
|
10
|
-
author_email: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function getChangesSince(since?: string): Promise<ListLogSummary>;
|
|
1
|
+
import type { LogResult } from 'simple-git';
|
|
2
|
+
export declare function getChangesSince(since?: string): Promise<LogResult>;
|
|
13
3
|
export declare function tagCommit(tag: string): Promise<string>;
|
|
14
4
|
export declare function doesTagExist(tag: string): Promise<boolean>;
|
|
15
5
|
export declare function refetchTag(tag: string): Promise<{
|
|
16
|
-
fetchTagResult: git.FetchResult | undefined;
|
|
6
|
+
fetchTagResult: import("simple-git").FetchResult | undefined;
|
|
17
7
|
}>;
|
|
18
8
|
export declare function getHash(ref: string): Promise<string>;
|
|
19
9
|
export declare function showFile(ref: string, filename: string, opts?: {
|
|
20
10
|
cwd?: string;
|
|
21
|
-
}):
|
|
11
|
+
}): import("simple-git").Response<string>;
|
|
22
12
|
export declare function getFiles(ref: string, glob: string, opts?: {
|
|
23
13
|
cwd?: string;
|
|
24
14
|
}): Promise<string[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dependency-version-analytics",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Tool to pull atlaskit version history from a repo",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"@babel/runtime": "^7.0.0",
|
|
25
25
|
"chalk": "^2.1.0",
|
|
26
26
|
"debug": "^2.2.0",
|
|
27
|
-
"inquirer": "^
|
|
27
|
+
"inquirer": "^8.2.0",
|
|
28
28
|
"meow": "^8.1.1",
|
|
29
29
|
"micromatch": "^4.0.2",
|
|
30
30
|
"node-fetch": "^2.6.1",
|
|
31
31
|
"semver": "^7.3.0",
|
|
32
|
-
"simple-git": "^
|
|
32
|
+
"simple-git": "^3.4.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@atlassiansox/analytics-node-client": "^1.1.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '@atlassiansox/analytics-node-client';
|