This article explains how to run the npm install command specifying a pull request on GitHub, which is like a version or branch.

On GitHub, you can find many beta features not yet implemented in pull requests, or conversely, features and overrides that weren’t added due to being troublesome or having no demand.

You can directly get the source code of unmerged pull requests on GitHub with npm.
# npm by Github pull pull request
npm install <user>/<repo>#pull/<id>/head
npm install --save markedjs/marked#pull/899/head
npm install from github pull request - Stack Overflow
By the way, you can do something similar with Python’s pip.
pip install git+https://github.com/user/repo.git@refs/pull/123/merge
python - pip: how to install a git pull request - Stack Overflow