Closed psibean closed 2 weeks ago
My staging build failed because of this issue. I fixed it by changing the version in package.json
.
- "csrf-csrf": "^3.0.4",
+ "csrf-csrf": "3.0.4",
In my dev environment I had 3.0.4 installed for a while. Pushed some code to staging today. My build process installed the updated 3.0.5 version and I got an error.
I tried to unpublish 3.0.5, but couldn't since it ended up with dependents quite quickly.
This is 100% my fault for rushing and trying to push out a fix, and I ended up making things WAY worse.
I don't quite understand why tsup
is removing the export keywords and making the type exports unavailable in 3.0.4
Getting TypeScript to just output a single declaration file with all the types exported is a lot more convoluted than it should be. 😐
Apologies. I'll make sure 3.0.6 actually works before I hit that publish. 🤦♂️
Temporary solution to downgrading is fine for now. Will be waiting for the 3.0.6. Thanks for the library ✌️
The "issue" with the build setup isn't fixed, but I manually constructed a fixed 3.0.6.
I tested 3.0.6 with my own typescript project prior to publishing. I was able to build & run, and csrf worked, and I had access to the types as expected.
Please let me know if there's any issues with 3.0.6
3.0.6 seems to be working 👍
Think I've fixed this up.
Edit / Update: For v3.0.4 and v3.0.5, types are broken in the releases, 3.0.6 fixes this problem and has no other changes but fixing the types. However the actual build still creates a broken package that needs to be manually tweaked in order to work.
Ugh. Real pain in the ass to just get some basic type declaration output working, firstly tsc doesn't support having just a single
.d.ts
file output, so I opted to usetsup
to output the declaration file so I could split the types out of the main file. And nowtsup
seems to strip all of theexport
keywords and / or doesn't export all of the types the way tsc does when it emits the declaration file.Annoying af.