mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bda400634c | ||
|
|
b01243ac3c | ||
|
|
89902a6919 | ||
|
|
80308a41a6 | ||
|
|
47cc2262e1 | ||
|
|
f7c5154490 | ||
|
|
cba4b2a4cd | ||
|
|
bdabf6a4e6 | ||
|
|
7896224384 | ||
|
|
3209cda975 | ||
|
|
38501a0b93 | ||
|
|
e60d236b25 | ||
|
|
044896e708 | ||
|
|
fc4c260de4 | ||
|
|
d405917b4a | ||
|
|
22bbb3fcaf |
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,2 +1,14 @@
|
||||
npm-debug.log*
|
||||
lerna-debug.log*
|
||||
/node_modules
|
||||
/npm-debug.log
|
||||
|
||||
/test/assets/package-*/
|
||||
/test/assets/temp-*/
|
||||
/test/reports
|
||||
/test/tmp/
|
||||
|
||||
/bower.json
|
||||
/component.json
|
||||
/bower_components
|
||||
/test/sample
|
||||
!/test/sample/bower.json
|
||||
/npm-shrinkwrap.json
|
||||
|
||||
@@ -17,6 +17,7 @@ install:
|
||||
- npm --version
|
||||
- git --version
|
||||
- svn --version | head -n 1
|
||||
- npm install -g grunt-cli
|
||||
- npm install
|
||||
|
||||
os:
|
||||
@@ -30,4 +31,4 @@ matrix:
|
||||
- env: "NODE_VERSION=0.11"
|
||||
|
||||
script:
|
||||
- npm test
|
||||
- grunt travis
|
||||
|
||||
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,5 +1,22 @@
|
||||
# Changelog
|
||||
|
||||
## 1.8.0 - 2016-11-07
|
||||
|
||||
- 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
|
||||
|
||||
- Show warnings for invalid bower.json fields
|
||||
@@ -83,7 +100,7 @@ https://github.com/npm/npm/issues/11227
|
||||
- Update bower config
|
||||
- Loads the .bowerrc file from the cwd specified on the command line
|
||||
- Allow the use of environment variables in .bowerrc ([#41](https://github.com/bower/config/issues/41))
|
||||
- Allow for array notation in ENV variables ([#44](https://github.com/bower/config/issues/44))
|
||||
- Allow for array notation in ENV variables ([#44](https://github.com/bower/config/issues/44))
|
||||
|
||||
## 1.6.9 - 2015-12-04
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
[](https://ci.appveyor.com/project/bower/bower)
|
||||
[](https://coveralls.io/r/bower/bower?branch=master)
|
||||
[](https://discord.gg/0fFM7QF0KpZRh2cY)
|
||||
[](http://issuestats.com/github/bower/bower)
|
||||
[](http://issuestats.com/github/bower/bower)
|
||||
|
||||
<img align="right" height="300" src="http://bower.io/img/bower-logo.png">
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ install:
|
||||
|
||||
# Post-install test scripts.
|
||||
test_script:
|
||||
- cmd: npm test
|
||||
- cmd: npm run ci
|
||||
|
||||
# Make clone much faster
|
||||
shallow_clone: true
|
||||
|
||||
10
lerna.json
10
lerna.json
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"lerna": "2.0.0-beta.23",
|
||||
"version": "independent",
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
"ignored-file",
|
||||
"*.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,9 @@ function info(logger, endpoint, property, config) {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle @ as version divider
|
||||
endpoint = endpoint.replace('@', '#');
|
||||
|
||||
var repository;
|
||||
var decEndpoint;
|
||||
|
||||
@@ -16,6 +16,8 @@ function install(logger, endpoints, options, config) {
|
||||
// Convert endpoints to decomposed endpoints
|
||||
endpoints = endpoints || [];
|
||||
decEndpoints = endpoints.map(function (endpoint) {
|
||||
// handle @ as version divider
|
||||
endpoint = endpoint.replace('@', '#');
|
||||
return endpointParser.decompose(endpoint);
|
||||
});
|
||||
|
||||
@@ -213,6 +213,20 @@ Project.prototype.update = function (names, options) {
|
||||
});
|
||||
};
|
||||
|
||||
function resolveUrlNames(names, flattened)
|
||||
{
|
||||
for (var i = 0; i < names.length; i++)
|
||||
if (! flattened[names[i]])
|
||||
{
|
||||
var url = names[i].trim().replace(/\/$/, '');
|
||||
var packName;
|
||||
for (packName in flattened)
|
||||
if (! ( !flattened[packName].source))
|
||||
if (url == flattened[packName].source.trim().replace(/\/$/, ''))
|
||||
names[i] = packName;
|
||||
}
|
||||
}
|
||||
|
||||
Project.prototype.uninstall = function (names, options) {
|
||||
var that = this;
|
||||
var packages = {};
|
||||
@@ -230,6 +244,7 @@ Project.prototype.uninstall = function (names, options) {
|
||||
// Fill in the packages to be uninstalled
|
||||
.spread(function (json, tree, flattened) {
|
||||
var promise = Q.resolve();
|
||||
resolveUrlNames(names, flattened);
|
||||
|
||||
names.forEach(function (name) {
|
||||
var decEndpoint = flattened[name];
|
||||
@@ -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,8 +26,18 @@ function GitResolver(decEndpoint, config, logger) {
|
||||
// anyway
|
||||
mkdirp.sync(config.storage.empty);
|
||||
process.env.GIT_TEMPLATE_DIR = config.storage.empty;
|
||||
process.env.GIT_SSL_NO_VERIFY = (!config.strictSsl).toString();
|
||||
process.env.GIT_TERMINAL_PROMPT = config.interactive ? '1' : '0';
|
||||
|
||||
if (!config.strictSsl) {
|
||||
process.env.GIT_SSL_NO_VERIFY = 'true';
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -206,7 +216,7 @@ GitResolver.prototype._savePkgMeta = function (meta) {
|
||||
version = semver.clean(this._resolution.tag);
|
||||
|
||||
// Warn if the package meta version is different than the resolved one
|
||||
if (typeof meta.version === 'string' && semver.neq(meta.version, version)) {
|
||||
if (typeof meta.version === 'string' && semver.valid(meta.version) && semver.neq(meta.version, version)) {
|
||||
this._logger.warn('mismatch', 'Version declared in the json (' + meta.version + ') is different than the resolved one (' + version + ')', {
|
||||
resolution: this._resolution,
|
||||
pkgMeta: meta
|
||||
@@ -109,7 +109,7 @@ function pluginResolverFactory(resolverFactory, bower) {
|
||||
throw createError('Resolver did not provide releases of package.');
|
||||
}
|
||||
|
||||
var releases = this._releases = result;
|
||||
var releases = that._releases = result;
|
||||
|
||||
var versions = releases.filter(function (target) {
|
||||
return semver.clean(target.version);
|
||||
@@ -19,7 +19,9 @@ function readJson(file, options) {
|
||||
|
||||
if (options.logger) {
|
||||
var issues = bowerJson.getIssues(json);
|
||||
|
||||
if (issues.warnings.length > 0) {
|
||||
options.logger.warn('invalid-meta', 'for:' + jsonFile);
|
||||
}
|
||||
issues.warnings.forEach(function (warning) {
|
||||
options.logger.warn('invalid-meta', warning);
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user