Giter VIP home page Giter VIP logo

registry's Introduction

jspm Registry

The raw registry file can be viewed at https://github.com/jspm/registry/blob/master/registry.json.

Pull requests welcome for registry.json and the package_overrides folder.

All registry entries are managed here through GitHub, moderated by the registry maintainers.

Registry

The currently supported endpoints are:

  • Github
  • npm

The registry provides a simple mapping in the file registry.json, which maps a shortname (bootstrap) to a canonical endpoint name (github:twbs/bootstrap). It is simply a convenience for installing through jspm.

Package.json Overrides

The registry also provides a service for overriding the package.json of existing repos.

This is useful for enabling jspm functionality in the package.json when direct access to the underlying repo is not possible.

jspm uses the package.json for modular package configuration, including:

  • Setting the main entry point (main)
  • Shim config for globals (shim)
  • Map configuration (map)
  • Module format (format)

In this way, the right package options can make any package play well with jspm, without needing any manual configuration at all.

Submitting a pull request to the original repo should be done at the same time as this is designed as a temporary service only and not a long term solution to the configuration problem.

Read more about configuring packages for jspm in the wiki.

Examples of jspm package.json files for common packages can be found in the package overrides section of the registry.

Testing Package Overrides

Package overrides may take some testing to get exactly the right configuration.

See the testing guide within Configuration Packages for jspm.

Submitting a Package Override

To submit a new package override:

  • Fork this repo, then create the file package-overrides/[endpoint name]/[repo name]@x.y.z.json.
  • Provide the correct configuration according to the configuration guide above.
  • Submit a pull request.
  • If the configuration is correct, this will be accepted and that will instantly enable the functionality on the endpoint.

The overrides will apply for all versions semver compatible with the override version, with the highest version override taking precedence.

Registry Maintainers

Anyone is welcome to assist with reviewing override changes. Overrides are reviewed based on checking syntax, backwards-compatibility and best-practises. The registry maintainers are selected based on their ability to implement these guidelines. The goal is for this to be a diverse group across timezones to provide prompt reviews for overrides.

registry's People

Contributors

2fd avatar 32graham avatar aaike avatar aluanhaddad avatar bgoscinski avatar capaj avatar carlosagsmendes avatar computmaxer avatar davinkevin avatar delebash avatar djindjic avatar douglasduteil avatar eisenbergeffect avatar guybedford avatar jarreddebeer avatar jdanyow avatar lookfirst avatar meirionhughes avatar munter avatar nicklasb avatar nicolashemonic avatar rajvirtual avatar robwormald avatar salfield avatar smajl avatar subesokun avatar tauren avatar theefer avatar thomasburleson avatar trusktr 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

registry's Issues

`jspm install angular` is broken

If I run jspm install angular, it uses github:angular/bower-angular, as per the registry.json. However, the file created at /jspm_packages/github/angular/[email protected] looks like this:

export * from "github:angular/[email protected]/bower-angular";

when it should be

export * from "github:angular/[email protected]/angular";

I'd thought the package.json override in this repo specifying "main": "angular.min" should fix this... so I'm not sure where it's breaking down (or if it's just my understanding).

auth0-js

auth0-js depends on zuul which has a commit id reference causing
unable to resolve defunctzombie/stacktrace.js#07e7b95

Need to override dependencies to:

"dependencies": {
"Base64": "~0.1.3",
"debug": "~1.0.4",
"json-fallback": "0.0.1",
"jsonp": "~0.0.4",
"packageify": "^0.2.0",
"qs": "git://github.com/jfromaniello/node-querystring.git#fix_ie7_bug_with_arrays",
"reqwest": "^1.1.4",
"trim": "~0.0.1",
"winchan": "^0.1.1",
"xtend": "~2.1.1"
},

hammerjs not being install as dep to vue-touch

hammerjs is in the registry, is it supposed to install as a dep when I install vue-touch like such
jspm install github:vuejs/vue-touch

it's listed as a dep in the package.json of vue-touch.

Readme: Semver Compatibility?

The overrides will apply for all versions semver compatible with the override version, with the highest version override taking precedence.

What does this mean exactly? Does semver compatible include minor version changes or only patch versions? And if I try to install a version of a package that is newer than the override that is in the registry, what happens? For example, if the registry contains an override for version r70 of three.js, and I try to jspm install version r71, will jspm use the r70 override that it knows about? (I hope so, but it's not clear to me). And how are major versions handled?

ng-infinite-scroll override not being used

Doing jspm install ng-infinite-scroll doesn't load its override:

$  sudo jspm install ng-infinite-scroll
     Updating registry cache...
     Looking up github:sroze/ngInfiniteScroll
     Downloading github:sroze/[email protected]

warn No main entry point detected for github:sroze/[email protected].
     Try adding an override, or set the package.json "main": false if this is the intention.

ok   Installed ng-infinite-scroll as github:sroze/ngInfiniteScroll@^1.2.0 (1.2.0)
ok   Install tree has no forks.

ok   Install complete.

The only way for me to make it work is to use: jspm install ng-infinite-scroll -o "{ main: 'build/ng-infinite-scroll' }".

I couldn't find where in jspm the overriding files are being loaded.

Thanks for the help :)

Should I commit `config.js` and `jspm_packages` into repository?

I'm experimenting with jspm.io. I have some questions:

  • I'd like to know if config.js and/or jspm_packages should be commited to the repository or not.

  • I prefer not to commit jspm_packages to the repository, with similar reason for node_modules.

  • If I commit only config.js, I'm not sure if when someone else check out the code, and type jspm install, will config.js stay the same or not. If config.js is so constantly updated, I prefer not to put config.js inside source tree.

  • But config.js also contains some custom configuration such as custom mapping for SystemJS plugins:

    "jsx": "app/transformers/jsx",
  • When I put the "map" key in package.json, delete config.js, and run jspm install, the "map" key I specified in the JSON does not show up inside the generated config.js.

  • So, is config.js meant to be edited by human or the CLI?

Angular loading minified version

Was there some special intention to override Angular to it's minified version? I really would like to load all my libs unminified during development.

If this is unintended, I will soon prepare a PR which corrects this.

select2

Seems the override expired. Needed:

jspm install select2 -o "{ shim: { select2: ['jquery'] }, dependencies: { jquery: '*' } }"

ace bug

System.import("ace").then(function (ace) {
    var editor = ace.edit("editor");
    editor.getSession().setMode("ace/mode/javascript"); 
})

print

GET http://localhost:63342/jshow-ui/mode-javascript.js

no found!

How to add ng-grid 3.x.x?

When I run jspm install github:angular-ui/ng-grid, version 2.0.13 is installed. I am trying to figure out how to create an override that will install version 3.0.0-rc.12. It looks like there is not a github release, so should I be doing a jspm install github:angular-ui/ng-grid@master? Even when I do that, there is no built file to reference. Assistance is appreciated, thanks!

https://github.com/angular-ui/ng-grid

How to shim things.

I'm not entirely clear on how shimming works. We should expand the wiki on this.

@guybedford Could you explain what exactly is going on in the shim of this bootstrap example?

{
  "registry": "jspm",
  "dependencies": {
    "jquery": "*",
    "css": "*"
  },
  "shim": {
    "js/bootstrap": {
      "deps": ["jquery", "../css/bootstrap.css!"],
      "exports": "$"
    }
  }
}

Package overrides dependencies

I have thought today about why there are two places to describe dependencies in package overrides files (shim/deps and dependences). For example (ionic again, sorry :D):

{
  "directories": {
    "lib": "release"
  },
  "main": "js/ionic",
  "shim": {
    "js/ionic": {
      "deps": ["../css/ionic.css!"]
    },
    "js/ionic-angular": {
      "deps": ["angular", "./ionic"]
    }
  },
  "registry": "jspm",
  "dependencies": {
    "css": "0.1.0",
    "angular": "^1.3.2",
    "angular-animate": "^1.3.2",
    "angular-sanitize": "^1.3.2",
    "angular-ui-router": "0.2.10"
  }
}

does it mean that import "ionic" will pull only ionic.css? but why dependencies section have 5 references if they are not imported with ionic (or any other defined in main section)? If all of them are dependencies, they are necessary to make main lib works? I guess I haven't understood it in right way because I've just found that my sample jspm project doesn't work if I comment this tree lines on top of this, no matter what there is configuration in registry package dependencies for this files.

Thanks for you time!

hammer or hammerjs

should the hammer package be defined as hammer or hammerjs ?

when installing hammer now from jspm

jspm install hammer

it ends up being defined as hammer and can be required without problems.

but when jquery.hammer is also used then it has to be named hammerjs , because the jquery.hammer.js script requires hammer as hammerjs

in my config.js i actually have to manually change it to hammerjs for this to work.

so should the hammer entry in this repository be changed to hammerjs ? or should hammerjs simply be added as an alias to hammer ?

can't get lumx from github installed without manually configuring it.

when I : jspm github:lumapps/lumx
I get: 'Try adding an override, or set the package.json "main": false if this is the intention.'

when I : jspm github:lumapps/lumx -o "{main: 'dist/js/lumx'}"
I get: 'Try adding an override, or set the package.json "main": false if this is the intention.'
I don't know what the override does exactly, explanation would be great.

To make this work, I go into jspm_packages/github/lumapps/ and create the appropriate file to module.exports the entry file. Then I go into dist/js/lumx.js and at the top "format global"; "exports lumx"; Where lumx is the angular module I had to save as a global.

I know this is not the right way to get github repos to work, and there must be something I am missing.

react-bootstrap

jspm install npm:react-bootstrap -o "{peerDependencies: {'react': '0.12.2'}}"

jspm install mocha throws Invalid Version error

Using [email protected]:

▶ jspm install mocha
No package.json found, would you like to create one? [yes]: 
Would you like jspm to prefix its package.json properties under jspm? [yes]: 
Enter packages folder [jspm_packages]: 
Enter config file path [config.js]: 
Configuration file config.js not found, create it? [yes]: 

     Updating registry cache
     Checking versions for npm:mocha

err  TypeError: Invalid Version: 1
         at new SemVer (/usr/lib/node_modules/jspm/node_modules/semver/semver.js:271:11)
         at SemVer.compare (/usr/lib/node_modules/jspm/node_modules/semver/semver.js:310:13)
         at Function.compare (/usr/lib/node_modules/jspm/node_modules/semver/semver.js:424:31)
         at /usr/lib/node_modules/jspm/lib/package.js:304:25
         at Array.sort (native)
         at /usr/lib/node_modules/jspm/lib/package.js:303:6
         at $$$internal$$tryCatch (/usr/lib/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:470:16)
         at $$$internal$$invoke~/projects/foo         Callback (/usr/lib/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:482:17)
         at $$$internal$$publish (/usr/lib/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:453:11)
         at $$rsvp$asap$$flush (/usr/lib/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:1531:9)

warn Installation changes not saved

Extending existing overrides broken.

If I run

jspm install famous=github:trusktr/famous@trusktr -o '{ "registry": "jspm", "directories": { "lib": "src" }, "dependencies": { "famous-polyfills": "^0.3.0", "css": "^0.1.0" }, "shim": { "*/*": { "deps": ["famous-polyfills", "../core/famous.css!"] } } }'

I get

err  ReferenceError: extend is not defined
         at /Users/trusktr/src/trusktr/portfolio/node_modules/jspm/node_modules/jspm-registry/registry.js:132:7
         at $$$internal$$tryCatch (/Users/trusktr/src/trusktr/portfolio/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:470:16)
         at $$$internal$$invokeCallback (/Users/trusktr/src/trusktr/portfolio/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:482:17)
         at $$$internal$$publish (/Users/trusktr/src/trusktr/portfolio/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:453:11)
         at $$rsvp$asap$$flush (/Users/trusktr/src/trusktr/portfolio/node_modules/jspm/node_modules/rsvp/dist/rsvp.js:1531:9)
         at process._tickCallback (node.js:419:13)

at registry.js:132:7.

Importing Superagent fails

Tried all kinds of variations, bumping requirements to same edge versions. No dice.
When issuing import Request from 'superagent'; I get:

    Uncaught TypeError: Object prototype may only be an Object or null: undefined
    system.js:1 Uncaught Error evaluating http://localhost:8000/jspm_packages/npm/[email protected]/lib/[email protected]/readable.js

What am I doing wrong here?

mocha

We have mocha@^1.21.5 working, but not the latest version. It would be good to get an override going for that.

//cc @stuartc

auth0

I've abandoned trying to use the npm version because it requires some browserify packaging stuff I don't know how to deal with.

The github package actually comes with a build in ./build/auth0-lock.min.js and I've been trying to create an override for it here: https://github.com/volak/registry/blob/master/package-overrides/github/auth0/lock%407.1.1.json

I am so close, but need help with the final bit.

If I do this:

System.import("lock").then((auth0) => {
            var lock = new auth0('key', 'instance.auth0.com');
            console.log(lock);
        });

It works!

But when I do this:

import {Auth0Lock} from 'lock';

Auth0Lock is undefined

Add [email protected]

Hi

I'm trying to add https://github.com/necolas/normalize.css to the registry but I can't find out how to test it

I start using

jspm install normalize.css=github:necolas/normalize.css -o "{package override}"

with:

// following https://github.com/jspm/registry/blob/824372c2169cf0333ca7e92f56c00ee36a0b1388/package-overrides/github/twbs/bootstrap%403.1.0.json
{
  "name": "normalize.css",
  "registry": "jspm",
  "dependencies": {
    "css": "*"
  },
  "shim": {
    "normalize.css": {
      "deps": ["./normalize.css!"]
    }
  }
}

but it's always trying to load a normalize.css.js file...

Is it normal ?

  • All registered package must have a main js file in jspm ?
  • Package with only css files aren't suppose to be there ?
  • I'm doing something wrong ?

npm:[email protected] support

Two issues currently:

  1. Minification fails on invalid JS, which needs a softer error message.
  2. Sizzle dependency is not specified in package.json so reverts to jspm registry. All dependencies must always be loaded from npm.

Adding some mocha here

Hi @guybedford

Like I was a bit lost and uncertain of what is actually registered here I wrote some tests (:

I made a little poke and find out that 19 over 155 packages are broken
( testing made by curl the GitHub API).

It would be cool to validate PR and auto check semver format for example (following #118)

What you think ?

momentjs needs blank override

From jspm/jspm-cli#421

The files folder includes the locale directory - https://github.com/moment/moment/blob/2.8.0/package.json#L68-L79

But the old override is still applying from https://github.com/jspm/registry/blob/6b46ce26972298378337b375b14c01806b1b1d38/package-overrides/github/moment/moment%402.4.0.json.

We need to disable the override by creating a blank override for 2.8.0 (or the first version that does this).

@douglasduteil contributions welcome, that have been tested.

Backbone

I just tried Backbone and it seemed to be loading fine for me in the browser.

@jason can you explain the code you were using that wasn't working. It would be great to look into it.

experiment with decimal.js

decimal.js currently doesn't work in browsers. This is maybe my fault because I have added it into registry, but it has some interesting behavior which I cant define. Before commiting into registry I have tried bellow code and module has been successfully importer:

<html>
  <body>
    <script src="http://jspm.io/system.js"></script>
    <script>
    System.import('npm:decimal.js').then(function(m) {
      console.log(m);
    });
    </script>
  </body>
</html>

Now, if we change npm:decimal.js to registry name decimal.js here is an error:

GET https://registry.jspm.io/decimal.js.js 404 (Not Found)
Same error occurs if module is localy loaded (jspm_packages/system.js).

In case of jspm install decima.js here is a bunch of not found libs:

image

baconjs

Would be good to test and confirm the override for this.

Handling scripts that assume nodejs modules are available if in CommonJS environment

The xls.js script found at https://github.com/SheetJS/js-xls assumes it can use fs and other node.js modules if it is within a CommonJS environment. This means that running it within a browser environment with JSPM is throwing errors such as fs.js not found. The readme indicates the script supports running in a browser and will not load nodejs modules or extra functionality such as cpexcel.

Here are some code snippets:

if(typeof module !== "undefined" && typeof require !== 'undefined') {
    if(typeof cptable === 'undefined') cptable = require('./dist/cpexcel');
    current_cptable = cptable[current_codepage];
}
...
function readFileSync(filename, options) {
    if(fs === undefined) fs = require('fs');
    return parse(fs.readFileSync(filename), options);
}

It seems to me the code would have to be changed to work within JSPM and that simple overrides will not solve this problem. Is this true, and if not, any ideas how to make it work?

web-animation-js

From systemjs/systemjs#345:

//cc @hgl

import "web-animation-js/web-animations-next.dev";
$ jspm bundle move/main
Building the bundle tree for move/main...

err  Error: Error loading "web-animation-js/web-animations-next.dev" at file:/Users/hgl/dev/lab/jspm/web-animation-js/web-animations-next.dev.js
     Error loading "web-animation-js/web-animations-next.dev" from "move/main" at file:/Users/hgl/dev/lab/jspm/lib/main.js
     ENOENT, open '/Users/hgl/dev/lab/jspm/web-animation-js/web-animations-next.dev.js'

Clearly, jspm is trying to bundle the file from my project root folder (Users/hgl/dev/lab/jspm/).

I have tried another npm package where the main entry point exists, and I can import a specific file like <pkgname>/<file> with no problem, but no when the entry point is missing in package.json.

Getting LESS on client and server

The npm version is currently giving:

Error evaluating file:..../jspm_packages/npm/image-size@0.
3.5/lib/index.js
Module ../lib/detector not declared as a dependency.]

This may need some override work.

//cc @whitecolor

Request: use glob

If you could use glob so shims can have things like ./*, **/*.js, or foo/**/bar/*/baz/*.js, that'd be great!

breezejs

Putting this here to track the override so it isn't forgotten. Thanks @jdanyow for working this out.

jspm install github:Breeze/breeze.js -o "{ main: 'build/breeze.min.js', dependencies: { jquery: '^2.1.0', Q: 'npm:q' }, shim: { 'build/breeze.min': { deps: ['jquery', 'Q'] } } }"

allow main array for packages

Consider bootstrap for example, it should be possible to load the js file without getting all the css.

Thus if we could define:

package.json:

{
  "main": ["js/bootstrap", "css/bootrap.css!"]
}

Then we would have:

  jspm.import('bootstrap'); // loads css + js
  jspm.import('bootstrap/js/bootstrap'); // loads just the js

angular-strap

From jspm/jspm-cli#483 by @smajl

After jspm install angular-strap and this line in my code import 'angular-strap' I realised that the jspm_packages/github/mgcrea/[email protected] file is missing (does not get created in the process).

So now have to bypass it with:

import 'github:mgcrea/[email protected]/dist/angular-strap'
import 'github:mgcrea/[email protected]/dist/angular-strap.tpl'

Is that problem with jspm, angular-strap package definition or something on my side?

Materialize css

From jspm/jspm-cli#536 -

Hi there,

I'm having a hard time getting something fairly basic to work and hoping for a nudge in the direction. The issue is similar to another issue but the information listed on the ticket don't seem to help me.

I pushed a test repo up as a discussion point and will outline my issues referencing the lines of code in there. I want to load the main JS file from materializecss and with my current code, I get an error: Uncaught ReferenceError: jQuery is not defined

  1. After going through the basic jspm setup, I tried installing with this command:
    jspm install github:dogfalo/materialize -o "{ main: 'js/bin/materialize.js', shim: { 'js/bin/materialize.js': ['jquery'] } }" However, running this command (or just jspm install github:dogfalo/materialize) doesn't seem to describe any hard dependency on jquery in either package.json or config.js
  2. I tried manually defining a shim to describe the hard dependency
  3. If I try to define information within package.json, any jspm install command removes the changes for whatever reason (tried what is described here)

I'd absolutely love any pointers or tips on how to solve this seemingly simple problem.

Thanks

FlowType (how to exactly configure packages)

I would like to submit a PR for FlowType but have a little question first.
The github repo currently does not have a package.json , only a bower.json.
i forked the repo and added a package.json.

This works but when it is installed the package is registered in the configuration as FlowType.JS
and i can import it as require("FlowType.JS")

Is there any way to change the name from FlowType.JS to just FlowType ?

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.