NPMJS Alternative (WIP)

Overview

SNPM (WIP)

SNPM is an "alternative" for NPM, but it's not meant to replace NPM/Yarn/PNPM

DISCLAIMER 🚧

This project was made to learn more about Package Managers, for now you should only use it to play with it.

CLI

The SNPM CLI is used to install packages from the package.json of a project.

Its advantages are that it is faster than NPM and saves more space.

Instalation

npm i @snpm-io/cli -g

Commands

  • snpm install Installs packages from package.json
  • snpm benchmark Tests SNPM against NPM and PNPM
  • snpm clear Remove .snpm-cache folder

Todo

  • Make it work in some JS Frameworks (Follow progress here)
  • Fix monorepos integration (WIP, degradated performance in some repos)

Why is it faster?

SNPM uses the same installation system as PNPM, fetch dependency, download dependency. Without waiting for the rest of the dependencies.

To resolve the dependencies, a dependency tree is generated as in NPM version 2, each dependency (or subdependency) has its own node_modules.

Now you are probably wondering how that makes the space more efficient than in NPM.

Each dependency is a symbolic link to a common store inside .snpm-cache, so all your projects use shared dependencies.

It works?

Short answer, probably no, but in some cases it works. (For now)

I've selected some quickstart templates to test SNPM, and I'm working on make it work in all of them.

If you want to test a template, you can use Vite, I've already tested it and it should work.

Full list

Comments
  • Can't install `fastify-zod`

    Can't install `fastify-zod`

    Provide installed version

    [Ultra] v0.7.3 (47.05ms)

    Current platform

    Windows

    Describe the Bug

    I tried running the following command

    ultra install fastify-zod
    

    And it did not install the fastify-zod package. Whereas npm successfully did it.

    This is the error ultra gave to me (after 26 seconds) image

    This is what NPM shows after installation (after 5 seconds) image

    Expected Behavior

    Expected that fastify-zod gets installed automatically

    Template command (if applicable)

    ultra install fastify-zod

    To Reproduce

    Run ultra install fastify-zod in a blank project

    bug Windows 
    opened by max-programming 8
  • Errors while installing T3 packages

    Errors while installing T3 packages

    Provide installed version

    [Ultra] v0.7.6

    Provide Node.js version

    16.17.1

    Current platform

    Windows

    Describe the Bug

    I got these weird error logs while trying to install with ultra i after running ultra create t3-app

    ℹ Using https://registry.npmjs.org/ as registry...
    ⚡ Installed local packages in 0.15 ms!
    ✖ Error while installing globals@^13.15.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\ignore-b50a0b7a023c81aa1a217fb5dca7ff67.tgz to C:\Users\Admin\.ultra-cache\ignore\5.2.0: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ Error while installing @eslint/eslintrc@^1.3.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\path-exists-7c15fc7e9a3b16862093ccba6ad29a03.tgz to C:\Users\Admin\.ultra-cache\path-exists\4.0.0: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ Error while installing find-up@^5.0.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\path-exists\4.0.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\path-exists\4.0.0\package.json'
    ✖ Error while installing globals@^13.15.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\read-cache-7a65d6fcfaf1ca051c995b784c6eb1f7.tgz to C:\Users\Admin\.ultra-cache\read-cache\1.0.0: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ Error while installing postcss-import@^14.1.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\read-cache\1.0.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\read-cache\1.0.0\package.json'
    ✖ Error while installing ignore@^5.2.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json'
    ✖ Error while installing ignore@^5.2.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\levn-5f3062071eebdde1684e0090ae90e913.tgz to C:\Users\Admin\.ultra-cache\levn\0.4.1: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ Error while installing [email protected] from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\levn\0.4.1\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\levn\0.4.1\package.json'
    ✖ Error while installing ignore@^5.2.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\regexpp-850ab2db51deef81dcd32b6851513535.tgz to C:\Users\Admin\.ultra-cache\regexpp\3.2.0: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ [ERR] @typescript-eslint/eslint-plugin@^5.33.0 - Error reading package.json from C:\Users\Admin\.ultra-cache\regexpp\3.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\regexpp\3.2.0\package.json'
    ✖ Error while installing globals@^13.15.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\globals\13.17.0\package.json'
    ✖ Error while installing ignore@^5.2.0 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\ignore\5.2.0\package.json'
    ✖ Error while installing levn@^0.4.1 from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\levn\0.4.1\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\levn\0.4.1\package.json'
    ✖ Error extracting C:\Users\Admin\AppData\Local\Temp\ultra_tmp\lodash.merge-879fb9805f7a2dc7d3dd9b949be2071a.tgz to C:\Users\Admin\.ultra-cache\lodash.merge\4.6.2: TAR_BAD_ARCHIVE: Unrecognized archive format
    ✖ Error while installing [email protected] from cache - Error reading package.json from C:\Users\Admin\.ultra-cache\lodash.merge\4.6.2\package.json - ENOENT: no such file or directory, open 'C:\Users\Admin\.ultra-cache\lodash.merge\4.6.2\package.json'
    ⚡ Installed packages in 3 min!
    ⚡ 1 Post Install scripts completed in 62.28 ms!
    ⚡ 121 packages verified
    ⚡ Done in 3 min!
    

    Expected Behavior

    It should install those packages without any errors

    Template command (if applicable)

    👇

    To Reproduce

    1. Run ultra create t3-app
    2. Say no to install packages
    3. Install the packages manually with ultra i
    bug 
    opened by max-programming 7
  • Create T3/Next App does not work on Windows

    Create T3/Next App does not work on Windows

    Provide installed version

    [Ultra] v0.7.5 (61.98ms)

    Current platform

    Windows

    Describe the Bug

    When I run ultra create t3-app, it fails

    image

    Expected Behavior

    It should generate a T3 Stack app just like npx creat-t3-app or yarn create t3-app

    Template command (if applicable)

    ultra create t3-app

    To Reproduce

    ultra create t3-app

    bug 
    opened by max-programming 6
  • Fixed 'remove' command exception

    Fixed 'remove' command exception

    Hi! I found a bug in the stable version of Ultra, when using "ultra remove package-name" it throws an exception if not found in peerDependencies.

    [Ultra] v0.7.0 (83.54ms)
    file:///C:/Users/doiska/Documents/Tools/nvm/v16.16.0/node_modules/ultra-pkg/build/commands/remove.js:15
            delete pkg.peerDependencies[arg];
                                        ^
    
    TypeError: Cannot convert undefined or null to object
        at remove (file:///C:/Users/doiska/Documents/Tools/nvm/v16.16.0/node_modules/ultra-pkg/build/commands/remove.js:15:37)
        at commands (file:///C:/Users/doiska/Documents/Tools/nvm/v16.16.0/node_modules/ultra-pkg/build/commands/index.js:107:16)
    
    
    opened by doiska 3
  • Support to private packages

    Support to private packages

    Ultra gives an 404 error when trying to install a private github package, seems that .npmrc file is ignored by ultra. On yarn and npm works fine.

    Versions

    • Ultra: 0.7.0
    • Node: v16.15.0
    enhancement 
    opened by luishrodg 3
  • Compare installed versions of packages.

    Compare installed versions of packages.

    Looks like this problem is related to duplicated dependencies with different versions.

    • [ ] Compare installed versions and skip if the package is suitable.
    • [ ] Cache manifests to speed up fetching.

    Originally posted by @nachoaldamav in https://github.com/nachoaldamav/fnpm/issues/38#issuecomment-1245398916

    enhancement 
    opened by nachoaldamav 3
  • Error: EXDEV: cross-device link not permitted,

    Error: EXDEV: cross-device link not permitted,

    Provide installed version

    [Ultra] v0.7.0

    Current platform

    Windows, WSL (Ubuntu 22.04 LTS)

    Describe the Bug

    My old project is up and running on an other hard disk partition

    • Run ultra clear to clean up
    ✔ Cleared cache!
    ✔ Cleared node_modules!
    ✔ Cleared all packages!
    
    • Run ultra install
    [Ultra] v0.7.0 (448.52ms)
    ℹ Using https://registry.npmjs.org/ as registry...
    ⚡ Installed local packages in 0.20 ms!
    ✖ Error: EXDEV: cross-device link not permitted, link '/root/.ultra-cache/@nestjs/config/2.2.0/.ultra' -> '/mnt/e/project/api/node_modules/@nestjs/config/.ultra' (file: /root/.ultra-cache/@nestjs/config/2.2.0/.ultra, target: /mnt/e/project/api/node_modules/@nestjs/config/.ultra)
    ✖ Error: EXDEV: cross-device link not permitted, link '/root/.ultra-cache/@nestjs/config/2.2.0/.vscode/settings.json' -> '/mnt/e/project/api/node_modules/@nestjs/config/.vscode/settings.json' (file: /root/.ultra-cache/@nestjs/config/2.2.0/.vscode/settings.json, target: /mnt/e/project/api/node_modules/@nestjs/config/.vscode/settings.json)
    ✖ Error: EXDEV: cross-device link not permitted, link '/root/.ultra-cache/@nestjs/config/2.2.0/LICENSE' -> '/mnt/e/project/api/node_modules/@nestjs/config/LICENSE' (file: /root/.ultra-cache/@nestjs/config/2.2.0/LICENSE, target: /mnt/e/project/api/node_modules/@nestjs/config/LICENSE)
    ✖ Error: EXDEV: cross-device link not permitted, link '/root/.ultra-cache/@nestjs/config/2.2.0/README.md' -> '/mnt/e/project/api/node_modules/@nestjs/config/README.md' (file: /root/.ultra-cache/@nestjs/config/2.2.0/README.md, target: /mnt/e/project/api/node_modules/@nestjs/config/README.md)
    

    Expected Behavior

    Fix this solution for cross device.

    Template command (if applicable)

    No response

    To Reproduce

    • Create nestjs app on device E:
    • Run ultra install
    bug 
    opened by nhahv 2
Releases(v0.8.7)
Owner
Nacho Aldama
Nacho Aldama
our features are few but we provide the best and it is not uncommon to find in other npmjs

hikki-me our features are few but we provide the best and it is not uncommon to find in other npmjs Installation Install hikki-me with npm npm install

(Anto) 10 Jul 10, 2022
NPM Alternative (WIP)

FNPM (WIP) FNPM is an "alternative" for NPM, it is faster and saves more space. DISCLAIMER ?? This project was made to learn more about Package Manage

Nacho Aldama 533 Dec 29, 2022
🐧 [WIP] Genshin Impact Chat Bot

Genshin Bot Config $ cp config/bot.sample.ts config/bot.ts Development $ yarn $ yarn dev $ open http://localhost:7001/ Npm Scripts Use yarn lint to ch

CanisMinor 2 Dec 20, 2021
[WIP] WebGL API implementation for Deno, built on GLFW using FFI.

Note I'm no longer working on this project because I have just realized macOS does not support OpenGL ES API, and adding Desktop GL backend to this mo

DjDeveloper 14 Jun 11, 2022
[WIP] A solid directive for adding colorful shadows to images.

solid-cosha A solid directive for adding colorful shadows to images (based on cosha). Quick start Install it: yarn add solid-cosha Use it: import { co

Robert Soriano 2 Feb 3, 2022
📝 [WIP] Write your reports in markdown, and get them in docx.

md-report What's md-report The repo name md-report stands for both "Write your reports in markdown, and get them in docx." and "Made report again." ("

Yiyang Sun 8 Jun 12, 2022
A programming language (WIP)

Umo programming language Concept Effect system (not implemented) Subtyping (not implemented) Opt-in shared mutability (not implemented) Gradual typing

Masaki Hara 15 Feb 25, 2022
WIP : Un pictionary mais avec 15 trait droits (sans courbes)

TODO Signer l'ID Ban dès le lobby Limiter la taille des pseudos Joueur déconnecté avec une couleur Afficher un message en cas de kick Limiter les devi

Jonathan 11 Apr 25, 2022
Minimal framework for SSG (WIP, PoC)

Frostleaf https://zenn.dev/0918nobita/scraps/64a268583b8463 Development Install tools asdf plugin-add nodejs asdf plugin-add pnpm asdf install Install

0918nobita 7 Jun 4, 2022
WIP: Hevm based debugger for hardhat-huff projects

Huff Debug An easy hevm debug integration for hardhat-huff projects What does it do: Speed up your development experience by gaining rich feedback in

Huff 6 Jul 15, 2022
🖼️ Bringing Material Design 3 to the Astro Blog. [WIP]

??️ Gumori You [WIP] Bringing Material Design 3 to the Astro Blog. ?? Contributing If you're interested in contributing to Gumori You, pls read the fo

!mportantImport 4 Oct 16, 2022
🚧 WIP: Bartosz Milewski's "Category Theory for Programmers" Korean translation 📚

프로그래머를 위한 범주론 본 레파지토리는 Bartosz Milewsk의 Category Theory for Programmers을 번역하며 학습한 레파지토리입니다. ?? 목차 Part 1. 범주:합성의 본질 타입과 함수 크고 작은 범주 Kleisli Categories

Minsu Kim 22 Aug 18, 2022
WIP: Power-pack for Turbo Streams

TurboPower turbo_power is a power-pack for Turbo Streams. It provides Turbo Streams with a bunch of new actions and additionally adds the morph action

Marco Roth 123 Jan 4, 2023
(WIP) A GitHub action that backs up your repo's source code to IPFS.

repo-backup-ipfs A GitHub Action that backs up your repository's source code to IPFS. How to use Create a workflow file in your repository at .github/

Dhaiwat Pandya 4 Oct 9, 2022
[WIP] n8n nodes that cover the Zoho "Books" API

n8n-nodes-starter This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter

Vrishin Patel 6 Nov 26, 2022
WIP - Boilerplate for Node.js + TypeScript + Prisma + Serverless

Boilerplate Node.js + TypeScript for Serverless WIP - Boilerplate Node.js + TypeScript + Prisma + Serverless Setup Update project information In serve

Fernando Daciuk 18 Oct 16, 2022
(WIP) A GitHub action that backs up your repo's source code to Arweave.

repo-backup-arweave A GitHub action that backs up your repo's source code to Arweave. How to use Create a workflow file in your repository at .github/

Dhaiwat Pandya 9 Sep 11, 2022
(WIP) Bilibili-live danmu listener with type.

blive-message-listener Bilibili-live danmu listener with type. Bilibili 直播间弹幕监听器,支持类型输出。 Features 完整的类型支持 Install npm i blive-message-listener Usage

Diu 23 Dec 28, 2022
(WIP) Bilibili-live danmu listener with type.

blive-message-listener Bilibili-live danmu listener with type. Bilibili 直播间弹幕监听器,支持类型输出。 Features 完整的类型支持 Install npm i blive-message-listener Usage

Diu 4 Sep 22, 2022