JLuboff / connect-mssql-v2

MS SQL Server session store for Express Session
MIT License
5 stars 7 forks source link

Updatereadme #32

Closed JLuboff closed 3 years ago

JLuboff commented 3 years ago

@bradtaniguchi Mind doing a quick review? I updated the readme to access the default export when requiring in the JS example.

bradtaniguchi commented 3 years ago

How long do you think we should stick with that approach? Because it looks pretty funky haha

JLuboff commented 3 years ago

How long do you think we should stick with that approach? Because it looks pretty funky haha

I agree its funky....I'm not sure how to fix it without introducing a breaking change (change from export default to export or what not would break TS import method). Any ideas?

bradtaniguchi commented 3 years ago

So one of the things I'ved noticed in the past when working with typescript projects is support for:

import MyLib from 'my-lib';

doesn't work without the allowSyntheticDefaultImports being turned on in the tsconfig. Often I see this being required in some of my projects that are using webpack on the back-end (which is weird) along with other tooling so it might be an exception.

Not sure if this is actually related or not, but its worth putting out there in-case we need to look more into it or it actually fixes it for someone.


So the thing with moving to this workaround its also technically a "breaking change" in that the docs will point to one way that may or not be fixed. I think with the reproduction code provided we can figure something out without breaking anything and without changing how it works. But we'll need to look into it a little more :thinking:

I'm updating my local code a bit, I might end up messaging you later if I run into problems. If anything I'll be able to run thru the gauntlet a little and see if I see anything

JLuboff commented 3 years ago

@bradtaniguchi has fixed the issue as opposed to my lame workaround 👍