@lerna-lite/core 1.14.2 → 1.15.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/dist/constants.d.ts +1 -0
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/models/command-options.d.ts +4 -2
- package/dist/models/interfaces.d.ts +1 -92
- package/dist/project/lib/apply-extends.js +2 -1
- package/dist/project/lib/apply-extends.js.map +1 -1
- package/dist/utils/collect-updates/__helpers__/build-graph.js +0 -1
- package/dist/utils/collect-updates/__helpers__/build-graph.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/npm-conf.js +24 -2
- package/dist/utils/npm-conf.js.map +1 -1
- package/package.json +2 -18
- package/dist/conventional-commits/constants.d.ts +0 -4
- package/dist/conventional-commits/constants.js +0 -13
- package/dist/conventional-commits/constants.js.map +0 -1
- package/dist/conventional-commits/get-changelog-config.d.ts +0 -11
- package/dist/conventional-commits/get-changelog-config.js +0 -99
- package/dist/conventional-commits/get-changelog-config.js.map +0 -1
- package/dist/conventional-commits/get-commits-since-last-release.d.ts +0 -23
- package/dist/conventional-commits/get-commits-since-last-release.js +0 -71
- package/dist/conventional-commits/get-commits-since-last-release.js.map +0 -1
- package/dist/conventional-commits/get-github-commits.d.ts +0 -11
- package/dist/conventional-commits/get-github-commits.js +0 -67
- package/dist/conventional-commits/get-github-commits.js.map +0 -1
- package/dist/conventional-commits/index.d.ts +0 -9
- package/dist/conventional-commits/index.js +0 -26
- package/dist/conventional-commits/index.js.map +0 -1
- package/dist/conventional-commits/make-bump-only-filter.d.ts +0 -6
- package/dist/conventional-commits/make-bump-only-filter.js +0 -23
- package/dist/conventional-commits/make-bump-only-filter.js.map +0 -1
- package/dist/conventional-commits/read-existing-changelog.d.ts +0 -7
- package/dist/conventional-commits/read-existing-changelog.js +0 -33
- package/dist/conventional-commits/read-existing-changelog.js.map +0 -1
- package/dist/conventional-commits/recommend-version.d.ts +0 -12
- package/dist/conventional-commits/recommend-version.js +0 -87
- package/dist/conventional-commits/recommend-version.js.map +0 -1
- package/dist/conventional-commits/update-changelog.d.ts +0 -13
- package/dist/conventional-commits/update-changelog.js +0 -97
- package/dist/conventional-commits/update-changelog.js.map +0 -1
- package/dist/conventional-commits/writer-opts-transform.d.ts +0 -38
- package/dist/conventional-commits/writer-opts-transform.js +0 -72
- package/dist/conventional-commits/writer-opts-transform.js.map +0 -1
- package/dist/git-clients/GitLabClient.d.ts +0 -8
- package/dist/git-clients/GitLabClient.js +0 -39
- package/dist/git-clients/GitLabClient.js.map +0 -1
- package/dist/git-clients/github-client.d.ts +0 -4
- package/dist/git-clients/github-client.js +0 -39
- package/dist/git-clients/github-client.js.map +0 -1
- package/dist/git-clients/gitlab-client.d.ts +0 -6
- package/dist/git-clients/gitlab-client.js +0 -22
- package/dist/git-clients/gitlab-client.js.map +0 -1
- package/dist/git-clients/index.d.ts +0 -2
- package/dist/git-clients/index.js +0 -19
- package/dist/git-clients/index.js.map +0 -1
- package/dist/otplease.d.ts +0 -14
- package/dist/otplease.js +0 -109
- package/dist/otplease.js.map +0 -1
- package/dist/utils/temp-write.d.ts +0 -12
- package/dist/utils/temp-write.js +0 -50
- package/dist/utils/temp-write.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EOL = "\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export * from './conventional-commits';
|
|
2
|
-
export * from './git-clients';
|
|
3
1
|
export * from './models';
|
|
4
2
|
export * from './package-graph';
|
|
5
3
|
export * from './project';
|
|
6
4
|
export * from './utils';
|
|
7
5
|
export * from './child-process';
|
|
6
|
+
export * from './constants';
|
|
8
7
|
export * from './command';
|
|
9
|
-
export * from './otplease';
|
|
10
8
|
export * from './package';
|
|
11
9
|
export * from './prompt';
|
|
12
10
|
export * from './validation-error';
|
package/dist/index.js
CHANGED
|
@@ -15,16 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// folders
|
|
18
|
-
__exportStar(require("./conventional-commits"), exports);
|
|
19
|
-
__exportStar(require("./git-clients"), exports);
|
|
20
18
|
__exportStar(require("./models"), exports);
|
|
21
19
|
__exportStar(require("./package-graph"), exports);
|
|
22
20
|
__exportStar(require("./project"), exports);
|
|
23
21
|
__exportStar(require("./utils"), exports);
|
|
24
22
|
// files
|
|
25
23
|
__exportStar(require("./child-process"), exports);
|
|
24
|
+
__exportStar(require("./constants"), exports);
|
|
26
25
|
__exportStar(require("./command"), exports);
|
|
27
|
-
__exportStar(require("./otplease"), exports);
|
|
28
26
|
__exportStar(require("./package"), exports);
|
|
29
27
|
__exportStar(require("./prompt"), exports);
|
|
30
28
|
__exportStar(require("./validation-error"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,2CAAyB;AACzB,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AAExB,QAAQ;AACR,kDAAgC;AAChC,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,qDAAmC"}
|
|
@@ -72,6 +72,8 @@ export interface PublishCommandOption extends VersionCommandOption {
|
|
|
72
72
|
c?: boolean;
|
|
73
73
|
/** Publish packages after every successful merge using the sha as part of the tag. */
|
|
74
74
|
canary?: boolean;
|
|
75
|
+
/** Cleanup packed temp files/folders after publish process is finished, defaults to false. */
|
|
76
|
+
cleanupTempFiles?: boolean;
|
|
75
77
|
/** Specify the prerelease identifier when publishing a prerelease */
|
|
76
78
|
preid?: string;
|
|
77
79
|
/** Subdirectory to publish. Must apply to ALL packages. */
|
|
@@ -102,7 +104,7 @@ export interface PublishCommandOption extends VersionCommandOption {
|
|
|
102
104
|
registry?: string;
|
|
103
105
|
/** Remove fields from each package.json before publishing them to the registry, removing fields from a complex object is also supported via the dot notation (ie "scripts.build") */
|
|
104
106
|
removePackageFields?: string[];
|
|
105
|
-
/** Execute ./scripts/prepublish.js and ./scripts/postpublish.js, relative to package root. */
|
|
107
|
+
/** @deprecated Execute ./scripts/prepublish.js and ./scripts/postpublish.js, relative to package root. */
|
|
106
108
|
requireScripts?: boolean;
|
|
107
109
|
/** Do not reset changes to working tree after publishing is complete. */
|
|
108
110
|
noGitReset?: boolean;
|
|
@@ -294,7 +296,7 @@ export interface WatchCommandOption {
|
|
|
294
296
|
* This provide enough time for the system to collect all Chokidar events (1x per file changes)
|
|
295
297
|
* and merge them into a single Lerna watch change event to be emitted (Lerna will join all file paths into a CSV string separated by whitespace by default).
|
|
296
298
|
*/
|
|
297
|
-
|
|
299
|
+
debounce?: number;
|
|
298
300
|
/** Defaults to whitespace, the delimiter that will be used to separate files when mutiple file changes are emitted by the watch */
|
|
299
301
|
fileDelimiter?: string;
|
|
300
302
|
/** Glob pattern to define which file pattern to watch, note that this will be appended to the package file path being watched. */
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { GitRawCommitsOptions, ParserOptions } from 'conventional-changelog-core';
|
|
2
|
-
import { Options as WriterOptions } from 'conventional-changelog-writer';
|
|
3
|
-
import { Options as RecommendedBumpOptions } from 'conventional-recommended-bump';
|
|
4
1
|
import log from 'npmlog';
|
|
5
2
|
import npa from 'npm-package-arg';
|
|
6
3
|
import { Package } from '../package';
|
|
@@ -13,30 +10,6 @@ export type JsonObject = {
|
|
|
13
10
|
export type JsonArray = JsonValue[];
|
|
14
11
|
export type JsonPrimitive = string | number | boolean | null;
|
|
15
12
|
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
16
|
-
export type VersioningStrategy = 'fixed' | 'independent';
|
|
17
|
-
export type ChangelogType = 'fixed' | 'independent' | 'root';
|
|
18
|
-
export type ChangelogPresetConfig = string | {
|
|
19
|
-
name: string;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
export interface BaseChangelogOptions {
|
|
23
|
-
changelogPreset?: ChangelogPresetConfig;
|
|
24
|
-
rootPath?: string;
|
|
25
|
-
tagPrefix?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface ChangelogConfig {
|
|
28
|
-
conventionalChangelog: {
|
|
29
|
-
parserOpts: ParserOptions;
|
|
30
|
-
writerOpts: WriterOptions;
|
|
31
|
-
};
|
|
32
|
-
gitRawCommitsOpts: GitRawCommitsOptions & {
|
|
33
|
-
path: string;
|
|
34
|
-
};
|
|
35
|
-
key?: string;
|
|
36
|
-
parserOpts: ParserOptions;
|
|
37
|
-
recommendedBumpOpts: RecommendedBumpOptions;
|
|
38
|
-
writerOpts: WriterOptions;
|
|
39
|
-
}
|
|
40
13
|
export interface CommandOptions {
|
|
41
14
|
rollPublish?: boolean;
|
|
42
15
|
rollVersion?: boolean;
|
|
@@ -87,19 +60,6 @@ export interface Manifest {
|
|
|
87
60
|
manifest: Package;
|
|
88
61
|
version: string;
|
|
89
62
|
}
|
|
90
|
-
export interface UpdateChangelogOption {
|
|
91
|
-
changelogHeaderMessage?: string;
|
|
92
|
-
changelogVersionMessage?: string;
|
|
93
|
-
changelogPreset?: string;
|
|
94
|
-
changelogIncludeCommitsGitAuthor?: boolean | string;
|
|
95
|
-
changelogIncludeCommitsClientLogin?: boolean | string;
|
|
96
|
-
commitsSinceLastRelease?: RemoteCommit[];
|
|
97
|
-
rootPath?: string;
|
|
98
|
-
tagPrefix?: string;
|
|
99
|
-
version?: string;
|
|
100
|
-
/** @deprecated this option was renamed to `changelogIncludeCommitsGitAuthor` */
|
|
101
|
-
changelogIncludeCommitAuthorFullname?: boolean | string;
|
|
102
|
-
}
|
|
103
63
|
export interface FetchConfig {
|
|
104
64
|
fetchRetries: number;
|
|
105
65
|
log: log.Logger;
|
|
@@ -137,34 +97,10 @@ export interface QueryGraphConfig {
|
|
|
137
97
|
export interface TopologicalConfig extends QueryGraphConfig {
|
|
138
98
|
concurrency?: number;
|
|
139
99
|
}
|
|
140
|
-
export interface GitClientReleaseOption {
|
|
141
|
-
owner: string;
|
|
142
|
-
repo: string;
|
|
143
|
-
tag_name: string;
|
|
144
|
-
name: string;
|
|
145
|
-
body?: string;
|
|
146
|
-
draft?: boolean;
|
|
147
|
-
prerelease?: boolean;
|
|
148
|
-
}
|
|
149
|
-
export type GitCreateReleaseFn = (options: GitClientReleaseOption) => Promise<{
|
|
150
|
-
ok: boolean;
|
|
151
|
-
status: string;
|
|
152
|
-
statusText: string;
|
|
153
|
-
}>;
|
|
154
|
-
export interface GitClient {
|
|
155
|
-
createRelease: (opts: GitClientReleaseOption) => Promise<void>;
|
|
156
|
-
}
|
|
157
|
-
export interface GitCreateReleaseClientOutput {
|
|
158
|
-
repos: GitClient;
|
|
159
|
-
}
|
|
160
100
|
export type NpaResolveResult = (npa.FileResult | npa.HostedGitResult | npa.URLResult | npa.AliasResult | npa.RegistryResult) & {
|
|
161
101
|
/** the specifier part used when deailing with a `workspace:` protocol resource */
|
|
162
102
|
workspaceSpec?: string;
|
|
163
103
|
};
|
|
164
|
-
/** Passed between concurrent executions */
|
|
165
|
-
export interface OneTimePasswordCache {
|
|
166
|
-
otp?: string | number;
|
|
167
|
-
}
|
|
168
104
|
export interface LernaConfig {
|
|
169
105
|
command?: {
|
|
170
106
|
init?: InitCommandOption;
|
|
@@ -214,34 +150,6 @@ export interface ProjectConfig extends LernaConfig, QueryGraphConfig {
|
|
|
214
150
|
export interface RawManifest extends Package {
|
|
215
151
|
publishConfig?: Record<'directory' | 'registry' | 'tag', string>;
|
|
216
152
|
}
|
|
217
|
-
export interface ReleaseClient {
|
|
218
|
-
repos: {
|
|
219
|
-
createRelease: GitCreateReleaseFn;
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
export interface ReleaseCommandProps {
|
|
223
|
-
tags: string[];
|
|
224
|
-
releaseNotes: ReleaseNote[];
|
|
225
|
-
}
|
|
226
|
-
export interface ReleaseOptions {
|
|
227
|
-
gitRemote: string;
|
|
228
|
-
execOpts: ExecOpts;
|
|
229
|
-
}
|
|
230
|
-
export interface ReleaseNote {
|
|
231
|
-
name: string;
|
|
232
|
-
notes?: string;
|
|
233
|
-
}
|
|
234
|
-
export type RemoteClientType = 'gitlab' | 'github';
|
|
235
|
-
export type RemoteCommit = {
|
|
236
|
-
/** git commit author name */
|
|
237
|
-
authorName: string;
|
|
238
|
-
/** remote client login (ie github login) */
|
|
239
|
-
login: string;
|
|
240
|
-
/** commit message headling (50 chars maxlen) */
|
|
241
|
-
message: string;
|
|
242
|
-
/** short commit hash (7 chars long) */
|
|
243
|
-
shortHash: string;
|
|
244
|
-
};
|
|
245
153
|
export interface UpdateCollectorOptions {
|
|
246
154
|
/** The semver bump keyword (patch/minor/major) or explicit version used */
|
|
247
155
|
bump?: string;
|
|
@@ -262,3 +170,4 @@ export interface UpdateCollectorOptions {
|
|
|
262
170
|
conventionalGraduate?: boolean | string;
|
|
263
171
|
excludeDependents?: boolean;
|
|
264
172
|
}
|
|
173
|
+
export type RemoteClientType = 'gitlab' | 'github';
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.applyExtends = void 0;
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const resolve_from_1 = __importDefault(require("resolve-from"));
|
|
9
10
|
const shallow_extend_1 = require("./shallow-extend");
|
|
@@ -27,7 +28,7 @@ function applyExtends(config, cwd, seen = new Set()) {
|
|
|
27
28
|
throw new validation_error_1.ValidationError('ECIRCULAR', 'Config .extends cannot be circular', seen);
|
|
28
29
|
}
|
|
29
30
|
seen.add(pathToDefault);
|
|
30
|
-
defaultConfig =
|
|
31
|
+
defaultConfig = fs_extra_1.default.readJsonSync(pathToDefault, { throws: false });
|
|
31
32
|
delete config.extends; // eslint-disable-line no-param-reassign
|
|
32
33
|
// deprecateConfig(defaultConfig, pathToDefault);
|
|
33
34
|
defaultConfig = applyExtends(defaultConfig, path_1.default.dirname(pathToDefault), seen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-extends.js","sourceRoot":"","sources":["../../../src/project/lib/apply-extends.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,gEAAuC;AAEvC,qDAAiD;AACjD,6DAAyD;AAEzD;;;;GAIG;AACH,SAAgB,YAAY,CAAC,MAA8B,EAAE,GAAW,EAAE,OAAO,IAAI,GAAG,EAAU;IAChG,IAAI,aAAa,GAAG,EAAE,CAAC;IAEvB,IAAI,SAAS,IAAI,MAAM,EAAE;QACvB,IAAI,aAAa,CAAC;QAElB,IAAI;YACF,aAAa,GAAG,IAAA,sBAAW,EAAC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;SAClD;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,IAAI,kCAAe,CAAC,WAAW,EAAE,4CAA4C,EAAE,GAAG,CAAC,CAAC;SAC3F;QAED,IAAI,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;YAC3B,MAAM,IAAI,kCAAe,CAAC,WAAW,EAAE,oCAAoC,EAAE,IAAW,CAAC,CAAC;SAC3F;QAED,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAExB,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"apply-extends.js","sourceRoot":"","sources":["../../../src/project/lib/apply-extends.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AACxB,gEAAuC;AAEvC,qDAAiD;AACjD,6DAAyD;AAEzD;;;;GAIG;AACH,SAAgB,YAAY,CAAC,MAA8B,EAAE,GAAW,EAAE,OAAO,IAAI,GAAG,EAAU;IAChG,IAAI,aAAa,GAAG,EAAE,CAAC;IAEvB,IAAI,SAAS,IAAI,MAAM,EAAE;QACvB,IAAI,aAAa,CAAC;QAElB,IAAI;YACF,aAAa,GAAG,IAAA,sBAAW,EAAC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;SAClD;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,IAAI,kCAAe,CAAC,WAAW,EAAE,4CAA4C,EAAE,GAAG,CAAC,CAAC;SAC3F;QAED,IAAI,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;YAC3B,MAAM,IAAI,kCAAe,CAAC,WAAW,EAAE,oCAAoC,EAAE,IAAW,CAAC,CAAC;SAC3F;QAED,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAExB,aAAa,GAAG,kBAAE,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,wCAAwC;QAE/D,iDAAiD;QAEjD,aAAa,GAAG,YAAY,CAAC,aAAa,EAAE,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC,CAAC;KAChF;IAED,OAAO,IAAA,8BAAa,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAC9C,CAAC;AA3BD,oCA2BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-graph.js","sourceRoot":"","sources":["../../../../src/utils/collect-updates/__hel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I,EAAE,EAAE,CAAC,IAAI,eAAO,CAAC,IAAI,EAAE,kBAAkB,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAE5E,OAAO,IAAI,oBAAY,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,kBAAe,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"build-graph.js","sourceRoot":"","sources":["../../../../src/utils/collect-updates/__helpers__/build-graph.ts"],"names":[],"mappings":";;AAAA,UAAU;AACV,0CAAuD;AAEvD,SAAS,UAAU,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;IAC5C,oDAAoD;IACpD,MAAM,QAAQ,GAAG;QACf;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,iEAAiE;YAC9E,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,iEAAiE;YAC9E,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;gBAC1B,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,OAAO;SACjB;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,gBAAgB,EAAE,OAAO;gBACzB,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;SACjB;KACF;SACE,GAAG,CAAC,WAAW,CAAC;SAChB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,eAAO,CAAC,IAAI,EAAE,kBAAkB,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAE5E,OAAO,IAAI,oBAAY,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,kBAAe,UAAU,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export * from './query-graph';
|
|
|
17
17
|
export * from './run-lifecycle';
|
|
18
18
|
export * from './run-topologically';
|
|
19
19
|
export * from './string-utils';
|
|
20
|
-
export * from './temp-write';
|
|
21
20
|
export * from './types';
|
|
22
21
|
export * from './warn-if-hanging';
|
|
23
22
|
export * from './write-log-file';
|
package/dist/utils/index.js
CHANGED
|
@@ -34,7 +34,6 @@ __exportStar(require("./query-graph"), exports);
|
|
|
34
34
|
__exportStar(require("./run-lifecycle"), exports);
|
|
35
35
|
__exportStar(require("./run-topologically"), exports);
|
|
36
36
|
__exportStar(require("./string-utils"), exports);
|
|
37
|
-
__exportStar(require("./temp-write"), exports);
|
|
38
37
|
__exportStar(require("./types"), exports);
|
|
39
38
|
__exportStar(require("./warn-if-hanging"), exports);
|
|
40
39
|
__exportStar(require("./write-log-file"), exports);
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,gDAA8B;AAC9B,wDAAsC;AACtC,yCAAyC;AACzC,6CAA2B;AAC3B,iDAA+B;AAC/B,gDAA8B;AAC9B,gDAA8B;AAC9B,sDAAoC;AACpC,6CAA2B;AAC3B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,+DAA6C;AAC7C,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,sDAAoC;AACpC,iDAA+B;AAC/B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,gDAA8B;AAC9B,wDAAsC;AACtC,yCAAyC;AACzC,6CAA2B;AAC3B,iDAA+B;AAC/B,gDAA8B;AAC9B,gDAA8B;AAC9B,sDAAoC;AACpC,6CAA2B;AAC3B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,+DAA6C;AAC7C,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,sDAAoC;AACpC,iDAA+B;AAC/B,0CAAwB;AACxB,oDAAkC;AAClC,mDAAiC"}
|
package/dist/utils/npm-conf.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
@@ -9,7 +32,7 @@ const conf_1 = require("../utils/conf");
|
|
|
9
32
|
Object.defineProperty(exports, "Conf", { enumerable: true, get: function () { return conf_1.Conf; } });
|
|
10
33
|
const nerf_dart_1 = require("./nerf-dart");
|
|
11
34
|
Object.defineProperty(exports, "toNerfDart", { enumerable: true, get: function () { return nerf_dart_1.toNerfDart; } });
|
|
12
|
-
const defaults = require(
|
|
35
|
+
const defaults = __importStar(require("./defaults"));
|
|
13
36
|
// https://github.com/npm/npm/blob/latest/lib/config/core.js#L101-L200
|
|
14
37
|
function npmConf(opts) {
|
|
15
38
|
const conf = new conf_1.Conf(Object.assign({}, defaults.defaults));
|
|
@@ -53,5 +76,4 @@ function npmConf(opts) {
|
|
|
53
76
|
return conf;
|
|
54
77
|
}
|
|
55
78
|
exports.npmConf = npmConf;
|
|
56
|
-
module.exports.defaults = Object.assign({}, defaults.defaults);
|
|
57
79
|
//# sourceMappingURL=npm-conf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-conf.js","sourceRoot":"","sources":["../../src/utils/npm-conf.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npm-conf.js","sourceRoot":"","sources":["../../src/utils/npm-conf.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IAE7C,0BAA0B;IAC1B,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QACtB,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;KAC7D;IAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,QAAQ,EAAE,CAAC;IAEhB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAElC,wBAAwB;IACxB,IAAI,MAAM,EAAE;QACV,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;KACzB;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAEc,0BAAO"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lerna-lite/core",
|
|
3
3
|
"description": "Lerna-Lite core implementation module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.15.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"typings": "dist/index.d.ts",
|
|
@@ -28,44 +28,28 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@npmcli/run-script": "^6.0.0",
|
|
31
|
-
"@octokit/plugin-enterprise-rest": "^6.0.1",
|
|
32
|
-
"@octokit/rest": "^19.0.5",
|
|
33
31
|
"chalk": "^4.1.2",
|
|
34
32
|
"clone-deep": "^4.0.1",
|
|
35
33
|
"config-chain": "^1.1.13",
|
|
36
|
-
"conventional-changelog-angular": "^5.0.13",
|
|
37
|
-
"conventional-changelog-core": "^4.2.4",
|
|
38
|
-
"conventional-changelog-writer": "^5.0.1",
|
|
39
|
-
"conventional-commits-parser": "^3.2.4",
|
|
40
|
-
"conventional-recommended-bump": "^6.1.0",
|
|
41
34
|
"cosmiconfig": "^8.0.0",
|
|
42
35
|
"dedent": "^0.7.0",
|
|
43
36
|
"execa": "^5.1.1",
|
|
44
37
|
"fs-extra": "^11.1.0",
|
|
45
|
-
"get-stream": "^6.0.1",
|
|
46
|
-
"git-url-parse": "^13.1.0",
|
|
47
38
|
"glob-parent": "^6.0.2",
|
|
48
39
|
"globby": "^11.1.0",
|
|
49
|
-
"graceful-fs": "^4.2.10",
|
|
50
40
|
"inquirer": "^8.2.4",
|
|
51
41
|
"is-ci": "^3.0.1",
|
|
52
|
-
"is-stream": "^2.0.1",
|
|
53
42
|
"load-json-file": "^6.2.0",
|
|
54
|
-
"make-dir": "^3.1.0",
|
|
55
43
|
"minimatch": "^5.1.6",
|
|
56
|
-
"node-fetch": "^2.6.7",
|
|
57
44
|
"npm-package-arg": "^10.1.0",
|
|
58
45
|
"npmlog": "^7.0.1",
|
|
59
46
|
"p-map": "^4.0.0",
|
|
60
47
|
"p-queue": "^6.6.2",
|
|
61
48
|
"path": "^0.12.7",
|
|
62
|
-
"pify": "^5.0.0",
|
|
63
49
|
"resolve-from": "^5.0.0",
|
|
64
50
|
"semver": "^7.3.8",
|
|
65
51
|
"slash": "^3.0.0",
|
|
66
52
|
"strong-log-transformer": "^2.1.0",
|
|
67
|
-
"temp-dir": "^1.0.0",
|
|
68
|
-
"uuid": "^9.0.0",
|
|
69
53
|
"write-file-atomic": "^5.0.0",
|
|
70
54
|
"write-json-file": "^4.3.0",
|
|
71
55
|
"write-pkg": "^4.0.0"
|
|
@@ -74,5 +58,5 @@
|
|
|
74
58
|
"type": "ko_fi",
|
|
75
59
|
"url": "https://ko-fi.com/ghiscoding"
|
|
76
60
|
},
|
|
77
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "4643d0113b7b9617a7eb94cb2f7da523b1e5b70e"
|
|
78
62
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHANGELOG_HEADER = exports.COMMIT_GUIDELINE = exports.BLANK_LINE = exports.EOL = void 0;
|
|
4
|
-
exports.EOL = '\n';
|
|
5
|
-
exports.BLANK_LINE = exports.EOL + exports.EOL;
|
|
6
|
-
exports.COMMIT_GUIDELINE = 'See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.';
|
|
7
|
-
exports.CHANGELOG_HEADER = [
|
|
8
|
-
'# Change Log',
|
|
9
|
-
'%s',
|
|
10
|
-
'All notable changes to this project will be documented in this file.',
|
|
11
|
-
exports.COMMIT_GUIDELINE,
|
|
12
|
-
].join(exports.EOL);
|
|
13
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/conventional-commits/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG,IAAI,CAAC;AACX,QAAA,UAAU,GAAG,WAAG,GAAG,WAAG,CAAC;AACvB,QAAA,gBAAgB,GAAG,oFAAoF,CAAC;AACxG,QAAA,gBAAgB,GAAG;IAC9B,cAAc;IACd,IAAI;IACJ,sEAAsE;IACtE,wBAAgB;CACjB,CAAC,IAAI,CAAC,WAAG,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ChangelogConfig, ChangelogPresetConfig } from '../models';
|
|
2
|
-
export declare class GetChangelogConfig {
|
|
3
|
-
static cfgCache: Map<string, any>;
|
|
4
|
-
static isFunction(config: ChangelogConfig): boolean;
|
|
5
|
-
static resolveConfigPromise(presetPackageName: string, presetConfig: ChangelogPresetConfig): Promise<ChangelogConfig>;
|
|
6
|
-
/**
|
|
7
|
-
* @param {ChangelogPresetConfig} [changelogPreset]
|
|
8
|
-
* @param {string} [rootPath]
|
|
9
|
-
*/
|
|
10
|
-
static getChangelogConfig(changelogPreset?: ChangelogPresetConfig, rootPath?: string): Promise<ChangelogConfig>;
|
|
11
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GetChangelogConfig = void 0;
|
|
7
|
-
const npmlog_1 = __importDefault(require("npmlog"));
|
|
8
|
-
const pify_1 = __importDefault(require("pify"));
|
|
9
|
-
const npm_package_arg_1 = __importDefault(require("npm-package-arg"));
|
|
10
|
-
const validation_error_1 = require("../validation-error");
|
|
11
|
-
class GetChangelogConfig {
|
|
12
|
-
static isFunction(config) {
|
|
13
|
-
return Object.prototype.toString.call(config) === '[object Function]';
|
|
14
|
-
}
|
|
15
|
-
static resolveConfigPromise(presetPackageName, presetConfig) {
|
|
16
|
-
npmlog_1.default.verbose('getChangelogConfig', 'Attempting to resolve preset %j', presetPackageName);
|
|
17
|
-
let config = require(presetPackageName);
|
|
18
|
-
npmlog_1.default.info('getChangelogConfig', 'Successfully resolved preset %j', presetPackageName);
|
|
19
|
-
if (this.isFunction(config)) {
|
|
20
|
-
try {
|
|
21
|
-
// try assuming config builder function first
|
|
22
|
-
config = config(presetConfig);
|
|
23
|
-
}
|
|
24
|
-
catch (_) {
|
|
25
|
-
// legacy presets export an errback function instead of Q.all()
|
|
26
|
-
config = (0, pify_1.default)(config)();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return config;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @param {ChangelogPresetConfig} [changelogPreset]
|
|
33
|
-
* @param {string} [rootPath]
|
|
34
|
-
*/
|
|
35
|
-
static getChangelogConfig(changelogPreset = 'conventional-changelog-angular', rootPath) {
|
|
36
|
-
const presetName = typeof changelogPreset === 'string' ? changelogPreset : changelogPreset.name;
|
|
37
|
-
const presetConfig = typeof changelogPreset === 'object' ? changelogPreset : {};
|
|
38
|
-
const cacheKey = `${presetName}${presetConfig ? JSON.stringify(presetConfig) : ''}`;
|
|
39
|
-
let config = GetChangelogConfig.cfgCache.get(cacheKey);
|
|
40
|
-
if (!config) {
|
|
41
|
-
let presetPackageName = presetName;
|
|
42
|
-
// https://github.com/npm/npm-package-arg#result-object
|
|
43
|
-
const parsed = (0, npm_package_arg_1.default)(presetPackageName, rootPath);
|
|
44
|
-
npmlog_1.default.verbose('getChangelogConfig', 'using preset %j', presetPackageName);
|
|
45
|
-
npmlog_1.default.silly('npa', parsed);
|
|
46
|
-
if (parsed.type === 'directory') {
|
|
47
|
-
if (parsed.raw[0] === '@') {
|
|
48
|
-
// npa parses scoped subpath reference as a directory
|
|
49
|
-
parsed.name = parsed.raw;
|
|
50
|
-
parsed.scope = parsed.raw.substring(0, parsed.raw.indexOf('/'));
|
|
51
|
-
// un-scoped subpath shorthand handled in first catch block
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
presetPackageName = parsed.fetchSpec;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else if (parsed.type === 'git' && parsed.hosted && parsed.hosted.default === 'shortcut') {
|
|
58
|
-
// probably a shorthand subpath, e.g. 'foo/bar'
|
|
59
|
-
parsed.name = parsed.raw;
|
|
60
|
-
}
|
|
61
|
-
// Maybe it doesn't need an implicit 'conventional-changelog-' prefix?
|
|
62
|
-
try {
|
|
63
|
-
config = this.resolveConfigPromise(presetPackageName, presetConfig);
|
|
64
|
-
GetChangelogConfig.cfgCache.set(cacheKey, config);
|
|
65
|
-
// early exit, yay
|
|
66
|
-
return Promise.resolve(config);
|
|
67
|
-
}
|
|
68
|
-
catch (err) {
|
|
69
|
-
npmlog_1.default.verbose('getChangelogConfig', err.message);
|
|
70
|
-
npmlog_1.default.info('getChangelogConfig', 'Auto-prefixing conventional-changelog preset %j', presetName);
|
|
71
|
-
// probably a deep shorthand subpath :P
|
|
72
|
-
parsed.name = parsed.raw;
|
|
73
|
-
}
|
|
74
|
-
if (parsed.name.indexOf('conventional-changelog-') < 0) {
|
|
75
|
-
// implicit 'conventional-changelog-' prefix
|
|
76
|
-
const parts = parsed.name.split('/');
|
|
77
|
-
const start = parsed.scope ? 1 : 0;
|
|
78
|
-
// foo => conventional-changelog-foo
|
|
79
|
-
// @scope/foo => @scope/conventional-changelog-foo
|
|
80
|
-
parts.splice(start, 1, `conventional-changelog-${parts[start]}`);
|
|
81
|
-
// _technically_ supports 'foo/lib/bar.js', but that's gross
|
|
82
|
-
presetPackageName = parts.join('/');
|
|
83
|
-
}
|
|
84
|
-
try {
|
|
85
|
-
config = this.resolveConfigPromise(presetPackageName, presetConfig);
|
|
86
|
-
GetChangelogConfig.cfgCache.set(cacheKey, config);
|
|
87
|
-
}
|
|
88
|
-
catch (err) {
|
|
89
|
-
npmlog_1.default.warn('getChangelogConfig', err.message);
|
|
90
|
-
throw new validation_error_1.ValidationError('EPRESET', `Unable to load conventional-changelog preset "${presetName}"${presetName !== presetPackageName ? ` (${presetPackageName})` : ''}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// the core presets are bloody Q.all() spreads
|
|
94
|
-
return Promise.resolve(config);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.GetChangelogConfig = GetChangelogConfig;
|
|
98
|
-
GetChangelogConfig.cfgCache = new Map();
|
|
99
|
-
//# sourceMappingURL=get-changelog-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-changelog-config.js","sourceRoot":"","sources":["../../src/conventional-commits/get-changelog-config.ts"],"names":[],"mappings":";;;;;;A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ED,8CAA8C;QAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;;AAhHH,gDAiHC;AAhHQ,2BAAQ,GAAG,IAAI,GAAG,EAAe,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ExecOpts, RemoteClientType, RemoteCommit } from '../models';
|
|
2
|
-
/**
|
|
3
|
-
* From the current branch, find all commits since the last tag release.
|
|
4
|
-
* The output will be an array which include every commit short hash & user login
|
|
5
|
-
* @param {RemoteClientType} client
|
|
6
|
-
* @param {String} gitRemote
|
|
7
|
-
* @param {String} branchName
|
|
8
|
-
* @param {Boolean} [isIndependent]
|
|
9
|
-
* @param {ExecOpts} [execOpts]
|
|
10
|
-
* @returns {Promise<RemoteCommit[]>}
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCommitsSinceLastRelease(client: RemoteClientType, gitRemote: string, branchName: string, isIndependent?: boolean, execOpts?: ExecOpts): Promise<RemoteCommit[]>;
|
|
13
|
-
/**
|
|
14
|
-
* Find the oldest commit details since the last release tag or else if not tag exists then return first commit info
|
|
15
|
-
* @param {ExecOpts} [execOpts]
|
|
16
|
-
* @param {Boolean} [includeMergedTags]
|
|
17
|
-
* @param {Boolean} [isIndependent]
|
|
18
|
-
* @returns {*} - oldest commit detail (hash, date)
|
|
19
|
-
*/
|
|
20
|
-
export declare function getOldestCommitSinceLastTag(execOpts?: ExecOpts, isIndependent?: boolean, includeMergedTags?: boolean): {
|
|
21
|
-
commitHash: string;
|
|
22
|
-
commitDate: string;
|
|
23
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getOldestCommitSinceLastTag = exports.getCommitsSinceLastRelease = void 0;
|
|
7
|
-
const npmlog_1 = __importDefault(require("npmlog"));
|
|
8
|
-
const child_process_1 = require("../child-process");
|
|
9
|
-
const get_github_commits_1 = require("./get-github-commits");
|
|
10
|
-
const describe_ref_1 = require("../utils/describe-ref");
|
|
11
|
-
const validation_error_1 = require("../validation-error");
|
|
12
|
-
/**
|
|
13
|
-
* From the current branch, find all commits since the last tag release.
|
|
14
|
-
* The output will be an array which include every commit short hash & user login
|
|
15
|
-
* @param {RemoteClientType} client
|
|
16
|
-
* @param {String} gitRemote
|
|
17
|
-
* @param {String} branchName
|
|
18
|
-
* @param {Boolean} [isIndependent]
|
|
19
|
-
* @param {ExecOpts} [execOpts]
|
|
20
|
-
* @returns {Promise<RemoteCommit[]>}
|
|
21
|
-
*/
|
|
22
|
-
async function getCommitsSinceLastRelease(client, gitRemote, branchName, isIndependent, execOpts) {
|
|
23
|
-
// get the last release tag date or the first commit date if no release tag found
|
|
24
|
-
const { commitDate } = getOldestCommitSinceLastTag(execOpts, isIndependent, false);
|
|
25
|
-
switch (client) {
|
|
26
|
-
case 'github':
|
|
27
|
-
return (0, get_github_commits_1.getGithubCommits)(gitRemote, branchName, commitDate, execOpts);
|
|
28
|
-
case 'gitlab':
|
|
29
|
-
default:
|
|
30
|
-
throw new validation_error_1.ValidationError('EREMOTE', 'Invalid remote client type, "github" is currently the only supported client with the option --changelog-include-commits-client-login.');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.getCommitsSinceLastRelease = getCommitsSinceLastRelease;
|
|
34
|
-
/**
|
|
35
|
-
* Find the oldest commit details since the last release tag or else if not tag exists then return first commit info
|
|
36
|
-
* @param {ExecOpts} [execOpts]
|
|
37
|
-
* @param {Boolean} [includeMergedTags]
|
|
38
|
-
* @param {Boolean} [isIndependent]
|
|
39
|
-
* @returns {*} - oldest commit detail (hash, date)
|
|
40
|
-
*/
|
|
41
|
-
function getOldestCommitSinceLastTag(execOpts, isIndependent, includeMergedTags) {
|
|
42
|
-
let commitResult = '';
|
|
43
|
-
const describeOptions = { ...execOpts };
|
|
44
|
-
if (isIndependent) {
|
|
45
|
-
describeOptions.match = '*@*'; // independent tag pattern
|
|
46
|
-
}
|
|
47
|
-
const { lastTagName } = (0, describe_ref_1.describeRefSync)(describeOptions, includeMergedTags);
|
|
48
|
-
if (lastTagName) {
|
|
49
|
-
const gitCommandArgs = ['log', `${lastTagName}..HEAD`, '--format="%h %aI"', '--reverse'];
|
|
50
|
-
npmlog_1.default.silly('git', 'getCurrentBranchOldestCommitSinceLastTag');
|
|
51
|
-
npmlog_1.default.verbose('exec', `git ${gitCommandArgs.join(' ')}`);
|
|
52
|
-
let stdout = (0, child_process_1.execSync)('git', gitCommandArgs, execOpts);
|
|
53
|
-
if (!stdout) {
|
|
54
|
-
// in some occasion the previous git command might return nothing, in that case we'll return the tag detail instead
|
|
55
|
-
stdout = (0, child_process_1.execSync)('git', ['log', '-1', '--format="%h %aI"', lastTagName], execOpts);
|
|
56
|
-
}
|
|
57
|
-
[commitResult] = stdout.split('\n');
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
const gitCommandArgs = ['log', '--oneline', '--format="%h %aI"', '--reverse', '--max-parents=0', 'HEAD'];
|
|
61
|
-
npmlog_1.default.silly('git', 'getCurrentBranchFirstCommit');
|
|
62
|
-
npmlog_1.default.verbose('exec', `git ${gitCommandArgs.join(' ')}`);
|
|
63
|
-
commitResult = (0, child_process_1.execSync)('git', gitCommandArgs, execOpts);
|
|
64
|
-
}
|
|
65
|
-
const [, commitHash, commitDate] = /^"?([0-9a-f]+)\s([0-9\-|\+T\:]*)"?$/.exec(commitResult) || [];
|
|
66
|
-
// prettier-ignore
|
|
67
|
-
npmlog_1.default.info('oldestCommitSinceLastTag', `commit found since last tag: ${lastTagName} - (SHA) ${commitHash} - ${commitDate}`);
|
|
68
|
-
return { commitHash, commitDate };
|
|
69
|
-
}
|
|
70
|
-
exports.getOldestCommitSinceLastTag = getOldestCommitSinceLastTag;
|
|
71
|
-
//# sourceMappingURL=get-commits-since-last-release.js.map
|