Skip to content
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

Fix resolving with yield #15423

Merged
merged 6 commits into from Mar 3, 2022
Merged

Fix resolving with yield #15423

merged 6 commits into from Mar 3, 2022

Conversation

vankop
Copy link
Member

@vankop vankop commented Feb 21, 2022

What kind of change does this PR introduce?

fixes #15409

Did you add tests for your changes?

yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
nothing

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

package.json Outdated Show resolved Hide resolved
@sokra
Copy link
Member

sokra commented Feb 22, 2022

Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a test case where multiple results are yielded and the first one is empty and the second one successful.

e. g.

resolve: {
  modules: ["a", "b"]
  alias: {
    [path.resolve(__dirname, "a/foo")]: false
  }
}
const x = "x";
import(`foo/${x}`)

a/foo/x = "wrong" and b/foo/x = "ok"

test/configCases/resolve/empty-context-module/index.js Outdated Show resolved Hide resolved
Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a test case where multiple results are yielded and the first one is empty and the second one successful.

e. g.

resolve: {
  modules: ["a", "b"]
  alias: {
    [path.resolve(__dirname, "a/foo")]: false
  }
}
const x = "x";
import(`foo/${x}`)

a/foo/x = "wrong" and b/foo/x = "ok"

@webpack-bot
Copy link
Contributor

@vankop Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@vankop vankop force-pushed the fix/issue-15409 branch 3 times, most recently from 8ebd760 to 10ebc91 Compare February 25, 2022 12:20
Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

lib/ContextModule.js Outdated Show resolved Hide resolved
@sokra sokra merged commit 870fcad into main Mar 3, 2022
@sokra sokra deleted the fix/issue-15409 branch March 3, 2022 13:53
@sokra
Copy link
Member

sokra commented Mar 3, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in 5.69.0: result is not iterable
3 participants