@code-pushup/core 0.39.0 → 0.42.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/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@code-pushup/core",
3
- "version": "0.39.0",
3
+ "version": "0.42.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "@code-pushup/models": "0.39.0",
7
- "@code-pushup/utils": "0.39.0",
6
+ "@code-pushup/models": "0.42.0",
7
+ "@code-pushup/utils": "0.42.0",
8
8
  "@code-pushup/portal-client": "^0.6.1",
9
- "chalk": "^5.3.0",
10
- "simple-git": "^3.20.0"
9
+ "chalk": "^5.3.0"
11
10
  },
12
11
  "type": "module",
13
12
  "main": "./index.js",
@@ -17,7 +16,7 @@
17
16
  },
18
17
  "repository": {
19
18
  "type": "git",
20
- "url": "https://github.com/code-pushup/cli.git",
19
+ "url": "git+https://github.com/code-pushup/cli.git",
21
20
  "directory": "packages/core"
22
21
  },
23
22
  "contributors": [
package/src/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { CollectOptions, collect } from './lib/implementation/collect';
4
4
  export { ReportsToCompare } from './lib/implementation/compare-scorables';
5
5
  export { PluginOutputMissingAuditError, executePlugin, executePlugins, } from './lib/implementation/execute-plugin';
6
6
  export { PersistDirError, PersistError, persistReport, } from './lib/implementation/persist';
7
- export { history, HistoryOptions, HistoryOnlyOptions, getHashes, } from './lib/history';
7
+ export { history, HistoryOptions, HistoryOnlyOptions } from './lib/history';
8
8
  export { ConfigPathError, autoloadRc, readRcByPath, } from './lib/implementation/read-rc-file';
9
9
  export { GlobalOptions } from './lib/types';
10
10
  export { UploadOptions, upload } from './lib/upload';
@@ -1,4 +1,3 @@
1
- import { LogOptions, LogResult } from 'simple-git';
2
1
  import { CoreConfig, PersistConfig, UploadConfig } from '@code-pushup/models';
3
2
  import { GlobalOptions } from './types';
4
3
  export type HistoryOnlyOptions = {
@@ -11,44 +10,3 @@ export type HistoryOptions = Required<Pick<CoreConfig, 'plugins'> & Required<Pic
11
10
  upload?: Required<UploadConfig>;
12
11
  } & HistoryOnlyOptions & Partial<GlobalOptions>;
13
12
  export declare function history(config: HistoryOptions, commits: string[]): Promise<string[]>;
14
- /**
15
- * `getHashes` returns a list of commit hashes. Internally it uses `git.log()` to determine the commits within a range.
16
- * The amount can be limited to a maximum number of commits specified by `maxCount`.
17
- * With `from` and `to`, you can specify a range of commits.
18
- *
19
- * **NOTE:**
20
- * In Git, specifying a range with two dots (`from..to`) selects commits that are reachable from `to` but not from `from`.
21
- * Essentially, it shows the commits that are in `to` but not in `from`, excluding the commits unique to `from`.
22
- *
23
- * Example:
24
- *
25
- * Let's consider the following commit history:
26
- *
27
- * A---B---C---D---E (main)
28
- *
29
- * Using `git log B..D`, you would get the commits C and D:
30
- *
31
- * C---D
32
- *
33
- * This is because these commits are reachable from D but not from B.
34
- *
35
- * ASCII Representation:
36
- *
37
- * Main Branch: A---B---C---D---E
38
- * \ \
39
- * \ +--- Commits included in `git log B..D`
40
- * \
41
- * +--- Excluded by the `from` parameter
42
- *
43
- * With `simple-git`, when you specify a `from` and `to` range like this:
44
- *
45
- * git.log({ from: 'B', to: 'D' });
46
- *
47
- * It interprets it similarly, selecting commits between B and D, inclusive of D but exclusive of B.
48
- * For `git.log({ from: 'B', to: 'D' })` or `git log B..D`, commits C and D are selected.
49
- *
50
- * @param options Object containing `from`, `to`, and optionally `maxCount` to specify the commit range and limit.
51
- * @param git The `simple-git` instance used to execute Git commands.
52
- */
53
- export declare function getHashes(options: LogOptions, git?: import("simple-git").SimpleGit): Promise<string[]>;
54
- export declare function prepareHashes(logs: LogResult): string[];
@@ -1,2 +1,3 @@
1
- import { type AuditOutputs } from '@code-pushup/models';
1
+ import { type AuditOutputs, Issue } from '@code-pushup/models';
2
+ export declare function normalizeIssue(issue: Issue, gitRoot: string): Issue;
2
3
  export declare function normalizeAuditOutputs(audits: AuditOutputs): Promise<AuditOutputs>;