You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
globally installed package binarys should have some safe-guards/reasonable way to determine which one wins when there's duplicate names
help potentially transfer node package/namespace on npmjs.com to the Node.js Project
ask Node.js Project to begin distributing releases on npmjs.com using dist-tags as mutable references for things like LTS versions
benefit: support policies, version management & updates come out-of-the-box with the npm CLI or any other tool/package manager that interfaces with npmjs.com (not really different then using canonical git tags/releases on github.com or hosting distributions on nodejs.org - these can continue to exist)
there should be no need for third-party tools (ie. npm comes with node, you should be able to use that to update/upgrade your system node without the need for a third-party tool)
remove references to node version managers in npm/cli's README.md
this list has been controversial in terms of the criteria used to add net-new projects
add reference to upgrading/updating node using npm in npm/cliREADME.md
npm pkg set engines.node="^14.17.0||^16.13.0||>=18.0.0"
Enforce node specific versions
# command specific
npm install --engines-strict
npm ci --engines-strict
# project-specific config
npm config set engines-strict=true --location=project
# user-specific config
npm config set engines-strict=true --location=user
# global config
npm config set engines-strict=true -g
Add Net-new Config for Maintaining Packages across Version Updates
node & npm become unique package names where we are able to provide unique flags/context when doing an install or update.
npm i node@14 -g -f -k
# -k | --keep-installed-packages
# maybe `--keep-installed-packages=node@12` to allow only copying/reinstalling deps from a previous spec of node
Note: consider
Note: switching npm or node bins may loose context of previously installed packages; adding this flag should resolve this use-case of retaining packages across these package versions at the system-level
Note: two (or more?) types of node installations:
"main" node - the version that all your globally installed packages are linked
"test/project" nodes - the versions that are used on specific projects. when those are installed as set as the primary node, you should not lose access to your globally installed packages. those should be callable and will use the "main" node
Net-new Global Manifest & Improved Linking
npm link
# current:
cd ./pkg && npm link . && cd ../project && npm link <pkg>
# future: interfaces with the global `package.json`
npm link <get|set|list>
npm link set <name>=<path>
npm link set lodash=.
npm link <path> # is equivalent to...
npm link <pkg>=<path>
npm link ls # returns all project deps that are symlinked
npm link ls -g # returns all globally available links
npm link get <pkg> # returns path to project linked package
npm link get <pkg> -g # returns path to globally linked package
npm update|install node -g
# will update and save `json` and `diff-so-fancy` (if necessary?) and update global/package.json
# due to them being listed in linkedDependencies#node
Questions
how does the name of a bin on disk get inferred when multiple packages have the name and bin?
darcyclarke
changed the title
EPIC: Improved Support for node / Global Binary Management
EPIC: (WIP) Improved Support for node / Global Binary Management
Oct 31, 2022
darcyclarke
changed the title
EPIC: (WIP) Improved Support for node / Global Binary Management
EPIC: Improved Support for node / Global Binary Management (WIP/TBD)
Oct 31, 2022
darcyclarke
changed the title
EPIC: Improved Support for node / Global Binary Management (WIP/TBD)
EPIC: Improved Support for node / Global Package Management (WIP/TBD)
Oct 31, 2022
darcyclarke
changed the title
EPIC: Improved Support for node / Global Package Management (WIP/TBD)
Epic: Improved Support for node / Global Package Management (WIP/TBD)
Oct 31, 2022
I think the very first step is to make a devEngines - iow, engines is for consumers, and people currently abuse it for project devs, but it would be much more explicit (and necessary for proper version management) to have one explicitly for developers.
node
versioning w/npm
Potential Goals & Action Items
node
package/namespace onnpmjs.com
to the Node.js Projectnpmjs.com
using dist-tags as mutable references for things likeLTS
versionsnpm
CLI or any other tool/package manager that interfaces withnpmjs.com
(not really different then using canonical git tags/releases ongit.luolix.top
or hosting distributions onnodejs.org
- these can continue to exist)npm
comes withnode
, you should be able to use that to update/upgrade your systemnode
without the need for a third-party tool)npm/cli
'sREADME.md
node
usingnpm
innpm/cli
README.md
nvm
& missing features ofnpm i node
nvm install node --reinstall-packages-from=node
volta
& it's approach (may have similar concerns about it's proxy/aliasing as we do conceptually as well as license-wise forcorepack
)npm i node -g -f && npm outdated -g
work (currentlty fails because of expected paths not existing)The below is rough ideation/WIP
Example Use Cases & Usage
Install & Manage
node
System-wideExecute
node
in an individual processCheck for outdated
node
versionUpdating
node
to a specific versionProject-specific
Set Project-specific
node
versions withengines
Enforce
node
specific versionsAdd Net-new Config for Maintaining Packages across Version Updates
node
&npm
become unique package names where we are able to provide unique flags/context when doing aninstall
orupdate
.Net-new Global Manifest & Improved Linking
npm link
Global
package.json
Questions
node
Global + Project Example
Net-new Command to manage
PATH
Questions
node
?--install-strategy=linked -g
could create a global store where multiple versions ofnode
can co-exist (hypothetically)Links & References
node
version checker to core: Adding a Version Checker nodejs/node#44942node
package: https://www.npmjs.com/package/nodeThe text was updated successfully, but these errors were encountered: