@itwin/build-tools 3.4.0-dev.9 → 3.5.0-dev.11

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,6 +1,29 @@
1
1
  # Change Log - @itwin/build-tools
2
2
 
3
- This log was last generated on Tue, 09 Aug 2022 15:52:41 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 01 Sep 2022 14:37:22 GMT and should not be manually modified.
4
+
5
+ ## 3.3.2
6
+ Thu, 01 Sep 2022 14:37:22 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.3.1
11
+ Fri, 26 Aug 2022 15:40:02 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 3.3.0
16
+ Thu, 18 Aug 2022 19:08:02 GMT
17
+
18
+ ### Updates
19
+
20
+ - Upgrade @microsoft/api-extractor to 7.24.2
21
+ - upgrade mocha to version 10.0.0
22
+
23
+ ## 3.2.9
24
+ Fri, 26 Aug 2022 14:21:40 GMT
25
+
26
+ _Version update only_
4
27
 
5
28
  ## 3.2.8
6
29
  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-dev.9",
3
+ "version": "3.5.0-dev.11",
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-dev.9",
42
- "@types/node": "16.11.7",
41
+ "@itwin/eslint-plugin": "3.5.0-dev.11",
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('fs-extra');
7
- const rootPackageJson = require('../../../../package.json');
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, 'utf-8');
13
- let packageRoot = directory.substring(directory.indexOf(rootPackageJson.name) + rootPackageJson.name.length + 1);
14
- let jsonContents = JSON.parse(contents);
15
- jsonContents['packageRoot'] = packageRoot.endsWith('src') ? packageRoot : `${packageRoot}\\${'src'}`;
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
  };