mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Compare commits
13 Commits
fix/github
...
1.8.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6500b421ce | ||
|
|
0641167b96 | ||
|
|
0d03374dab | ||
|
|
765d8e739d | ||
|
|
0bd318de53 | ||
|
|
aa6b51edc0 | ||
|
|
2c2e5309fd | ||
|
|
b716bc4e3a | ||
|
|
bda400634c | ||
|
|
b01243ac3c | ||
|
|
89902a6919 | ||
|
|
80308a41a6 | ||
|
|
47cc2262e1 |
@@ -11,6 +11,7 @@ node_js:
|
||||
- "4.2"
|
||||
- "5"
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
install:
|
||||
- node --version
|
||||
@@ -29,6 +30,7 @@ matrix:
|
||||
allow_failures:
|
||||
- os: osx
|
||||
- env: "NODE_VERSION=0.11"
|
||||
- env: "NODE_VERSION=7"
|
||||
|
||||
script:
|
||||
- grunt travis
|
||||
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,14 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
## 1.8.0 - 2016-11-07
|
||||
|
||||
- Change default shorthand resolver for github from `git://` to `https://`
|
||||
- Allow to type the entire version when conflict occured, #2243
|
||||
- Allow `owner/reponame` shorthand for registering components, #2248
|
||||
- Allow single-char repo names and package names, #2249
|
||||
- Make `bower version` no longer honor `version` in bower.json, #2232
|
||||
- Add `postinstall` hook, #2252
|
||||
- Allow for `@` instead of `#` for `install` and `info` commands, #2322
|
||||
- Download tar archives from GitHub when possible (#2263)
|
||||
- Change default shorthand resolver for github from `git://` to `https://`
|
||||
- Fix ssl handling by not setting GIT_SSL_NO_VERIFY=false (#2361)
|
||||
- Allow for removing components with url instead of name (#2368)
|
||||
- Show in warning message location of malformed bower.json (#2357)
|
||||
- Improve handling of non-semver versions in git resolver (#2316)
|
||||
- Fix handling of cached releases pluginResolverFactory (#2356)
|
||||
- Allow to type the entire version when conflict occured (#2243)
|
||||
- Allow `owner/reponame` shorthand for registering components (#2248)
|
||||
- Allow single-char repo names and package names (#2249)
|
||||
- Make `bower version` no longer honor `version` in bower.json (#2232)
|
||||
- Add `postinstall` hook (#2252)
|
||||
- Allow for `@` instead of `#` for `install` and `info` commands (#2322)
|
||||
- Upgrade all bundled modules
|
||||
|
||||
## 1.7.9 - 2016-04-05
|
||||
|
||||
@@ -18,7 +18,7 @@ Bower is a large community project with many different developers contributing a
|
||||
|
||||
## Team Meetings
|
||||
|
||||
We communicate through a channel on slack: https://gitter.im/bower
|
||||
We communicate through a channel on Discord https://discord.gg/0fFM7QF0KpZRh2cY
|
||||
|
||||
If you'd like to attend the meetings, please fill the [support form](http://goo.gl/forms/P1ndzCNoiG), and you'll get an invite.
|
||||
|
||||
@@ -29,9 +29,9 @@ The issue tracker is the preferred channel for [bug reports](#bugs),
|
||||
requests](#pull-requests), but please respect the following restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests. Use
|
||||
[Stack Overflow](http://stackoverflow.com/questions/tagged/bower)
|
||||
[Gitter Channel](https://gitter.im/bower/bower)
|
||||
[Mailing List](http://groups.google.com/group/twitter-bower)
|
||||
[Stack Overflow](http://stackoverflow.com/questions/tagged/bower),
|
||||
[Discord Channel](https://discordapp.com/channels/119103197720739842/123728452816732160),
|
||||
[Mailing List](http://groups.google.com/group/twitter-bower),
|
||||
(twitter-bower@googlegroups.com), or
|
||||
[#bower](http://webchat.freenode.net/?channels=bower) on Freenode.
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2016 Twitter and other contributors
|
||||
Copyright (c) 2017 Twitter and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
79
README.md
79
README.md
@@ -1,6 +1,9 @@
|
||||
# Bower - A package manager for the web
|
||||
|
||||
> Bower needs your help. If you're willing to help, please say hello to team@bower.io or [donate](https://salt.bountysource.com/teams/bower)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
> ..psst! While Bower is maintained, we recommend [yarn](https://yarnpkg.com/) and [webpack](https://webpack.js.org/) for new front-end projects!
|
||||
|
||||
[](https://travis-ci.org/bower/bower)
|
||||
[](https://ci.appveyor.com/project/bower/bower)
|
||||
@@ -117,8 +120,82 @@ Note that on Windows for tests to pass you need to configure Git before cloning:
|
||||
git config --global core.autocrlf input
|
||||
```
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/bower#backer)]
|
||||
|
||||
<a href="https://opencollective.com/bower/backer/0/website" target="_blank"><img src="https://opencollective.com/bower/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/1/website" target="_blank"><img src="https://opencollective.com/bower/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/2/website" target="_blank"><img src="https://opencollective.com/bower/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/3/website" target="_blank"><img src="https://opencollective.com/bower/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/4/website" target="_blank"><img src="https://opencollective.com/bower/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/5/website" target="_blank"><img src="https://opencollective.com/bower/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/6/website" target="_blank"><img src="https://opencollective.com/bower/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/7/website" target="_blank"><img src="https://opencollective.com/bower/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/8/website" target="_blank"><img src="https://opencollective.com/bower/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/9/website" target="_blank"><img src="https://opencollective.com/bower/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/10/website" target="_blank"><img src="https://opencollective.com/bower/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/11/website" target="_blank"><img src="https://opencollective.com/bower/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/12/website" target="_blank"><img src="https://opencollective.com/bower/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/13/website" target="_blank"><img src="https://opencollective.com/bower/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/14/website" target="_blank"><img src="https://opencollective.com/bower/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/15/website" target="_blank"><img src="https://opencollective.com/bower/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/16/website" target="_blank"><img src="https://opencollective.com/bower/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/17/website" target="_blank"><img src="https://opencollective.com/bower/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/18/website" target="_blank"><img src="https://opencollective.com/bower/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/19/website" target="_blank"><img src="https://opencollective.com/bower/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/20/website" target="_blank"><img src="https://opencollective.com/bower/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/21/website" target="_blank"><img src="https://opencollective.com/bower/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/22/website" target="_blank"><img src="https://opencollective.com/bower/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/23/website" target="_blank"><img src="https://opencollective.com/bower/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/24/website" target="_blank"><img src="https://opencollective.com/bower/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/25/website" target="_blank"><img src="https://opencollective.com/bower/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/26/website" target="_blank"><img src="https://opencollective.com/bower/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/27/website" target="_blank"><img src="https://opencollective.com/bower/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/28/website" target="_blank"><img src="https://opencollective.com/bower/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/backer/29/website" target="_blank"><img src="https://opencollective.com/bower/backer/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/bower#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/bower/sponsor/0/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/1/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/2/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/3/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/4/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/5/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/6/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/7/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/8/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/9/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/10/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/11/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/12/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/13/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/14/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/15/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/16/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/17/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/18/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/19/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/20/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/21/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/22/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/23/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/24/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/25/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/26/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/27/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/28/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/bower/sponsor/29/website" target="_blank"><img src="https://opencollective.com/bower/sponsor/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2016 Twitter and [other contributors](https://github.com/bower/bower/graphs/contributors)
|
||||
|
||||
Licensed under the MIT License
|
||||
|
||||
|
||||
@@ -587,6 +587,17 @@ Manager.prototype._dissect = function () {
|
||||
}
|
||||
}
|
||||
|
||||
// If they are equal and one of them is an exact target,
|
||||
// give higher priority
|
||||
if (!result) {
|
||||
if (first.target === first.pkgMeta.version) {
|
||||
return -1;
|
||||
}
|
||||
if (second.target === second.pkgMeta.version) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@ function GitHubResolver(decEndpoint, config, logger) {
|
||||
this._source += '.git';
|
||||
}
|
||||
|
||||
// Check if it's public
|
||||
this._public = mout.string.startsWith(this._source, 'git://');
|
||||
|
||||
// Use https:// rather than git:// if on a proxy
|
||||
if (this._config.proxy || this._config.httpsProxy) {
|
||||
this._source = this._source.replace('git://', 'https://');
|
||||
@@ -49,14 +46,10 @@ mout.object.mixIn(GitHubResolver, GitRemoteResolver);
|
||||
// -----------------
|
||||
|
||||
GitHubResolver.prototype._checkout = function () {
|
||||
// Only fully works with public repositories and tags
|
||||
// Could work with https/ssh protocol but not with 100% certainty
|
||||
if (!this._public || !this._resolution.tag) {
|
||||
return GitRemoteResolver.prototype._checkout.call(this);
|
||||
}
|
||||
|
||||
var msg;
|
||||
var tarballUrl = 'https://github.com/' + this._org + '/' + this._repo + '/archive/' + this._resolution.tag + '.tar.gz';
|
||||
var name = this._resolution.tag || this._resolution.branch || this._resolution.commit;
|
||||
var tarballUrl = 'https://github.com/' + this._org + '/' + this._repo + '/archive/' + name + '.tar.gz';
|
||||
|
||||
var file = path.join(this._tempDir, 'archive.tar.gz');
|
||||
var reqHeaders = {};
|
||||
var that = this;
|
||||
@@ -121,7 +114,6 @@ GitHubResolver.prototype._checkout = function () {
|
||||
|
||||
return that._cleanTempDir()
|
||||
.then(GitRemoteResolver.prototype._checkout.bind(that));
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -26,10 +26,18 @@ function GitResolver(decEndpoint, config, logger) {
|
||||
// anyway
|
||||
mkdirp.sync(config.storage.empty);
|
||||
process.env.GIT_TEMPLATE_DIR = config.storage.empty;
|
||||
|
||||
if (!config.strictSsl) {
|
||||
process.env.GIT_SSL_NO_VERIFY = 'true';
|
||||
}
|
||||
process.env.GIT_TERMINAL_PROMPT = config.interactive ? '1' : '0';
|
||||
|
||||
if (!config.interactive) {
|
||||
process.env.GIT_TERMINAL_PROMPT = '0';
|
||||
|
||||
if (!process.env.SSH_ASKPASS) {
|
||||
process.env.SSH_ASKPASS = 'echo';
|
||||
}
|
||||
}
|
||||
|
||||
Resolver.call(this, decEndpoint, config, logger);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ function readJson(file, options) {
|
||||
|
||||
if (options.logger) {
|
||||
var issues = bowerJson.getIssues(json);
|
||||
if (issues.warnings.length > 0){
|
||||
if (issues.warnings.length > 0) {
|
||||
options.logger.warn('invalid-meta', 'for:' + jsonFile);
|
||||
}
|
||||
issues.warnings.forEach(function (warning) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bower",
|
||||
"version": "1.7.9",
|
||||
"version": "1.8.0",
|
||||
"description": "The browser package manager",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"registry": {
|
||||
"search": [
|
||||
"http://localhost:8000",
|
||||
"https://bower.herokuapp.com"
|
||||
"https://registry.bower.io"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ var userAgent = !proxy && !httpsProxy
|
||||
|
||||
var defaults = {
|
||||
'directory': 'bower_components',
|
||||
'registry': 'https://bower.herokuapp.com',
|
||||
'registry': 'https://registry.bower.io',
|
||||
'shorthand-resolver': 'https://github.com/{{owner}}/{{package}}.git',
|
||||
'tmp': paths.tmp,
|
||||
'proxy': proxy,
|
||||
|
||||
@@ -86,7 +86,7 @@ function expand(config) {
|
||||
publish: config.registry
|
||||
};
|
||||
} else if (typeof config.registry === 'object') {
|
||||
config.registry.default = config.registry.default || 'https://bower.herokuapp.com';
|
||||
config.registry.default = config.registry.default || 'https://registry.bower.io';
|
||||
|
||||
config.registry = {
|
||||
default: config.registry.default,
|
||||
|
||||
@@ -12,12 +12,12 @@ describe('NPM Config on package.json', function () {
|
||||
var config = require('../lib/Config').read(null, {});
|
||||
|
||||
assert.deepEqual(config.registry, {
|
||||
'default': 'https://bower.herokuapp.com',
|
||||
'default': 'https://registry.bower.io',
|
||||
'search': [
|
||||
'https://bower.herokuapp.com'
|
||||
'https://registry.bower.io'
|
||||
],
|
||||
'register': 'https://bower.herokuapp.com',
|
||||
'publish': 'https://bower.herokuapp.com'
|
||||
'register': 'https://registry.bower.io',
|
||||
'publish': 'https://registry.bower.io'
|
||||
});
|
||||
});
|
||||
|
||||
@@ -38,12 +38,12 @@ describe('NPM Config on package.json', function () {
|
||||
var config = require('../lib/Config').read(null, { registry: { search: 'https://foobar' } });
|
||||
|
||||
assert.deepEqual(config.registry, {
|
||||
'default': 'https://bower.herokuapp.com',
|
||||
'default': 'https://registry.bower.io',
|
||||
'search': [
|
||||
'https://foobar',
|
||||
],
|
||||
'register': 'https://bower.herokuapp.com',
|
||||
'publish': 'https://bower.herokuapp.com'
|
||||
'register': 'https://registry.bower.io',
|
||||
'publish': 'https://registry.bower.io'
|
||||
});
|
||||
});
|
||||
|
||||
@@ -70,12 +70,12 @@ describe('NPM Config on package.json', function () {
|
||||
assert.deepEqual(config, {
|
||||
'directory': 'bower_components',
|
||||
'registry': {
|
||||
'default': 'https://bower.herokuapp.com',
|
||||
'default': 'https://registry.bower.io',
|
||||
'search': [
|
||||
'https://bower.herokuapp.com'
|
||||
'https://registry.bower.io'
|
||||
],
|
||||
'register': 'https://bower.herokuapp.com',
|
||||
'publish': 'https://bower.herokuapp.com'
|
||||
'register': 'https://registry.bower.io',
|
||||
'publish': 'https://registry.bower.io'
|
||||
},
|
||||
'shorthandResolver': 'https://github.com/{{owner}}/{{package}}.git',
|
||||
'tmp': '/foo/bar',
|
||||
|
||||
@@ -447,7 +447,7 @@ describe('.normalize', function () {
|
||||
describe('packages from bower registry', function () {
|
||||
|
||||
var packageList,
|
||||
packageListUrl = 'http://bower.herokuapp.com/packages';
|
||||
packageListUrl = 'http://registry.bower.io/packages';
|
||||
|
||||
this.timeout(60000);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ var Config = require('bower-config');
|
||||
|
||||
describe('RegistryClient', function () {
|
||||
beforeEach(function () {
|
||||
this.uri = 'https://bower.herokuapp.com';
|
||||
this.uri = 'https://registry.bower.io';
|
||||
this.timeoutVal = 5000;
|
||||
this.registry = new RegistryClient(Config.read(process.cwd(), {
|
||||
strictSsl: false,
|
||||
@@ -104,7 +104,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('cache', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/search/jquery')
|
||||
.replyWithFile(200, __dirname + '/fixtures/search.json');
|
||||
|
||||
@@ -114,7 +114,7 @@ describe('RegistryClient', function () {
|
||||
}));
|
||||
|
||||
this.cacheDir = this.client._config.cache;
|
||||
this.host = 'bower.herokuapp.com';
|
||||
this.host = 'registry.bower.io';
|
||||
this.method = 'search';
|
||||
this.pkg = 'jquery';
|
||||
|
||||
@@ -164,7 +164,7 @@ describe('RegistryClient', function () {
|
||||
//
|
||||
describe('calling the lookup instance method with argument', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/jquery')
|
||||
.reply(200, {
|
||||
name: 'jquery',
|
||||
@@ -260,7 +260,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('calling the lookup instance method with three registries', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/jquery')
|
||||
.reply(404);
|
||||
|
||||
@@ -283,7 +283,7 @@ describe('RegistryClient', function () {
|
||||
force: true,
|
||||
registry: {
|
||||
search: [
|
||||
'https://bower.herokuapp.com',
|
||||
'https://registry.bower.io',
|
||||
'http://custom-registry.com',
|
||||
'http://custom-registry2.com'
|
||||
]
|
||||
@@ -311,7 +311,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
it('should respect order', function (next) {
|
||||
this.registry._config.registry.search = [
|
||||
'https://bower.herokuapp.com',
|
||||
'https://registry.bower.io',
|
||||
'http://custom-registry2.com',
|
||||
'http://custom-registry.com'
|
||||
];
|
||||
@@ -330,7 +330,7 @@ describe('RegistryClient', function () {
|
||||
//
|
||||
describe('calling the register instance method with argument', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.post('/packages', 'name=test-ba&url=git%3A%2F%2Fgithub.com%2Ftest-ba%2Ftest-ba.git')
|
||||
.reply(201);
|
||||
|
||||
@@ -368,7 +368,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('calling the register instance method without arguments', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.post('/packages', 'name=&url=')
|
||||
.reply(400);
|
||||
});
|
||||
@@ -392,7 +392,7 @@ describe('RegistryClient', function () {
|
||||
this.accessToken = '12345678';
|
||||
this.registry._config.accessToken = this.accessToken;
|
||||
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.delete('/packages/' + this.pkg + '?access_token=' + this.accessToken)
|
||||
.reply(204);
|
||||
});
|
||||
@@ -420,7 +420,7 @@ describe('RegistryClient', function () {
|
||||
this.pkg = 'testfoo';
|
||||
this.registry._config.accessToken = '';
|
||||
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.delete('/packages/' + this.pkg)
|
||||
.reply(403);
|
||||
});
|
||||
@@ -440,7 +440,7 @@ describe('RegistryClient', function () {
|
||||
this.accessToken = '12345678';
|
||||
this.registry._config.accessToken = this.accessToken;
|
||||
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.delete('/packages/' + this.notpkg + '?access_token=' + this.accessToken)
|
||||
.reply(404);
|
||||
});
|
||||
@@ -459,7 +459,7 @@ describe('RegistryClient', function () {
|
||||
//
|
||||
describe('calling the search instance method with argument', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/search/jquery')
|
||||
.replyWithFile(200, __dirname + '/fixtures/search.json');
|
||||
|
||||
@@ -505,7 +505,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('calling the search instance method with two registries', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/search/jquery')
|
||||
.reply(200, []);
|
||||
|
||||
@@ -526,7 +526,7 @@ describe('RegistryClient', function () {
|
||||
force: true,
|
||||
registry: {
|
||||
search: [
|
||||
'https://bower.herokuapp.com',
|
||||
'https://registry.bower.io',
|
||||
'http://custom-registry.com'
|
||||
]
|
||||
}
|
||||
@@ -566,7 +566,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('calling the search instance method without argument', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages/search/')
|
||||
.reply(404);
|
||||
});
|
||||
@@ -585,7 +585,7 @@ describe('RegistryClient', function () {
|
||||
//
|
||||
describe('calling the list instance method', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages')
|
||||
.reply(200, [], {});
|
||||
|
||||
@@ -610,7 +610,7 @@ describe('RegistryClient', function () {
|
||||
|
||||
describe('calling the list instance method with two registries', function () {
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages')
|
||||
.reply(200, []);
|
||||
|
||||
@@ -628,7 +628,7 @@ describe('RegistryClient', function () {
|
||||
force: true,
|
||||
registry: {
|
||||
search: [
|
||||
'https://bower.herokuapp.com',
|
||||
'https://registry.bower.io',
|
||||
'http://custom-registry.com'
|
||||
]
|
||||
}
|
||||
@@ -669,7 +669,7 @@ describe('RegistryClient', function () {
|
||||
describe('calling the list instance method', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
nock('https://bower.herokuapp.com:443')
|
||||
nock('https://registry.bower.io:443')
|
||||
.get('/packages')
|
||||
.reply(200, [], {});
|
||||
});
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('bower register', function () {
|
||||
return helpers.expectEvent(promise.logger, 'confirm')
|
||||
.spread(function (e) {
|
||||
expect(e.type).to.be('confirm');
|
||||
expect(e.message).to.be('Registering a package will make it installable via the registry (https://bower.herokuapp.com), continue?');
|
||||
expect(e.message).to.be('Registering a package will make it installable via the registry (https://registry.bower.io, continue?');
|
||||
expect(e.default).to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -34,6 +34,31 @@ describe('Manager', function () {
|
||||
next();
|
||||
});
|
||||
|
||||
describe('resolve', function () {
|
||||
it('prefers exact versions over ranges', function () {
|
||||
manager._resolved = {
|
||||
ember: [
|
||||
{
|
||||
target: '>=1.4',
|
||||
pkgMeta: { version: '2.7.0' }
|
||||
},
|
||||
{
|
||||
target: '2.7.0',
|
||||
pkgMeta: { version: '2.7.0' }
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return manager.resolve().then(function () {
|
||||
expect(manager._dissected).to.eql({
|
||||
ember: {
|
||||
target: '2.7.0',
|
||||
pkgMeta: { version: '2.7.0' }
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('_areCompatible', function () {
|
||||
describe('resolved is being fetched', function () {
|
||||
|
||||
Reference in New Issue
Block a user