@storm-software/workspace-tools 1.13.12 → 1.13.13
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 +7 -0
- package/index.js +72 -15
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +78 -16
- package/src/executors/tsup/get-config.js +73 -16
- package/src/executors/tsup/schema.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.13.12](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.13.11...workspace-tools-v1.13.12) (2023-11-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Resolved issue around adding files to api-extractor config ([4ad4118](https://github.com/storm-software/storm-ops/commit/4ad41184c0c8d1f803846b5bb653dc8fffc905e6))
|
|
7
|
+
|
|
1
8
|
## [1.13.11](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.13.10...workspace-tools-v1.13.11) (2023-11-27)
|
|
2
9
|
|
|
3
10
|
|
package/index.js
CHANGED
|
@@ -37426,9 +37426,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
37426
37426
|
}
|
|
37427
37427
|
});
|
|
37428
37428
|
|
|
37429
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
37429
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
37430
37430
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
37431
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
37431
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
37432
37432
|
"use strict";
|
|
37433
37433
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37434
37434
|
var version = "8.0.0";
|
|
@@ -39075,9 +39075,9 @@ var require_resolve_from = __commonJS({
|
|
|
39075
39075
|
}
|
|
39076
39076
|
});
|
|
39077
39077
|
|
|
39078
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39078
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
39079
39079
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
39080
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39080
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
39081
39081
|
"use strict";
|
|
39082
39082
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39083
39083
|
function _interopRequireDefault(obj) {
|
|
@@ -39355,9 +39355,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
39355
39355
|
}
|
|
39356
39356
|
});
|
|
39357
39357
|
|
|
39358
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39358
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
39359
39359
|
var require_chunk_UIX4URMV = __commonJS({
|
|
39360
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39360
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
39361
39361
|
"use strict";
|
|
39362
39362
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39363
39363
|
function _interopRequireWildcard(obj) {
|
|
@@ -40291,9 +40291,9 @@ var require_dist2 = __commonJS({
|
|
|
40291
40291
|
}
|
|
40292
40292
|
});
|
|
40293
40293
|
|
|
40294
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40294
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
40295
40295
|
var require_chunk_7G76EW2R = __commonJS({
|
|
40296
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40296
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
40297
40297
|
"use strict";
|
|
40298
40298
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40299
40299
|
function _interopRequireDefault(obj) {
|
|
@@ -95291,9 +95291,9 @@ var require_chokidar = __commonJS({
|
|
|
95291
95291
|
}
|
|
95292
95292
|
});
|
|
95293
95293
|
|
|
95294
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95294
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/index.js
|
|
95295
95295
|
var require_dist6 = __commonJS({
|
|
95296
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95296
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ozahcrvbx3dbyb7o5rk2jowdzi_@microsoft+api-extractor@7.38.3_@swc+core@1._eqrbl6tdl36m7ygs4afj6pyolu/node_modules/tsup/dist/index.js"(exports) {
|
|
95297
95297
|
"use strict";
|
|
95298
95298
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95299
95299
|
function _interopRequireDefault(obj) {
|
|
@@ -97523,6 +97523,62 @@ var require_dist6 = __commonJS({
|
|
|
97523
97523
|
}
|
|
97524
97524
|
return program.getRootFileNames().flatMap(extractExports);
|
|
97525
97525
|
}
|
|
97526
|
+
function emitDtsFiles(program, host, options) {
|
|
97527
|
+
let fileMapping = /* @__PURE__ */ new Map();
|
|
97528
|
+
let writeFile = (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
97529
|
+
const sourceFile = _optionalChain([sourceFiles, "optionalAccess", (_14) => _14[0]]);
|
|
97530
|
+
let sourceFileName = _optionalChain([sourceFile, "optionalAccess", (_15) => _15.fileName]);
|
|
97531
|
+
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
97532
|
+
const cwd = options.workspaceRoot ? options.workspaceRoot : program.getCurrentDirectory();
|
|
97533
|
+
fileMapping.set(
|
|
97534
|
+
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName, cwd),
|
|
97535
|
+
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, fileName, cwd)
|
|
97536
|
+
);
|
|
97537
|
+
}
|
|
97538
|
+
return host.writeFile(
|
|
97539
|
+
fileName,
|
|
97540
|
+
text,
|
|
97541
|
+
writeByteOrderMark,
|
|
97542
|
+
onError,
|
|
97543
|
+
sourceFiles,
|
|
97544
|
+
data
|
|
97545
|
+
);
|
|
97546
|
+
};
|
|
97547
|
+
logger.info("tsc", "Emitting DTS files");
|
|
97548
|
+
let emitResult = program.emit(void 0, writeFile, void 0, true);
|
|
97549
|
+
let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
97550
|
+
let diagnosticMessages = [];
|
|
97551
|
+
diagnostics.forEach((diagnostic) => {
|
|
97552
|
+
if (diagnostic.file) {
|
|
97553
|
+
let { line, character } = _typescript2.default.getLineAndCharacterOfPosition(
|
|
97554
|
+
diagnostic.file,
|
|
97555
|
+
diagnostic.start
|
|
97556
|
+
);
|
|
97557
|
+
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
97558
|
+
diagnostic.messageText,
|
|
97559
|
+
"\n"
|
|
97560
|
+
);
|
|
97561
|
+
diagnosticMessages.push(
|
|
97562
|
+
`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
|
|
97563
|
+
);
|
|
97564
|
+
} else {
|
|
97565
|
+
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
97566
|
+
diagnostic.messageText,
|
|
97567
|
+
"\n"
|
|
97568
|
+
);
|
|
97569
|
+
diagnosticMessages.push(message);
|
|
97570
|
+
}
|
|
97571
|
+
});
|
|
97572
|
+
let diagnosticMessage = diagnosticMessages.join("\n");
|
|
97573
|
+
if (diagnosticMessage) {
|
|
97574
|
+
logger.error(
|
|
97575
|
+
"TSC",
|
|
97576
|
+
"Failed to emit declaration files.\n\n" + diagnosticMessage
|
|
97577
|
+
);
|
|
97578
|
+
throw new Error("TypeScript compilation failed");
|
|
97579
|
+
}
|
|
97580
|
+
return fileMapping;
|
|
97581
|
+
}
|
|
97526
97582
|
var getFile = (name, logger3) => {
|
|
97527
97583
|
logger3.info("tsc", `Reading file content for: ${name}`);
|
|
97528
97584
|
return _fs2.default.promises.readFile(name, "utf8");
|
|
@@ -97626,17 +97682,17 @@ var require_dist6 = __commonJS({
|
|
|
97626
97682
|
logger.info("tsc", "Created program");
|
|
97627
97683
|
logger.info("tsc", "Emitting DTS files with the following options: ");
|
|
97628
97684
|
logger.info("tsc", parsedTsconfig.options);
|
|
97685
|
+
let fileMapping;
|
|
97629
97686
|
try {
|
|
97630
97687
|
logger.info("tsc", "Emitting DTS files");
|
|
97631
|
-
|
|
97632
|
-
program.emit();
|
|
97688
|
+
fileMapping = emitDtsFiles(program, host.compilerHost, options);
|
|
97633
97689
|
logger.info("tsc", "Emit DTS files complete");
|
|
97634
|
-
logger.info("tsc",
|
|
97690
|
+
logger.info("tsc", fileMapping);
|
|
97635
97691
|
} catch (e) {
|
|
97636
97692
|
logger.error("tsc", "An error occured while emitting DTS files");
|
|
97637
97693
|
logger.error("tsc", e);
|
|
97638
97694
|
}
|
|
97639
|
-
return getExports(options, program,
|
|
97695
|
+
return getExports(options, program, fileMapping);
|
|
97640
97696
|
}
|
|
97641
97697
|
async function runTypeScriptCompiler(options) {
|
|
97642
97698
|
try {
|
|
@@ -97797,7 +97853,8 @@ var require_dist6 = __commonJS({
|
|
|
97797
97853
|
enabled: options.tsdocMetadata !== false,
|
|
97798
97854
|
tsdocMetadataFilePath: _path2.default.join(
|
|
97799
97855
|
"<projectFolder>",
|
|
97800
|
-
|
|
97856
|
+
"dist",
|
|
97857
|
+
options.projectRoot,
|
|
97801
97858
|
"tsdoc-metadata.api.json"
|
|
97802
97859
|
)
|
|
97803
97860
|
},
|