-
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
Update core-js in group stark-apps to the latest version 🚀 #1206
Conversation
6b7de89
to
649b969
Compare
@SuperITMan @cnomes can you review this PR? Apart from the commits from Greenkeeper, I've added 1 commit with these changes:
|
I guess it's a breaking change, maybe we should mention it in our CHANGELOG. What do you think ? |
Mmm not really, because The apps based in Stark can continue using |
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.
A couple of notes / questions. Also I'm wondering if importing core-js/es
does not affect our bundle size to much?
"@nationalbankbelgium/*": ["../node_modules/@nationalbankbelgium/*"] | ||
"@nationalbankbelgium/*": ["../node_modules/@nationalbankbelgium/*"], | ||
"core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"], | ||
"core-js/es6/*": ["../node_modules/core-js/es/*"] |
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.
are these needed? because it seems you removed them from starter/src/polyfills.browser.ts
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.
In fact this is the workaround to get Angular CLI working with the latest core-js
... See angular/angular-cli#13954... I would like to add a FIXME somewhere to mention this but where do I add it? This is a json file and we cannot put comments in here :(
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.
This is also related to the issue you mentioned in the other remarks: angular/angular#29531
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.
Ok, I understand the fix now. 😄
As for the .json comments. You are right we shouldn't/can't comment there. Maybe we should start a known issues section in our README.md I actually think this would also provide better visibility to active issues (for us) then the FIXME comments we add in code. 🤔
@SuperITMan @christophercr what do you think?
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.
Thinking about it again known issues might be the wrong title. 🤔
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 think it could be a good idea 😊
I'll have a look asap
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 a comment about this workaround in the POLYFILLS.md
and also in polyfills.browser.ts
of the Showcase and Starter.
So I guess the idea from @cnomes will be done in a different PR right?
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.
Probably best. 😄
packages/stark-ui/base.spec.ts
Outdated
import "../../node_modules/zone.js/dist/sync-test"; | ||
import "../../node_modules/zone.js/dist/jasmine-patch"; // put here since zone.js 0.6.14 | ||
import "../../node_modules/zone.js/dist/async-test"; | ||
import "../../node_modules/zone.js/dist/fake-async-test"; |
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.
Could you add a FIXME comment here? you can reference angular/angular#29531
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.
Well, in fact, this is not related to Angular, it is just the fact that we now have core-js
as a direct dependency in our root package. Before we didn't and it was just working fine by coincidence because core-js
was a transient dependency.
So I think it is better like this now regardless of which version of core-js
is used. What do you think?
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 I just saw you were talking about zone.js
. Well, it is the same reason, we explicitly point to the package at the root which we already have as a direct dependency 😉 I think it is safer this way and easier to troubleshoot
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 think it would be better that we add zone.js and core.js to our tsconfig.spec.json
since we already do this for some other dependencies.
Then something not really related to this PR....
If we add something like
"paths": {
"*": ["../stark-core/node_modules/*", "../../node_modules/*", ...],
}
We should hit all these indirect dependencies in one go. But we should investigate if it has a significant impact on our build process.
Also I think we should review our dependency management / use of transient dependencies. But I will move that discussion to another issue. 😄
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 #1224
About the bundle size, indeed, I will refine the imports of ``core-js` to the strictly neccessary ones ;) |
4c23a38
to
a3987b6
Compare
@SuperITMan @cnomes I've updated this PR:
|
a3987b6
to
3b39051
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.
LGTM 👍
|
9871876
to
c7ff82d
Compare
@SuperITMan I've updated this PR with the docs about polyfills in the |
c7ff82d
to
d4173ac
Compare
d4173ac
to
4edc63a
Compare
3734809
to
702ccee
Compare
@@ -11,7 +11,9 @@ | |||
"@angular/router": ["../../node_modules/@angular/router"], | |||
"rxjs/*": ["../../node_modules/rxjs/*"], | |||
"environments/environment": ["./src/common/environment"], | |||
"@nationalbankbelgium/stark-core": ["."] | |||
"@nationalbankbelgium/stark-core": ["."], |
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.
Previously, @nationalbankbelgium/stark-<package>": ["."],
was always the last mentioned path, is not it important so ? 😊
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.
Technically speaking, no... it is not important. What could be important is a path like this: "*" : ["some-path"]
which indeed should be at the end because the TS compiler checks these paths sequentially from top to bottom, so the more generic paths should be at the end to prevent overlapping with the rest of paths.
But that is not the case here 😉
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.
Okido. Thanks for the explanation 😊
In this case, could we change the order like this ?
"paths": {
"@angular/common": ["../../node_modules/@angular/common"],
"@angular/core": ["../../node_modules/@angular/core"],
"@angular/router": ["../../node_modules/@angular/router"],
"@nationalbankbelgium/stark-core": ["."],
"core-js/*" : ["../../node_modules/core-js/*"],
"environments/environment": ["./src/common/environment"],
"rxjs/*": ["../../node_modules/rxjs/*"],
"zone.js/*": ["../../node_modules/zone.js/*"]
},
Otherwise I find this a bit weird if it's not sorted in alphabetical order. What do you think ? 😊
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.
True, I forgot to sort it... I'll do it ;)
@@ -23,7 +23,9 @@ | |||
"rxjs/*": ["../../node_modules/rxjs/*"], | |||
"environments/environment": ["../../dist/packages/stark-core/src/common/environment"], | |||
"@nationalbankbelgium/stark-core": ["../../dist/packages/stark-core"], | |||
"@nationalbankbelgium/stark-rbac": ["."] | |||
"@nationalbankbelgium/stark-rbac": ["."], |
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.
same here about order
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.
See my previous remark
@@ -29,7 +29,9 @@ | |||
"rxjs/*": ["../../node_modules/rxjs/*"], | |||
"environments/environment": ["../../dist/packages/stark-core/src/common/environment"], | |||
"@nationalbankbelgium/stark-core": ["../../dist/packages/stark-core"], | |||
"@nationalbankbelgium/stark-ui": ["."] | |||
"@nationalbankbelgium/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.
same here about order
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.
See my previous remark
"@nationalbankbelgium/*": ["../node_modules/@nationalbankbelgium/*"] | ||
"@nationalbankbelgium/*": ["../node_modules/@nationalbankbelgium/*"], | ||
"core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"], | ||
"core-js/es6/*": ["../node_modules/core-js/es/*"] |
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 think it could be a good idea 😊
I'll have a look asap
…w structure in core-js 3.0.0
702ccee
to
8da6515
Compare
@SuperITMan PR updated |
The dependency core-js was updated from
2.6.5
to3.0.0
.This version is not covered by your current version range.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Find out more about this release.
FAQ and help
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot 🌴