Showing the changes to scripts (1 of 7 files). Show all
Unified · Split
| @@ -78,6 +78,13 @@ type SmokeFailure = { · 77 unmodified lines | ||
| 78 | 78 | |
| 79 | 79 | const PRIVATE_PACKAGE_RE = /Cannot find package '(@executor-js\/[^']+)'/; |
| 80 | 80 | |
| 81 | +// `import { X } from "@executor-js/sdk"` where the published entry doesn't | |
| 82 | +// export `X` — the packed bundle references a symbol that only exists on a | |
| 83 | +// different subpath (or in the dev-time workspace view). This is a bundle | |
| 84 | +// bug, never a missing-peer environment issue, so it's a hard failure. | |
| 85 | +const MISSING_EXPORT_RE = | |
| 86 | + /The requested module '([^']+)' does not provide an export named '([^']+)'/; | |
| 87 | + | |
| 81 | 88 | const firstMeaningfulLine = (stderr: string): string => { |
| 82 | 89 | const lines = stderr |
| 83 | 90 | .split("\n") |
| @@ -182,6 +189,17 @@ const smokeTestPackage = async ( · 98 unmodified lines | ||
| 182 | 189 | console.log(` FAIL ${spec} — references private '${offending}'`); |
| 183 | 190 | continue; |
| 184 | 191 | } |
| 192 | + const missingExportMatch = stderr.match(MISSING_EXPORT_RE); | |
| 193 | + if (missingExportMatch) { | |
| 194 | + const [, module, symbol] = missingExportMatch; | |
| 195 | + failures.push({ | |
| 196 | + pkg: pkg.name, | |
| 197 | + subpath, | |
| 198 | + reason: `published '${module}' does not export '${symbol}'`, | |
| 199 | + }); | |
| 200 | + console.log(` FAIL ${spec} — '${module}' does not export '${symbol}'`); | |
| 201 | + continue; | |
| 202 | + } | |
| 185 | 203 | const peerMatch = |
| 186 | 204 | stderr.match(/Cannot find package '([^']+)'/) ?? |
| 187 | 205 | stderr.match(/Cannot find module '([^']+)'/); |