build(broccoli): convert dependencies to peerDependencies in all package.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 #5560

Closes #5649
This commit is contained in:
Igor Minar 2015-12-07 10:35:10 -08:00 committed by Jeremy Elbourn
parent 11f98c58b3
commit 80b025ae53
4 changed files with 20 additions and 10 deletions

View File

@ -7,10 +7,12 @@
"contributors": <%= JSON.stringify(packageJson.contributors) %>, "contributors": <%= JSON.stringify(packageJson.contributors) %>,
"license": "<%= packageJson.license %>", "license": "<%= packageJson.license %>",
"repository": <%= JSON.stringify(packageJson.repository) %>, "repository": <%= JSON.stringify(packageJson.repository) %>,
"dependencies": { "devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>,
"peerDependencies": {
"es6-promise": "<%= packageJson.dependencies['es6-promise'] %>",
"es6-shim": "<%= packageJson.dependencies['es6-shim'] %>",
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>", "reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>",
"rxjs": "<%= packageJson.dependencies['rxjs'] %>", "rxjs": "<%= packageJson.dependencies['rxjs'] %>",
"zone.js": "<%= packageJson.dependencies['zone.js'] %>" "zone.js": "<%= packageJson.dependencies['zone.js'] %>"
}, }
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>
} }

View File

@ -7,10 +7,9 @@
"contributors": <%= JSON.stringify(packageJson.contributors) %>, "contributors": <%= JSON.stringify(packageJson.contributors) %>,
"license": "<%= packageJson.license %>", "license": "<%= packageJson.license %>",
"repository": <%= JSON.stringify(packageJson.repository) %>, "repository": <%= JSON.stringify(packageJson.repository) %>,
"dependencies": {
"angular2": "<%= packageJson.version %>",
"rxjs": "<%= packageJson.dependencies['rxjs'] %>",
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>"
},
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %> "devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>
"peerDependencies": {
"angular2": "<%= packageJson.version %>",
"rxjs": "<%= packageJson.dependencies['rxjs'] %>"
}
} }

View File

@ -8,9 +8,14 @@
"license": "<%= packageJson.license %>", "license": "<%= packageJson.license %>",
"repository": <%= JSON.stringify(packageJson.repository) %>, "repository": <%= JSON.stringify(packageJson.repository) %>,
"dependencies": { "dependencies": {
"angular2": "<%= packageJson.version %>", "es6-promise": "<%= packageJson.dependencies['es6-promise'] %>",
"es6-shim": "<%= packageJson.dependencies['es6-shim'] %>",
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>",
"rxjs": "<%= packageJson.dependencies['rxjs'] %>", "rxjs": "<%= packageJson.dependencies['rxjs'] %>",
"zone.js": "<%= packageJson.dependencies['zone.js'] %>" "zone.js": "<%= packageJson.dependencies['zone.js'] %>"
}, },
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %> "devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>
"peerDependencies": {
"angular2": "<%= packageJson.version %>"
}
} }

View File

@ -10,8 +10,12 @@
"repository": <%= JSON.stringify(packageJson.repository) %>, "repository": <%= JSON.stringify(packageJson.repository) %>,
"dependencies": { "dependencies": {
"angular2": "<%= packageJson.version %>", "angular2": "<%= packageJson.version %>",
"es6-promise": "<%= packageJson.dependencies['es6-promise'] %>",
"es6-shim": "<%= packageJson.dependencies['es6-shim'] %>",
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>",
"rxjs": "<%= packageJson.dependencies['rxjs'] %>",
"selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>", "selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>",
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>" "zone.js": "<%= packageJson.dependencies['zone.js'] %>"
}, },
"optionalDependencies": { "optionalDependencies": {
"jpm": "<%= packageJson.devDependencies.jpm %>", "jpm": "<%= packageJson.devDependencies.jpm %>",