Skip to content

ConfigurableModuleBuilder doesn't resolve extras asyncΒ #15661

@tonyd33

Description

@tonyd33

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

ConfigurableModuleBuilder does not resolve extras set on .setExtras in the async version. The extras passed to the transformationDefinition is always the default using the async version.

Minimum reproduction code

https://codesandbox.io/p/devbox/restless-snow-6y9q4y?workspaceId=ws_Wb56io5ZgKjPm8EKBAcX43

Steps to reproduce

See the codesandbox. The only relevant changed files from the starter project are in src/app.module.ts and src/config/

Expected behavior

look at the terminal output on the codesandbox: I'd expect to see an output like:

{ folder: 'forRoot' }
{ folder: 'forRootAsync' }

yet I get

{ folder: 'forRoot' }
{ folder: 'default', useFactory: [Function: useFactory] }

separately, you can see in the same terminal output that it seems like the the options aren't making it into the ConfigService correctly...? this issue isn't centered around that though

NestJS version

11.0.1

Packages versions

➜  workspace git:(main) npx nest info

 _   _             _      ___  _____  _____  _     _____
| \ | |           | |    |_  |/  ___|/  __ \| |   |_   _|
|  \| |  ___  ___ | |_     | |\ `--. | /  \/| |     | |
| . ` | / _ \/ __|| __|    | | `--. \| |    | |     | |
| |\  ||  __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/  \____/\_____/\___/


[System Information]
OS Version     : Linux6.1.43
NodeJS Version : v20.12.1
NPM Version    : 10.5.0 

[Nest CLI]
Nest CLI Version : 11.0.0 

[Nest Platform Information
platform-express version : 11.0.1
schematics version       : 11.0.0
testing version          : 11.0.1
common version           : 11.0.17
core version             : 11.0.1
cli version              : 11.0.0

pretty sure this is the same on the latest release as well

Node.js version

20.12.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions