@itwin/build-tools 4.10.0-dev.9 → 5.0.0-dev.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 CHANGED
@@ -1,6 +1,26 @@
1
1
  # Change Log - @itwin/build-tools
2
2
 
3
- This log was last generated on Wed, 25 Sep 2024 20:12:30 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 22 Oct 2024 20:03:09 GMT and should not be manually modified.
4
+
5
+ ## 4.9.5
6
+ Tue, 22 Oct 2024 20:01:40 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.9.4
11
+ Wed, 09 Oct 2024 20:22:04 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.9.3
16
+ Thu, 03 Oct 2024 19:15:45 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.9.2
21
+ Wed, 02 Oct 2024 15:14:43 GMT
22
+
23
+ _Version update only_
4
24
 
5
25
  ## 4.9.1
6
26
  Wed, 25 Sep 2024 20:10:58 GMT
@@ -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-var-requires */
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-dev.9",
3
+ "version": "5.0.0-dev.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.0",
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.3.3",
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": "^4.0.2",
41
+ "@itwin/eslint-plugin": "5.0.0-dev.1",
42
42
  "@types/node": "~18.16.20",
43
- "eslint": "^8.56.0"
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 -f visualstudio \"./src/**/*.ts\" 1>&2",
49
+ "lint": "eslint \"./src/**/*.ts\" 1>&2",
50
50
  "test": "",
51
51
  "cover": ""
52
52
  }
@@ -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("lib")) {
108
- process.stderr.write("`lib` folder not found. Build the package(s) before running `extract-api`");
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 = `lib/cjs/${entryPointFileName}.json`;
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 = [