@@ -282,6 +282,33 @@ the application as a whole is executing correctly. It is very common to run E2E
282
282
a new commit of changes to a remote repository.
283
283
284
284
285
+ ### Updating dependencies
286
+
287
+ In order to avoid surprises, all dependencies listed in `package.json` are pinned to specific
288
+ versions (this is what the [package-lock.json][package-lock] file is about). This ensures that the
289
+ same version of a dependency is installed every time.
290
+
291
+ Since all dependencies are acquired via npm, you can use the same tool to easily update them as
292
+ well (although you probably don't need to for the purpose of this tutorial). Simply run the
293
+ preconfigured script:
294
+
295
+ ```
296
+ npm run update-deps
297
+ ```
298
+
299
+ This will update all packages to the latest version that satisfy their version ranges (as specified
300
+ in `package.json`) and also copy the necessary files into `app/lib/`. For example, if `package.json`
301
+ contains `"some-package": "1.2.x"`, it will be updated to the latest 1.2.x version (e.g. 1.2.99),
302
+ but not to 1.3.x (e.g. 1.3.0).
303
+
304
+ If you want to update a dependency to a version newer than what the specificed range would permit,
305
+ you can change the version range in `package.json` and then run `npm run update-deps` as usual.
306
+
307
+ <div class="alert alert-info">
308
+ See [here][semver-ranges] for more info on the various version range formats.
309
+ </div>
310
+
311
+
285
312
### Common Issues
286
313
287
314
<br />
@@ -336,5 +363,7 @@ Now that you have set up your local machine, let's get started with the tutorial
336
363
[npm]: https://www.npmjs.com/
337
364
[nvm]: https://github.com/creationix/nvm
338
365
[nvm-windows]: https://github.com/coreybutler/nvm-windows
366
+ [package-lock]: https://docs.npmjs.com/files/package-lock.json
339
367
[protractor]: https://github.com/angular/protractor
340
368
[selenium]: https://docs.seleniumhq.org/
369
+ [semver-ranges]: https://docs.npmjs.com/misc/semver#ranges
0 commit comments