-
Notifications
You must be signed in to change notification settings - Fork 23
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
refactor(stark-all): replace 'lodash' by tree-shakeable 'lodash-es'. Add '@types/lodash-es' to get correct typings. #1147
refactor(stark-all): replace 'lodash' by tree-shakeable 'lodash-es'. Add '@types/lodash-es' to get correct typings. #1147
Conversation
894bdaf
to
44b2475
Compare
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.
Small remarks
...defaultKarmaConfig.karmaTypescriptConfig, | ||
bundlerOptions: { | ||
...defaultKarmaConfig.karmaTypescriptConfig.bundlerOptions, | ||
transforms: [ |
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.
Can you add these to the exports of this file so that you can access it in stark-core/karma.conf.ci.js
instead of duplicating this block in these 2 files?
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 was thinking of doing this with #1145 (amongst other things). But I could append a commit to this PR.
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.
Mmm well I don't think that this will change that much when #1145 is solved right? We would need to apply the same logic here... so we could re-use it here instead of duplicating it
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 was thinking of writing (using) a merge function so that a single config file could be exported from the karma.conf.js
@@ -28,6 +28,7 @@ | |||
"dependencies": { | |||
"@angular/material-moment-adapter": "^7.0.0", | |||
"@mdi/angular-material": "^3.3.92", | |||
"@types/lodash-es": "^4.17.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.
Shouldn't the types from lodash-es
be taken from stark-core by changing the path in the tsconfig.json
of stark-ui ?
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 will try again, but I think my IDE didn't recognize the types when I tried that. 🤔
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'm hitting a lot of other issues. Maybe this is more suitable for a separate ticket? 😕
b88f813
to
0d3d8e0
Compare
0d3d8e0
to
6e26513
Compare
edbad62
to
2a5a870
Compare
The build works, so this Pr is ready for some extra reviewing. 😄 |
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.
Just small remarks... the rest looks good 👍
Also these files need to be changed (they are still using
|
b4a5071
to
f8ab02c
Compare
- added used modules to rollup globals (TODO: NationalBankBelgium#1129) - blacklisted `lodash-es` (use submodules instead) - added `karma-typescript-es6-transform` for transforming es6 dependencies - added workaround for monounity/karma-typescript#320 in `base.spec.ts` (stark-core, stark-ui, showcase, starter) - aliased all used lodash modules in karma.conf.js (TODO NationalBankBelgium#1145) - minor refactors ISSUES CLOSED: NationalBankBelgium#150
This commit will refactor all used instances of `const (.*) = require("lodash/(.*)")` to `import (.*) from "lodash/(.*)"` ISSUES CLOSED: NationalBankBelgium#150
f8ab02c
to
1ff90ff
Compare
1ff90ff
to
3a8a21b
Compare
LGTM 👍 @SuperITMan can you have a look on this PR? |
…a CI config (bug introduced in NationalBankBelgium#1147)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #150
What is the new behavior?
Lodash-es imports and typings
Does this PR introduce a breaking change?
Other information