Skip to content

Commit 730a3b7

Browse files
committed
Update Express version numbers in material
1 parent aa82a74 commit 730a3b7

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/content/3/en/part3a.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ The dependency is also added to our <i>package.json</i> file:
240240
{
241241
// ...
242242
"dependencies": {
243-
"express": "^4.21.2"
243+
"express": "^5.1.0"
244244
}
245245
}
246246
```
@@ -251,15 +251,15 @@ The source code for the dependency is installed in the <i>node\_modules</i> dire
251251

252252
These are the dependencies of the Express library and the dependencies of all of its dependencies, and so forth. These are called the [transitive dependencies](https://lexi-lambda.github.io/blog/2016/08/24/understanding-the-npm-dependency-model/) of our project.
253253

254-
Version 4.21.2 of Express was installed in our project. What does the caret in front of the version number in <i>package.json</i> mean?
254+
Version 5.1.0 of Express was installed in our project. What does the caret in front of the version number in <i>package.json</i> mean?
255255

256256
```json
257-
"express": "^4.21.2"
257+
"express": "^5.1.0"
258258
```
259259

260260
The versioning model used in npm is called [semantic versioning](https://docs.npmjs.com/about-semantic-versioning).
261261

262-
The caret in the front of <i>^4.21.2</i> means that if and when the dependencies of a project are updated, the version of Express that is installed will be at least <i>4.21.2</i>. However, the installed version of Express can also have a larger <i>patch</i> number (the last number), or a larger <i>minor</i> number (the middle number). The major version of the library indicated by the first <i>major</i> number must be the same.
262+
The caret in the front of <i>^5.1.0</i> means that if and when the dependencies of a project are updated, the version of Express that is installed will be at least <i>5.1.0</i>. However, the installed version of Express can also have a larger <i>patch</i> number (the last number), or a larger <i>minor</i> number (the middle number). The major version of the library indicated by the first <i>major</i> number must be the same.
263263

264264
We can update the dependencies of the project with the command:
265265

@@ -273,7 +273,7 @@ Likewise, if we start working on the project on another computer, we can install
273273
npm install
274274
```
275275

276-
If the <i>major</i> number of a dependency does not change, then the newer versions should be [backwards compatible](https://en.wikipedia.org/wiki/Backward_compatibility). This means that if our application happened to use version 4.99.175 of Express in the future, then all the code implemented in this part would still have to work without making changes to the code. In contrast, the future 5.0.0 version of Express [may contain](https://expressjs.com/en/guide/migrating-5.html) changes that would cause our application to no longer work.
276+
If the <i>major</i> number of a dependency does not change, then the newer versions should be [backwards compatible](https://en.wikipedia.org/wiki/Backward_compatibility). This means that if our application happened to use version 5.99.175 of Express in the future, then all the code implemented in this part would still have to work without making changes to the code. In contrast, the future 6.0.0 version of Express may contain changes that would cause our application to no longer work.
277277

278278
### Web and Express
279279

src/content/3/en/part3d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The contents of the package.json file will change as follows:
208208
//...
209209
"dependencies": {
210210
"dotenv": "^16.4.7",
211-
"express": "^4.21.2",
211+
"express": "^5.1.0",
212212
"mongoose": "^8.11.0"
213213
},
214214
"devDependencies": { // highlight-line

src/content/3/fi/osa3a.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Riippuvuus tulee nyt määritellyksi tiedostoon <i>package.json</i>:
238238
{
239239
// ...
240240
"dependencies": {
241-
"express": "^4.21.2"
241+
"express": "^5.1.0"
242242
}
243243
}
244244

@@ -250,13 +250,13 @@ Riippuvuuden koodi asentuu kaikkien projektin riippuvuuksien tapaan projektin ju
250250

251251
Kyseessä ovat Expressin riippuvuudet ja niiden riippuvuudet jne. eli projektimme [transitiiviset riippuvuudet](https://lexi-lambda.github.io/blog/2016/08/24/understanding-the-npm-dependency-model/).
252252

253-
Projektiin asentui Expressin versio 4.21.2. </i>package.json:issa</i> versiomerkinnän edessä on väkänen, eli muoto on
253+
Projektiin asentui Expressin versio 5.1.0. </i>package.json:issa</i> versiomerkinnän edessä on väkänen, eli muoto on
254254

255255
```json
256-
"express": "^4.21.2"
256+
"express": "^5.1.0"
257257
```
258258

259-
npm:n yhteydessä käytetään ns. [semanttista versiointia](https://docs.npmjs.com/getting-started/semantic-versioning). Merkintä <i>^4.21.2</i> tarkoittaa, että jos projektin riippuvuudet päivitetään, asennetaan Expressistä versio, joka on vähintään <i>4.21.2</i>, mutta asennetuksi voi tulla versio, jonka <i>patch</i> eli viimeinen numero tai <i>minor</i> eli keskimmäinen numero voi olla suurempi. Pääversio eli <i>major</i> täytyy kuitenkin olla edelleen sama.
259+
npm:n yhteydessä käytetään ns. [semanttista versiointia](https://docs.npmjs.com/getting-started/semantic-versioning). Merkintä <i>^5.1.0</i> tarkoittaa, että jos projektin riippuvuudet päivitetään, asennetaan Expressistä versio, joka on vähintään <i>5.1.0</i>, mutta asennetuksi voi tulla versio, jonka <i>patch</i> eli viimeinen numero tai <i>minor</i> eli keskimmäinen numero voi olla suurempi. Pääversio eli <i>major</i> täytyy kuitenkin olla edelleen sama.
260260

261261
Voimme päivittää projektin riippuvuudet komennolla
262262

@@ -270,7 +270,7 @@ Jos aloitamme projektin koodaamisen toisella koneella, saamme haettua ajantasais
270270
npm install
271271
```
272272

273-
Jos riippuvuuden <i>major</i>-versionumero ei muutu, uudempien versioiden pitäisi olla [taaksepäin yhteensopivia](https://en.wikipedia.org/wiki/Backward_compatibility), eli jos ohjelmamme käyttäisi tulevaisuudessa esim. Expressin versiota 4.99.175, tässä osassa tehtävän koodin pitäisi edelleen toimia ilman muutoksia. Sen sijaan tulevaisuudessa joskus julkaistava Express 5.0.0 [voi sisältää](https://expressjs.com/en/guide/migrating-5.html) sellaisia muutoksia, että koodimme ei enää toimisi.
273+
Jos riippuvuuden <i>major</i>-versionumero ei muutu, uudempien versioiden pitäisi olla [taaksepäin yhteensopivia](https://en.wikipedia.org/wiki/Backward_compatibility), eli jos ohjelmamme käyttäisi tulevaisuudessa esim. Expressin versiota 5.99.175, tässä osassa tehtävän koodin pitäisi edelleen toimia ilman muutoksia. Sen sijaan tulevaisuudessa joskus julkaistava Express 6.0.0 voi sisältää sellaisia muutoksia, että koodimme ei enää toimisi.
274274

275275
### Web ja Express
276276

src/content/3/fi/osa3d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Tiedoston package.json sisältö muuttuu seuraavasti:
197197
//...
198198
"dependencies": {
199199
"dotenv": "^16.4.7",
200-
"express": "^4.21.2",
200+
"express": "^5.1.0",
201201
"mongoose": "^8.11.0"
202202
},
203203
"devDependencies": { // highlight-line

0 commit comments

Comments
 (0)