Closed m-fire closed 9 months ago
Please provide a minimum reproduction repository. You can start one by running npm init nest
in your terminal
@micalevisk May I request a review? I've updated the minimal reproduction comments and reproduction procedure above, and I've posted sample code as you suggested - it's a minimal scenario test, so there's a lot of source code.
@micalevisk I think this issue is related to the import/export behavior of Typescript. What do you think? I think it's right, it suddenly started working again 😑. All import/export code is working fine during the overhaul. I've had a hard time with this, you've had a hard time, so you can rest now.😌
I've no ideia :thinking:
This is the second time this has happened to me.
in
src/module/auth/feature/sign-in-user.api.ts
before
: The
Request
was placed inside theauth
module outside the Api class.import { AuthToken, SignInUserRequest } from '@src-module/auth/feature'
after
: Located in the same folder as the API class
import { SignInUserRequest } from './sign-in-user.request'
I thought it was fixed. It was my mistake. It's hard...
I'll commit the rest of the code to the repository to reflect this, so take a look when you need to.
Let's reopen it first. because it's impossible to reproduce what happened😑. I don't know how it was fixed. I don't think it's just an import/export issue with Typescript. I feel like I'm getting lost in a maze...
I'm sure it's just an import/export issue, possibly caused by barrel files (index.ts) introducing a cyclic import in your code, leading to TS metadata being undefined in a specific context
Is there an existing issue for this?
Current behavior
1. Typical app runs or standalone E2E
supertest
situations:2-1. Nested request API scenario testing situations:
2-2. ValidationPipe.transform Status:
Minimum reproduction code
Steps to reproduce
npm run test:e2e
, check the result: success2, failure3test/module/auth/feature
test/module/board/feature
request
method insrc/module/auth/feature/sign-in-user.api.ts
for each testundefined
check in the title should be checked in theValidationPipe.transform()
method.Expected behavior
ValidationPipe should have no problem converting DTOs through
@Body
. It's too unreliable.Package
Other package
No response
NestJS version
10.3.1
Packages versions