@anolilab/multi-semantic-release 1.0.1 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.2](https://github.com/anolilab/multi-semantic-release/compare/v1.0.1...v1.0.2) (2023-09-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * removed dead code ([#5](https://github.com/anolilab/multi-semantic-release/issues/5)) ([238f997](https://github.com/anolilab/multi-semantic-release/commit/238f997d6d186062388d334840cf29dfa64b7383))
7
+
1
8
  ## [1.0.1](https://github.com/anolilab/multi-semantic-release/compare/v1.0.0...v1.0.1) (2023-09-28)
2
9
 
3
10
 
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  hacky [semantic-release](https://github.com/semantic-release/semantic-release) for monorepos based on [qiwi/multi-semantic-release](https://github.com/qiwi/multi-semantic-release)
8
8
 
9
- [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
9
+ [![npm-image]][npm-url] [![license-image]][license-url]
10
10
 
11
11
  </div>
12
12
 
@@ -402,9 +402,7 @@ If you would like to help take a look at the [list of issues](https://github.com
402
402
 
403
403
  [0BSD](./LICENSE.md)
404
404
 
405
- [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
406
- [typescript-url]: "typescript"
407
- [license-image]: https://img.shields.io/npm/l/@anolilab/eslint-config?color=blueviolet&style=for-the-badge
405
+ [license-image]: https://img.shields.io/npm/l/@anolilab/multi-semantic-release?color=blueviolet&style=for-the-badge
408
406
  [license-url]: LICENSE.md "license"
409
- [npm-image]: https://img.shields.io/npm/v/@anolilab/eslint-config/latest.svg?style=for-the-badge&logo=npm
410
- [npm-url]: https://www.npmjs.com/package/@anolilab/eslint-config/v/latest "npm"
407
+ [npm-image]: https://img.shields.io/npm/v/@anolilab/multi-semantic-release/latest.svg?style=for-the-badge&logo=npm
408
+ [npm-url]: https://www.npmjs.com/package/@anolilab/multi-semantic-releasv/latest "npm"
@@ -1,5 +1,6 @@
1
+ import { getTagHead } from "semantic-release/lib/git.js";
2
+
1
3
  import getCommitsFiltered from "./get-commits-filtered.js";
2
- import { getTagHead } from "./git.js";
3
4
  import logger from "./logger.js";
4
5
  import { resolveReleaseType, updateManifestDeps } from "./update-deps.js";
5
6
 
@@ -201,28 +201,6 @@ export const getNextVersion = (package_) => {
201
201
  return lastVersion && typeof package_._nextType === "string" ? semver.inc(lastVersion, package_._nextType) : lastVersion || "1.0.0";
202
202
  };
203
203
 
204
- /**
205
- * Resolve the package version from a tag
206
- *
207
- * @param {Package} package_ Package object.
208
- * @param {string} tag The tag containing the version to resolve
209
- * @returns {string|null} The version of the package or null if no tag was passed
210
- * @internal
211
- */
212
- export const getVersionFromTag = (package_, tag) => {
213
- if (!package_.name) {
214
- return tag || null;
215
- }
216
-
217
- if (!tag) {
218
- return null;
219
- }
220
-
221
- // TODO inherit semantic-release/lib/branches/get-tags.js
222
- const stringMatch = tag.match(/\d.\d.\d[^+]*/u);
223
- return stringMatch && stringMatch[0] && semver.valid(stringMatch[0]) ? stringMatch[0] : null;
224
- };
225
-
226
204
  /**
227
205
  * Parse the prerelease tag from a semver version.
228
206
  *
@@ -356,7 +334,7 @@ export const resolveNextVersion = (currentVersion, nextVersion, bumpStrategy = "
356
334
  * Update pkg deps.
357
335
  *
358
336
  * @param {Package} package_ The package this function is being called on.
359
- * @returns {undefined}
337
+ * @returns {void}
360
338
  * @internal
361
339
  */
362
340
  export const updateManifestDeps = (package_) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/multi-semantic-release",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A multi semantic release tool for monorepos.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,7 +54,6 @@
54
54
  "execa": "^8.0.1",
55
55
  "git-log-parser": "^1.2.0",
56
56
  "lodash-es": "^4.17.21",
57
- "promise-events": "^0.2.4",
58
57
  "resolve-from": "^5.0.0",
59
58
  "semver": "^7.5.4",
60
59
  "signale": "^1.4.0",
package/lib/git.js DELETED
@@ -1,41 +0,0 @@
1
- import { execaSync } from "execa";
2
-
3
- /**
4
- * Get all the tags for a given branch.
5
- *
6
- * @param {String} branch The branch for which to retrieve the tags.
7
- * @param {Object} [execaOptions] Options to pass to `execa`.
8
- * @param {Array<String>} filters List of string to be checked inside tags.
9
- *
10
- * @return {Array<String>} List of git tags.
11
- * @throws {Error} If the `git` command fails.
12
- * @internal
13
- */
14
- export function getTags(branch, execaOptions, filters) {
15
- const { stdout } = execaSync("git", ["tag", "--merged", branch], execaOptions);
16
-
17
- const tags = stdout
18
- .split("\n")
19
- .map((tag) => tag.trim())
20
- .filter(Boolean);
21
-
22
- if (!filters || filters.length === 0) {
23
- return tags;
24
- }
25
-
26
- const validateSubstr = (t, f) => f.every((v) => t.includes(v));
27
-
28
- return tags.filter((tag) => validateSubstr(tag, filters));
29
- }
30
-
31
- /**
32
- * Get the commit sha for a given tag.
33
- *
34
- * @param {String} tagName Tag name for which to retrieve the commit sha.
35
- * @param {Object} [execaOptions] Options to pass to `execa`.
36
- *
37
- * @return {String} The commit sha of the tag in parameter or `null`.
38
- */
39
- export function getTagHead(tagName, execaOptions) {
40
- return execaSync("git", ["rev-list", "-1", tagName], execaOptions).stdout;
41
- }