@storm-software/workspace-tools 1.49.30 → 1.50.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,3 +1,27 @@
1
+ ## 1.50.0 (2024-01-26)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - **config-tools:** Added the `externalPackagePatterns` option to Storm config ([78f5c9d4](https://github.com/storm-software/storm-ops/commit/78f5c9d4))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
13
+ ## 1.49.31 (2024-01-26)
14
+
15
+
16
+ ### 🩹 Fixes
17
+
18
+ - **workspace-tools:** Use the default `outputPath` for tsup build ([1078da89](https://github.com/storm-software/storm-ops/commit/1078da89))
19
+
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Patrick Sullivan
24
+
1
25
  ## 1.49.30 (2024-01-26)
2
26
 
3
27
 
package/index.js CHANGED
@@ -129881,6 +129881,9 @@ var StormConfigSchema = objectType({
129881
129881
  ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
129882
129882
  workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
129883
129883
  packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
129884
+ externalPackagePatterns: arrayType(stringType()).default([]).describe(
129885
+ "The build will use these package patterns to determine if they should be external to the bundle"
129886
+ ),
129884
129887
  buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
129885
129888
  runtimeDirectory: stringType().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
129886
129889
  runtimeVersion: stringType().trim().regex(
@@ -139333,17 +139336,18 @@ ${Object.keys(options).map(
139333
139336
  return ret;
139334
139337
  }, options.external);
139335
139338
  }
139336
- if (options.bundle === false) {
139337
- for (const thirdPartyDependency of getExternalDependencies(
139338
- context.projectName,
139339
- context.projectGraph
139339
+ for (const thirdPartyDependency of getExternalDependencies(
139340
+ context.projectName,
139341
+ context.projectGraph
139342
+ )) {
139343
+ const packageConfig = thirdPartyDependency.node.data;
139344
+ if (packageConfig?.packageName && !config?.externalPackagePatterns?.some(
139345
+ (pattern) => pattern.includes(packageConfig.packageName)
139346
+ ) && !externalDependencies?.some(
139347
+ (externalDependency) => externalDependency.name.includes(packageConfig.packageName)
139340
139348
  )) {
139341
- const packageConfig = thirdPartyDependency.node.data;
139342
- if (packageConfig?.packageName) {
139343
- options.external.push(packageConfig.packageName);
139344
- if (!packageJson?.devDependencies?.[packageConfig.packageName]) {
139345
- externalDependencies.push(thirdPartyDependency);
139346
- }
139349
+ if (!packageJson?.devDependencies?.[packageConfig.packageName] || !packageConfig.hash) {
139350
+ externalDependencies.push(thirdPartyDependency);
139347
139351
  }
139348
139352
  }
139349
139353
  }
@@ -139413,6 +139417,9 @@ ${externalDependencies.map((dep) => {
139413
139417
  packageJson.dependencies ??= {};
139414
139418
  packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
139415
139419
  }
139420
+ if (!options.external.includes(packageName)) {
139421
+ options.external.push(packageName);
139422
+ }
139416
139423
  }
139417
139424
  }
139418
139425
  for (const packageName of internalDependencies) {
@@ -139538,14 +139545,7 @@ ${(0, import_node_fs5.readFileSync)(file, "utf-8")}`,
139538
139545
  }
139539
139546
  await Promise.all(
139540
139547
  entryPoints.map((entryPoint) => {
139541
- let outputPath = removeExtension(entryPoint).replace(sourceRoot, "");
139542
- if (outputPath.startsWith(".")) {
139543
- outputPath = outputPath.substring(1);
139544
- }
139545
- if (outputPath.startsWith("/")) {
139546
- outputPath = outputPath.substring(1);
139547
- }
139548
- writeInfo(config, `*** Build output path: ${outputPath} ***`);
139548
+ writeInfo(config, `*** Build output path: ${options.outputPath} ***`);
139549
139549
  return runTsupBuild(
139550
139550
  {
139551
139551
  main: entryPoint,
@@ -139554,11 +139554,7 @@ ${(0, import_node_fs5.readFileSync)(file, "utf-8")}`,
139554
139554
  sourceRoot
139555
139555
  },
139556
139556
  config,
139557
- {
139558
- ...options,
139559
- outputPath,
139560
- getConfig: options.getConfig
139561
- }
139557
+ options
139562
139558
  );
139563
139559
  })
139564
139560
  );