Skip to content

Commit d7a65f3

Browse files
authored
Fix resolving external packages that are ESM only (#1346)
* Fix resolving external packages that are ESM only by falling back to mlly resolvePathSync. This will fix mupdf * when publishing a prerelease and aborting, clear the git stage
1 parent 5cb59d8 commit d7a65f3

File tree

13 files changed

+3800
-6
lines changed

13 files changed

+3800
-6
lines changed

.changeset/heavy-jobs-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Fix resolving external packages that are ESM only by falling back to mlly resolvePathSync. This will fix mupdf

packages/cli-v3/e2e/fixtures.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,38 @@ export const fixturesConfig: TestCase[] = [
179179
},
180180
],
181181
},
182+
{
183+
id: "esm-only-external",
184+
buildManifestMatcher: {
185+
runtime: "node",
186+
externals: [
187+
{
188+
name: "import-in-the-middle",
189+
version: "1.11.0",
190+
},
191+
{
192+
name: "mupdf",
193+
version: "0.3.0",
194+
},
195+
],
196+
files: [{ entry: "src/trigger/helloWorld.ts" }],
197+
},
198+
workerManifestMatcher: {
199+
tasks: [
200+
{
201+
id: "helloWorld",
202+
filePath: "src/trigger/helloWorld.ts",
203+
exportName: "helloWorld",
204+
},
205+
],
206+
},
207+
runs: [
208+
{
209+
task: { id: "helloWorld", filePath: "src/trigger/helloWorld.ts", exportName: "helloWorld" },
210+
payload: "{}",
211+
result: { ok: true, durationMs: 1 },
212+
},
213+
],
214+
tsconfig: "tsconfig.json",
215+
},
182216
];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

0 commit comments

Comments
 (0)