@itwin/build-tools 4.10.0-dev.9 → 4.10.1

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,41 @@
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 Thu, 14 Nov 2024 18:11:00 GMT and should not be manually modified.
4
+
5
+ ## 4.10.1
6
+ Thu, 14 Nov 2024 18:11:00 GMT
7
+
8
+ ### Updates
9
+
10
+ - Bump `typedoc` dependency to a version that supports typescript `5.6`.
11
+ - Deprecate unused --includes flag
12
+
13
+ ## 4.10.0
14
+ Wed, 13 Nov 2024 15:23:38 GMT
15
+
16
+ ### Updates
17
+
18
+ - Allow specifying a relative directory for the `entry` argument in the `extract-api` command.
19
+
20
+ ## 4.9.5
21
+ Tue, 22 Oct 2024 20:01:40 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.9.4
26
+ Wed, 09 Oct 2024 20:22:04 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.9.3
31
+ Thu, 03 Oct 2024 19:15:45 GMT
32
+
33
+ _Version update only_
34
+
35
+ ## 4.9.2
36
+ Wed, 02 Oct 2024 15:14:43 GMT
37
+
38
+ _Version update only_
4
39
 
5
40
  ## 4.9.1
6
41
  Wed, 25 Sep 2024 20:10:58 GMT
package/bin/betools.js CHANGED
@@ -32,7 +32,7 @@ yargs.strict(true)
32
32
  describe: "Specify a baseUrl to resolve modules"
33
33
  },
34
34
  "includes": {
35
- describe: "Specify a baseUrl to resolve modules"
35
+ describe: "Deprecated - this flag does nothing and will be removed in @itwin/build-tools 5.x"
36
36
  },
37
37
  "excludes": {
38
38
  describe: "Specify a directory, filename, or pattern to be excluded"
@@ -140,14 +140,13 @@ function docsCommand(options) {
140
140
  const outOpt = options.out ? ["--out", options.out] : [];
141
141
  const jsonOpt = options.json ? ["--json", options.json] : [];
142
142
  const baseUrlOpt = options.baseUrl ? ["--baseUrl", options.baseUrl] : [];
143
- const includesOpt = options.includes ? ["--includes", options.includes] : [];
144
143
  const excludesOpt = options.excludes ? ["--excludes", options.excludes] : [];
145
144
  const excludesGlobOpt = options.excludeGlob ? ["--excludeGlob", options.excludeGlob] : [];
146
145
  const testExcludeGlobOpt = options.testExcludeGlob ? ["--testExcludeGlob", options.testExcludeGlob] : [];
147
146
  const indexFileOpt = options.tsIndexFile ? ["--tsIndexFile", options.tsIndexFile] : [];
148
147
  const onlyJsonOpt = options.onlyJson ? ["--onlyJson"] : [];
149
148
  exec("node", [getScriptPath("docs.js"),
150
- ...sourceOpt, ...outOpt, ...jsonOpt, ...baseUrlOpt, ...includesOpt,
149
+ ...sourceOpt, ...outOpt, ...jsonOpt, ...baseUrlOpt,
151
150
  ...excludesOpt, ...excludesGlobOpt, ...testExcludeGlobOpt, ...indexFileOpt, ...onlyJsonOpt]);
152
151
  }
153
152
 
@@ -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": "4.10.1",
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",
@@ -31,22 +31,22 @@
31
31
  "mocha-junit-reporter": "^2.0.2",
32
32
  "rimraf": "^3.0.2",
33
33
  "tree-kill": "^1.2.2",
34
- "typedoc": "^0.25.8",
35
- "typedoc-plugin-merge-modules": "^5.1.0",
36
- "typescript": "~5.3.3",
34
+ "typedoc": "^0.26.11",
35
+ "typedoc-plugin-merge-modules": "^6.0.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
  }
package/scripts/docs.js CHANGED
@@ -27,7 +27,6 @@ const out = (argv.out === undefined) ? paths.appDocs : argv.out;
27
27
  const json = (argv.json === undefined) ? paths.appJsonDocs : argv.json;
28
28
 
29
29
  const baseUrlOptions = (argv.baseUrl === undefined) ? [] : ["--baseUrl", argv.baseUrl];
30
- const includeOptions = (argv.includes === undefined) ? [] : ["--includes", argv.includes];
31
30
 
32
31
  const testExclude = argv.testExcludeGlob ?? "**/*test*/**/*";
33
32
  const excludeInternalFolders = "**/internal/**/*"
@@ -51,7 +50,6 @@ if (argv.onlyJson === undefined)
51
50
  const readmeOption = (argv.readme === undefined) ? "none" : argv.readme;
52
51
 
53
52
  const options = [
54
- "--excludePrivate",
55
53
  "--hideGenerator",
56
54
  "--logLevel",
57
55
  "Error"
@@ -74,7 +72,6 @@ const args = [
74
72
  "--readme", readmeOption,
75
73
  ...pluginOptions,
76
74
  ...baseUrlOptions,
77
- ...includeOptions
78
75
  ];
79
76
 
80
77
  console.log("Arguments to TypeDoc: " + JSON.stringify(args, null, 2));
@@ -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 = [