Skip to content

Commit

Permalink
Upgrade dependencies, document lifecycle #770
Browse files Browse the repository at this point in the history
  • Loading branch information
caebr authored Feb 4, 2025
1 parent a6b5235 commit ba66e4f
Show file tree
Hide file tree
Showing 5 changed files with 226 additions and 159 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Download the [latest build](https://bkd-mba-fbi.github.io/evento-portal/evento-p

- [Setup & Development](./doc/development.md) – Start local development, run linting & tests
- [Git Workflow](./doc/git.md) – Branching & commit messages
- [Lifecycle](./doc/lifecycle.md) – Update Framework and Dependencies
- [Internationalization (I18n)](./doc/i18n.md) – Translating texts
- [Prettier](doc/prettier.md) – Source code formatting
- [Design](./doc/design.md) – Responsive Design & CI/CD
Expand Down
6 changes: 0 additions & 6 deletions doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ Verify TypeScript typing and check source files with [ESLint](https://eslint.org
npm run lint
```

Print a report of unused dependencies, files & exports using [Knip](https://github.com/webpro/knip) (for the configuration, see [.knip.json](../.knip.json)):

```
npm run unused
```

### E2E Tests

Run E2E tests interactively:
Expand Down
36 changes: 36 additions & 0 deletions doc/lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[back](../README.md)

# Lifecycle

Before starting a new development phase, we usually update the frameworks and dependencies first.

## Update Dependencies

### Angular

To update to a newer version of Angular, see the official [Update Guide](https://angular.dev/update-guide).

- Check that all Angular libraries (e.g. `ng-bootstrap`, `ng-translate`) are compatible with the target Angular version
- Update Angular to the target version using the [Update Guide](https://angular.dev/update-guide)
- Update the Angular libraries (check changelogs for breaking changes)
- See the [Angular release blog post](https://blog.angular.dev/) for optional migrations and new features
- Ensure that all tests and linting are successful. If necessary, test certain components/aspects manually.

### Other Dependencies

The easiest way to update the dependencies is to use [npm-check-updates](https://www.npmjs.com/package/npm-check-updates).

- You can use the interactive mode to selectively apply the updates: `npx npm-check-updates -i`
- Patch / minor updates can usually be applied without problems
- For major updates, check each package's changelog / migration guide for breaking changes
- When Prettier is updated, the source code needs to be reformatted, see [Update Prettier Version](./prettier.md#update-prettier-version)
- Do not update TypeScript beyond the [version supported by Angular](https://angular.dev/reference/versions)
- Ensure that all tests and linting are successful. If necessary, test certain components/aspects manually.

## Uncluttering

Print a report of unused dependencies, files & exports using [Knip](https://github.com/webpro/knip) (for the configuration, see [.knip.json](../.knip.json)):

```
npm run unused
```
Loading

0 comments on commit ba66e4f

Please sign in to comment.