@@ -282,6 +282,27 @@ 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
+ To avoid surprizes, the versions of 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
+ If, however, you want to update one or more dependencies, you can use the `npm update` command:
292
+
293
+ - When passed a package name (e.g. `npm update some-package`), it will update the specified package
294
+ to the latest version permitted by its version range (as specified in `package.json`). For
295
+ example, if `package.json` contains `"some-package": "1.2.x"`, it will be updated to the latest
296
+ 1.2.x version, but not to 1.3.x.
297
+
298
+ - When run without any arguments, `npm update` will update all packages listed as dependencies in
299
+ `package.json` to the latest version permitted by their specified version range.
300
+
301
+ - Finally, you can request for a package to be updated to the latest version (regardless of its
302
+ version range in `package.json`), by appending `@latest` to the package's name:
303
+ `npm update some-package@latest`
304
+
305
+
285
306
### Common Issues
286
307
287
308
<br />
@@ -336,5 +357,6 @@ Now that you have set up your local machine, let's get started with the tutorial
336
357
[npm]: https://www.npmjs.com/
337
358
[nvm]: https://github.com/creationix/nvm
338
359
[nvm-windows]: https://github.com/coreybutler/nvm-windows
360
+ [package-lock]: https://docs.npmjs.com/files/package-lock.json
339
361
[protractor]: https://github.com/angular/protractor
340
362
[selenium]: https://docs.seleniumhq.org/
0 commit comments