You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`packages/tree-shaking-plugin/src/lib/plugin/create-qraft-tree-shake-plugin.ts` forwards `this.inputSourceMap` from the bundler context into the core transform.
13
+
-`packages/tree-shaking-plugin/src/core.ts` accepts an optional incoming map and passes it to Babel generator through `inputSourceMap`.
14
+
-`packages/tree-shaking-plugin/src/core.test.ts` adds the regression test, updates the local test helper to pass the optional map, and verifies the composed position with `@jridgewell/trace-mapping`.
15
+
-`packages/tree-shaking-plugin/package.json` and `yarn.lock` add the direct dev dependency required by the new test.
16
+
-`e2e/projects/tree-shaking-bundlers/` is not expected to change for this feature, but it is the external validation target.
17
+
11
18
---
12
19
13
20
### Task 1: Add the failing composed-map regression test
@@ -19,6 +26,40 @@
19
26
20
27
-[ ]**Step 1: Add a source-map test that traces the rewritten call site back to the original source**
21
28
29
+
Update the local test helper first so the new regression test can pass the incoming map through to the real transform:
-[ ]**Step 2: Run the focused test before plumbing exists and confirm it fails**
109
+
-[ ]**Step 2: Add `@jridgewell/trace-mapping` as a direct dev dependency**
69
110
70
111
Run:
71
112
72
113
```bash
73
-
yarn workspace @openapi-qraft/tree-shaking-plugin test -- src/core.test.ts -t "keeps the rewritten call site traceable through the composed source map"
Expected: FAIL because the incoming bundler map is not threaded into the transform yet.
117
+
Expected: `packages/tree-shaking-plugin/package.json` and `yarn.lock` now list `@jridgewell/trace-mapping` directly, so the new test can compile under Yarn PnP.
77
118
78
-
-[ ]**Step 3: Record the dependency update**
119
+
-[ ]**Step 3: Run the focused test before plumbing exists and confirm it fails**
yarn workspace @openapi-qraft/tree-shaking-plugin test -- src/core.test.ts -t "keeps the rewritten call site traceable through the composed source map"
84
125
```
85
126
86
-
Expected: the package manifest and lockfile both include the source-map assertion dependency.
127
+
Expected: FAIL because the incoming bundler map is not threaded into the transform yet, so the composed-map assertion still points at generated-only positions.
87
128
88
129
### Task 2: Thread the incoming map through the plugin and generator
Keep the rest of the transform unchanged. This spec is only about source-map composition for rewritten user call sites; synthetic generated statements do not need bespoke original-source mapping.
0 commit comments