FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow plugins to be loaded from package subpaths by kitten · Pull Request #57266 · microsoft/TypeScript · GitHub

Allow plugins to be loaded from package subpaths - #57266

Merged
Sheetal Nandi (sheetalkamat) merged 7 commits into
microsoft:mainfrom
kitten:fix/allow-plugins-in-package-subpath
Feb 21, 2024
Merged

Allow plugins to be loaded from package subpaths#57266
Sheetal Nandi (sheetalkamat) merged 7 commits into
microsoft:mainfrom
kitten:fix/allow-plugins-in-package-subpath

Conversation

Phil Pluckthun (kitten) commented Feb 1, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

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

This comment was marked as resolved.

Comment thread src/compiler/moduleNameResolver.ts Outdated
Co-authored-by: Sheetal Nandi <sheetalkamat@users.noreply.github.com>
Phil Pluckthun (kitten) force-pushed the fix/allow-plugins-in-package-subpath branch from 30341f7 to 14324ed Compare February 21, 2024 06:42

Copy link
Copy Markdown
Contributor Author

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

5 participants


Back | FazBrowse Home | New Git URL