@storm-software/workspace-tools 1.7.29 → 1.7.31

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,3 +1,17 @@
1
+ ## [1.7.30](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.7.29...workspace-tools-v1.7.30) (2023-11-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **workspace-tools:** Added code to default tsup build options and package.json path in api-extractor ([f79dbb1](https://github.com/storm-software/storm-ops/commit/f79dbb1d57ba7e2da054ae47483e98516739662b))
7
+
8
+ ## [1.7.29](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.7.28...workspace-tools-v1.7.29) (2023-11-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **workspace-tools:** Added env option to the tsup executor config ([80e4e84](https://github.com/storm-software/storm-ops/commit/80e4e84d130bd7275a7b104d8f589d906c9f92ac))
14
+
1
15
  ## [1.7.28](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.7.27...workspace-tools-v1.7.28) (2023-11-20)
2
16
 
3
17
 
package/index.js CHANGED
@@ -408390,9 +408390,9 @@ var require_brace_expansion2 = __commonJS({
408390
408390
  }
408391
408391
  });
408392
408392
 
408393
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
408393
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
408394
408394
  var require_chunk_EPAEWGCP = __commonJS({
408395
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
408395
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
408396
408396
  "use strict";
408397
408397
  Object.defineProperty(exports, "__esModule", { value: true });
408398
408398
  var version = "8.0.0";
@@ -410039,9 +410039,9 @@ var require_resolve_from = __commonJS({
410039
410039
  }
410040
410040
  });
410041
410041
 
410042
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
410042
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
410043
410043
  var require_chunk_GQ77QZBO = __commonJS({
410044
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
410044
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
410045
410045
  "use strict";
410046
410046
  Object.defineProperty(exports, "__esModule", { value: true });
410047
410047
  function _interopRequireDefault(obj) {
@@ -410320,9 +410320,9 @@ var require_chunk_GQ77QZBO = __commonJS({
410320
410320
  }
410321
410321
  });
410322
410322
 
410323
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
410323
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
410324
410324
  var require_chunk_UIX4URMV = __commonJS({
410325
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410325
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410326
410326
  "use strict";
410327
410327
  Object.defineProperty(exports, "__esModule", { value: true });
410328
410328
  function _interopRequireWildcard(obj) {
@@ -411256,9 +411256,9 @@ var require_dist2 = __commonJS({
411256
411256
  }
411257
411257
  });
411258
411258
 
411259
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
411259
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
411260
411260
  var require_chunk_7G76EW2R = __commonJS({
411261
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411261
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411262
411262
  "use strict";
411263
411263
  Object.defineProperty(exports, "__esModule", { value: true });
411264
411264
  function _interopRequireDefault(obj) {
@@ -465064,9 +465064,9 @@ var require_chokidar = __commonJS({
465064
465064
  }
465065
465065
  });
465066
465066
 
465067
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
465067
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
465068
465068
  var require_dist5 = __commonJS({
465069
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
465069
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7gmoeiiohmkt6i3co3e5ukbynm_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
465070
465070
  "use strict";
465071
465071
  Object.defineProperty(exports, "__esModule", { value: true });
465072
465072
  function _interopRequireDefault(obj) {
@@ -466646,15 +466646,9 @@ var require_dist5 = __commonJS({
466646
466646
  }
466647
466647
  return result;
466648
466648
  };
466649
- async function runEsbuild(options, {
466650
- format: format2,
466651
- css,
466652
- logger: logger3,
466653
- buildDependencies,
466654
- pluginContainer
466655
- }) {
466656
- let pkgPath = options.outDir ? options.outDir : process.cwd();
466657
- !options.silent && logger3.info(format2, `\u26A1 Preparing to run ESBuild: ${pkgPath}`);
466649
+ var packageJsonSearch = (outDir, silent, format2, logger3) => {
466650
+ let pkgPath = outDir ? outDir : process.cwd();
466651
+ !silent && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
466658
466652
  if (pkgPath) {
466659
466653
  const splits = pkgPath.split("/");
466660
466654
  if (splits.length > 0) {
@@ -466666,12 +466660,12 @@ var require_dist5 = __commonJS({
466666
466660
  ).join("/"),
466667
466661
  "package.json"
466668
466662
  );
466669
- !options.silent && logger3.info(
466663
+ !silent && logger3.info(
466670
466664
  format2,
466671
466665
  `\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
466672
466666
  );
466673
466667
  if (_fs2.default.existsSync(packageJsonPath)) {
466674
- !options.silent && logger3.info(
466668
+ !silent && logger3.info(
466675
466669
  format2,
466676
466670
  `\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
466677
466671
  );
@@ -466681,6 +466675,16 @@ var require_dist5 = __commonJS({
466681
466675
  }
466682
466676
  }
466683
466677
  }
466678
+ return pkgPath;
466679
+ };
466680
+ async function runEsbuild(options, {
466681
+ format: format2,
466682
+ css,
466683
+ logger: logger3,
466684
+ buildDependencies,
466685
+ pluginContainer
466686
+ }) {
466687
+ const pkgPath = packageJsonSearch(options.outDir, options.silent, format2, logger3);
466684
466688
  logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
466685
466689
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
466686
466690
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -466755,7 +466759,7 @@ var require_dist5 = __commonJS({
466755
466759
  target: options.target,
466756
466760
  banner,
466757
466761
  footer,
466758
- tsconfig: options.tsconfig,
466762
+ tsconfig: options.projectRoot ? _path2.join(options.projectRoot, options.tsconfig) : options.tsconfig,
466759
466763
  loader: {
466760
466764
  ".aac": "file",
466761
466765
  ".css": "file",
@@ -466804,7 +466808,7 @@ var require_dist5 = __commonJS({
466804
466808
  outExtension: options.legacyOutput ? void 0 : outExtension,
466805
466809
  write: false,
466806
466810
  splitting,
466807
- logLevel: options.silent ? "error" : "info",
466811
+ logLevel: options.silent !== false ? "error" : "info",
466808
466812
  color: true,
466809
466813
  minify: options.minify === "terser" ? false : options.minify,
466810
466814
  minifyWhitespace: options.minifyWhitespace,
@@ -467338,11 +467342,11 @@ var require_dist5 = __commonJS({
467338
467342
  }
467339
467343
  return fileMapping;
467340
467344
  }
467341
- function emit(compilerOptions, tsconfig) {
467342
- let cwd = process.cwd();
467343
- let rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, cwd, tsconfig);
467345
+ function emit(options, compilerOptions, tsconfig) {
467346
+ logger.info("tsc", `Trying to find ${tsconfig || "tsconfig.json"} in ${options.projectRoot}`);
467347
+ let rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, options.projectRoot, tsconfig);
467344
467348
  if (!rawTsconfig) {
467345
- throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${cwd}`);
467349
+ throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${options.projectRoot}`);
467346
467350
  }
467347
467351
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
467348
467352
  let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
@@ -467350,6 +467354,7 @@ var require_dist5 = __commonJS({
467350
467354
  ...rawTsconfig.data,
467351
467355
  compilerOptions: {
467352
467356
  ..._optionalChain([rawTsconfig, "access", (_16) => _16.data, "optionalAccess", (_17) => _17.compilerOptions]),
467357
+ ...compilerOptions,
467353
467358
  // Enable declaration emit and disable javascript emit
467354
467359
  noEmit: false,
467355
467360
  declaration: true,
@@ -467359,13 +467364,12 @@ var require_dist5 = __commonJS({
467359
467364
  }
467360
467365
  },
467361
467366
  _typescript2.default.sys,
467362
- tsconfig ? _path.dirname.call(void 0, tsconfig) : "./"
467367
+ tsconfig ? _path.join(options.projectRoot, _path.dirname.call(void 0, tsconfig)) : options.projectRoot
467363
467368
  );
467364
- let options = parsedTsconfig.options;
467365
- let host = _typescript2.default.createCompilerHost(options);
467369
+ let host = _typescript2.default.createCompilerHost(parsedTsconfig.options);
467366
467370
  let program = _typescript2.default.createProgram(
467367
467371
  parsedTsconfig.fileNames,
467368
- options,
467372
+ parsedTsconfig.options,
467369
467373
  host
467370
467374
  );
467371
467375
  let fileMapping = emitDtsFiles(program, host);
@@ -467379,7 +467383,7 @@ var require_dist5 = __commonJS({
467379
467383
  };
467380
467384
  logger.info("tsc", "Build start");
467381
467385
  const dtsOptions = options.experimentalDts;
467382
- const exports2 = emit(dtsOptions.compilerOptions, options.tsconfig);
467386
+ const exports2 = emit(options, dtsOptions.compilerOptions, options.tsconfig);
467383
467387
  logger.success("tsc", `\u26A1\uFE0F Build success in ${getDuration()}`);
467384
467388
  return exports2;
467385
467389
  } catch (error) {
@@ -467474,8 +467478,9 @@ var require_dist5 = __commonJS({
467474
467478
  }
467475
467479
  var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
467476
467480
  function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath) {
467477
- let cwd = process.cwd();
467478
- let packageJsonFullPath = _path2.default.join(cwd, "package.json");
467481
+ let pkgPath = packageJsonSearch(outputFilePath, false, "dts", logger2);
467482
+ logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
467483
+ let packageJsonFullPath = _path2.default.join(pkgPath, "package.json");
467479
467484
  let configObject = {
467480
467485
  mainEntryPointFilePath: inputFilePath,
467481
467486
  apiReport: {
@@ -467492,7 +467497,7 @@ var require_dist5 = __commonJS({
467492
467497
  compiler: {
467493
467498
  tsconfigFilePath
467494
467499
  },
467495
- projectFolder: cwd
467500
+ projectFolder: pkgPath
467496
467501
  };
467497
467502
  const prepareOptions = {
467498
467503
  configObject,
@@ -467522,7 +467527,9 @@ var require_dist5 = __commonJS({
467522
467527
  async function rollupDtsFiles(options, exports2, format2) {
467523
467528
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
467524
467529
  let outDir = options.outDir || "dist";
467525
- let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, process.cwd());
467530
+ let pkgPath = packageJsonSearch(outDir, false, "dts", logger2);
467531
+ logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
467532
+ let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
467526
467533
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
467527
467534
  let dtsInputFilePath = _path2.default.join(
467528
467535
  declarationDir,