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
Update Nest.js deps #637
Merged
Merged
Update Nest.js deps #637
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
via `nest update -f -t latest` (see nestjs/nest-cli#321 (comment)) TypeORM was also upgraded separately via `yarn upgrade --latest typeorm` since it seems it was installed as a sibling dependency (see 10fcff9#diff-d57c900a61f2746ea3823bed028e1d81004e1e077149e4b4935269ffb39383e8) which is also how the docs indicate it should be done (see https://docs.nestjs.com/techniques/database).
Nest was failing to build since `HandlebarsAdapter` is no longer exported from the same module. The import was updated as per the current docs: https://nest-modules.github.io/mailer/docs/mailer `handlebars` was also added as a peer dependency since the docs said it should be installed if it is used (there was also a warning about this).
When moving to 4.6.1+ an error is thrown at runtime when we try to list projects: server_1 | QueryFailedError: column Project.undefined does not exist This is related to the filtering of the project controller. In looking at the WHERE condition in the query to fetch the projects we can see where the query is being built incorrectly (a column `"Project"."undefined"` is referenced): server_1 | query failed: SELECT "Project"."id" AS "Project_id", "Project"."name" AS "Project_name", "Project"."number_of_districts" AS ... "regionConfig"."id"="Project"."region_config_id" INNER JOIN "user" "project_user" ON "project_user"."id"="Project"."user_id" WHERE ("Project"."undefined" = $1) ORDER BY "Project"."updated_dt" DESC -- PARAMETERS: ["07f9966f-facf-42ce-a4ee-48320007f1cc"] It seems like this should work fine since `user_id` is indeed a column on the project. An issue was created for this here: nestjsx/crud#684
This makes it so that all deps which can be upgraded are upgraded. `class-transformer` had to be held back because upgrading it caused `@nestjsx/crud-typeorm` to throw an error since it seems to depend on an older version.
pcaisse
force-pushed
the
feature/pc/update-nest-deps
branch
from
March 19, 2021 20:23
636b832
to
72dd828
Compare
maurizi
approved these changes
Mar 23, 2021
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.
Working great 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Update all Nest.js deps, including the "microframework" packages such as
@nestjsx/crud
and@nestsx/crud-typeorm
and their peer dependenciesChecklist
CHANGELOG.md
and grouped with similar changes, if possibleNotes
I tried to make the commit messages nice and descriptive so I'd recommend looking at those one-by-one.
There are some warnings shown when running
yarn install
around unmet peer dependencies, but we don't use those dependencies for templates in email (we're using handlebars) and so they should optional and the warnings can be safely ignored:Testing Instructions
scripts/update
and thenscripts/server
Closes #602