Skip to content

Port TS PR 61082 (Fix accidental ESM-mode directory module lookup in package non-root) #1263

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

jakebailey
Copy link
Member

@Copilot Copilot AI review requested due to automatic review settings June 22, 2025 04:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Ports TypeScript PR #61082 to update module resolution behavior and refresh related test baselines.

  • Removes an obsolete diff-based test baseline and adds a consolidated .errors.txt for nodeModulesNoDirectoryModule.
  • Enhances loadModuleFromSpecificNodeModulesDirectory by only performing directory index lookup when there’s no subpath (rest == "").
  • Retains a ported comment that questions its own correctness, which may warrant clarification.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
testdata/baselines/reference/submodule/conformance/nodeModulesNoDirectoryModule.errors.txt.diff Removed outdated diff-based baseline
testdata/baselines/reference/submodule/conformance/nodeModulesNoDirectoryModule.errors.txt Added updated, consolidated test baseline
internal/module/resolver.go Added rest == "" guard in package directory resolution condition

@jakebailey jakebailey changed the title Port TS PR 61082 Port TS PR 61082 (Fix accidental ESM-mode directory module lookup in package non-root) Jun 23, 2025
@jakebailey jakebailey added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit 0d266e6 Jun 24, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/port-61082 branch June 24, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants