@itwin/build-tools 4.9.0-dev.1 → 4.9.0-dev.10
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 +25 -1
- package/bin/betools.js +7 -2
- package/package.json +1 -1
- package/scripts/extract-api-summary.js +9 -8
- package/scripts/extract-api.js +2 -0
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
# Change Log - @itwin/build-tools
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 16 Aug 2024 18:19:52 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.8.3
|
6
|
+
Fri, 16 Aug 2024 18:18:14 GMT
|
7
|
+
|
8
|
+
_Version update only_
|
9
|
+
|
10
|
+
## 4.8.2
|
11
|
+
Thu, 15 Aug 2024 15:33:49 GMT
|
12
|
+
|
13
|
+
_Version update only_
|
14
|
+
|
15
|
+
## 4.8.1
|
16
|
+
Mon, 12 Aug 2024 14:05:54 GMT
|
17
|
+
|
18
|
+
_Version update only_
|
19
|
+
|
20
|
+
## 4.8.0
|
21
|
+
Thu, 08 Aug 2024 16:15:37 GMT
|
22
|
+
|
23
|
+
### Updates
|
24
|
+
|
25
|
+
- extract-api-summary: Improve regex so that includes all exports with improved output.
|
26
|
+
- Update ThirdPartyNotices.md
|
27
|
+
- Update api-extractor to 7.47.
|
4
28
|
|
5
29
|
## 4.7.8
|
6
30
|
Wed, 31 Jul 2024 13:38:04 GMT
|
package/bin/betools.js
CHANGED
@@ -88,7 +88,11 @@ yargs.strict(true)
|
|
88
88
|
},
|
89
89
|
"apiSummaryFolder": {
|
90
90
|
describe: "Directory for the API summary. Defaults to `<Rush repository root>/common/api/summary`."
|
91
|
-
}
|
91
|
+
},
|
92
|
+
"includeUnexportedApis": {
|
93
|
+
boolean: true,
|
94
|
+
describe: "If this flag is set, then APIs that are unexported, but still indirectly accessible via exported APIs, will also be included to the API report. Defaults to `false`"
|
95
|
+
},
|
92
96
|
})
|
93
97
|
},
|
94
98
|
(argv) => { extractApiCommand(argv) })
|
@@ -161,7 +165,8 @@ function extractApiCommand(options) {
|
|
161
165
|
const apiReportFolderOpt = options.apiReportFolder ? ["--apiReportFolder", options.apiReportFolder] : [];
|
162
166
|
const apiReportTempFolderOpt = options.apiReportTempFolder ? ["--apiReportTempFolder", options.apiReportTempFolder] : [];
|
163
167
|
const apiSummaryFolderOpt = options.apiSummaryFolder ? ["--apiSummaryFolder", options.apiSummaryFolder] : [];
|
164
|
-
|
168
|
+
const includeUnexportedApisOpt = options.includeUnexportedApis ? ["--includeUnexportedApis"] : [];
|
169
|
+
exec("node", [getScriptPath("extract-api.js"), ...entryOpt, ...ignoreTagsOpt, ...apiReportFolderOpt, ...apiReportTempFolderOpt, ...apiSummaryFolderOpt, ...includeUnexportedApisOpt]);
|
165
170
|
}
|
166
171
|
|
167
172
|
function pseudolocalizeCommand(options) {
|
package/package.json
CHANGED
@@ -34,7 +34,7 @@ if (undefined !== argv.gatherFullReport)
|
|
34
34
|
|
35
35
|
// create output file
|
36
36
|
const apiSignatureFileName = path.parse(argv.apiSignature).name;
|
37
|
-
const sigFileName = (apiSignatureFileName.
|
37
|
+
const sigFileName = apiSignatureFileName.substring(0, apiSignatureFileName.lastIndexOf('.'));
|
38
38
|
const sigFilePath = path.join(argv.outDir, `${shouldGenerateFullReport ? "summary" : sigFileName}.exports.csv`);
|
39
39
|
|
40
40
|
const outputLines = [];
|
@@ -43,12 +43,12 @@ if (shouldGenerateFullReport) {
|
|
43
43
|
outputLines.push("");
|
44
44
|
else {
|
45
45
|
outputLines.push("sep=;");
|
46
|
-
outputLines.push("Package Name;Release Tag;API Item");
|
46
|
+
outputLines.push("Package Name;Release Tag;API Item Type;API Item Name");
|
47
47
|
}
|
48
48
|
} else {
|
49
49
|
fs.createFileSync(sigFilePath);
|
50
50
|
outputLines.push("sep=;");
|
51
|
-
outputLines.push("Release Tag;API Item");
|
51
|
+
outputLines.push("Release Tag;API Item Type;API Item Name");
|
52
52
|
}
|
53
53
|
|
54
54
|
// Open up the signature file
|
@@ -60,11 +60,12 @@ fs.readFile(argv.apiSignature, function (error, data) {
|
|
60
60
|
if (index === arr.length - 1 && line === "") { return; }
|
61
61
|
|
62
62
|
if (previousLines.length !== 0) {
|
63
|
-
const matches = line.match(/export
|
64
|
-
if (
|
65
|
-
const
|
66
|
-
|
67
|
-
outputLines.push(shouldGenerateFullReport ? `${sigFileName};${
|
63
|
+
const matches = line.match(/export.+?(class|interface|type|function|const|enum|namespace) (\w+)/);
|
64
|
+
if (matches) {
|
65
|
+
for (const previousLine of previousLines) {
|
66
|
+
const line = `${previousLine};${matches[1]};${matches[2]}`;
|
67
|
+
outputLines.push(shouldGenerateFullReport ? `${sigFileName};${line}` : line);
|
68
|
+
}
|
68
69
|
}
|
69
70
|
|
70
71
|
previousLines = [];
|
package/scripts/extract-api.js
CHANGED
@@ -18,6 +18,7 @@ if (argv.entry === undefined) {
|
|
18
18
|
const isCI = (process.env.TF_BUILD);
|
19
19
|
const entryPointFileName = argv.entry;
|
20
20
|
const ignoreMissingTags = argv.ignoreMissingTags;
|
21
|
+
const includeUnexportedApis = argv.includeUnexportedApis;
|
21
22
|
|
22
23
|
// Resolves the root of the Rush repo
|
23
24
|
const resolveRoot = relativePath => {
|
@@ -53,6 +54,7 @@ const config = {
|
|
53
54
|
enabled: true,
|
54
55
|
reportFolder: path.resolve(apiReportFolder),
|
55
56
|
reportTempFolder: path.resolve(apiReportTempFolder),
|
57
|
+
includeForgottenExports: !!includeUnexportedApis,
|
56
58
|
},
|
57
59
|
docModel: {
|
58
60
|
enabled: false
|