@atlaskit/dependency-version-analytics 1.4.0 → 1.4.1
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/cli/package.json +2 -2
- package/constants/package.json +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/populate-historic-data/package.d.ts +1 -1
- package/dist/types/commands/populate-historic-data/product.d.ts +1 -1
- package/dist/types/commands/populate-historic-data/types.d.ts +3 -3
- package/dist/types/types.d.ts +5 -5
- package/dist/types/util/get-package-version-history.d.ts +1 -1
- package/dist/types/util/statlas.d.ts +1 -1
- package/package.json +11 -3
- package/types/package.json +2 -2
- package/dist/types-ts4.0/cli.d.ts +0 -4
- package/dist/types-ts4.0/commands/populate-historic-data/__fixtures__/git.d.ts +0 -2
- package/dist/types-ts4.0/commands/populate-historic-data/index.d.ts +0 -2
- package/dist/types-ts4.0/commands/populate-historic-data/lib/dependency-store.d.ts +0 -41
- package/dist/types-ts4.0/commands/populate-historic-data/package.d.ts +0 -7
- package/dist/types-ts4.0/commands/populate-historic-data/product.d.ts +0 -10
- package/dist/types-ts4.0/commands/populate-historic-data/types.d.ts +0 -19
- package/dist/types-ts4.0/commands/populate-historic-data/util/allowed-scopes.d.ts +0 -8
- package/dist/types-ts4.0/commands/populate-historic-data/util/generate-csv.d.ts +0 -3
- package/dist/types-ts4.0/constants.d.ts +0 -19
- package/dist/types-ts4.0/index.d.ts +0 -3
- package/dist/types-ts4.0/types.d.ts +0 -25
- package/dist/types-ts4.0/util/analytics.d.ts +0 -12
- package/dist/types-ts4.0/util/assert.d.ts +0 -2
- package/dist/types-ts4.0/util/env-with-guard.d.ts +0 -1
- package/dist/types-ts4.0/util/get-file-history-from-git.d.ts +0 -1
- package/dist/types-ts4.0/util/get-package-version-history.d.ts +0 -8
- package/dist/types-ts4.0/util/git.d.ts +0 -14
- package/dist/types-ts4.0/util/statlas.d.ts +0 -5
- package/dist/types-ts4.0/util/yarn.d.ts +0 -2
package/CHANGELOG.md
CHANGED
package/cli/package.json
CHANGED
package/constants/package.json
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PopulateHistoricDataFlags } from './types';
|
|
2
2
|
import { UpgradeEvent } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type PopulatePackageFlags = PopulateHistoricDataFlags & {
|
|
4
4
|
since?: string;
|
|
5
5
|
pkg: string;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DependencyType } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type PopulateHistoricDataFlags = {
|
|
3
3
|
cwd?: string;
|
|
4
4
|
dev: boolean;
|
|
5
5
|
dryRun: boolean;
|
|
@@ -7,13 +7,13 @@ export declare type PopulateHistoricDataFlags = {
|
|
|
7
7
|
interactive: boolean;
|
|
8
8
|
includeRestrictedScopes?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type DependencyMap = {
|
|
11
11
|
[name: string]: {
|
|
12
12
|
version: string;
|
|
13
13
|
type: DependencyType;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type PackageChange = {
|
|
17
17
|
deps: DependencyMap;
|
|
18
18
|
date: string;
|
|
19
19
|
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReleaseType } from 'semver';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
2
|
+
export type DependencyType = 'devDependency' | 'dependency' | 'optionalDependency' | 'peerDependency';
|
|
3
|
+
export type UpgradeType = 'add' | 'upgrade' | 'remove' | 'downgrade';
|
|
4
|
+
export type UpgradeSubType = ReleaseType | null;
|
|
5
|
+
export type UpgradeEvent = {
|
|
6
6
|
dependencyName: string;
|
|
7
7
|
versionString: string;
|
|
8
8
|
major: string | null;
|
|
@@ -20,6 +20,6 @@ export declare type UpgradeEvent = {
|
|
|
20
20
|
historical?: boolean;
|
|
21
21
|
commitHash?: string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type DistTagsType = {
|
|
24
24
|
[tag: string]: string;
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dependency-version-analytics",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Tool to pull atlaskit version history from a repo",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
12
12
|
"types": "dist/types/index.d.ts",
|
|
13
|
+
"typesVersions": {
|
|
14
|
+
">=4.5 <4.9": {
|
|
15
|
+
"*": [
|
|
16
|
+
"dist/types-ts4.5/*",
|
|
17
|
+
"dist/types-ts4.5/index.d.ts"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"sideEffects": false,
|
|
14
22
|
"atlaskit:src": "src/index.ts",
|
|
15
23
|
"atlassian": {
|
|
@@ -41,7 +49,7 @@
|
|
|
41
49
|
"@types/micromatch": "^4.0.1",
|
|
42
50
|
"@types/node": "~16.11.27",
|
|
43
51
|
"ts-node": "^10.9.1",
|
|
44
|
-
"typescript": "4.
|
|
52
|
+
"typescript": "~4.9.5"
|
|
45
53
|
},
|
|
46
54
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
47
|
-
}
|
|
55
|
+
}
|
package/types/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/** Workspace code */
|
|
2
|
-
import { DependencyMap } from '../types';
|
|
3
|
-
import type { DefaultLogFields, ListLogLine } from 'simple-git';
|
|
4
|
-
/**
|
|
5
|
-
* Stores the state of atlaskit dependencies in a repository
|
|
6
|
-
*/
|
|
7
|
-
export declare class DependencyStore {
|
|
8
|
-
private cwd;
|
|
9
|
-
/** Mapping of dependency names to arrays of unique dependency type + versions */
|
|
10
|
-
private dependencies;
|
|
11
|
-
/** Mapping of workspaces to their dependency map. Each dependency in their map links to an entry in `dependencies` */
|
|
12
|
-
private workspaces;
|
|
13
|
-
/** Set of workspace globs. Used to verify that a package.json is a valid workspace */
|
|
14
|
-
private workspaceGlobs;
|
|
15
|
-
private initialised;
|
|
16
|
-
private supportedScopes;
|
|
17
|
-
private supportedPackages;
|
|
18
|
-
constructor(cwd: string | undefined, supportedScopes: string[], supportedPackages: string[]);
|
|
19
|
-
/** Scans the repo for dependencies at the specified git ref and return the flattened dependency map */
|
|
20
|
-
initialise(gitRef: string | undefined): Promise<DependencyMap>;
|
|
21
|
-
/** Updates the repo dependency store based on the changes in `logItem`.
|
|
22
|
-
* Returns the updated flattened dependencies
|
|
23
|
-
*/
|
|
24
|
-
update(logItem: DefaultLogFields & ListLogLine): Promise<DependencyMap>;
|
|
25
|
-
/** Retrieve a flattened list of p repo dependencies.
|
|
26
|
-
* If multiple versions of a dependency exist, the lowest version is returned.
|
|
27
|
-
* If the dependency is listed under multiple dependency types, 'dependencies' is prioritised over 'devDependencies'
|
|
28
|
-
*/
|
|
29
|
-
private getFlattenedDeps;
|
|
30
|
-
private assertInitialised;
|
|
31
|
-
/** Scans all workspaces in repo and rebuilds dependency store */
|
|
32
|
-
private resetStore;
|
|
33
|
-
private getWorkspaceDependencies;
|
|
34
|
-
private updateWorkspaces;
|
|
35
|
-
private addDependency;
|
|
36
|
-
private removeDependency;
|
|
37
|
-
private getSupportedDependencies;
|
|
38
|
-
private static getMinimumVersion;
|
|
39
|
-
private static transformDepName;
|
|
40
|
-
private static transformDepVersion;
|
|
41
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PopulateHistoricDataFlags } from './types';
|
|
2
|
-
import { UpgradeEvent } from '../../types';
|
|
3
|
-
export declare type PopulatePackageFlags = PopulateHistoricDataFlags & {
|
|
4
|
-
since?: string;
|
|
5
|
-
pkg: string;
|
|
6
|
-
};
|
|
7
|
-
export default function populatePackage(flags: PopulatePackageFlags): Promise<UpgradeEvent[]>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PopulateHistoricDataFlags } from './types';
|
|
2
|
-
export declare type PopulateProductFlags = PopulateHistoricDataFlags & {
|
|
3
|
-
csv: boolean;
|
|
4
|
-
product: string;
|
|
5
|
-
reset: boolean;
|
|
6
|
-
statlas?: boolean;
|
|
7
|
-
tag?: string;
|
|
8
|
-
supportedPackages?: string;
|
|
9
|
-
};
|
|
10
|
-
export default function populateProduct(flags: PopulateProductFlags): Promise<void>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DependencyType } from '../../types';
|
|
2
|
-
export declare type PopulateHistoricDataFlags = {
|
|
3
|
-
cwd?: string;
|
|
4
|
-
dev: boolean;
|
|
5
|
-
dryRun: boolean;
|
|
6
|
-
limit?: number;
|
|
7
|
-
interactive: boolean;
|
|
8
|
-
includeRestrictedScopes?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare type DependencyMap = {
|
|
11
|
-
[name: string]: {
|
|
12
|
-
version: string;
|
|
13
|
-
type: DependencyType;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare type PackageChange = {
|
|
17
|
-
deps: DependencyMap;
|
|
18
|
-
date: string;
|
|
19
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getSupportedScopes: (enableNonAtlaskitPackages?: boolean) => string[];
|
|
2
|
-
export declare const isPackageFromSupportedScopes: (packageName: string, supportedScopes?: string[]) => boolean;
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* Checks if the package is from supported scope
|
|
6
|
-
* and if so, the package is also from supported package list.
|
|
7
|
-
*/
|
|
8
|
-
export declare const isPackageSupported: (packageName: string, supportedPackages?: string[], supportedScopes?: string[]) => boolean;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_TAG = "atlaskit-dependency-version-analytics-last-run";
|
|
2
|
-
export declare const DEP_TYPES: readonly [
|
|
3
|
-
{
|
|
4
|
-
readonly packageJsonKey: "devDependencies";
|
|
5
|
-
readonly depTypeName: "devDependency";
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
readonly packageJsonKey: "dependencies";
|
|
9
|
-
readonly depTypeName: "dependency";
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
readonly packageJsonKey: "peerDependencies";
|
|
13
|
-
readonly depTypeName: "peerDependency";
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
readonly packageJsonKey: "optionalDependencies";
|
|
17
|
-
readonly depTypeName: "optionalDependency";
|
|
18
|
-
}
|
|
19
|
-
];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReleaseType } from 'semver';
|
|
2
|
-
export declare type DependencyType = 'devDependency' | 'dependency' | 'optionalDependency' | 'peerDependency';
|
|
3
|
-
export declare type UpgradeType = 'add' | 'upgrade' | 'remove' | 'downgrade';
|
|
4
|
-
export declare type UpgradeSubType = ReleaseType | null;
|
|
5
|
-
export declare type UpgradeEvent = {
|
|
6
|
-
dependencyName: string;
|
|
7
|
-
versionString: string;
|
|
8
|
-
major: string | null;
|
|
9
|
-
minor: string | null;
|
|
10
|
-
patch: string | null;
|
|
11
|
-
date: string;
|
|
12
|
-
upgradeType: UpgradeType;
|
|
13
|
-
upgradeSubType: UpgradeSubType;
|
|
14
|
-
cliVersion: string;
|
|
15
|
-
latestTag: string | null;
|
|
16
|
-
nextTag: string | null;
|
|
17
|
-
hotfixTag: string | null;
|
|
18
|
-
rcTag: string | null;
|
|
19
|
-
dependencyType?: DependencyType;
|
|
20
|
-
historical?: boolean;
|
|
21
|
-
commitHash?: string;
|
|
22
|
-
};
|
|
23
|
-
export declare type DistTagsType = {
|
|
24
|
-
[tag: string]: string;
|
|
25
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UpgradeEvent, DependencyType, DistTagsType } from '../types';
|
|
2
|
-
export declare function createUpgradeEvent(name: string, version: string | undefined, previousVersion: string | undefined, date: string, optionalEventArgs?: {
|
|
3
|
-
commitHash?: string;
|
|
4
|
-
dependencyType?: DependencyType;
|
|
5
|
-
historical?: boolean;
|
|
6
|
-
}, tags?: DistTagsType): UpgradeEvent | null;
|
|
7
|
-
export declare function sendAnalytics(analyticsEvents: UpgradeEvent[], { dev, limit, product, skipPrompt, }: {
|
|
8
|
-
dev?: boolean;
|
|
9
|
-
limit?: number;
|
|
10
|
-
product: string;
|
|
11
|
-
skipPrompt?: boolean;
|
|
12
|
-
}): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (name: string): string | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getFileHistoryFromGit(fileName: string): Promise<string>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DistTagsType } from '../types';
|
|
2
|
-
export declare type PackageVersionHistoryAndTagsType = {
|
|
3
|
-
time: {
|
|
4
|
-
[version: string]: string;
|
|
5
|
-
};
|
|
6
|
-
'dist-tags': DistTagsType;
|
|
7
|
-
};
|
|
8
|
-
export default function getPackageVersionHistoryAndTags(packageName: string): Promise<PackageVersionHistoryAndTagsType>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { LogResult } from 'simple-git';
|
|
2
|
-
export declare function getChangesSince(since?: string): Promise<LogResult>;
|
|
3
|
-
export declare function tagCommit(tag: string): Promise<string>;
|
|
4
|
-
export declare function doesTagExist(tag: string): Promise<boolean>;
|
|
5
|
-
export declare function refetchTag(tag: string): Promise<{
|
|
6
|
-
fetchTagResult: import("simple-git").FetchResult | undefined;
|
|
7
|
-
}>;
|
|
8
|
-
export declare function getHash(ref: string): Promise<string>;
|
|
9
|
-
export declare function showFile(ref: string, filename: string, opts?: {
|
|
10
|
-
cwd?: string;
|
|
11
|
-
}): import("simple-git").Response<string>;
|
|
12
|
-
export declare function getFiles(ref: string, glob: string, opts?: {
|
|
13
|
-
cwd?: string;
|
|
14
|
-
}): Promise<string[]>;
|