Git Product home page Git Product logo

github's Introduction

JSPM CLI

JSPM CLI is the package management of the JSPM project, supporting import map package management.

Getting Started | Documentation | FAQ


  • Resolution against node_modules for local development workflows.
  • Versioned, locked dependency management against the local package.json.
  • Tracing and installing the full dependency tree of an application.
  • Complete NPM-like module resolution that supports conditional environments and package entry points.
  • Support for a wide range of CDNs, such as jspm.io, jsDeliver, esm.sh and unpkg.
  • Import map extraction/injection into HTML files, with module preloading and integrity attributes.

See the documentation and getting started guide on jspm.org.

Contributing

Build and test workflows use Chomp.

License

Apache-2.0

github's People

Contributors

aluanhaddad avatar brendonparker avatar cehoffman avatar chalker avatar computmaxer avatar crisptrutski avatar francisbrito avatar frankwallis avatar gu1 avatar guybedford avatar jschultzmn avatar koltesdigital avatar kudos avatar seph-m avatar speigg avatar subesokun avatar tamird avatar v-jiepeng avatar yeban avatar zhuangya avatar

Stargazers

 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

github's Issues

Invalid tar error when trying to install gauge.js

I can't seem to be able to install gauge.js from github, i get an error about an invalid tar file.
I tried adding debugging statements to see what file was downloaded, and I can download the tar and extract it just fine.

$ jspm install github:bernii/gauge.js
     Looking up github:bernii/gauge.js
     Creating registry cache...
     Downloading github:bernii/[email protected]

warn Error on download for github:bernii/gauge.js, retrying (1).
     Error: invalid tar file
         at Extract.Parse._startEntry (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:145:13)
         at Extract.Parse._process (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:127:12)
         at BlockStream.<anonymous> (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:47:8)
         at BlockStream.emit (events.js:107:17)
         at BlockStream._emitChunk (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:145:10)
         at BlockStream.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:45:10)
         at Extract.Parse.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:81:23)
         at IncomingMessage.ondata (_stream_readable.js:540:20)
         at IncomingMessage.emit (events.js:129:20)
         at readableAddChunk (_stream_readable.js:163:16)

warn Error on download for github:bernii/gauge.js, retrying (2).
     Error: invalid tar file
         at Extract.Parse._startEntry (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:145:13)
         at Extract.Parse._process (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:127:12)
         at BlockStream.<anonymous> (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:47:8)
         at BlockStream.emit (events.js:107:17)
         at BlockStream._emitChunk (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:145:10)
         at BlockStream.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:45:10)
         at Extract.Parse.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:81:23)
         at IncomingMessage.ondata (_stream_readable.js:540:20)
         at IncomingMessage.emit (events.js:129:20)
         at readableAddChunk (_stream_readable.js:163:16)

warn Error on download for github:bernii/gauge.js, retrying (3).
     Error: invalid tar file
         at Extract.Parse._startEntry (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:145:13)
         at Extract.Parse._process (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:127:12)
         at BlockStream.<anonymous> (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:47:8)
         at BlockStream.emit (events.js:107:17)
         at BlockStream._emitChunk (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:145:10)
         at BlockStream.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:45:10)
         at Extract.Parse.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:81:23)
         at IncomingMessage.ondata (_stream_readable.js:540:20)
         at IncomingMessage.emit (events.js:129:20)
         at readableAddChunk (_stream_readable.js:163:16)

warn Error on download for github:bernii/gauge.js
     Error: invalid tar file
         at Extract.Parse._startEntry (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:145:13)
         at Extract.Parse._process (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:127:12)
         at BlockStream.<anonymous> (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:47:8)
         at BlockStream.emit (events.js:107:17)
         at BlockStream._emitChunk (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:145:10)
         at BlockStream.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/node_modules/block-stream/block-stream.js:45:10)
         at Extract.Parse.write (/home/gu1/xx/node_modules/jspm/node_modules/jspm-github/node_modules/tar/lib/parse.js:81:23)
         at IncomingMessage.ondata (_stream_readable.js:540:20)
         at IncomingMessage.emit (events.js:129:20)
         at readableAddChunk (_stream_readable.js:163:16)

err  Error downloading github:bernii/gauge.js.

warn Installation changes not saved.

Private github repo with travis pro hitting rate limit.

I'm currently getting:

warn GitHub rate limit reached.

I've followed the guide here https://github.com/jspm/jspm-cli/wiki/Registries#auto-configuring-registries and run jspm registry export github and grabbed the token ran it through travis' encrypt tool.

That wasn't working, and after adding the token to environment variables via the web interface I still am hitting rate limit.

I also echoed out the token during the before_install step and it was visible.

For the life of me I just can't work out what's going on :(

Semver branches incorrectly detected

jsPlumb has a branch called 1.7.0. This is the development branch, and gets detected as a stable version.

We need some way to filter out or mark semver branches as unstable.

Response too large (after it was just working)

This just started happening. The strange thing is that it was just working fine.

$ jspm install github:mrdoob/three.js@r70
     Looking up github:mrdoob/three.js
     Updating registry cache...
     Downloading github:mrdoob/three.js@r70

err  Error downloading github:mrdoob/three.js
     Response too large.

warn Installation changes not saved.

The maxRepoSize is still set to 100.

git location service (using git+ssh instead of https download)

Hi

I'd be interested in a Location Service that uses git+ssh instead of https downloads.
This would allow for authentication using a running ssh-agent which I prefer over storing credentials or generating tokens for all packages.
Additionally this would make it possible to install packages from any git repository and not just Github.

As far as I get it, one idea behind using https is to be able to load this directly from the browser, which for git+ssh doesn't work. I'm I mistaken here?

I'm willing to put some work into this, but wanted to ask for other opinions first. Do you think this would be useful? Should it be another Location Service or somehow merged/integrated with this github one?

Provide a useful message for hash installs

It should be possible to easily detect if a version target looks like a hash, and when not found, the GitHub endpoint here can show a warning that commit references are not supported.

Error: tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:782

When attempting to do a jspm install on any of the github components - I get the error -

Error: tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:782

         at ClientRequest.onError (c:\dev\node_modules\jsp
m\node_modules\jspm-github\node_modules\request\node_modules\tunnel-agent\index.
js:174:17)
         at ClientRequest.g (events.js:199:16)
         at ClientRequest.emit (events.js:107:17)
         at TLSSocket.socketErrorListener (_http_client.js:271:9)
         at TLSSocket.emit (events.js:129:20)
         at onwriteError (_stream_writable.js:317:10)
         at onwrite (_stream_writable.js:335:5)
         at WritableState.onwrite (_stream_writable.js:105:5)
         at fireErrorCallbacks (net.js:456:13)
         at TLSSocket.Socket._destroy (net.js:495:3)

I've set the https_proxy, http_proxy variables and strictSSL=false

I'm also behind a corporate proxy - I think it has to do with jspm not recognizing the strictSSL=false variable. Any thoughts on how I can resolve this error?

Have rate limit errors stop and ask for credentials on the spot

This improves the install experience over the full stalling we have currently.

The API issue to handle is allowing configuration to be saved at any point in time via any hook. It may be worth having a constructor option provided for "saveConfig", or something to that effect.

Error EPERM rename tmp-loader

I'm trying to install Aurelia Skeleton Navigation from github.

https://github.com/aurelia/skeleton-navigation/releases

I ran the jspm registry config github command and the test for my credentials (via a token) was successful. Prior to that, I got the warning about the rate limit.

When I run jspm install -y, it starts downloading and installing but eventually gets an error similar to the following:

err Error: EPERM, rename 'C:\Users\ttrentham.jspm\packages\github\[email protected]'

I actually opened an issue with Aurelia which they closed.

aurelia/skeleton-navigation#65

I tried the last suggestion which was to execute it from my home instead of at work behind our firewall. I get the same issue.

This is on a Windows 8.1 machine. I'm running my command prompt as an administrator. I've got GitHub for Windows installed.

Any other help would be appreciated.

github registry should not require git client

I have been experimenting with jspm for several months now with the hopes of evangelizing it to a wider audience at my company, but there are a few concerns that are holding me back, this is one of them

why does the github registry require both the git client and the github api?

In case my reason for concern isn't obvious, each point of coupling increases the surface area for something to go wrong.

It appears that the git client is used to lookup available versions (git tags).

It appears that you can also do this with the github api

curl  https://api.github.com/repos/webdriverio/webdriverio/git/refs/tags

Is there a good reason the git client is needed? If not, should I start a pull request or is this already in the works?

Race condition in getVersion

Isn't there a race conditions in this module?

I see that the download method makes two calls to request that are intentionally run in parallel. But in getVersions, the request response handler is dependent upon versions, but versions is not set until the exec finishes. Exec is async, isn't it? Even if it is sync, how the code is expected to work isn't very clear.

I'd like to fix this issue, as it is causing me some trouble, but I need to fully understand the intent of the code. Is the request simply to see if there is a redirect? If there is a redirect, what is supposed to happen? I assume the git ls-remote exec is where the actual versions are retrieved.

Any chance you could please explain the high-level logic that is supposed to take place not only in getVersions, but in download as well?

Proper rate limit error

The rate limit response looks like:

{
  "server": "GitHub.com",
  "date": "Wed, 07 Jan 2015 14:55:25 GMT",
  "content-type": "application/json; charset=utf-8",
  "status": "403 Forbidden",
  "x-ratelimit-limit": "60",
  "x-ratelimit-remaining": "0",
  "x-ratelimit-reset": "1420644334",
  "x-github-media-type": "unknown",
  "x-xss-protection": "1; mode=block",
  "x-frame-options": "deny",
  "content-security-policy": "default-src 'none'",
  "content-length": "246",
  "access-control-allow-credentials": "true",
  "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
  "access-control-allow-origin": "*",
  "x-github-request-id": "C59B0418:6AE3:7AA50:54AD48DC",
  "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
  "x-content-type-options": "nosniff"
}

Limit full clone

Do a ls-remote without a full clone.

Then see if it is possible to skip the full clone entirely for fetch in case of a large history.

Large download timeouts

Try jspm install github:google/material-design-icons. This downloads from the zip release archive.

Somehow we're stalling after extraction, but the hash info is being written so that cancelling and restarting shows it is up-to-date. This may be something in the post-processing phase, or a timeout.

Consider always adding `format:global` on github without an override

This would be a breaking change.

The idea is that most installs from GitHub break because no package has CommonJS or AMD dependencies that properly resolve in place. We should just treat everything as a global, and it will probably give the most luck.

The next mistake users will make then is manually installing global dependencies like jQuery, but perhaps that is the lesser evil to an easier adoption path.

jspm not preserving module alias from package.json to config.js

When I have a dependency with an alias in package.json:

  "jspm": {
    "dependencies": {
      "jade-compiler": "github:jadejs/[email protected]"
    }
  }

and I run jspm install jade=github:johnsoftek/[email protected], jspm creates this entry in config.js:

    "jade": "github:johnsoftek/[email protected]",
    "github:johnsoftek/[email protected]": {
      "jade": "github:jadejs/[email protected]"
    }

rather than:

    "jade": "github:johnsoftek/[email protected]",
    "github:johnsoftek/[email protected]": {
      "jade-compiler": "github:jadejs/[email protected]"
    }

The jade-compiler alias is not preserved, so when I require('jade-compiler'), it fails.

I'm guessing that adding a jade-compiler entry to the jspm registry would likely solve the problem. But I think this is a bug that makes it difficult to test a plugin or module before requesting a registry update.

Misleading error when ~/.netrc is invalid

[email protected]
[email protected]

Just had a silly problem, I figured I should report it so it's at least documented somewhere.

% jspm registry config github

err  Registry handler`jspm-github` not installed.

In fact the registry is installed, but it crashed at some point because my ~/.netrc is invalid. It started with

//machine localhost

Fixing the file or deleting it ( if you don't need it ) fixes the problem.

Release asset url download with auth

Adding an auth at https://github.com/jspm/github/blob/master/github.js#L380, gives a 400 response:

{"x-amz-request-id":"3C1EEAB7D070942F","x-amz-id-2":"52SF9wE63X2hzL+Vs3TwoLJ/latodEC+lN9po+T6/2ys2HFr81A2ck3EWIWMs/DW6eemz+4yD0w=","content-type":"application/xml","transfer-encoding":"chunked","date":"Wed, 07 Jan 2015 15:26:34 GMT","connection":"close","server":"AmazonS3"}

This is requesting the url provided from the API call in https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository.

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.