@itwin/build-tools 4.10.0-dev.8 → 4.10.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/CHANGELOG.md +28 -1
- package/mocha-reporter/index.js +1 -1
- package/package.json +6 -6
- package/scripts/extract-api.js +13 -5
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
# Change Log - @itwin/build-tools
|
2
2
|
|
3
|
-
This log was last generated on Wed,
|
3
|
+
This log was last generated on Wed, 13 Nov 2024 15:23:38 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.10.0
|
6
|
+
Wed, 13 Nov 2024 15:23:38 GMT
|
7
|
+
|
8
|
+
### Updates
|
9
|
+
|
10
|
+
- Allow specifying a relative directory for the `entry` argument in the `extract-api` command.
|
11
|
+
|
12
|
+
## 4.9.5
|
13
|
+
Tue, 22 Oct 2024 20:01:40 GMT
|
14
|
+
|
15
|
+
_Version update only_
|
16
|
+
|
17
|
+
## 4.9.4
|
18
|
+
Wed, 09 Oct 2024 20:22:04 GMT
|
19
|
+
|
20
|
+
_Version update only_
|
21
|
+
|
22
|
+
## 4.9.3
|
23
|
+
Thu, 03 Oct 2024 19:15:45 GMT
|
24
|
+
|
25
|
+
_Version update only_
|
26
|
+
|
27
|
+
## 4.9.2
|
28
|
+
Wed, 02 Oct 2024 15:14:43 GMT
|
29
|
+
|
30
|
+
_Version update only_
|
4
31
|
|
5
32
|
## 4.9.1
|
6
33
|
Wed, 25 Sep 2024 20:10:58 GMT
|
package/mocha-reporter/index.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
6
6
|
/* eslint-disable @typescript-eslint/naming-convention */
|
7
|
-
/* eslint-disable @typescript-eslint/no-
|
7
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
8
8
|
/* eslint-disable no-console */
|
9
9
|
const debugLeaks = process.env.DEBUG_LEAKS;
|
10
10
|
let asyncResourceStats;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itwin/build-tools",
|
3
|
-
"version": "4.10.0
|
3
|
+
"version": "4.10.0",
|
4
4
|
"description": "Bentley build tools",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"url": "http://www.bentley.com"
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
|
-
"@microsoft/api-extractor": "~7.47.
|
24
|
+
"@microsoft/api-extractor": "~7.47.10",
|
25
25
|
"chalk": "^3.0.0",
|
26
26
|
"cpx2": "^3.0.0",
|
27
27
|
"cross-spawn": "^7.0.1",
|
@@ -33,20 +33,20 @@
|
|
33
33
|
"tree-kill": "^1.2.2",
|
34
34
|
"typedoc": "^0.25.8",
|
35
35
|
"typedoc-plugin-merge-modules": "^5.1.0",
|
36
|
-
"typescript": "~5.
|
36
|
+
"typescript": "~5.6.2",
|
37
37
|
"wtfnode": "^0.9.1",
|
38
38
|
"yargs": "^17.4.0"
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
|
-
"@itwin/eslint-plugin": "
|
41
|
+
"@itwin/eslint-plugin": "5.0.0-dev.1",
|
42
42
|
"@types/node": "~18.16.20",
|
43
|
-
"eslint": "^
|
43
|
+
"eslint": "^9.13.0"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"build": "tsc 1>&2",
|
47
47
|
"clean": "rimraf ../../modules .rush/temp/package-deps*.json",
|
48
48
|
"docs": "",
|
49
|
-
"lint": "eslint
|
49
|
+
"lint": "eslint \"./src/**/*.ts\" 1>&2",
|
50
50
|
"test": "",
|
51
51
|
"cover": ""
|
52
52
|
}
|
package/scripts/extract-api.js
CHANGED
@@ -15,8 +15,14 @@ if (argv.entry === undefined) {
|
|
15
15
|
return;
|
16
16
|
}
|
17
17
|
|
18
|
+
function getEntryPointDirName(){
|
19
|
+
const dirname = path.dirname(argv.entry);
|
20
|
+
return dirname === "." ? "./lib/cjs" : dirname;
|
21
|
+
};
|
22
|
+
|
18
23
|
const isCI = (process.env.TF_BUILD);
|
19
|
-
const entryPointFileName = argv.entry;
|
24
|
+
const entryPointFileName = path.basename(argv.entry);
|
25
|
+
const entryPointDirName = getEntryPointDirName();
|
20
26
|
const ignoreMissingTags = argv.ignoreMissingTags;
|
21
27
|
const includeUnexportedApis = argv.includeUnexportedApis;
|
22
28
|
|
@@ -43,9 +49,11 @@ const apiReportFolder = argv.apiReportFolder ?? path.join(rushCommon(), "/api");
|
|
43
49
|
const apiReportTempFolder = argv.apiReportTempFolder ?? path.join(rushCommon(), "/temp/api");
|
44
50
|
const apiSummaryFolder = argv.apiSummaryFolder ?? path.join(rushCommon(), "/api/summary");
|
45
51
|
|
52
|
+
const appDir = path.join(paths.appSrc, "..");
|
53
|
+
const projectFolder = path.relative(entryPointDirName, appDir);
|
46
54
|
const config = {
|
47
55
|
$schema: "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
48
|
-
projectFolder
|
56
|
+
projectFolder,
|
49
57
|
compiler: {
|
50
58
|
tsconfigFilePath: "<projectFolder>/tsconfig.json"
|
51
59
|
},
|
@@ -104,12 +112,12 @@ const config = {
|
|
104
112
|
}
|
105
113
|
};
|
106
114
|
|
107
|
-
if (!fs.existsSync(
|
108
|
-
process.stderr.write(
|
115
|
+
if (!fs.existsSync(entryPointDirName)) {
|
116
|
+
process.stderr.write(`\`${entryPointDirName}\` folder not found. Build the package(s) before running \`extract-api\``);
|
109
117
|
process.exit(1);
|
110
118
|
}
|
111
119
|
|
112
|
-
const configFileName =
|
120
|
+
const configFileName = path.format({ dir: entryPointDirName, name: entryPointFileName, ext: ".json" });
|
113
121
|
fs.writeFileSync(configFileName, JSON.stringify(config, null, 2));
|
114
122
|
|
115
123
|
const args = [
|