@mawesome/npm-vm 0.0.0-alpha.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -1
  3. package/dist/cli.js +4157 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/index-B071ZJDk.d.cts +164 -0
  6. package/dist/index-B071ZJDk.d.ts +164 -0
  7. package/dist/index.cjs +7 -0
  8. package/dist/index.d.cts +2 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +2 -0
  11. package/dist/internal.cjs +2709 -0
  12. package/dist/internal.cjs.map +1 -0
  13. package/dist/internal.d.cts +139 -0
  14. package/dist/internal.d.ts +139 -0
  15. package/dist/internal.js +2706 -0
  16. package/dist/internal.js.map +1 -0
  17. package/dist/provenance--sOYCeF2.js +322 -0
  18. package/dist/provenance--sOYCeF2.js.map +1 -0
  19. package/dist/provenance-DDegWCyS.js +2 -0
  20. package/dist/runtime/atomic-C3shKdH9.cjs +88 -0
  21. package/dist/runtime/bootstrap.cjs +271 -0
  22. package/dist/runtime/commonjs-AANzyd21.cjs +7393 -0
  23. package/dist/runtime/dispatch-B9OSfqsn.cjs +25156 -0
  24. package/dist/runtime/dist-CXwBT6rE.cjs +30766 -0
  25. package/dist/runtime/home-BaoZZSBy.cjs +91 -0
  26. package/dist/runtime/install-C_M5WK98.cjs +13598 -0
  27. package/dist/runtime/journal-_bs-eJRJ.cjs +282 -0
  28. package/dist/runtime/launchers/cmd.tmpl +2 -0
  29. package/dist/runtime/launchers/ps1.tmpl +5 -0
  30. package/dist/runtime/launchers/sh.tmpl +3 -0
  31. package/dist/runtime/lease-HBD4CmBx.cjs +224 -0
  32. package/dist/runtime/lock-DBeYN-Zg.cjs +141 -0
  33. package/dist/runtime/messages-vUDkl1-0.cjs +174 -0
  34. package/dist/runtime/p-map-b8pXdaFZ.cjs +105 -0
  35. package/dist/runtime/proc-hB8N9WjN.cjs +127 -0
  36. package/dist/runtime/provenance-B4bajGXQ.cjs +2 -0
  37. package/dist/runtime/rolldown-runtime-BGT596CS.cjs +64 -0
  38. package/dist/runtime/runtime.cjs +143 -0
  39. package/dist/runtime/src-SpeGbMJx.cjs +314 -0
  40. package/dist/src-Bc9nN1Kl.cjs +2125 -0
  41. package/dist/src-Bc9nN1Kl.cjs.map +1 -0
  42. package/dist/src-NhNG2mnQ.js +1798 -0
  43. package/dist/src-NhNG2mnQ.js.map +1 -0
  44. package/package.json +87 -17
  45. package/index.js +0 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Manzoor Ahmad Wani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,52 @@
1
1
  # @mawesome/npm-vm
2
2
 
3
- Placeholder release reserving the name. The first implementation ships in 0.1.0 from https://github.com/mawesomedev/mawesome/tree/main/packages/npm-vm.
3
+ > Run the npm version a project declares in `devEngines`, whatever Node is active.
4
+
5
+ A new npm ships, your projects want it, and no Node release bundles it yet. Or an old branch still needs the npm it was built with. `npm-vm` puts an `npm` shim first on `PATH` that reads `devEngines.packageManager` from the project npm itself would use. When Node's own npm satisfies the range, it runs unchanged. Otherwise the newest matching release that supports the active Node is downloaded once through Node's own npm, verified, cached per machine and run from there. It works with nvm, fnm and nvm-windows, and a project that declares nothing sees no difference.
6
+
7
+ 📚 Full documentation lives in [`docs/`](./docs/): [get started](./docs/get-started.md), [how it works](./docs/how-it-works.md), [CLI](./docs/cli.md), [shells and Node managers](./docs/shells.md), [security](./docs/security.md), [GitHub Action](./docs/action.md).
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npx --prefix ~ -y @mawesome/npm-vm setup
13
+ ```
14
+
15
+ Then open a new terminal and run `npm-vm doctor`.
16
+
17
+ ## Declare
18
+
19
+ ```sh
20
+ npm-vm pin ^12.0.0
21
+ ```
22
+
23
+ ```json
24
+ {
25
+ "devEngines": {
26
+ "packageManager": { "name": "npm", "version": "^12.0.0", "onFail": "error" }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Use
32
+
33
+ ```sh
34
+ npm ci # npm ^12 in this project
35
+ npm -v # Node's own npm in a project that declares nothing
36
+ ```
37
+
38
+ Global installs (`npm i -g`) always use Node's own npm.
39
+
40
+ ## In CI
41
+
42
+ ```yaml
43
+ - uses: mawesomedev/npm-vm-action@v1
44
+ ```
45
+
46
+ ## Requirements
47
+
48
+ Node 22.9 or newer runs the tool; below that the launcher falls back to Node's own npm and says so. Node's own npm must be 8 or newer to act as the download transport.
49
+
50
+ ## License
51
+
52
+ [MIT](../../LICENSE)