@storm-software/workspace-tools 1.49.31 → 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,15 @@
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
+
1
13
  ## 1.49.31 (2024-01-26)
2
14
 
3
15
 
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) {