-
-
Notifications
You must be signed in to change notification settings - Fork 158
Labels
Description
Reproduction link or steps
I am using the latest tsdown and in my pacakage.json, I have this script (which works at intended):
"lint:attw": "attw --pack . --profile esm-only",I changed the tsdown config to use attw: { profile: 'esm-only' }, but it fails:
ℹ 131 files, total: 96.84 kB
✔ Build complete in 380ms
✔ [publint] No issues found (1550ms)
ERROR ATTW check failed: SyntaxError: Unexpected token 'C', "Created C:"... is not valid JSON
npm error Lifecycle script `build` failed with error:
npm error code 1
The thing is, my package.json file also has prepack and postpack scripts:
"postpack": "node scripts/postpack.ts",
"prepack": "node scripts/prepack.ts",They emit console.log() which seems to be picked up by the attw execution from tsdown.
What is expected?
attw from tsdown should work as if I was using attw's own CLI
What is actually happening?
It breaks because of console.logs in prepack and postpack scripts.
Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
None yet
Effort
None yet