Compare commits

..

1 Commits

Author SHA1 Message Date
Adam Stankiewicz
0a8a4f9029 Format with prettier 2018-03-28 19:10:16 +02:00
6 changed files with 53 additions and 769 deletions

View File

@@ -1,9 +1,5 @@
# Changelog
## Newer releases
Please see: https://github.com/bower/bower/releases
## 1.8.0 - 2016-11-07
- Download tar archives from GitHub when possible (#2263)

View File

@@ -85,12 +85,40 @@ module.exports = function(grunt) {
if (npmMajor !== 3 || npmMinor < 5) {
grunt.log.writeln(
'You need to use at npm@3.5 to publish bower.'
'You need to use at least npm@3.5 to publish bower.'
);
grunt.log.writeln(
'It is because npm 2.x produces too long paths that Windows does not handle and newer npm drops lib/node_modules'
'It is because npm 2.x produces too long paths that Windows does not handle.'
);
grunt.log.writeln('Please upgrade it: npm install -g npm@3');
grunt.log.writeln('Please upgrade it: npm install -g npm');
process.exit(1);
}
var version = jsonPackage.version;
var changelog = fs.readFileSync('./CHANGELOG.md');
if (changelog.indexOf('## ' + version) === -1) {
grunt.log.writeln(
'Please add changelog.md entry for this bower version (' +
version +
')'
);
var lastRelease = childProcess
.execSync('git tag | tail -1')
.toString()
.trim();
grunt.log.writeln(
'Commits since last release (' + lastRelease + '): \n'
);
grunt.log.writeln(
childProcess
.execSync('git log --oneline ' + lastRelease + '..')
.toString()
);
process.exit(1);
}
@@ -109,12 +137,12 @@ module.exports = function(grunt) {
if (process.env.SKIP_TESTS !== '1') {
grunt.log.writeln('Reinstalling dependencies...');
childProcess.execSync('rm -rf node_modules && yarn', {
childProcess.execSync('rm -rf node_modules && npm install', {
stdio: [0, 1, 2]
});
grunt.log.writeln('Running test suite...');
childProcess.execSync('yarn test', { stdio: [0, 1, 2] });
childProcess.execSync('grunt test', { stdio: [0, 1, 2] });
}
var dir = tmp.dirSync().name;
@@ -127,7 +155,7 @@ module.exports = function(grunt) {
});
grunt.log.writeln('Installing production dependencies...');
childProcess.execSync('yarn --production', {
childProcess.execSync('npm install --production --silent', {
cwd: dir,
stdio: [0, 1, 2]
});
@@ -192,6 +220,13 @@ module.exports = function(grunt) {
message: 'Did you review all the changes with "git diff"?',
default: false
},
{
type: 'confirm',
name: 'changelog',
message:
'Are you sure the CHANGELOG.md contains all changes?',
default: false
},
{
type: 'confirm',
name: 'tests',
@@ -217,6 +252,7 @@ module.exports = function(grunt) {
inquirer.prompt(questions, function(answers) {
if (
!answers.review ||
!answers.changelog ||
!answers.tests ||
!answers.publish
) {
@@ -228,14 +264,11 @@ module.exports = function(grunt) {
}
grunt.log.writeln(
'\nPlease remember to tag this release, and add a release with changelog on Github!'
'\nPlease remember to tag this relese, and add a release on Github!'
);
grunt.log.writeln(
'\nAlso, please remember to test published Bower one more time!'
);
grunt.log.writeln(
'\nYou can promote this bower release with "npm dist-tag add bower@' + jsonPackage.version + ' latest'
);
grunt.log.writeln('\nPublishing Bower...');
childProcess.execSync('npm publish --tag beta', {

View File

@@ -3,7 +3,7 @@
[![Backers on Open Collective](https://opencollective.com/bower/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/bower/sponsors/badge.svg)](#sponsors)
> ..psst! While Bower is maintained, we recommend [yarn](https://yarnpkg.com/) and [webpack](https://webpack.js.org/) or [parcel](https://parceljs.org/) for new front-end projects!
> ..psst! While Bower is maintained, we recommend [yarn](https://yarnpkg.com/) and [webpack](https://webpack.js.org/) for new front-end projects!
[![Unix CI](https://img.shields.io/travis/bower/bower/master.svg?maxAge=2592000)](https://travis-ci.org/bower/bower)
[![Windows CI](https://img.shields.io/appveyor/ci/bower/bower/master.svg)](https://ci.appveyor.com/project/bower/bower)

View File

@@ -130,8 +130,8 @@ function extractGz(archive, dst) {
return deferred.promise;
}
function isSymlink(_, entry) {
return entry.type === 'symlink';
function isSymlink(entry) {
return entry.type === 'SymbolicLink';
}
function filterSymlinks(entry) {

View File

@@ -1,6 +1,6 @@
{
"name": "bower",
"version": "1.8.8",
"version": "1.8.0",
"description": "The browser package manager",
"author": "Twitter",
"license": "MIT",
@@ -26,7 +26,7 @@
"chalk": "^1.0.0",
"chmodr": "^1.0.2",
"configstore": "^2.0.0",
"decompress-zip": "^0.2.2",
"decompress-zip": "^0.2.1",
"destroy": "^1.0.3",
"findup-sync": "^0.3.0",
"fs-write-stream-atomic": "1.0.8",
@@ -94,9 +94,9 @@
"test": "grunt test",
"ci": "grunt travis",
"coveralls": "coveralls",
"prepublishOnly": "in-publish && echo 'You need to use \"grunt publish\" to publish bower' && false || not-in-publish",
"prepublish": "in-publish && echo 'You need to use \"grunt publish\" to publish bower' && false || not-in-publish",
"format": "prettier --write --single-quote --tab-width 4 '**/*.js'",
"precommit": "lint-staged"
"precommit": "lint-staged && npm test"
},
"lint-staged": {
"*.js": [

751
yarn.lock

File diff suppressed because it is too large Load Diff