Skip to content

Setting non-relative for importModuleSpecifier fails when package links itself #48170

@o-alexandrov

Description

@o-alexandrov

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.64.2
  • OS Version: macOS 12.2.1

Steps to Reproduce:

  • for your convenience, here's a minimum repro, but you'd need to use VSCode

Or follow these steps:

  1. Use any package manager that allows to link a package
  2. Add package.json
{
  "name": "pkg",
  "devDependencies": {
    "pkg": "file:."
  }
}
  1. Define a variable in a separate from the testing file (ex. example.ts)
  2. Attempt to auto import from the testing file (index.ts) the variable declared in example.ts
  3. VSCode fails to auto import using a non-relative path
    • even with typescript.preferences.importModuleSpecifier set as non-relative
    • expectation
      • pkg/src/example
    • current VSCode's behavior
      • ./example

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs InvestigationThis issue needs a team member to investigate its status.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions