@storm-software/workspace-tools 1.62.0 → 1.62.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,3 +1,15 @@
1
+ ## 1.62.1 (2024-02-26)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **workspace-tools:** Resolve issue with bad entry path ([9dc79475](https://github.com/storm-software/storm-ops/commit/9dc79475))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
1
13
  ## 1.62.0 (2024-02-26)
2
14
 
3
15
 
package/index.js CHANGED
@@ -484125,7 +484125,14 @@ var import_typescript = __toESM(require_typescript());
484125
484125
  // packages/workspace-tools/src/utils/file-path-utils.ts
484126
484126
  var import_node_path4 = require("node:path");
484127
484127
  var removeExtension = (filePath) => {
484128
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
484128
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
484129
+ if (result.startsWith("./")) {
484130
+ return result.substring(2);
484131
+ }
484132
+ if (result.startsWith(".") || result.startsWith("/")) {
484133
+ return result.substring(1);
484134
+ }
484135
+ return result;
484129
484136
  };
484130
484137
  function findFileName(filePath) {
484131
484138
  return filePath?.split(filePath?.includes(import_node_path4.sep) ? import_node_path4.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
@@ -484166,6 +484173,7 @@ var applyDefaultOptions = (options8) => {
484166
484173
  return options8;
484167
484174
  };
484168
484175
  var runTsupBuild = async (context, config, options8) => {
484176
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
484169
484177
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
484170
484178
  ret[key2] = options8.env?.[key2];
484171
484179
  return ret;
@@ -484173,7 +484181,7 @@ var runTsupBuild = async (context, config, options8) => {
484173
484181
  options8.plugins?.push(
484174
484182
  (0, import_esbuild_decorators.esbuildDecorators)({
484175
484183
  tsconfig: options8.tsConfig,
484176
- cwd: config.workspaceRoot
484184
+ cwd: workspaceRoot
484177
484185
  })
484178
484186
  );
484179
484187
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -484193,8 +484201,7 @@ var runTsupBuild = async (context, config, options8) => {
484193
484201
  ...stormEnv
484194
484202
  },
484195
484203
  dtsTsConfig: getNormalizedTsConfig(
484196
- context,
484197
- config.workspaceRoot ?? ".",
484204
+ workspaceRoot,
484198
484205
  options8.outputPath,
484199
484206
  createTypeScriptCompilationOptions(
484200
484207
  (0, import_normalize_options.normalizeOptions)(
@@ -484204,9 +484211,9 @@ var runTsupBuild = async (context, config, options8) => {
484204
484211
  main: context.main,
484205
484212
  transformers: []
484206
484213
  },
484207
- config.workspaceRoot ?? ".",
484214
+ workspaceRoot,
484208
484215
  context.sourceRoot,
484209
- config.workspaceRoot ?? "."
484216
+ workspaceRoot
484210
484217
  ),
484211
484218
  context.projectName
484212
484219
  )
@@ -484229,7 +484236,7 @@ ${options8.banner}
484229
484236
  const getConfigFns = [options8.getConfig];
484230
484237
  const tsupConfig = (0, import_tsup.defineConfig)(
484231
484238
  getConfigFns.map(
484232
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
484239
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
484233
484240
  )
484234
484241
  );
484235
484242
  if (_isFunction2(tsupConfig)) {
@@ -484245,19 +484252,15 @@ ${options8.banner}
484245
484252
  );
484246
484253
  }
484247
484254
  };
484248
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
484255
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
484249
484256
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
484250
484257
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
484251
484258
  {
484252
484259
  ...config,
484253
484260
  compilerOptions: {
484254
484261
  ...config?.compilerOptions,
484255
- entry: {
484256
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
484257
- },
484262
+ include: ["**/*"],
484258
484263
  outDir: outputPath,
484259
- rootDir: workspaceRoot,
484260
- baseUrl: workspaceRoot,
484261
484264
  noEmit: false,
484262
484265
  esModuleInterop: true,
484263
484266
  downlevelIteration: true,