angular/aio/tools/examples/shared/package.json
George Kalpakas 7243564499 build(docs-infra): ensure all boilerplate dependencies are in sync (#47009)
All docs examples share the same `node_modules/` (symlinked into each
example from `aio/tools/examples/shared/node_modules/`). However, each
example type has a different `package.json`, which comes from
`aio/tools/examples/shared/boilerplate/*`). In order to ensure that the
dependencies in each example's `package.json` are the same as the ones
in the symlinked `node_modules/` (i.e. the ones that CI tests are run
with), we have a script (`yarn run sync-deps`) that can sync
dependencies from `shared/package.json` into the boilerplate
`package.json` files.

Previously, this script had to be run manually, which was easy to
forget/not know about and resulted in the boilerplate dependencies
often being out-of-sync with the ones in `shared/package.json` (and by
extension, the ones that were actually installed in `node_modules/`).

This commit helps keep the boilerplate dependencies up-to-date in the
following ways:
- Adds the `sync-deps` script to the `postinstall` scripts.
  This ensures that dependencies remain in sync whenever someone
  manually updates dependencies in `shared/package.json`.
- Runs the `sync-deps` script as a Renovate post-upgrade task.
  This ensures that the depenencies remain in sync whenever Renovate
  updates dependencies in `shared/package.json`.
  For more info on configuring post-upgrade tasks in Renovate, see:
  - [postUpgradeTasks][1]
  - [allowedPostUpgradeCommands][2]
  - [allowPostUpgradeCommandTemplating][3]

NOTE:
For the Renovate change to take effect, the [global config][4] in
`angular/dev-infra` also needs to be updated. This will be done in a
separate PR.

[1]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
[2]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[3]: https://docs.renovatebot.com/self-hosted-configuration/#allowpostupgradecommandtemplating
[4]: 22d3067021/.github/ng-renovate/runner-config.js

PR Close #47009
2022-08-02 11:58:51 -07:00

88 lines
3 KiB
JSON

{
"name": "angular-examples-master",
"version": "1.0.0",
"private": true,
"description": "Master package.json, the superset of all dependencies for all of the _example package.json files. See _boilerplate/package.json for example npm scripts.",
"scripts": {
"http-server": "http-server",
"protractor": "protractor",
"webdriver:update": "node ../../../../scripts/webdriver-manager-update.js",
"postinstall": "yarn sync-deps && yarn webdriver:update",
"sync-deps": "node sync-boilerplate-dependencies"
},
"//engines-comment": "Keep this in sync with /package.json and /aio/package.json",
"engines": {
"node": ">=14.0.0",
"yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
"keywords": [],
"author": "",
"license": "MIT",
"repository": {},
"dependencies": {
"@angular/animations": "^14.1.0-next",
"@angular/common": "^14.1.0-next",
"@angular/compiler": "^14.1.0-next",
"@angular/core": "^14.1.0-next",
"@angular/elements": "^14.1.0-next",
"@angular/forms": "^14.1.0-next",
"@angular/localize": "^14.1.0-next",
"@angular/platform-browser": "^14.1.0-next",
"@angular/platform-browser-dynamic": "^14.1.0-next",
"@angular/platform-server": "^14.1.0-next",
"@angular/router": "^14.1.0-next",
"@angular/service-worker": "^14.1.0-next",
"@angular/upgrade": "^14.1.0-next",
"@nguniversal/express-engine": "~14.0.0",
"angular": "^1.8.3",
"angular-in-memory-web-api": "~0.14.0",
"angular-route": "1.8.0",
"core-js": "^2.5.4",
"express": "^4.18.1",
"rxjs": "~7.5.0",
"systemjs": "~0.19.39",
"systemjs-plugin-babel": "~0.0.25",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.1.0-next",
"@angular/cli": "~14.0.0",
"@angular/compiler-cli": "^14.1.0-next",
"@nguniversal/builders": "~14.0.0",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.2.0",
"@types/angular": "^1.8.4",
"@types/angular-animate": "^1.5.11",
"@types/angular-mocks": "^1.7.1",
"@types/angular-resource": "^1.5.17",
"@types/angular-route": "^1.7.2",
"@types/express": "^4.17.13",
"@types/jasmine": "~4.0.0",
"@types/jquery": "3.5.1",
"@types/node": "^16.11.35",
"canonical-path": "1.0.0",
"concurrently": "^7.0.0",
"copyfiles": "^2.4.1",
"http-server": "^14.0.0",
"jasmine-core": "~4.1.0",
"jasmine-marbles": "~0.9.2",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~2.0.0",
"lite-server": "^2.6.1",
"lodash": "^4.16.2",
"protractor": "~7.0.0",
"puppeteer": "10.2.0",
"rimraf": "^3.0.0",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"source-map-explorer": "^2.0.0",
"ts-node": "~10.8.0",
"typescript": "~4.7.2"
}
}