@itwin/build-tools 3.4.0-dev.8 → 3.4.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 +48 -1
- package/package.json +3 -3
- package/scripts/utils/addSourceDir.js +24 -7
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,53 @@
|
|
1
1
|
# Change Log - @itwin/build-tools
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 13 Oct 2022 20:24:47 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 3.4.0
|
6
|
+
Thu, 13 Oct 2022 20:24:47 GMT
|
7
|
+
|
8
|
+
### Updates
|
9
|
+
|
10
|
+
- Use Rush env variable to find root monorepo path
|
11
|
+
- Updated Node types declaration to support latest v16
|
12
|
+
- Update mocha-junit-reporter to v2.0.2
|
13
|
+
|
14
|
+
## 3.3.5
|
15
|
+
Tue, 27 Sep 2022 11:50:59 GMT
|
16
|
+
|
17
|
+
_Version update only_
|
18
|
+
|
19
|
+
## 3.3.4
|
20
|
+
Thu, 08 Sep 2022 19:00:04 GMT
|
21
|
+
|
22
|
+
_Version update only_
|
23
|
+
|
24
|
+
## 3.3.3
|
25
|
+
Tue, 06 Sep 2022 20:54:19 GMT
|
26
|
+
|
27
|
+
_Version update only_
|
28
|
+
|
29
|
+
## 3.3.2
|
30
|
+
Thu, 01 Sep 2022 14:37:22 GMT
|
31
|
+
|
32
|
+
_Version update only_
|
33
|
+
|
34
|
+
## 3.3.1
|
35
|
+
Fri, 26 Aug 2022 15:40:02 GMT
|
36
|
+
|
37
|
+
_Version update only_
|
38
|
+
|
39
|
+
## 3.3.0
|
40
|
+
Thu, 18 Aug 2022 19:08:02 GMT
|
41
|
+
|
42
|
+
### Updates
|
43
|
+
|
44
|
+
- Upgrade @microsoft/api-extractor to 7.24.2
|
45
|
+
- upgrade mocha to version 10.0.0
|
46
|
+
|
47
|
+
## 3.2.9
|
48
|
+
Fri, 26 Aug 2022 14:21:40 GMT
|
49
|
+
|
50
|
+
_Version update only_
|
4
51
|
|
5
52
|
## 3.2.8
|
6
53
|
Tue, 09 Aug 2022 15:52:41 GMT
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itwin/build-tools",
|
3
|
-
"version": "3.4.0
|
3
|
+
"version": "3.4.0",
|
4
4
|
"description": "Bentley build tools",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"yargs": "^17.4.0"
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
|
-
"@itwin/eslint-plugin": "3.4.0
|
42
|
-
"@types/node": "16.11.
|
41
|
+
"@itwin/eslint-plugin": "3.4.0",
|
42
|
+
"@types/node": "16.11.59",
|
43
43
|
"eslint": "^7.11.0"
|
44
44
|
},
|
45
45
|
"eslintConfig": {
|
@@ -3,20 +3,37 @@
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
5
5
|
|
6
|
-
const FS = require(
|
7
|
-
const
|
6
|
+
const FS = require("fs-extra");
|
7
|
+
const path = require("path");
|
8
|
+
|
9
|
+
// We cannot guarantee the folder structure of a project
|
10
|
+
// so find the project root using rush env variable if available.
|
11
|
+
if (process.env.RUSHSTACK_FILE_ERROR_BASE_FOLDER) {
|
12
|
+
rootPackageJsonPath = path.resolve(
|
13
|
+
process.env.RUSHSTACK_FILE_ERROR_BASE_FOLDER,
|
14
|
+
"package.json"
|
15
|
+
);
|
16
|
+
} else {
|
17
|
+
rootPackageJsonPath = path.resolve("../../../../package.json");
|
18
|
+
}
|
19
|
+
|
20
|
+
const rootPackageJson = require(rootPackageJsonPath);
|
8
21
|
|
9
22
|
// Appends the directory of the package root to the Typedoc JSON output
|
10
23
|
function addSourceDir(file, directory) {
|
11
24
|
if (FS.existsSync(file) && FS.statSync(file).isFile()) {
|
12
|
-
const contents = FS.readFileSync(file,
|
13
|
-
|
14
|
-
|
15
|
-
|
25
|
+
const contents = FS.readFileSync(file, "utf-8");
|
26
|
+
const packageRoot = directory.substring(
|
27
|
+
directory.indexOf(rootPackageJson.name) + rootPackageJson.name.length + 1
|
28
|
+
);
|
29
|
+
const jsonContents = JSON.parse(contents);
|
30
|
+
jsonContents["packageRoot"] = packageRoot.endsWith("src")
|
31
|
+
? packageRoot
|
32
|
+
: `${packageRoot}\\${"src"}`;
|
16
33
|
FS.writeFileSync(file, Buffer.from(JSON.stringify(jsonContents, null, 2)));
|
17
34
|
}
|
18
35
|
}
|
19
36
|
|
20
37
|
module.exports = {
|
21
|
-
addSourceDir
|
38
|
+
addSourceDir,
|
22
39
|
};
|