@scaleway/changesets-renovate 2.2.6 → 2.3.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/cli.js +1 -1
- package/dist/git-utils.js +4 -5
- package/dist/utils.js +2 -3
- package/package.json +4 -5
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { simpleGit } from "simple-git";
|
|
|
7
7
|
async function run() {
|
|
8
8
|
const branch = await simpleGit().branch();
|
|
9
9
|
const branchPrefix = env["BRANCH_PREFIX"] ?? "renovate/";
|
|
10
|
-
console.log("Detected branch:", branch);
|
|
10
|
+
console.log("Detected branch:", branch.current);
|
|
11
11
|
if (!(branch.current.startsWith(branchPrefix) || env["SKIP_BRANCH_CHECK"])) {
|
|
12
12
|
console.log("Not a renovate branch, skipping");
|
|
13
13
|
return;
|
package/dist/git-utils.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { env } from "node:process";
|
|
2
2
|
import { simpleGit } from "simple-git";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import { glob } from "tinyglobby";
|
|
5
|
+
import { parse } from "yaml";
|
|
6
6
|
//#region src/git-utils.ts
|
|
7
|
-
var { globSync } = fg;
|
|
8
7
|
/**
|
|
9
8
|
* Load catalog from pnpm workspace file at specific git revision
|
|
10
9
|
* @param revision Git revision to load file from (default: HEAD)
|
|
@@ -14,7 +13,7 @@ var { globSync } = fg;
|
|
|
14
13
|
async function loadCatalogFromGit(revision = "HEAD", filePath = "pnpm-workspace.yaml") {
|
|
15
14
|
try {
|
|
16
15
|
if (!revision) return {};
|
|
17
|
-
return
|
|
16
|
+
return parse(await simpleGit().show([`${revision}:${filePath}`]))?.catalog ?? {};
|
|
18
17
|
} catch {
|
|
19
18
|
return {};
|
|
20
19
|
}
|
|
@@ -54,7 +53,7 @@ async function getBumpsFromGit(files) {
|
|
|
54
53
|
*/
|
|
55
54
|
async function findAffectedPackages(changedDeps, packageJsonGlob = "packages/*/package.json") {
|
|
56
55
|
if (changedDeps.length === 0) return /* @__PURE__ */ new Set();
|
|
57
|
-
const packageJsonPaths =
|
|
56
|
+
const packageJsonPaths = await glob(packageJsonGlob, { expandDirectories: false });
|
|
58
57
|
const affectedPackages = /* @__PURE__ */ new Set();
|
|
59
58
|
for (const pkgJsonPath of packageJsonPaths) try {
|
|
60
59
|
const json = JSON.parse(await readFile(pkgJsonPath, "utf8"));
|
package/dist/utils.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
2
|
+
import "tinyglobby";
|
|
3
|
+
import "yaml";
|
|
4
4
|
//#region src/utils.ts
|
|
5
|
-
var { globSync } = fg;
|
|
6
5
|
function shouldIgnorePackage(packageName, ignoredPackages) {
|
|
7
6
|
return ignoredPackages.some((ignoredPackage) => {
|
|
8
7
|
if (ignoredPackage.endsWith("*")) return packageName.startsWith(ignoredPackage.slice(0, -1));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/changesets-renovate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Automatically create changesets for Renovate and pnpm catalogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"catalogs",
|
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"simple-git": "3.36.0"
|
|
38
|
+
"simple-git": "3.36.0",
|
|
39
|
+
"tinyglobby": "0.2.16",
|
|
40
|
+
"yaml": "2.8.4"
|
|
42
41
|
},
|
|
43
42
|
"engines": {
|
|
44
43
|
"node": ">=20.x"
|