@atlaskit/dependency-version-analytics 1.1.0 → 1.2.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -3
  3. package/dist/cjs/cli.js +52 -17
  4. package/dist/cjs/commands/populate-historic-data/index.js +2 -2
  5. package/dist/cjs/commands/populate-historic-data/lib/dependency-store.js +227 -451
  6. package/dist/cjs/commands/populate-historic-data/package.js +31 -75
  7. package/dist/cjs/commands/populate-historic-data/product.js +129 -289
  8. package/dist/cjs/commands/populate-historic-data/util/allowed-scopes.js +15 -0
  9. package/dist/cjs/commands/populate-historic-data/util/generate-csv.js +16 -21
  10. package/dist/cjs/constants.js +2 -2
  11. package/dist/cjs/index.js +3 -3
  12. package/dist/cjs/util/analytics.js +78 -102
  13. package/dist/cjs/util/get-file-history-from-git.js +4 -4
  14. package/dist/cjs/util/get-package-version-history.js +7 -5
  15. package/dist/cjs/util/git.js +75 -205
  16. package/dist/cjs/util/statlas.js +27 -97
  17. package/dist/cjs/util/yarn.js +40 -101
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/cli.js +10 -4
  20. package/dist/es2019/commands/populate-historic-data/lib/dependency-store.js +6 -4
  21. package/dist/es2019/commands/populate-historic-data/package.js +6 -5
  22. package/dist/es2019/commands/populate-historic-data/product.js +8 -6
  23. package/dist/es2019/commands/populate-historic-data/util/allowed-scopes.js +7 -0
  24. package/dist/es2019/commands/populate-historic-data/util/generate-csv.js +1 -1
  25. package/dist/es2019/util/analytics.js +5 -4
  26. package/dist/es2019/util/get-package-version-history.js +2 -0
  27. package/dist/es2019/version.json +1 -1
  28. package/dist/esm/cli.js +8 -3
  29. package/dist/esm/commands/populate-historic-data/lib/dependency-store.js +20 -15
  30. package/dist/esm/commands/populate-historic-data/package.js +22 -20
  31. package/dist/esm/commands/populate-historic-data/product.js +45 -42
  32. package/dist/esm/commands/populate-historic-data/util/allowed-scopes.js +11 -0
  33. package/dist/esm/commands/populate-historic-data/util/generate-csv.js +1 -1
  34. package/dist/esm/util/analytics.js +10 -7
  35. package/dist/esm/util/get-package-version-history.js +2 -0
  36. package/dist/esm/util/git.js +14 -13
  37. package/dist/esm/util/statlas.js +8 -7
  38. package/dist/esm/util/yarn.js +6 -5
  39. package/dist/esm/version.json +1 -1
  40. package/dist/types/commands/populate-historic-data/lib/dependency-store.d.ts +3 -2
  41. package/dist/types/commands/populate-historic-data/types.d.ts +3 -2
  42. package/dist/types/commands/populate-historic-data/util/allowed-scopes.d.ts +2 -0
  43. package/dist/types/commands/populate-historic-data/util/generate-csv.d.ts +2 -2
  44. package/dist/types/util/analytics.d.ts +2 -3
  45. package/package.json +2 -2
  46. package/report.api.md +1 -0
  47. package/tmp/api-report-tmp.d.ts +1 -0
  48. package/tokenize-arg-string.ts +0 -0
@@ -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
- constructor(cwd?: string);
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 static getAkDependencies;
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 AkPackageChange = {
16
- akDeps: DependencyMap;
16
+ export declare type PackageChange = {
17
+ deps: DependencyMap;
17
18
  date: string;
18
19
  };
@@ -0,0 +1,2 @@
1
+ export declare const getSupportedScopes: (enableNonAtlaskitPackages?: boolean) => string[];
2
+ export declare const isPackageFromSupportedScopes: (packageName: string, supportedScopes?: string[]) => boolean;
@@ -1,3 +1,3 @@
1
- import { AkPackageChange } from '../types';
1
+ import { PackageChange } from '../types';
2
2
  /** Generates a CSV of product package changes over time */
3
- export declare const generateCSV: (packageChanges: AkPackageChange[]) => string;
3
+ export declare const generateCSV: (packageChanges: PackageChange[]) => string;
@@ -1,10 +1,9 @@
1
1
  import { UpgradeEvent, DependencyType, DistTagsType } from '../types';
2
- export declare function createUpgradeEvent(name: string, version: string | undefined, previousVersion: string | undefined, date: string, optionalArgs?: {
2
+ export declare function createUpgradeEvent(name: string, version: string | undefined, previousVersion: string | undefined, date: string, optionalEventArgs?: {
3
3
  commitHash?: string;
4
4
  dependencyType?: DependencyType;
5
5
  historical?: boolean;
6
- tags?: DistTagsType;
7
- }): UpgradeEvent | null;
6
+ }, tags?: DistTagsType): UpgradeEvent | null;
8
7
  export declare function sendAnalytics(analyticsEvents: UpgradeEvent[], { dev, limit, product, skipPrompt, }: {
9
8
  dev?: boolean;
10
9
  limit?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dependency-version-analytics",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
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)
@@ -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)
File without changes