GithubHelp home page GithubHelp logo

rlidwka / yapm Goto Github PK

View Code? Open in Web Editor NEW
76.0 10.0 12.0 19.91 MB

yapm is a package manager for node.js (npm fork)

License: Other

Shell 3.27% JavaScript 94.60% CSS 0.92% Python 0.01% Makefile 1.20%

yapm's Introduction

"yapm" is a package manager for node.js (npm fork)

screenshot

Changes

  • improvements in package.json handling:

    • preserve formatting of package.json files
    • support for package.json5 and package.yaml files (docs, #3336, #4482).
    • if package.json or any other json document is malformed, show where the error is (#3869).
  • formatting changes:

    • logs have much more clean formatting
    • added a progress bar showing download progress (#1257)
    • better search output with github repository links
  • multiple registries support

    • registry-specific configs + security fixes
    • easier switch between different npm registries
  • semver support for packages installable from github (docs, #3014, #3328, #3442, #3511, #4527).

  • a bunch of other minor changes (docs, #4573).

Installation

# install it as a global module (maybe with sudo)
$ npm install -g yapm

# run it just as you'd run npm itself
$ yapm install whatever

# if you want to write 'npm' and hate the name change,
# you might want to use an alias (i.e. write into ~/.bashrc)
$ alias npm=yapm

Upstreams

Pulled from visionmedia/npm

  • Github semver support
  • Output formatting changes
  • Better search output

Pulled from npm/npm

  • Everything else, this repository is synced with upstream at least once a week

yapm's People

Contributors

alexkwolfe avatar arlolra avatar bcoe avatar chrismeyersfsu avatar davglass avatar deanlandolt avatar domenic avatar dylang avatar edef1c avatar evnm avatar iarna avatar indexzero avatar isaacs avatar kenany avatar luk- avatar mfncooper avatar mmalecki avatar othiym23 avatar pvorb avatar ralt avatar raynos avatar reid avatar rlidwka avatar robertkowalski avatar smikes avatar timoxley avatar tj avatar trentm avatar yhpark avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yapm's Issues

Non-GitHub private repository semver

Is there a plan to support semver with private repositories that are not on GitHub? It could retrieve the tags (using the loaded SSH key) and find the most recent one that matches against the specified semvar string.

Something like:

"dependencies": {
    "git+ssh://myprivatesite.com/project/repo": "0.2.x",
}

Still maintained?

@rlidwka Is this repo still maintained? I see it hasn't been synced with upstream since last January.

We're still using yapm and while the improvements are great, it still tickles me that it's now falling behind the main npm. As great as they are, I could probably do without all the improvements yapm provides but the JSON5 support, and that's solely for the comments support. I see npm/read-package-json#46 which gives me hope, but I'm not holding my breath.

Moreover, since the switch from npm/yapm 1.x to 2.x, the --save and --save-dev commands don't save back to the JSON5 anymore, even though the packages get installed. If this repo is still maintained I could always open a separate issue for that.

Thank you for your great work!

"pack" command

... that packs all listed dependencies (except dev maybe?).

progress bar

This is apt-get's progress bar:

Get:13 http://archive.ubuntu.com/ubuntu/ saucy/main groff-base amd64 1.22.2-3 [719 kB]
4% [13 groff-base 298 kB/719 kB 41%]                                 196 kB/s 4min 11s 

yum:

Downloading Packages:
mc-4.7.0.2-3.el6.x86_64.rpm                                          | 1.6 MB     00:00     
Running Transaction
  Installing : 1:mc-4.7.0.2-3.el6.x86_64 [#######                                     ] 1/1

We'll probably need something like that.

Broken npm dependency?

I ran afoul of this error when trying to install yapm:

npm ERR! Error: setuid user id does not exist
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:44:16
npm ERR! at ChildProcess.exithandler (child_process.js:635:7)
npm ERR! at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR! at maybeClose (child_process.js:743:16)
npm ERR! at Socket. (child_process.js:956:11)
npm ERR! at Socket.EventEmitter.emit (events.js:95:17)
npm ERR! at Pipe.close (net.js:465:12)

atomic update

We should install packages to "node_modules.tmp" folder and then do a "mv node_modules.tmp node_modules". So modules can be require'd while npm is updating.

_auth doesn't depend on repository

Copy-pasting my issue from npm/npm#4711 :


Login and password are stored and transferred over a wire in plain text.

It might be fine, but it's too easy to send them into the wrong place:

$ npm adduser
$ npm publish --reg http://localhost:12345/

$ nc -l 12345
POST /_session HTTP/1.1
host: localhost:1234
accept: application/json
content-type: application/json
content-length: 27
Connection: keep-alive

{"name":"foo","password":"bar"}

Whoops.

Add-auth option is especially dangerous, because npm install whatever --registry http://localhost:12345/ --add-auth=true will send your credentials even on install.

Web browser will never send your password to a different domain, so npm behaviour is unexpected and might open a few social engineering possibilities.

Ideally, the fix would be to lock "_auth" string with a "repository" it belongs to, and drop it if repository changes for whatever reason.

failed tests

upstream fails these tests:

not ok test/tap/ignore-scripts.js ..................... 50/51
not ok test/tap/lifecycle-signal.js ..................... 1/3
not ok test/tap/prepublish.js ........................... 1/2
total ............................................... 872/876

Current yapm adds these failures:

not ok test/tap/ls-no-results.js ........................ 1/2
not ok test/tap/outdated-json.js ........................ 0/1

visionmedia/npm adds these:

(.....)
not ok test/tap/peer-deps-invalid.js .................... 1/2
not ok test/tap/peer-deps-without-package-json.js ....... 1/2
not ok test/tap/prepublish.js ........................... 1/2
not ok test/tap/url-dependencies.js ..................... 2/3

investigating...

make `run` print available scripts in error msg?

Make output like this:

$ yapm run
 error - npm run-script [<pkg>] <command>
         Available scripts are:
          - test:       "node ./test/run.js && tap test/tap/*.js"
          - tap:        "tap test/tap/*.js"
          - prepublish: "node bin/npm-cli.js prune --prefi[...]
          - dumpconf:   "env | grep npm | sort | uniq",
          - echo:       "node bin/npm-cli.js"
 error - not ok code 0

npm/npm#4888

remove latest tag?

Currently yapm install something equals to yapm install something@latest, where "latest" is a most recent package.

Desirable behaviour is to install highest semver version available.

Maybe "default" tag?

Merge [email protected]

I was waiting for it to be released to merge it all at once. Now it seems like that time has come.

Ohh... that diff is scary...

Is this repo dead?

Any alternative you guys suggest for people who want to use yaml or json5 instead for the package.json file?

support gzip encoding of HTTP requests

It'll dramatically decrease an amount of transferred data:

$ curl http://registry.npmjs.eu/yapm | wc -c
150725
$ curl http://registry.npmjs.eu/yapm | gzip | wc -c
10010

npm init

  1. Support for configuring a format like npm init --json5 or npm init --yaml.
  2. Show result before writing it (currently it shows json).

show parsing errors when invalid json exists

This is not helpful:

alex@elu:/tmp$ cp /etc/passwd package.json
alex@elu:/tmp$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Failed to parse json
npm ERR! Unexpected token r
npm ERR! File: /tmp/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR! 
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.