semantic-release-lerna 0.4.0 → 0.5.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.
@@ -60,7 +60,8 @@ async function generateNotes(pluginConfig, context) {
60
60
  const [match, auth, host, path] =
61
61
  /* eslint-disable-next-line security/detect-unsafe-regex */
62
62
  /^(?!.+:\/\/)(?:(?<auth>.*)@)?(?<host>.*?):(?<path>.*)$/.exec(repositoryUrl) || [];
63
- const url = new URL(match ? `ssh://${auth ? `${auth}@` : ""}${host}/${path}` : repositoryUrl);
63
+ const authString = auth ? `${auth}@` : "";
64
+ const url = new URL(match ? `ssh://${authString}${host}/${path}` : repositoryUrl);
64
65
  const { hostname, pathname } = url;
65
66
  let { port, protocol } = url;
66
67
  port = protocol.includes("ssh") ? "" : port;
package/lib/prepare.js CHANGED
@@ -3,6 +3,7 @@ const fs = require("fs").promises;
3
3
  const { existsSync } = require("fs");
4
4
  const { format } = require("util");
5
5
  const execa = require("execa");
6
+ const npmVersion = require("libnpmversion");
6
7
  const { Project } = require("@lerna/project");
7
8
  const { Package } = require("@lerna/package");
8
9
  const writeJsonFile = require("write-json-file");
@@ -47,28 +48,22 @@ async function updateLernaJson(basePath, context) {
47
48
  */
48
49
  async function updatePackage(npmrc, pkg, context, currentVersions) {
49
50
  const {
50
- env,
51
51
  nextRelease: { version },
52
- stdout,
53
- stderr,
54
52
  logger,
55
53
  } = context;
56
54
  logger.log("Write version %s to package.json in %s", version, pkg.location);
57
55
 
58
- /* Use "npm version" to bump version for all changed packages: "lerna version"
59
- * would handle this better but lerna disagrees with the tags produced by
60
- * semantic-release and bumps all packages. */
61
- const versionResult = execa(
62
- "npm",
63
- ["version", version, "--userconfig", npmrc, "--no-git-tag-version", "--allow-same-version"],
64
- {
65
- cwd: pkg.location,
66
- env,
67
- }
68
- );
69
- versionResult.stdout.pipe(stdout, { end: false });
70
- versionResult.stderr.pipe(stderr, { end: false });
71
- await versionResult;
56
+ await npmVersion(version, {
57
+ path: pkg.location,
58
+ allowSameVersion: true,
59
+ commitHooks: false,
60
+ gitTagVersion: false,
61
+ signGitCommit: false,
62
+ signGitTag: false,
63
+ force: false,
64
+ ignoreScripts: false,
65
+ silent: false,
66
+ });
72
67
 
73
68
  /* Bump dependencies */
74
69
  if (currentVersions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-release-lerna",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "semantic-release plugin to publish lerna monorepo packages to npm",
5
5
  "keywords": [
6
6
  "npm",
@@ -46,13 +46,13 @@
46
46
  "testTimeout": 10000
47
47
  },
48
48
  "dependencies": {
49
- "@lerna/child-process": "^4.0.0",
50
- "@lerna/collect-updates": "^4.0.0",
51
- "@lerna/package": "^4.0.0",
52
- "@lerna/package-graph": "^4.0.0",
53
- "@lerna/project": "^4.0.0",
54
- "@semantic-release/error": "^2.2.0",
55
- "@semantic-release/release-notes-generator": "^9.0.1",
49
+ "@lerna/child-process": "^5.0.0",
50
+ "@lerna/collect-updates": "^5.0.0",
51
+ "@lerna/package": "^5.0.0",
52
+ "@lerna/package-graph": "^5.0.0",
53
+ "@lerna/project": "^5.0.0",
54
+ "@semantic-release/error": "^3.0.0",
55
+ "@semantic-release/release-notes-generator": "^10.0.0",
56
56
  "aggregate-error": "^3.1.0",
57
57
  "conventional-changelog-writer": "^5.0.0",
58
58
  "conventional-commits-filter": "^2.0.0",
@@ -61,32 +61,32 @@
61
61
  "execa": "^5.0.0",
62
62
  "get-stream": "^6.0.0",
63
63
  "into-stream": "^6.0.0",
64
+ "libnpmversion": "^3.0.0",
64
65
  "read-pkg-up": "^7.0.0",
65
66
  "semver": "^7.0.0",
66
67
  "tempy": "^1.0.0",
67
68
  "write-json-file": "^4.0.0"
68
69
  },
69
70
  "devDependencies": {
70
- "@html-validate/eslint-config": "4.4.3",
71
- "@html-validate/eslint-config-jest": "4.4.2",
72
- "@html-validate/prettier-config": "1.1.0",
73
- "@semantic-release/npm": "7.1.3",
74
- "@types/jest": "26.0.23",
75
- "codecov": "3.8.2",
76
- "eslint": "7.29.0",
77
- "fs-extra": "10.0.0",
78
- "got": "11.8.2",
79
- "jest": "27.0.4",
80
- "lerna": "4.0.0",
81
- "prettier": "2.3.1",
82
- "semantic-release": "17.4.4",
71
+ "@html-validate/eslint-config": "5.4.9",
72
+ "@html-validate/eslint-config-jest": "5.4.8",
73
+ "@html-validate/prettier-config": "2.2.0",
74
+ "@semantic-release/npm": "9.0.1",
75
+ "@types/jest": "27.5.1",
76
+ "codecov": "3.8.3",
77
+ "fs-extra": "10.1.0",
78
+ "got": "11.8.3",
79
+ "jest": "28.1.0",
80
+ "lerna": "5.0.0",
81
+ "prettier": "2.6.2",
82
+ "semantic-release": "19.0.2",
83
83
  "stream-buffers": "3.0.2",
84
- "verdaccio": "5.1.1"
84
+ "verdaccio": "5.10.2"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@semantic-release/npm": ">= 7",
88
- "lerna": "^3.2 || ^4",
89
- "semantic-release": ">=15.0.0 <18.0.0"
88
+ "lerna": "^3.2 || ^4 || ^5",
89
+ "semantic-release": ">=15.0.0 <20.0.0"
90
90
  },
91
91
  "engines": {
92
92
  "node": ">= 12.10"
@@ -96,7 +96,7 @@
96
96
  },
97
97
  "renovate": {
98
98
  "extends": [
99
- "@html-validate"
99
+ "gitlab>html-validate/renovate-config"
100
100
  ]
101
101
  }
102
102
  }