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

Simplify / speed-up / enhance node package manager implementations #9261

Open
fviernau opened this issue Oct 9, 2024 · 0 comments
Open

Simplify / speed-up / enhance node package manager implementations #9261

fviernau opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements tech debt Technical debt that should be addressed

Comments

@fviernau
Copy link
Member

fviernau commented Oct 9, 2024

ORT has the node package managers Npm, Pnpm, Yarn, Yarn2, whereas Pnpm and Yarn inherit from Npm.
Changing the code in Npm has turned out to be quite hard / complicated. One of the complications is, that
it is not easily possible to make a change which applies only to one of these 3 managers. In fact, most code changes need
to work with all 3 managers.

Furthermore, there is code redundancy between Yarn2 and Npm, and also code in Npm which is only used by one of the child classes. All in all, a bunch of stuff to clean-up.

This will be approached in the following steps:

  1. Remove the inheritance between the package managers
  2. Potentially re-write parts of each of the managers to rely on the command output rather than
    on the node_modules file structure.
  3. Clean-up as much code as possible in the now separated package managers
  4. Remove code redundancies across the managers (also covering Yarn2), most importantly:
    • Logic for model mapping (PackageJson -> Package / Project)
    • Requesting remote package details
  5. Improve performance of these requests by parallel execution. (Maybe also by using yarn2, if installed, as it supports batch requests)
  6. Add support for NPM workspaces, or any other missing features discovered during previous steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements tech debt Technical debt that should be addressed
Projects
None yet
Development

No branches or pull requests

1 participant