-
Notifications
You must be signed in to change notification settings - Fork 15
feat: update angular version to v17 #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update angular version to v17 #249
Conversation
881a26a to
fd31e38
Compare
|
I've done the changing that you asked in PR #248 |
OlivierAlbertini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run npm run chromatic this will trigger storybook on this build in order to review visually.
* feat: update to angular 17 * feat: update eslint version * fix: linting errors * feat: remove deprecated lint package * feat: remove deprecated lint rules * fix: eslint rules compliance error * ci: change node image * refactor: replace deprecated type * refactor: replace deprecated type from storybook-angular * ci: update github actions versions * fix: broken lint command when upgrading to Angular v17 VilledeMontreal#222 * ci: run build job before lint job to fix linting error --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
* fix: error when rendering file input component story in storybook * docs: add comment to improve understanding Signed-off-by: DevSallSa <mrsallsa@protonmail.com> --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
6c5413f to
06c5165
Compare
OlivierAlbertini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GG
* fix: update to Angular v17 broke linter (VilledeMontreal#2) * feat: update to angular 17 * feat: update eslint version * fix: linting errors * feat: remove deprecated lint package * feat: remove deprecated lint rules * fix: eslint rules compliance error * ci: change node image * refactor: replace deprecated type * refactor: replace deprecated type from storybook-angular * ci: update github actions versions * fix: broken lint command when upgrading to Angular v17 VilledeMontreal#222 * ci: run build job before lint job to fix linting error --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com> * fix: error when rendering file input component story in storybook (VilledeMontreal#3) * fix: error when rendering file input component story in storybook * docs: add comment to improve understanding Signed-off-by: DevSallSa <mrsallsa@protonmail.com> --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com> --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
TL;DR
Context
Based on @OlivierAlbertini ’s PR (#221),
I updated the Angular version to v17 and fixed the following issue: #222.
The lint error was caused by several factors :
villedemontreal/lint-configwhich is incompatible with current ESLint versioneslint,typescript-eslintandangular-eslintpackagesExplanation
The Lint job failed because it ran before the build job in GitHub Actions.
The Storybook sub-project depends on the built version of
angular-uiand without it, TypeScript cannot resolve certain imports.For example, the following code will fail during linting:
with the following error in GitHub Actions :
As
angular-uiis developed inside this project, it doesn't appear inpackage.jsonnor innode_modules.In that case, Typescript will look in the
dist/folder to find the lib. These types are only available after the build step, as they reside in thedist/folder but currently as the lint command is ran before the build command, thedist/folder does not exist.Step to reproduce in local
npm cidist/folder doesn't exist in the root folder. Delete it otherwisenpm run lint=> The error will occurrednpm run build && npm run lint=> the lint will pass without error (only warnings)Why now ?
Because of
eslint,typescript-eslintandangular-eslintversions supported by Angular v17 which may include breaking changes or enforce stricter best practices.The solution
To resolve this, we can either :
Or
This PR implements the first solution to minimize code changes.