@dsivd/prestations-ng 19.0.0-beta.10 → 19.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.browserslistrc CHANGED
@@ -1,11 +1,24 @@
1
- # Se mettre à la racine du projet
2
- # Mettre à jour avec "npx browserslist --update-db"
3
- # Valider le contenu de ce fichier avec `npx browserslist --coverage=CH "> 2% in CH, last 2 versions, not dead, Firefox ESR, not IE_Mob <= 11, not IE <= 11"`
4
- # Le pourcentage accepté doit être supérieur à 80%
5
- # Regénérer le fichier "supported-browsers.ts" avec "npm run buildScript:generateBrowsersList"
1
+ # Se mettre a la racine du projet
2
+ # Mettre a jour avec "npx browserslist --update-db"
3
+ # Ce bloc par defaut est consomme par Angular CLI.
4
+ # Regenerer le fichier "supported-browser.ts" avec "npm run buildScript:generateBrowsersList"
6
5
  #######################################################################################################################################################################################
7
- # Liste des navigateurs supportés
6
+ # Liste des navigateurs supportes par Angular CLI (evite les warnings "Unsupported browsers")
8
7
  #######################################################################################################################################################################################
8
+ last 2 Chrome major versions
9
+ last 2 Edge major versions
10
+ last 2 Firefox major versions
11
+ Firefox ESR
12
+ last 2 and_chr major versions
13
+ not dead
14
+ # Maintenance: passer a 19.x (puis 20.x, ...) quand la matrice de support Angular l'autorise.
15
+ ios_saf 18.0-18.99
16
+ safari 18.0-18.99
17
+
18
+ [supportedBrowsersRegex]
19
+ # Valider ce bloc avec:
20
+ # npx browserslist --config=src/.browserslistrc --env=supportedBrowsersRegex --coverage=CH
21
+ # Le pourcentage accepte doit etre environ 80%
9
22
  > 2% in CH
10
23
  last 2 versions
11
24
  not dead
package/UPGRADING_V19.md CHANGED
@@ -77,7 +77,7 @@ Replace `com.fasterxml.jackson.databind.ObjectMapper` with `tools.jackson.databi
77
77
  - `ch.vd.cyberadminbe.jms` has been moved to `ch.vd.cyber.backofficebe.jms`
78
78
  - `ch.vd.cyberadminbe.security` has been moved to `ch.vd.cyber.backofficebe.security`
79
79
  - `ch.vd.cyberadminbe.editique` has been moved to `ch.vd.cyber.backofficebe.editique`
80
- - `cyberadminbe.config.CyberAdminBeEsbHttpConfig` has renamed to `backofficebe.config.BoCommonEsbHttpConfig`
80
+ - `cyberadminbe.config.CyberAdminBeEsbHttpConfig` has been renamed to `backofficebe.config.BoCommonEsbHttpConfig`
81
81
 
82
82
  ### BO : Brave Tracer
83
83
 
@@ -133,7 +133,7 @@ public class MyListener extends EsbMessageListenerWithTracingPropagation {
133
133
  }
134
134
  ```
135
135
 
136
- finally, if you have mock issues with your integration tests, you can use `ch.vd.cyber.backofficebe.jms.JmsTestUtils.mockTracingPropagation(final Tracer tracerMock, final Propagator propagatorMock)`
136
+ Finally, if you have mock issues with your integration tests, you can use `ch.vd.cyber.backofficebe.jms.JmsTestUtils.mockTracingPropagation(final Tracer tracerMock, final Propagator propagatorMock)`
137
137
 
138
138
  ### BO : ESB Integration
139
139
 
@@ -152,11 +152,11 @@ Run your application with this dependency :
152
152
  </dependency>
153
153
  ```
154
154
 
155
- Look for logs that indicate property you should migrate (watch for WARN logs of class PropertiesMigrationListener), update them and remove the dependency
155
+ Look for logs that indicate properties you should migrate (watch for WARN logs of class PropertiesMigrationListener), update them and remove the dependency
156
156
 
157
157
  ### BO using jpa repositories
158
158
 
159
- As we also have jdbc in the classpath, to avoid having dozens of log like "Spring Data JDBC - Could not safely
159
+ As we also have jdbc in the classpath, to avoid having dozens of logs like "Spring Data JDBC - Could not safely
160
160
  identify store assignment for repository candidate interface", add the property in your application.properties :
161
161
 
162
162
  spring.data.jdbc.repositories.enabled=false
@@ -188,9 +188,9 @@ For the commands in this guide, it is supposed that you are in the `front` folde
188
188
  The main feature in `prestations-ng` v19 is the update of the `@angular/*` peer dependencies
189
189
  to `^21.2.14`, using `node 22+` to build, `npm 10+` for package manager and `Foehn 2+ (Bootstrap 5+)` for our design system.
190
190
 
191
- A lot of breaking because our library has migrated to **standalone** components, **signals** and **inject function** instead of constructor injection parameters.
191
+ A lot of breaking changes because our library has migrated to **standalone** components, **signals** and **inject function** instead of constructor injection parameters.
192
192
 
193
- > 🚨 **Read carefully following [PITFALLS](ANGULAR_SIGNALS.md#common_pitfalls), especially points 4, 6 & 8**
193
+ > 🚨 **Read carefully the following [PITFALLS](ANGULAR_SIGNALS.md#common_pitfalls), especially points 4, 6 & 8**
194
194
 
195
195
  ### Migrate to ESLint
196
196
 
@@ -241,6 +241,10 @@ Be sure to use a node version 22+ in your terminal:
241
241
  node -v
242
242
  ```
243
243
 
244
+ ##### IntelliJ node version
245
+
246
+ Change IntelliJ node version to 22+ by going to `File > Settings > Languages & Frameworks > TypeScript` and selecting a node version 22+ in `Node runtime`.
247
+
244
248
  #### Continue with Angular 20 migration
245
249
 
246
250
  ```bash
@@ -352,9 +356,11 @@ ng update ngx-matomo-client@9
352
356
 
353
357
  ### Now fix your project before continuing
354
358
 
355
- **IMPORTANT: Fix your project because our new prestations-ng v19+ is standalone, uses signals instead of observables and inject function instead of constructor injection parameter.**
359
+ **IMPORTANT: Fix your project because our new prestations-ng v19+ is standalone, uses signals instead of observables and inject function instead of constructor injection parameters.**
356
360
 
357
- - Remove all your `@dsivd/prestations-ng` imports of modules and make sure you are using the new standalone components instead by adding them directly from your html file "alt+enter".
361
+ - Only keep `modules` relative to your application such as `AppRoutingModule`.
362
+ - Remove all other imports of **modules** and make sure you are using the new **standalone components** by adding them directly from your HTML file "alt+enter".
363
+ - Add `providePrestationsNgCore(),` in `providers` array of your `app.modules.ts` file.
358
364
  - Check every `constructor` in your project, and remove useless `constructor` parameters that are not used anymore (like `ActivatedRoute` in components extending `AbstractPageComponent`).
359
365
 
360
366
  Run the following command until you have no more errors.
@@ -879,7 +885,7 @@ rm karma.conf.js
879
885
  - search for `karma.conf.js` in your project and remove all references to it.
880
886
  - search for `protractor.conf.js` in your project and remove them if they still exist.
881
887
 
882
- Then run following command to migrate from jasmine to vitest:
888
+ Then run the following command to migrate from jasmine to vitest:
883
889
 
884
890
  ```bash
885
891
  ng g @schematics/angular:refactor-jasmine-vitest
@@ -1278,7 +1284,44 @@ mv ./.husky ../.husky
1278
1284
  git add -A
1279
1285
  ```
1280
1286
 
1281
- - You can manually run formatting commands as well:
1287
+ - In your `package.json`, modify `prepare` script to run husky from the parent folder:
1288
+
1289
+ ```diff
1290
+ - "prepare": "husky"
1291
+ + "prepare": "cd .. && husky"
1292
+ ```
1293
+
1294
+ Then run:
1295
+
1296
+ ```bash
1297
+ npm install
1298
+ ```
1299
+
1300
+ You should see in your project root folder `.husky` a new folder `_`.
1301
+
1302
+ #### Husky pre-commit hook for multi-project repository
1303
+
1304
+ - when having a multi-project repository, modify `.husky/pre-commit` file with following content to make sure husky is running in the right folder:
1305
+
1306
+ ```bash
1307
+ projects=$(git diff --cached --name-only --diff-filter=ACMR | awk -F'/' '{print $1}' | sort -u)
1308
+
1309
+ for project in $projects; do
1310
+ if [ -d "$project/front" ]; then
1311
+ echo "➡️ lint-staged pour $project/front"
1312
+ (cd "$project/front" && npx lint-staged) || exit 1
1313
+ fi
1314
+ done
1315
+ ```
1316
+
1317
+ and move it to the root folder of your repository. Then change your `package.json` by modifying `prepare` script to run husky from the parent folder:
1318
+
1319
+ ```diff
1320
+ - "prepare": "husky"
1321
+ + "prepare": "cd ../.. && husky"
1322
+ ```
1323
+
1324
+ #### Manually run formatting commands
1282
1325
 
1283
1326
  ```bash
1284
1327
  npm run format:prettier
@@ -1376,7 +1419,7 @@ Finally check if your tests run well :
1376
1419
  npm run test
1377
1420
  ```
1378
1421
 
1379
- > 🚨 **Read carefully following [PITFALLS](ANGULAR_SIGNALS.md#common_pitfalls), especially points 4, 6 & 8 and check again your application**
1422
+ > 🚨 **Read carefully the following [PITFALLS](ANGULAR_SIGNALS.md#common_pitfalls), especially points 4, 6 & 8 and check again your application**
1380
1423
 
1381
1424
  ### Release your application using `jenkins-libs`
1382
1425
 
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "ng-update": {
41
41
  "migrations": "./schematics/migration-collection.json"
42
42
  },
43
- "version": "19.0.0-beta.10",
43
+ "version": "19.0.0-beta.12",
44
44
  "module": "fesm2022/dsivd-prestations-ng.mjs",
45
45
  "typings": "types/dsivd-prestations-ng.d.ts",
46
46
  "exports": {