Skip to content

Conversation

@kitten
Copy link
Contributor

@kitten kitten commented Feb 1, 2024

Fixes #57047

When merged, this allows plugins to also be loaded from package subpaths.

Before, tsconfig.json:compilerOptions.plugins[] would:

  • reject package-plugin/sub/path
  • reject @package-plugin/subpath
  • load .. and .

After, tsconfig.json:compilerOptions.plugins[] will:

  • load package-plugin/sub/path
  • load @package-plugin/subpath
  • reject @package-plugin/subpath/../../malicious
  • reject plugin/subpath/../../malicious
  • reject .. and .

I noticed while looking at the tests that . and .. are accepted plugin names, which is likely unintentional.

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Feb 1, 2024
@kitten

This comment was marked as resolved.

@kitten kitten force-pushed the fix/allow-plugins-in-package-subpath branch from 30341f7 to 14324ed Compare February 21, 2024 06:42
@kitten
Copy link
Contributor Author

kitten commented Feb 21, 2024

@sheetalkamat That's all applied and test cases are looking good and pass 👍 Sorry for the delay!

@sheetalkamat sheetalkamat merged commit ef091bf into microsoft:main Feb 21, 2024
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TSServer Plugins with sub-packages/paths are not loaded

4 participants