mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Compare commits
5 Commits
fix/github
...
lerna
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
965a53db21 | ||
|
|
1334ff67ae | ||
|
|
afb27f446a | ||
|
|
fe011b8462 | ||
|
|
096fc3da0d |
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,14 +1,2 @@
|
||||
/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
|
||||
npm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
@@ -17,7 +17,6 @@ install:
|
||||
- npm --version
|
||||
- git --version
|
||||
- svn --version | head -n 1
|
||||
- npm install -g grunt-cli
|
||||
- npm install
|
||||
|
||||
os:
|
||||
@@ -31,4 +30,4 @@ matrix:
|
||||
- env: "NODE_VERSION=0.11"
|
||||
|
||||
script:
|
||||
- grunt travis
|
||||
- npm test
|
||||
|
||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,16 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- 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
|
||||
- Upgrade all bundled modules
|
||||
|
||||
## 1.7.9 - 2016-04-05
|
||||
|
||||
- Show warnings for invalid bower.json fields
|
||||
@@ -94,7 +83,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,6 +6,8 @@
|
||||
[](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 run ci
|
||||
- cmd: npm test
|
||||
|
||||
# Make clone much faster
|
||||
shallow_clone: true
|
||||
|
||||
10
lerna.json
Normal file
10
lerna.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"lerna": "2.0.0-beta.23",
|
||||
"version": "independent",
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
"ignored-file",
|
||||
"*.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
100
package.json
100
package.json
@@ -1,100 +1,10 @@
|
||||
{
|
||||
"name": "bower",
|
||||
"version": "1.7.9",
|
||||
"description": "The browser package manager",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
"repository": "bower/bower",
|
||||
"main": "lib",
|
||||
"bin": "bin/bower",
|
||||
"homepage": "http://bower.io",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"keywords": [
|
||||
"bower"
|
||||
],
|
||||
"dependencies": {
|
||||
"abbrev": "^1.0.5",
|
||||
"archy": "1.0.0",
|
||||
"bower-config": "^1.4.0",
|
||||
"bower-endpoint-parser": "^0.2.2",
|
||||
"bower-json": "^0.8.1",
|
||||
"bower-logger": "^0.2.2",
|
||||
"bower-registry-client": "^1.0.0",
|
||||
"cardinal": "0.4.4",
|
||||
"chalk": "^1.0.0",
|
||||
"chmodr": "^1.0.2",
|
||||
"configstore": "^2.0.0",
|
||||
"decompress-zip": "^0.2.1",
|
||||
"destroy": "^1.0.3",
|
||||
"findup-sync": "^0.3.0",
|
||||
"fs-write-stream-atomic": "1.0.8",
|
||||
"fstream": "^1.0.3",
|
||||
"fstream-ignore": "^1.0.2",
|
||||
"github": "^0.2.3",
|
||||
"glob": "^4.3.2",
|
||||
"graceful-fs": "^4.1.3",
|
||||
"handlebars": "^4.0.5",
|
||||
"inquirer": "0.10.0",
|
||||
"is-root": "^1.0.0",
|
||||
"junk": "^1.0.0",
|
||||
"lockfile": "^1.0.0",
|
||||
"lru-cache": "^2.5.0",
|
||||
"md5-hex": "^1.0.2",
|
||||
"mkdirp": "0.5.0",
|
||||
"mout": "^0.11.0",
|
||||
"nopt": "^3.0.1",
|
||||
"opn": "^4.0.0",
|
||||
"p-throttler": "0.1.1",
|
||||
"promptly": "0.2.0",
|
||||
"q": "^1.1.2",
|
||||
"request": "2.67.0",
|
||||
"request-progress": "0.3.1",
|
||||
"requireg": "^0.1.5",
|
||||
"resolve": "^1.1.7",
|
||||
"retry": "0.6.1",
|
||||
"rimraf": "^2.2.8",
|
||||
"semver": "^2.3.0",
|
||||
"semver-utils": "^1.1.1",
|
||||
"shell-quote": "^1.4.2",
|
||||
"stringify-object": "^1.0.0",
|
||||
"tar-fs": "^1.4.1",
|
||||
"tmp": "0.0.28",
|
||||
"update-notifier": "^0.6.0",
|
||||
"user-home": "^1.1.0",
|
||||
"which": "^1.0.8"
|
||||
},
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"arr-diff": "^2.0.0",
|
||||
"chai": "^3.5.0",
|
||||
"coveralls": "^2.11.9",
|
||||
"expect.js": "^0.3.1",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-cli": "^1.1.0",
|
||||
"grunt-contrib-watch": "^1.0.0",
|
||||
"grunt-eslint": "^18.1.0",
|
||||
"grunt-exec": "^0.4.7",
|
||||
"grunt-simple-mocha": "^0.4.1",
|
||||
"in-publish": "^2.0.0",
|
||||
"istanbul": "^0.4.3",
|
||||
"load-grunt-tasks": "^3.5.0",
|
||||
"mocha": "^2.5.3",
|
||||
"multiline": "^1.0.2",
|
||||
"nock": "^7.7.2",
|
||||
"node-uuid": "^1.4.7",
|
||||
"proxyquire": "^1.7.9",
|
||||
"spawn-sync": "1.0.15",
|
||||
"wrench": "^1.5.8"
|
||||
"lerna": "2.0.0-beta.23"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test",
|
||||
"ci": "grunt travis",
|
||||
"coveralls": "coveralls",
|
||||
"prepublish": "in-publish && echo 'You need to use \"grunt publish\" to publish bower' && false || not-in-publish"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"lib"
|
||||
]
|
||||
"postinstall": "lerna bootstrap",
|
||||
"test": "lerna run test"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,20 +3,6 @@ module.exports = function (grunt) {
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
'bin/*',
|
||||
'lib/**/*.js',
|
||||
'test/**/*.js',
|
||||
'!test/assets/**/*',
|
||||
'!test/reports/**/*',
|
||||
'!test/tmp/**/*'
|
||||
]
|
||||
},
|
||||
simplemocha: {
|
||||
options: {
|
||||
reporter: 'spec',
|
||||
@@ -41,13 +27,21 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files: ['<%= jshint.files %>'],
|
||||
tasks: ['jshint', 'simplemocha:short']
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
'bin/*',
|
||||
'lib/**/*.js',
|
||||
'test/**/*.js',
|
||||
'!test/assets/**/*',
|
||||
'!test/reports/**/*',
|
||||
'!test/tmp/**/*'
|
||||
],
|
||||
tasks: ['simplemocha:short']
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('test', ['jshint', 'simplemocha:full']);
|
||||
grunt.registerTask('test', ['simplemocha:full']);
|
||||
grunt.registerTask('cover', 'exec:cover');
|
||||
grunt.registerTask('travis', ['jshint', 'exec:cover', 'exec:coveralls']);
|
||||
grunt.registerTask('travis', ['exec:cover', 'exec:coveralls']);
|
||||
grunt.registerTask('default', 'test');
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "The Bower config reader and writer.",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/bower/bower/tree/master/packages/bower-config",
|
||||
"repository": "bower/config",
|
||||
"main": "lib/Config",
|
||||
"homepage": "http://bower.io",
|
||||
"engines": {
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
"url": "https://github.com/bower/endpoint-parser/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"repository": "https://github.com/bower/bower/tree/master/packages/bower-endpoint-parser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/bower/endpoint-parser.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "Read bower.json files with semantics, normalisation, defaults and validation",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/bower/bower/tree/master/packages/bower-json",
|
||||
"repository": "bower/json",
|
||||
"main": "lib/json",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"url": "https://github.com/bower/logger/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"repository": "https://github.com/bower/bower/tree/master/packages/bower-logger",
|
||||
"repository": "bower/logger",
|
||||
"main": "lib/Logger",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "Provides easy interaction with the Bower registry",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/bower/bower/tree/master/packages/bower-registry-client",
|
||||
"repository": "bower/registry-client",
|
||||
"main": "Client",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
14
packages/bower/.gitignore
vendored
Normal file
14
packages/bower/.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/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
|
||||
@@ -9,9 +9,6 @@ function info(logger, endpoint, property, config) {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle @ as version divider
|
||||
endpoint = endpoint.replace('@', '#');
|
||||
|
||||
var repository;
|
||||
var decEndpoint;
|
||||
|
||||
@@ -16,8 +16,6 @@ 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,20 +213,6 @@ 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 = {};
|
||||
@@ -244,7 +230,6 @@ 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,6 +29,9 @@ 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://');
|
||||
@@ -46,10 +49,14 @@ mout.object.mixIn(GitHubResolver, GitRemoteResolver);
|
||||
// -----------------
|
||||
|
||||
GitHubResolver.prototype._checkout = function () {
|
||||
var msg;
|
||||
var name = this._resolution.tag || this._resolution.branch || this._resolution.commit;
|
||||
var tarballUrl = 'https://github.com/' + this._org + '/' + this._repo + '/archive/' + name + '.tar.gz';
|
||||
// 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 file = path.join(this._tempDir, 'archive.tar.gz');
|
||||
var reqHeaders = {};
|
||||
var that = this;
|
||||
@@ -114,6 +121,7 @@ GitHubResolver.prototype._checkout = function () {
|
||||
|
||||
return that._cleanTempDir()
|
||||
.then(GitRemoteResolver.prototype._checkout.bind(that));
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
@@ -26,18 +26,8 @@ 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';
|
||||
}
|
||||
|
||||
if (!config.interactive) {
|
||||
process.env.GIT_TERMINAL_PROMPT = '0';
|
||||
|
||||
if (!process.env.SSH_ASKPASS) {
|
||||
process.env.SSH_ASKPASS = 'echo';
|
||||
}
|
||||
}
|
||||
process.env.GIT_SSL_NO_VERIFY = (!config.strictSsl).toString();
|
||||
process.env.GIT_TERMINAL_PROMPT = config.interactive ? '1' : '0';
|
||||
|
||||
Resolver.call(this, decEndpoint, config, logger);
|
||||
|
||||
@@ -216,7 +206,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.valid(meta.version) && semver.neq(meta.version, version)) {
|
||||
if (typeof meta.version === 'string' && 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 = that._releases = result;
|
||||
var releases = this._releases = result;
|
||||
|
||||
var versions = releases.filter(function (target) {
|
||||
return semver.clean(target.version);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user