@lerna-lite/core 1.10.0 → 1.11.2

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.
@@ -5,17 +5,19 @@ import { ExecOpts, RemoteClientType, RemoteCommit } from '../models';
5
5
  * @param {RemoteClientType} client
6
6
  * @param {String} gitRemote
7
7
  * @param {String} branchName
8
+ * @param {Boolean} [isIndependent]
8
9
  * @param {ExecOpts} [execOpts]
9
10
  * @returns {Promise<RemoteCommit[]>}
10
11
  */
11
- export declare function getCommitsSinceLastRelease(client: RemoteClientType, gitRemote: string, branchName: string, execOpts?: ExecOpts): Promise<RemoteCommit[]>;
12
+ export declare function getCommitsSinceLastRelease(client: RemoteClientType, gitRemote: string, branchName: string, isIndependent?: boolean, execOpts?: ExecOpts): Promise<RemoteCommit[]>;
12
13
  /**
13
14
  * Find the oldest commit details since the last release tag or else if not tag exists then return first commit info
14
15
  * @param {ExecOpts} [execOpts]
15
16
  * @param {Boolean} [includeMergedTags]
17
+ * @param {Boolean} [isIndependent]
16
18
  * @returns {*} - oldest commit detail (hash, date)
17
19
  */
18
- export declare function getOldestCommitSinceLastTag(execOpts?: ExecOpts, includeMergedTags?: boolean): {
20
+ export declare function getOldestCommitSinceLastTag(execOpts?: ExecOpts, isIndependent?: boolean, includeMergedTags?: boolean): {
19
21
  commitHash: string;
20
22
  commitDate: string;
21
23
  };
@@ -15,12 +15,13 @@ const validation_error_1 = require("../validation-error");
15
15
  * @param {RemoteClientType} client
16
16
  * @param {String} gitRemote
17
17
  * @param {String} branchName
18
+ * @param {Boolean} [isIndependent]
18
19
  * @param {ExecOpts} [execOpts]
19
20
  * @returns {Promise<RemoteCommit[]>}
20
21
  */
21
- async function getCommitsSinceLastRelease(client, gitRemote, branchName, execOpts) {
22
+ async function getCommitsSinceLastRelease(client, gitRemote, branchName, isIndependent, execOpts) {
22
23
  // get the last release tag date or the first commit date if no release tag found
23
- const { commitDate } = getOldestCommitSinceLastTag(execOpts, false);
24
+ const { commitDate } = getOldestCommitSinceLastTag(execOpts, isIndependent, false);
24
25
  switch (client) {
25
26
  case 'github':
26
27
  return (0, get_github_commits_1.getGithubCommits)(gitRemote, branchName, commitDate, execOpts);
@@ -34,22 +35,36 @@ 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
35
36
  * @param {ExecOpts} [execOpts]
36
37
  * @param {Boolean} [includeMergedTags]
38
+ * @param {Boolean} [isIndependent]
37
39
  * @returns {*} - oldest commit detail (hash, date)
38
40
  */
39
- function getOldestCommitSinceLastTag(execOpts, includeMergedTags) {
41
+ function getOldestCommitSinceLastTag(execOpts, isIndependent, includeMergedTags) {
40
42
  let commitResult = '';
41
43
  const describeOptions = { ...execOpts };
44
+ if (isIndependent) {
45
+ describeOptions.match = '*@*'; // independent tag pattern
46
+ }
42
47
  const { lastTagName } = (0, describe_ref_1.describeRefSync)(describeOptions, includeMergedTags);
43
48
  if (lastTagName) {
49
+ const gitCommandArgs = ['log', `${lastTagName}..HEAD`, '--format="%h %aI"', '--reverse'];
44
50
  npmlog_1.default.silly('git', 'getCurrentBranchOldestCommitSinceLastTag');
45
- const stdout = (0, child_process_1.execSync)('git', ['log', `${lastTagName}..HEAD`, '--format="%h %cI"', '--reverse'], execOpts);
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
+ }
46
57
  [commitResult] = stdout.split('\n');
47
58
  }
48
59
  else {
60
+ const gitCommandArgs = ['log', '--oneline', '--format="%h %aI"', '--reverse', '--max-parents=0', 'HEAD'];
49
61
  npmlog_1.default.silly('git', 'getCurrentBranchFirstCommit');
50
- commitResult = (0, child_process_1.execSync)('git', ['log', '--oneline', '--format="%h %cI"', '--reverse', '--max-parents=0', 'HEAD'], execOpts);
62
+ npmlog_1.default.verbose('exec', `git ${gitCommandArgs.join(' ')}`);
63
+ commitResult = (0, child_process_1.execSync)('git', gitCommandArgs, execOpts);
51
64
  }
52
- const [, commitHash, commitDate] = /^"?([0-9a-f]+)\s([0-9\-T\:]*)"?$/.exec(commitResult) || [];
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}`);
53
68
  return { commitHash, commitDate };
54
69
  }
55
70
  exports.getOldestCommitSinceLastTag = getOldestCommitSinceLastTag;
@@ -1 +1 @@
1
- {"version":3,"file":"get-commits-since-last-release.js","sourceRoot":"","sources":["../../src/conventional-commits/get-commits-since-last-release.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AAEzB,oDAA4C;AAC5C,6DAAwD;AAExD,wDAAwD;AACxD,0DAAsD;AAEtD;;;;;;;;GAQG;AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAwB,EACxB,SAAiB,EACjB,UAAkB,EAClB,QAAmB;IAEnB,iFAAiF;IACjF,MAAM,EAAE,UAAU,EAAE,GAAG,2BAA2B,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAEpE,QAAQ,MAAM,EAAE;QACd,KAAK,QAAQ;YACX,OAAO,IAAA,qCAAgB,EAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QACvE,KAAK,QAAQ,CAAC;QACd;YACE,MAAM,IAAI,kCAAe,CACvB,SAAS,EACT,uIAAuI,CACxI,CAAC;KACL;AACH,CAAC;AAnBD,gEAmBC;AAED;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,QAAmB,EAAE,iBAA2B;IAC1F,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,MAAM,eAAe,GAAuB,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC5D,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,8BAAe,EAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAE5E,IAAI,WAAW,EAAE;QACf,gBAAG,CAAC,KAAK,CAAC,KAAK,EAAE,0CAA0C,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAA,wBAAQ,EAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,WAAW,QAAQ,EAAE,mBAAmB,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC5G,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACrC;SAAM;QACL,gBAAG,CAAC,KAAK,CAAC,KAAK,EAAE,6BAA6B,CAAC,CAAC;QAChD,YAAY,GAAG,IAAA,wBAAQ,EACrB,KAAK,EACL,CAAC,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,CAAC,EACjF,QAAQ,CACT,CAAC;KACH;IAED,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,kCAAkC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC/F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC;AApBD,kEAoBC"}
1
+ {"version":3,"file":"get-commits-since-last-release.js","sourceRoot":"","sources":["../../src/conventional-commits/get-commits-since-last-release.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AAEzB,oDAA4C;AAC5C,6DAAwD;AAExD,wDAAwD;AACxD,0DAAsD;AAEtD;;;;;;;;;GASG;AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAwB,EACxB,SAAiB,EACjB,UAAkB,EAClB,aAAuB,EACvB,QAAmB;IAEnB,iFAAiF;IACjF,MAAM,EAAE,UAAU,EAAE,GA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,YAAY,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACrC;SAAM;QACL,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;QACzG,gBAAG,CAAC,KAAK,CAAC,KAAK,EAAE,6BAA6B,CAAC,CAAC;QAChD,gBAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvD,YAAY,GAAG,IAAA,wBAAQ,EAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;KAC1D;IAED,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,qCAAqC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAClG,kBAAkB;IAClB,gBAAG,CAAC,IAAI,CAAC,0BAA0B,EAAE,gCAAgC,WAAW,YAAY,UAAU,MAAM,UAAU,EAAE,CAAC,CAAC;IAE1H,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC;AA9BD,kEA8BC"}
@@ -8,5 +8,6 @@ import { Package } from '../package';
8
8
  */
9
9
  export declare function updateChangelog(pkg: Package, type: ChangelogType, updateOptions: UpdateChangelogOption): Promise<{
10
10
  logPath: any;
11
+ content: string;
11
12
  newEntry: string;
12
13
  }>;
@@ -38,10 +38,11 @@ async function updateChangelog(pkg, type, updateOptions) {
38
38
  // NOTE: must pass as positional argument due to weird bug in merge-config
39
39
  const gitRawCommitsOpts = Object.assign({}, options.config.gitRawCommitsOpts);
40
40
  // are we including commit author name/email or remote client login name
41
- if (changelogIncludeCommitsGitAuthor) {
41
+ if (changelogIncludeCommitsGitAuthor || changelogIncludeCommitsGitAuthor === '') {
42
42
  (0, writer_opts_transform_1.setConfigChangelogCommitGitAuthor)(config, gitRawCommitsOpts, writerOpts, changelogIncludeCommitsGitAuthor);
43
43
  }
44
- else if (changelogIncludeCommitsClientLogin && commitsSinceLastRelease) {
44
+ else if ((changelogIncludeCommitsClientLogin || changelogIncludeCommitsClientLogin === '') &&
45
+ commitsSinceLastRelease) {
45
46
  // prettier-ignore
46
47
  (0, writer_opts_transform_1.setConfigChangelogCommitClientLogin)(config, gitRawCommitsOpts, writerOpts, commitsSinceLastRelease, changelogIncludeCommitsClientLogin);
47
48
  }
@@ -77,7 +78,7 @@ async function updateChangelog(pkg, type, updateOptions) {
77
78
  let newEntry = inputEntry;
78
79
  npmlog_1.default.silly(type, 'writing new entry: %j', newEntry);
79
80
  const changelogVersion = type === 'root' ? changelogVersionMessage : '';
80
- const changelogHeader = constants_1.CHANGELOG_HEADER.replace(/%s/g, type === 'root' ? ((changelogHeaderMessage === null || changelogHeaderMessage === void 0 ? void 0 : changelogHeaderMessage.length) > 0 ? changelogHeaderMessage + constants_1.EOL : '') : '');
81
+ const changelogHeader = constants_1.CHANGELOG_HEADER.replace(/%s/g, (changelogHeaderMessage === null || changelogHeaderMessage === void 0 ? void 0 : changelogHeaderMessage.length) > 0 ? changelogHeaderMessage + constants_1.EOL : '');
81
82
  const content = [changelogHeader, changelogVersion, newEntry, changelogContents]
82
83
  .join(constants_1.BLANK_LINE)
83
84
  .trim()
@@ -86,6 +87,7 @@ async function updateChangelog(pkg, type, updateOptions) {
86
87
  npmlog_1.default.verbose(type, 'wrote', changelogFileLoc);
87
88
  return {
88
89
  logPath: changelogFileLoc,
90
+ content,
89
91
  newEntry,
90
92
  };
91
93
  });
@@ -1 +1 @@
1
- {"version":3,"file":"update-changelog.js","sourceRoot":"","sources":["../../src/conventional-commits/update-changelog.ts"],"names":[],"mappings":";;;;;;AAAA,8FAAiF;AAEjF,wDAA0B;AAC1B,4DAAmC;AACnC,oDAAyB;AAEzB,2CAAgE;AAChE,iEAA4D;AAC5D,mEAA6D;AAC7D,uEAAkE;AAGlE,mEAAiH;AAEjH;;;;;GAKG;AACI,KAAK,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AC9D,IAAI,QAAQ,GAAG,UAAU,CAAC;QAE1B,gBAAG,CAAC,KAAK,CAAC,IAAI,EAAE,uBAAuB,EAAE,QAAQ,CAAC,CAAC;QAEnD,MAAM,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;QACxE,MAAM,eAAe,GAAG,4BAAgB,CAAC,OAAO,CAC9C,KAAK,EACL,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,GAAG,eAAG,CAAC,CAAC,CAAC,EAAE,CACvE,CAAC;QAEF,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,CAAC;aAC7E,IAAI,CAAC,sBAAU,CAAC;aAChB,IAAI,EAAE;aACN,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,yFAAyF;QAE7H,OAAO,kBAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE,OAAO,GAAG,eAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAC7D,gBAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;YAE7C,OAAO;gBACL,OAAO,EAAE,gBAAgB;gBACzB,OAAO;gBACP,QAAQ;aACT,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AArGD,0CAqGC"}
@@ -16,7 +16,7 @@ const GIT_COMMIT_WITH_AUTHOR_FORMAT = '%B%n-hash-%n%H%n-gitTags-%n%d%n-committer
16
16
  */
17
17
  function setConfigChangelogCommitGitAuthor(config, gitRawCommitsOpts, writerOpts, commitCustomFormat) {
18
18
  gitRawCommitsOpts.format = GIT_COMMIT_WITH_AUTHOR_FORMAT;
19
- const extraCommitMsg = typeof commitCustomFormat === 'string'
19
+ const extraCommitMsg = typeof commitCustomFormat === 'string' && commitCustomFormat !== ''
20
20
  ? commitCustomFormat.replace(/%a/g, '{{authorName}}' || '').replace(/%e/g, '{{authorEmail}}' || '')
21
21
  : `({{authorName}})`;
22
22
  writerOpts.commitPartial =
@@ -36,14 +36,13 @@ exports.setConfigChangelogCommitGitAuthor = setConfigChangelogCommitGitAuthor;
36
36
  */
37
37
  function setConfigChangelogCommitClientLogin(config, gitRawCommitsOpts, writerOpts, commitsSinceLastRelease, commitCustomFormat) {
38
38
  gitRawCommitsOpts.format = GIT_COMMIT_WITH_AUTHOR_FORMAT;
39
- const extraCommitMsg = typeof commitCustomFormat === 'string'
39
+ const extraCommitMsg = typeof commitCustomFormat === 'string' && commitCustomFormat !== ''
40
40
  ? commitCustomFormat
41
41
  .replace(/%a/g, '{{authorName}}' || '')
42
42
  .replace(/%e/g, '{{authorEmail}}' || '')
43
43
  .replace(/%l/g, '{{userLogin}}' || '')
44
- : `(@{{userLogin}})`;
45
- writerOpts.commitPartial =
46
- config.writerOpts.commitPartial.replace(/\n*$/, '') + ` {{#if @root.linkReferences~}}${extraCommitMsg}{{~/if}}\n`;
44
+ : ` (@{{userLogin}})`;
45
+ writerOpts.commitPartial = config.writerOpts.commitPartial.replace(/\n*$/, '') + `${extraCommitMsg}\n`;
47
46
  // add commits since last release into the transform function
48
47
  writerOpts.transform = writerOptsTransform.bind(null, config.writerOpts.transform, commitsSinceLastRelease);
49
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"writer-opts-transform.js","sourceRoot":"","sources":["../../src/conventional-commits/writer-opts-transform.ts"],"names":[],"mappings":";;;AAKA,gGAAgG;AAChG,MAAM,6BAA6B,GACjC,gIAAgI,CAAC;AAEnI;;;;;;;;;;GAUG;AACH,SAAgB,iCAAiC,CAC/C,MAAuB,EACvB,iBAAuC,EACvC,UAAyB,EACzB,kBAAqC;IAErC,iBAAiB,CAAC,MAAM,GAAG,6BAA6B,CAAC;IACzD,MAAM,cAAc,GAClB,OAAO,kBAAkB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AC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE1D,mCAAmC;IACnC,IAAI,cAAc,EAAE;QAClB,MAAM,YAAY,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3F,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,EAAE;YACvB,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC;SACvC;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAlBD,kDAkBC"}
1
+ {"version":3,"file":"writer-opts-transform.js","sourceRoot":"","sources":["../../src/conventional-commits/writer-opts-transform.ts"],"names":[],"mappings":";;;AAKA,gGAAgG;AAChG,MAAM,6BAA6B,GACjC,gIAAgI,CAAC;AAEnI;;;;;;;;;;GAUG;AACH,SAAgB,iCAAiC,CAC/C,MAAuB,EACvB,iBAAuC,EACvC,UAAyB,EACzB,kBAAqC;IAErC,iBAAiB,CAAC,MAAM,GAAG,6BAA6B,CAAC;IACzD,MAAM,cAAc,GAClB,OAAO,kBAAkB,KAAK,QAAQ,IAAI,kBAAkB,KAAK,EAAE;QACjE,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,IAAI,EAAE,CAAC;QACnG,CAAC,CAAC,kBAAkB,CAAC;IACzB,UAAU,CAAC,aAAa;QACtB,MAAM,CAAC,UAAU,CAAC,aAAc,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,iCAAiC,cAAc,YAAY,CAAC;AACvH,CAAC;AAbD,8EAaC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,mCAAmC,CACjD,MAAuB,EACvB,iBAAuC,EACvC,UAAyB,EACzB,uBAAuC,EACvC,kBAAqC;IAErC,iBAAiB,CAAC,MAAM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Client {
3
3
  baseUrl: string;
4
4
  token: string;
5
- constructor(baseUrl: string | undefined, token: string);
5
+ constructor(token: string, baseUrl?: string);
6
6
  createRelease({ owner, repo, name, tag_name: tagName, body }: GitClientRelease): Promise<void>;
7
7
  releasesUrl(namespace: string, project: string, releaseType?: string): string;
8
8
  }
@@ -7,9 +7,8 @@ exports.GitLabClient = void 0;
7
7
  const node_fetch_1 = __importDefault(require("node-fetch"));
8
8
  const npmlog_1 = __importDefault(require("npmlog"));
9
9
  const path_1 = __importDefault(require("path"));
10
- const whatwg_url_1 = require("whatwg-url");
11
10
  class GitLabClient {
12
- constructor(baseUrl = 'https://gitlab.com/api/v4', token) {
11
+ constructor(token, baseUrl = 'https://gitlab.com/api/v4') {
13
12
  this.baseUrl = baseUrl;
14
13
  this.token = token;
15
14
  }
@@ -33,7 +32,7 @@ class GitLabClient {
33
32
  });
34
33
  }
35
34
  releasesUrl(namespace, project, releaseType = 'releases') {
36
- return new whatwg_url_1.URL(`${this.baseUrl}/${path_1.default.join('projects', encodeURIComponent(`${namespace}/${project}`), releaseType)}`).toString();
35
+ return new URL(`${this.baseUrl}/${path_1.default.join('projects', encodeURIComponent(`${namespace}/${project}`), releaseType)}`).toString();
37
36
  }
38
37
  }
39
38
  exports.GitLabClient = GitLabClient;
@@ -1 +1 @@
1
- {"version":3,"file":"GitLabClient.js","sourceRoot":"","sources":["../../src/git-clients/GitLabClient.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,oDAAyB;AACzB,gDAAwB;AACxB,2CAAiC;AAIjC,MAAa,YAAY;IAIvB,YAAY,OAAO,GAAG,2BAA2B,EAAE,KAAa;QAC9D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAoB;QAC5E,MAAM,WA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D,oCAmCC"}
@@ -15,7 +15,7 @@ function createGitLabClient() {
15
15
  if (!GL_TOKEN) {
16
16
  throw new Error('A GL_TOKEN environment variable is required.');
17
17
  }
18
- const client = new GitLabClient_1.GitLabClient(GL_API_URL, GL_TOKEN);
18
+ const client = new GitLabClient_1.GitLabClient(GL_TOKEN, GL_API_URL);
19
19
  return OcktokitAdapter(client);
20
20
  }
21
21
  exports.createGitLabClient = createGitLabClient;
@@ -1 +1 @@
1
- {"version":3,"file":"gitlab-client.js","sourceRoot":"","sources":["../../src/git-clients/gitlab-client.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AACzB,iDAA8C;AAE9C,SAAS,eAAe,CAAC,MAAM;IAC7B,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAE7C,gBAAG,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IAED,MAAM,MAAM,GAAG,IAAI,2BAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAEtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAEQ,gDAAkB"}
1
+ {"version":3,"file":"gitlab-client.js","sourceRoot":"","sources":["../../src/git-clients/gitlab-client.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AACzB,iDAA8C;AAE9C,SAAS,eAAe,CAAC,MAAM;IAC7B,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAE7C,gBAAG,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IAED,MAAM,MAAM,GAAG,IAAI,2BAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAEQ,gDAAkB"}
@@ -6,13 +6,13 @@ export interface ChangedCommandOption {
6
6
  conventionalGraduate: boolean | string | string[];
7
7
  /** always include targeted packages when detecting changed packages, skipping default logic. */
8
8
  forcePublish?: boolean | string | string[];
9
- /** ignore changes in files matched by glob(s) when detecting changed packages. Pass --no-ignore-changes to completely disable. */
9
+ /** ignore changes in files matched by glob(s) when detecting changed packages. Pass `--no-ignore-changes` to completely disable. */
10
10
  ignoreChanges: string[];
11
11
  /** include tags from merged branches when detecting changed packages. */
12
12
  includeMergedTags?: boolean;
13
13
  }
14
14
  export interface DiffCommandOption {
15
- /** ignore changes in files matched by glob(s) when detecting changed packages. Pass --no-ignore-changes to completely disable. */
15
+ /** ignore changes in files matched by glob(s) when detecting changed packages. Pass `--no-ignore-changes` to completely disable. */
16
16
  ignoreChanges: string[];
17
17
  /** package name */
18
18
  pkgName: string;
@@ -30,11 +30,11 @@ export interface ExecCommandOption {
30
30
  parallel?: boolean;
31
31
  /** Continue executing command despite non-zero exit in a given package. */
32
32
  noBail?: boolean;
33
- /** proxy for --no-bail */
33
+ /** proxy for `--no-bail` */
34
34
  bail?: boolean;
35
35
  /** Do not prefix streaming output. */
36
36
  noPrefix?: boolean;
37
- /** proxy for --no-prefix */
37
+ /** proxy for `--no-prefix` */
38
38
  prefix?: boolean;
39
39
  /** Profile command executions and output performance profile to default location. */
40
40
  profile?: boolean;
@@ -66,7 +66,7 @@ export interface ListCommandOption {
66
66
  toposort?: boolean;
67
67
  }
68
68
  export interface PublishCommandOption extends VersionCommandOption {
69
- /** alias to '--canary' */
69
+ /** alias to `--canary` */
70
70
  c?: boolean;
71
71
  /** Publish packages after every successful merge using the sha as part of the tag. */
72
72
  canary?: boolean;
@@ -90,7 +90,7 @@ export interface PublishCommandOption extends VersionCommandOption {
90
90
  ignoreScripts?: boolean;
91
91
  /** Do not reset changes file-by-file, but globally. */
92
92
  noGranularPathspec?: boolean;
93
- /** proxy for --no-granular-pathspec */
93
+ /** proxy for `--no-granular-pathspec` */
94
94
  granularPathspec?: boolean;
95
95
  /** Supply a one-time password for publishing with two-factor authentication. */
96
96
  otp?: string;
@@ -105,9 +105,9 @@ export interface PublishCommandOption extends VersionCommandOption {
105
105
  tempTag?: boolean;
106
106
  /** Do not verify package read-write access for current npm user. */
107
107
  noVerifyAccess?: boolean;
108
- /** proxy for --no-verify-access */
108
+ /** proxy for `--no-verify-access` */
109
109
  verifyAccess?: boolean;
110
- /** alias to '--yes' */
110
+ /** alias to `--yes` */
111
111
  y?: boolean;
112
112
  /** Skip all confirmation prompts. */
113
113
  yes?: boolean;
@@ -123,25 +123,25 @@ export interface VersionCommandOption {
123
123
  conventionalCommits?: boolean;
124
124
  /** Version currently prereleased packages to a non-prerelease version. */
125
125
  conventionalGraduate?: boolean | string;
126
- /** Version changed packages as prereleases when using --conventional-commits. */
126
+ /** Version changed packages as prereleases when using `--conventional-commits`. */
127
127
  conventionalPrerelease?: boolean | string;
128
- /** Add a custom message at the top of your "changelog.md" which is located in the root of your project. This option is only available when using --conventional-commits with changelogs. */
128
+ /** Add a custom message at the top of all "changelog.md" files. This option is only available when using `--conventional-commits` with changelogs. */
129
129
  changelogHeaderMessage?: string;
130
130
  /**
131
- * Specify if we want to include the commit author's name, this option is only available when using --conventional-commits with changelogs.
131
+ * Specify if we want to include the commit author's name, this option is only available when using `--conventional-commits` with changelogs.
132
132
  * We can also optionally provide a custom message or else a default format will be used.
133
133
  */
134
134
  changelogIncludeCommitsGitAuthor?: boolean | string;
135
135
  /** @deprecated option renamed to `changelogIncludeCommitsGitAuthor` */
136
136
  changelogIncludeCommitAuthorFullname?: boolean | string;
137
137
  /**
138
- * Specify if we want to include the commit remote client login name (ie GitHub username), this option is only available when using --conventional-commits with changelogs.
138
+ * Specify if we want to include the commit remote client login name (ie GitHub username), this option is only available when using `--conventional-commits` with changelogs.
139
139
  * We can also optionally provide a custom message or else a default format will be used.
140
140
  */
141
141
  changelogIncludeCommitsClientLogin?: boolean | string;
142
142
  /**
143
143
  * Add a custom message as a prefix to each new version in your "changelog.md" which is located in the root of your project.
144
- * This option is only available when using --conventional-commits with changelogs.
144
+ * This option is only available when using `--conventional-commits` with changelogs.
145
145
  */
146
146
  changelogVersionMessage?: string;
147
147
  /** Defaults 'angular', custom conventional-changelog preset. */
@@ -158,42 +158,42 @@ export interface VersionCommandOption {
158
158
  gitRemote: string;
159
159
  /**
160
160
  * Ignore changes in files matched by glob(s) when detecting changed packages.
161
- * Pass --no-ignore-changes to completely disable.
161
+ * Pass `--no-ignore-changes` to completely disable.
162
162
  */
163
163
  ignoreChanges?: string[];
164
- /** Disable all lifecycle scripts */
164
+ /** Disable all lifecycle scripts. */
165
165
  ignoreScripts?: boolean;
166
166
  /** Include tags from merged branches when detecting changed packages. */
167
167
  includeMergedTags?: boolean;
168
- /** alias to '--message' */
168
+ /** alias to `--message`. */
169
169
  m?: string;
170
170
  /** Use a custom commit message when creating the version commit. */
171
171
  message?: string;
172
- /** Do not generate CHANGELOG.md files when using --conventional-commits. */
172
+ /** Do not generate CHANGELOG.md files when using `--conventional-commits`. */
173
173
  noChangelog?: boolean;
174
- /** proxy for --no-changelog */
174
+ /** proxy for `--no-changelog`. */
175
175
  changelog?: boolean;
176
176
  /** Do not run git commit hooks when committing version changes. */
177
177
  noCommitHooks?: boolean;
178
- /** proxy for --no-commit-hooks */
178
+ /** proxy for `--no-commit-hooks`. */
179
179
  commitHooks?: boolean;
180
180
  /** Do not commit or tag version changes. */
181
181
  noGitTagVersion?: boolean;
182
- /** proxy for --no-git-tag-version */
182
+ /** proxy for `--no-git-tag-version`. */
183
183
  gitTagVersion?: boolean;
184
184
  /** Do not stage changes file-by-file, but globally. */
185
185
  noGranularPathspec?: boolean;
186
- /** Stage changes file-by-file, not globally. Proxy for --no-granular-pathspec */
186
+ /** Stage changes file-by-file, not globally. Proxy for `--no-granular-pathspec`. */
187
187
  granularPathspec?: boolean;
188
188
  /** Do not version private packages. */
189
189
  noPrivate?: boolean;
190
- /** proxy for --no-private */
190
+ /** proxy for `--no-private`. */
191
191
  private?: boolean;
192
192
  /** Do not push tagged commit to git remote. */
193
193
  noPush?: boolean;
194
- /** proxy for --no-push */
194
+ /** proxy for `--no-push`. */
195
195
  push?: boolean;
196
- /** Defaults to 'alpha', specify the prerelease identifier when versioning a prerelease */
196
+ /** Defaults to 'alpha', specify the prerelease identifier when versioning a prerelease. */
197
197
  preid?: string;
198
198
  /** Remote git client, which client is used when reading commits from remote which is useful when associating client login for each changelog entry. */
199
199
  remoteClient?: RemoteClientType;
@@ -211,14 +211,14 @@ export interface VersionCommandOption {
211
211
  noManuallyUpdateRootLockfile?: boolean;
212
212
  /** Defaults to true when found, update the project root lock file, the lib will internally read/write back to the lock file. */
213
213
  manuallyUpdateRootLockfile?: boolean;
214
- /** Runs `npm install --package-lock-only` or equivalent depending on the package manager defined in `npmClient` */
214
+ /** Runs `npm install --package-lock-only` or equivalent depending on the package manager defined in `npmClient`. */
215
215
  syncWorkspaceLock?: boolean;
216
216
  /**
217
217
  * @deprecated Strict match transform version numbers to an exact range (like "1.2.3") rather than with a caret (like ^1.2.3) when using `workspace:*`.
218
218
  * Future version will make `workspace:` protocol as strict matching at all time, so this flag becomes redundant.
219
219
  */
220
220
  workspaceStrictMatch?: boolean;
221
- /** alias to '--yes' */
221
+ /** alias to `--yes` */
222
222
  y?: boolean;
223
223
  /** Skip all confirmation prompts. */
224
224
  yes?: boolean;
@@ -234,19 +234,19 @@ export interface RunCommandOption {
234
234
  parallel?: boolean;
235
235
  /** Continue running script despite non-zero exit in a given package. */
236
236
  noBail?: boolean;
237
- /** proxy for --no-bail */
237
+ /** proxy for `--no-bail`. */
238
238
  bail?: boolean;
239
239
  /** Do not prefix streaming output. */
240
240
  noPrefix?: boolean;
241
- /** proxy for --no-prefix */
241
+ /** proxy for `--no-prefix`. */
242
242
  prefix?: boolean;
243
243
  /** Profile script executions and output performance profile to default location. */
244
244
  profile?: boolean;
245
245
  /** Output performance profile to custom location instead of default project root. */
246
246
  profileLocation?: string;
247
- /** npm script to run by the command */
247
+ /** npm script to run by the command. */
248
248
  script: string;
249
- /** Enables integration with [Nx](https://nx.dev) */
249
+ /** Enables integration with [Nx](https://nx.dev). */
250
250
  useNx?: boolean;
251
251
  /** when "useNx" is enabled, do we want to skip caching with Nx? */
252
252
  skipNxCache?: boolean;
@@ -170,6 +170,8 @@ export interface LernaConfig {
170
170
  version: string;
171
171
  }
172
172
  export interface ProjectConfig extends LernaConfig, QueryGraphConfig {
173
+ /** Lerna JSON Schema https://json-schema.org/ */
174
+ $schema: string;
173
175
  ci?: boolean;
174
176
  concurrency: number | string;
175
177
  cwd: string;
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.10.0",
4
+ "version": "1.11.2",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "typings": "dist/index.d.ts",
@@ -31,9 +31,9 @@
31
31
  "npm": ">=8.0.0"
32
32
  },
33
33
  "dependencies": {
34
- "@npmcli/run-script": "^4.2.0",
34
+ "@npmcli/run-script": "^4.2.1",
35
35
  "@octokit/plugin-enterprise-rest": "^6.0.1",
36
- "@octokit/rest": "^19.0.3",
36
+ "@octokit/rest": "^19.0.4",
37
37
  "async": "^3.2.4",
38
38
  "chalk": "^4.1.2",
39
39
  "clone-deep": "^4.0.1",
@@ -62,15 +62,15 @@
62
62
  "minimatch": "^5.1.0",
63
63
  "node-fetch": "^2.6.7",
64
64
  "npm-package-arg": "^9.1.0",
65
- "npm-packlist": "^5.1.1",
66
- "npm-registry-fetch": "^13.3.0",
65
+ "npm-packlist": "^5.1.3",
66
+ "npm-registry-fetch": "^13.3.1",
67
67
  "npmlog": "^6.0.2",
68
68
  "os": "^0.1.2",
69
69
  "p-map": "^4.0.0",
70
70
  "p-pipe": "^3.1.0",
71
71
  "p-queue": "^6.6.2",
72
72
  "p-reduce": "^2.1.0",
73
- "pacote": "^13.6.1",
73
+ "pacote": "^13.6.2",
74
74
  "path": "^0.12.7",
75
75
  "pify": "^5.0.0",
76
76
  "resolve-from": "^5.0.0",
@@ -81,8 +81,7 @@
81
81
  "tar": "^6.1.11",
82
82
  "temp-dir": "^1.0.0",
83
83
  "uuid": "^8.3.2",
84
- "whatwg-url": "^11.0.0",
85
- "write-file-atomic": "^4.0.1",
84
+ "write-file-atomic": "^4.0.2",
86
85
  "write-json-file": "^4.3.0",
87
86
  "write-pkg": "^4.0.0",
88
87
  "yargs": "^17.5.1"
@@ -99,12 +98,12 @@
99
98
  "@types/fs-extra": "^9.0.13",
100
99
  "@types/git-url-parse": "^9.0.1",
101
100
  "@types/glob-parent": "^5.1.1",
102
- "@types/inquirer": "^9.0.0",
101
+ "@types/inquirer": "^9.0.1",
103
102
  "@types/load-json-file": "^5.1.0",
104
- "@types/minimatch": "^3.0.5",
103
+ "@types/minimatch": "^5.1.0",
105
104
  "@types/npm-package-arg": "^6.1.1",
106
105
  "@types/p-map": "^2.0.0",
107
- "@types/semver": "^7.3.10",
106
+ "@types/semver": "^7.3.12",
108
107
  "@types/strong-log-transformer": "^1.0.0",
109
108
  "@types/write-file-atomic": "^4.0.0",
110
109
  "@types/write-json-file": "^3.2.1",
@@ -115,5 +114,5 @@
115
114
  "type": "ko_fi",
116
115
  "url": "https://ko-fi.com/ghiscoding"
117
116
  },
118
- "gitHead": "209a8e90255d2ecb364cb8eaa62a322745281601"
117
+ "gitHead": "2950c160bbc1c9139b5247fff6fb9e82428b836b"
119
118
  }