@backstage/repo-tools 0.19.3-next.0 → 0.19.3-next.1
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,5 +1,21 @@
|
|
|
1
1
|
# @backstage/repo-tools
|
|
2
2
|
|
|
3
|
+
## 0.19.3-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1892d2f: chore(deps): bump `minimatch` from 10.2.6 to 11.0.1
|
|
8
|
+
- 9120c46: Updated dependency `glob` to `^14.0.0`.
|
|
9
|
+
- 5eb2381: The generated API reference documentation no longer overwrites pages when a package exports declarations whose names only differ in case, or that share a name but are of different kinds, for example a variable and an interface or namespace. One of them keeps the existing page, and the others get a page with their kind added to the filename, for example `-interface` or `-namespace`, or a number if they are of the same kind.
|
|
10
|
+
- 1fba2bb: The peer dependency check no longer enforces a shared `react-router-dom` version, so packages can declare their own supported major version. See the [1.57 migration notes](https://backstage.io/docs/frontend-system/architecture/migrations#157) for background on the routing changes this supports.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/cli-node@0.3.6-next.2
|
|
13
|
+
- @backstage/backend-plugin-api@1.12.0-next.1
|
|
14
|
+
- @backstage/errors@1.4.0-next.0
|
|
15
|
+
- @backstage/catalog-model@1.10.3-next.0
|
|
16
|
+
- @backstage/cli-common@0.3.3-next.0
|
|
17
|
+
- @backstage/config-loader@1.11.5-next.0
|
|
18
|
+
|
|
3
19
|
## 0.19.3-next.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -14,6 +14,61 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
16
16
|
|
|
17
|
+
const FILENAME_KIND_PRIORITY = [
|
|
18
|
+
apiExtractorModel.ApiItemKind.Class,
|
|
19
|
+
apiExtractorModel.ApiItemKind.Function,
|
|
20
|
+
apiExtractorModel.ApiItemKind.Variable,
|
|
21
|
+
apiExtractorModel.ApiItemKind.Enum,
|
|
22
|
+
apiExtractorModel.ApiItemKind.Namespace,
|
|
23
|
+
apiExtractorModel.ApiItemKind.Interface,
|
|
24
|
+
apiExtractorModel.ApiItemKind.TypeAlias
|
|
25
|
+
];
|
|
26
|
+
const SKIPPED_FILENAME_KINDS = [
|
|
27
|
+
apiExtractorModel.ApiItemKind.Model,
|
|
28
|
+
apiExtractorModel.ApiItemKind.EntryPoint,
|
|
29
|
+
apiExtractorModel.ApiItemKind.EnumMember,
|
|
30
|
+
apiExtractorModel.ApiItemKind.Package
|
|
31
|
+
];
|
|
32
|
+
function getKindPriority(kind) {
|
|
33
|
+
const index = FILENAME_KIND_PRIORITY.indexOf(kind);
|
|
34
|
+
return index === -1 ? FILENAME_KIND_PRIORITY.length : index;
|
|
35
|
+
}
|
|
36
|
+
function compareCollidingItems(a, b) {
|
|
37
|
+
const byKind = getKindPriority(a.kind) - getKindPriority(b.kind);
|
|
38
|
+
if (byKind !== 0) {
|
|
39
|
+
return byKind;
|
|
40
|
+
}
|
|
41
|
+
if (a.displayName === b.displayName) {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
return a.displayName < b.displayName ? -1 : 1;
|
|
45
|
+
}
|
|
46
|
+
function getCollisionSuffix(item) {
|
|
47
|
+
const name = item.displayName.toLowerCase();
|
|
48
|
+
const siblings = item.parent?.members ?? [];
|
|
49
|
+
const colliding = siblings.filter(
|
|
50
|
+
(sibling) => sibling === item || sibling.displayName.toLowerCase() === name && (sibling.kind !== item.kind || sibling.displayName !== item.displayName)
|
|
51
|
+
).sort(compareCollidingItems);
|
|
52
|
+
if (colliding[0] === item) {
|
|
53
|
+
return "";
|
|
54
|
+
}
|
|
55
|
+
const sameKind = colliding.filter((sibling) => sibling.kind === item.kind);
|
|
56
|
+
const kindSuffix = colliding[0].kind === item.kind ? "" : `-${item.kind.toLowerCase()}`;
|
|
57
|
+
const index = sameKind.indexOf(item);
|
|
58
|
+
const isFirstOfKind = index === 0 && kindSuffix !== "";
|
|
59
|
+
return isFirstOfKind ? kindSuffix : `${kindSuffix}-${index + 1}`;
|
|
60
|
+
}
|
|
61
|
+
function disambiguateFilename(filename, apiItem) {
|
|
62
|
+
const segments = filename.slice(0, -".md".length).split(".");
|
|
63
|
+
const items = apiItem.getHierarchy().filter((item) => !SKIPPED_FILENAME_KINDS.includes(item.kind));
|
|
64
|
+
if (segments.length !== items.length + 1) {
|
|
65
|
+
return filename;
|
|
66
|
+
}
|
|
67
|
+
items.forEach((item, index) => {
|
|
68
|
+
segments[index + 1] += getCollisionSuffix(item);
|
|
69
|
+
});
|
|
70
|
+
return `${segments.join(".")}.md`;
|
|
71
|
+
}
|
|
17
72
|
class ExcerptTokenMatcher {
|
|
18
73
|
#tokens;
|
|
19
74
|
constructor(tokens) {
|
|
@@ -308,7 +363,10 @@ async function buildDocs({
|
|
|
308
363
|
this._markdownEmitter = new CustomCustomMarkdownEmitter(newModel);
|
|
309
364
|
}
|
|
310
365
|
_getFilenameForApiItem(apiItem) {
|
|
311
|
-
|
|
366
|
+
let filename = super._getFilenameForApiItem(apiItem);
|
|
367
|
+
if (filename !== "index.md") {
|
|
368
|
+
filename = disambiguateFilename(filename, apiItem);
|
|
369
|
+
}
|
|
312
370
|
if (filename.includes(".html.")) {
|
|
313
371
|
return filename.replace(/\.html\./g, "._html.");
|
|
314
372
|
}
|
|
@@ -440,4 +498,5 @@ async function buildDocs({
|
|
|
440
498
|
}
|
|
441
499
|
|
|
442
500
|
exports.buildDocs = buildDocs;
|
|
501
|
+
exports.disambiguateFilename = disambiguateFilename;
|
|
443
502
|
//# sourceMappingURL=buildDocs.cjs.js.map
|
|
@@ -9,22 +9,23 @@ var fs = require('node:fs');
|
|
|
9
9
|
const desiredLocalVersionsOfDependencies = {
|
|
10
10
|
"@types/react": "^18.0.0",
|
|
11
11
|
react: "^18.0.2",
|
|
12
|
-
"react-dom": "^18.0.2"
|
|
13
|
-
"react-router-dom": "^6.30.2"
|
|
12
|
+
"react-dom": "^18.0.2"
|
|
14
13
|
};
|
|
15
14
|
const peerDependencies = {
|
|
16
15
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
17
16
|
react: "^17.0.0 || ^18.0.0",
|
|
18
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
19
|
-
"react-router-dom": "^6.30.2"
|
|
17
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
20
18
|
};
|
|
21
19
|
const peerDependenciesReact18Only = {
|
|
22
20
|
"@types/react": "^18.0.0",
|
|
23
21
|
react: "^18.0.0",
|
|
24
|
-
"react-dom": "^18.0.0"
|
|
25
|
-
"react-router-dom": "^6.30.2"
|
|
22
|
+
"react-dom": "^18.0.0"
|
|
26
23
|
};
|
|
27
|
-
const react18OnlyPackages = /* @__PURE__ */ new Set([
|
|
24
|
+
const react18OnlyPackages = /* @__PURE__ */ new Set([
|
|
25
|
+
"@backstage/frontend-adapter-react-router-v7",
|
|
26
|
+
"@backstage/frontend-adapter-tanstack-router",
|
|
27
|
+
"@backstage/ui"
|
|
28
|
+
]);
|
|
28
29
|
const groupsOfPeerDependencies = [["@types/react", "react", "react-dom"]];
|
|
29
30
|
const optionalPeerDependencies = /* @__PURE__ */ new Set(["@types/react"]);
|
|
30
31
|
const isOptional = (dep) => {
|
package/dist/package.json.cjs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/repo-tools",
|
|
3
|
-
"version": "0.19.3-next.
|
|
3
|
+
"version": "0.19.3-next.1",
|
|
4
4
|
"description": "CLI for Backstage repo tooling ",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "cli"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
45
45
|
"@apisyouwonthate/style-guide": "^1.4.0",
|
|
46
|
-
"@backstage/backend-plugin-api": "1.
|
|
47
|
-
"@backstage/catalog-model": "1.10.
|
|
48
|
-
"@backstage/cli-common": "0.3.
|
|
49
|
-
"@backstage/cli-node": "0.3.6-next.
|
|
50
|
-
"@backstage/config-loader": "1.11.
|
|
51
|
-
"@backstage/errors": "1.
|
|
46
|
+
"@backstage/backend-plugin-api": "1.12.0-next.1",
|
|
47
|
+
"@backstage/catalog-model": "1.10.3-next.0",
|
|
48
|
+
"@backstage/cli-common": "0.3.3-next.0",
|
|
49
|
+
"@backstage/cli-node": "0.3.6-next.2",
|
|
50
|
+
"@backstage/config-loader": "1.11.5-next.0",
|
|
51
|
+
"@backstage/errors": "1.4.0-next.0",
|
|
52
52
|
"@electric-sql/pglite": "^0.5.8",
|
|
53
53
|
"@manypkg/get-packages": "^1.1.3",
|
|
54
54
|
"@microsoft/api-documenter": "^7.28.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"commander": "^14.0.3",
|
|
70
70
|
"diff": "^9.0.0",
|
|
71
71
|
"fs-extra": "^11.2.0",
|
|
72
|
-
"glob": "^
|
|
72
|
+
"glob": "^14.0.0",
|
|
73
73
|
"globby": "^11.0.0",
|
|
74
74
|
"is-glob": "^4.0.3",
|
|
75
75
|
"js-yaml": "^5.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"knex-pglite": "^0.14.0",
|
|
79
79
|
"knip": "^5.42.0",
|
|
80
80
|
"lodash": "^4.17.21",
|
|
81
|
-
"minimatch": "^
|
|
81
|
+
"minimatch": "^11.0.1",
|
|
82
82
|
"openapi-types": "^12.0.0",
|
|
83
83
|
"p-limit": "^3.0.2",
|
|
84
84
|
"tar": "^7.5.21",
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
"zod": "^3.25.76 || ^4.0.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@backstage/backend-test-utils": "1.
|
|
91
|
-
"@backstage/cli": "0.36.8-next.
|
|
90
|
+
"@backstage/backend-test-utils": "1.12.0-next.2",
|
|
91
|
+
"@backstage/cli": "0.36.8-next.2",
|
|
92
92
|
"@backstage/types": "1.2.2",
|
|
93
93
|
"@types/is-glob": "^4.0.2",
|
|
94
|
-
"@types/node": "^
|
|
94
|
+
"@types/node": "^24.0.0",
|
|
95
95
|
"@types/prettier": "^2.0.0",
|
|
96
96
|
"typedoc": "^0.28.0"
|
|
97
97
|
},
|