convert npm dependencies to peerDependencies#5649
convert npm dependencies to peerDependencies#5649IgorMinar wants to merge 4 commits intoangular:masterfrom
Conversation
package.json
Outdated
There was a problem hiding this comment.
Shouldn't we be more strict about rxjs? If I recall properly alpha.12 was kind of broken and @robwormald had to go back to .11. In any case given the amount of changes in both libraries we might be more strict here.
There was a problem hiding this comment.
I'll do that in a separate commit within this PR. do we know what version of RXJS is the good one?
|
Travis build is not a flake, I think that we read from package.json dependencies in some of our scripts |
|
yay for CI. I'll fix the breakage. |
|
@pkozlowski-opensource should be all fixed now. I also added es6-promise as a peer dependency (it comes from zone.js). waiting for CI now.. |
|
oh.. I still need to lock rxjs.. one more commit coming. |
|
done |
package.json
Outdated
There was a problem hiding this comment.
Why do we need this now?
There was a problem hiding this comment.
We always needed it. It's a transitive dep coming from zone
On Sun, Dec 6, 2015 at 11:21 AM Jeff Cross notifications@github.com wrote:
In package.json
#5649 (comment):@@ -30,9 +30,11 @@
"postinstall": "node tools/analytics/build-analytics success install npm-install-net && node tools/analytics/build-analytics start install npm-postinstall && node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json && tsd reinstall --overwrite --config modules/angular1_router/tsd.json && node tools/analytics/build-analytics success install npm-postinstall && node tools/analytics/build-analytics success install npm-install",
"test": "gulp test.all.js && gulp test.all.dart"
},
- "dependencies": {
- "peerDependencies": {
- "es6-promise": "^3.0.2",
Why do we need this now?
—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/5649/files#r46774522.
There was a problem hiding this comment.
Isn't it part of zone.js build? Or are you saying that we need to have it for some other reason (typings)?
|
@IgorMinar the more I look at this PR the more I think that we are focusing on the wrong package.json. What we want to do is to have peer dependencies in the package.json of a module that we publish to npm. Here we still want things as regular (dependencies or devDependencies) deps since we need zone and company to run tests, prepare bundles etc. What I'm saying is that we don't want to move zone & co to peereDependencies in this repo's package.json but do this only in package.json that we push to npm. |
package.json
Outdated
There was a problem hiding this comment.
Do we want to force es6-shim? What about people that do projects for modern browsers only? Or want to use a different shim?
|
@pkozlowski-opensource: @IgorMinar said you are right (as always) and that he is going to update the PR to keep |
|
@pkozlowski-opensource you are right. my bad. I'm fixing that now. |
|
ci still failing, looking into that too |
|
changes made. running CI. if green then I need to squash commits and we can land this |
|
@IgorMinar what about my comments regarding I'm not sure why we need |
There was a problem hiding this comment.
Should have a dependency on rxjs
There was a problem hiding this comment.
I guess rxjs is already declared as a peerDependency of angular2, so as long as this package depends on angular2 rxjs isn't necessary.
There was a problem hiding this comment.
And http isn't even published as a standalone package yet.
There was a problem hiding this comment.
Jeff, rxjs comes in via angular. But I'll make it an explicit peer dep.
Pawel, see my comment about optionalPeerDependencies in one of my commit
messages. For now apps that don't need shims will still need to declare
them in their package.json but not use them.
On Mon, Dec 7, 2015 at 11:36 AM Jeff Cross notifications@github.com wrote:
In modules/angular2/src/http/package.json
#5649 (comment):"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>
- "peerDependencies": {
- "angular2": "<%= packageJson.version %>"
And http isn't even published as a standalone package yet.
—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/5649/files#r46865671.
|
CI is green! I'm squashing the commits and applying merge label |
|
everything is resolved and rebased. good to be merged now |
|
@IgorMinar Travis failures still look legitimate to me. |
|
looking into it |
To be later used as a peerDependency in the generated package.json It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
This is actually an inherited dependency that comes from zone.js. See related issue: angular/zone.js#212 It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
…age.json templates
This is more correct and resolves the issue of having dupes within the same project.
This change has no impact on our shrinkwrap since peerDeps and deps are merged into one
within the shrinkwrap file.
BREAKING CHANGE: rxjs, reflect-metadata, zone.js and es6-shims now must be specified as
explicit dependencies of each angular app that uses npm for package management.
To migrate, please add the following into the "dependencies" section of your package.json:
```
"dependencies": {
...
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-alpha.11",
"zone.js": "0.5.8"
...
}
```
Closes angular#5560
|
sorry.. it was a bad squash. fixed now. rerunning CI |
|
@mary-poppins isn't picking this one up, merging manually. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #5560