-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove TSDX from build system #1175
Conversation
|
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed clean on windows and build on linux - module needs testing in the field, but otherwise LGTM. Many thanks for taking this on @julianna-ciq
Tested all changed commands on windows (command prompt) and RHEL9 and look good. Also very happy to see npm install complete with 0 vulnerabilities. |
"tslib": "^2.0.1", | ||
"typescript": "^4.0.3" | ||
}, | ||
"optionalDependencies": { | ||
"@rollup/rollup-linux-x64-gnu": "4.14.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianna-ciq Where are these native bindings used? Should we add the windows and darwin as optional and let npm work out which to install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this after it started blowing up on netlify/github actions. Doesn't seem to need the window version declared though (just works there). I haven't tested on a mac - all you need to do to check is npm run build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this after it started blowing up on netlify/github actions. Doesn't seem to need the window version declared though (just works there). I haven't tested on a mac - all you need to do to check is
npm run build
.
Just tested mac again after linting issue was fixed and it is all good.
We only had a couple of minor types conflicts in finsemble when we dropped the new module in - one relates to a change that should only go out in 2.2.0 that's already merged and the second maybe a type issue caused by that first one. Hence, I'll figure out what to do to back out the change temporarily so we can get this released! |
The change that needs backing out is: |
Did it always build upon npm install? I now get eslint failures that I wasn't seeing on last test -
|
It did indeed always build on install, not sure why. These two new eslint errors are from: We'll should adjust as it suggests to clear them out... |
@bingenito @andreifloricel it took me a little while to understand what was going on here (https://github.com/InteropIO/FDC3/blob/c2cb9d51e8644ac64e3640b1eb0cb95bb9cc8d5b/src/context/ContextType.ts#L46-L48). It would be nice if, when using the type, if Intellisense or similar was proposing the standard types for you - although you can create your own so any string is allowed: export type ContextType = StandardContextType | ExperimentalContextType | string; However, the typescript compiler aggressively reduces that to just export type ContextType = StandardContextType | ExperimentalContextType | (string & {}); However, that trips the modern linting rule |
…led or on pack/publish (not also on install)
@bingenito latest version should no longer typegen & build on npm install. Switched to Also @julianna-ciq fixed the missing dist/index.js file, which was being generated by a custom feature (custom rollup plugin) of TSDX: https://www.unpkg.com/browse/@finos/fdc3@2.1.0-beta.6/dist/index.js <- TSDX |
resolves #1061
TSDX is a build system to uses rollup, prettier, eslint, and jest. It's helpful to use TSDX, because it will manage your build, lint, and testing procedures for you, instead of you having to manage all of those dependencies.
Unfortunately, TSDX hasn't been keeping those dependencies up-to-date, including the dependencies with vulnerabilities. If you have already cloned this repo, go to the
main
branch and runnpm audit
. You'll see 17 moderate vulnerabilities. Those vulnerabilities are all downstream of TSDX, and many of them are for features not even used in this repo. Furthermore, since TSDX relies on so many stale dependencies, it's reasonable to expect that problems will only continue to grow .To overcome the risk presented by TSDX's stale dependencies, I've replaced TSDX with the rollup, prettier/eslint, and jest dependencies that it was obfuscating. Note that I copied over most of TSDX's configs for these tools, to maintain continuity.
The changes in this PR include:
tsdx lint
tsdx test
tsdx build
andtsdx watch
clean
script, which just removes the generateddist
folder. This was convenient while I was rerunning builds to confirm that I was generating things correctly. Now,clean
runs before everybuild
to avoid the potential of hiding build errors.