deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.15k stars 118 forks source link

(deepkit/bson) cjs compilation not up to date? #112

Closed theodorDiaconu closed 3 years ago

theodorDiaconu commented 3 years ago
const crypto = __importStar(require("@deepkit/crypto"));

node_modules/@deepkit/bson/dist/cjs/src/model.js

^ Inside the dist of latest alpha 35.

However I see no such thing in the model.ts file. This error I only get in production.

marcj commented 3 years ago

I don't see an error in your post?

theodorDiaconu commented 3 years ago

It's related again the npm 6 and peerDependencies. Not an issue here, sorry

theodorDiaconu commented 3 years ago

So, the problem wasn't intuitive, because I have used "@deepkit/bson" in a separate package to leverage its goodness, but basically in that package I need to add additional "dependencies" (core, type, crypto), I needed to manually add them to work within a deployment inside creative cloud. But I don't think there's anything to do on your counter-part for npm 7

Is there any particular reason you chose peerDependencies vs dependencies ?

marcj commented 3 years ago

Yes, it makes handling dependencies easier for me, makes it safer for the user (so no npm dupes happen), and nominal types work correctly.