Closed fa-sharp closed 2 weeks ago
Did some more digging and I think I found the issue - it's the tsBuildInfoFile property in the tsconfig file. The ESM tsconfig needs a separate file for incremental compilation, otherwise it won't generate the new ESM files.
I added "tsBuildInfoFile": "./tsconfig.esm.tsbuildinfo"
to the ESM tsconfig file:
Then when running the build
command, the new ESM files are built as expected in the dist/esm
folder.
The generated tsconfig.esm.tsbuildinfo
file will also need to be added to .gitignore
.
Hope that fixes this, but let me know if you need anything else!
Thanks for the report and help here @fa-sharp ! I've incorporated this fix in https://github.com/ynab/ynab-sdk-js/pull/175.
Hey team! I noticed that the
flag_name
property was missing in flagged transactions when using the SDK, and it seems the underlying issue is that the ESM build (under thedist/esm
folder) is not being updated for some reason. This causes ESM bundlers like Parcel to end up with an older version of the SDK. For example, the following file in the ESM build is missing theflag_name
property, which means the property won't be parsed:https://github.com/ynab/ynab-sdk-js/blob/7cda942e8077be84ecf0caac43df67ad49f67665/dist/esm/models/TransactionDetail.js#L60-L62
The
flag_name
property does appear in the Common JS build:https://github.com/ynab/ynab-sdk-js/blob/7cda942e8077be84ecf0caac43df67ad49f67665/dist/models/TransactionDetail.js#L67-L70
Could you take a look? I'm guessing it might have something to do with the OpenAPI Generator that's being used. Let me know if you need more info or if I can help in any way!