chore: remove babel, fix integration tests

This commit removes babel/es6 from all source and test files, because it was introducing a lot of overhead and only little gain.
This commit fixes and enables integration tests on Travis.
This commit fixes #153 and #151 along the way.

_Originally this commit should have only removed babel, but without working tests that's a bit too hairy._
_I only realized that half way into removing babel/es6, so things are all over the place now._

Closes #153, Closes #151
This commit is contained in:
Stephan Bönnemann
2015-12-31 15:11:54 +01:00
parent 88334523e4
commit 5cdc732b68
29 changed files with 474 additions and 461 deletions
+1 -3
View File
@@ -1,4 +1,4 @@
const nixt = require('nixt')
var nixt = require('nixt')
module.exports = function (cwd, uri) {
return nixt()
@@ -7,8 +7,6 @@ module.exports = function (cwd, uri) {
.env('NPM_EMAIL', 'integration@test.com')
.env('GH_TOKEN', 'ghtoken')
.env('CI', 'true')
.env('TRAVIS', 'true')
.env('TRAVIS_BRANCH', 'master')
.env('npm_config_registry', uri)
.clone()
}
+17 -26
View File
@@ -1,40 +1,31 @@
const { exec } = require('child_process')
const { join } = require('path')
const { writeFileSync } = require('fs')
var exec = require('child_process').exec
var join = require('path').join
var writeFileSync = require('fs').writeFileSync
const mkdirp = require('mkdirp')
var mkdirp = require('mkdirp')
module.exports = function (name, cb) {
const cwd = join(__dirname, '../tmp', name)
module.exports = function (name, registry, cb) {
var cwd = join(__dirname, '../tmp', name)
mkdirp.sync(cwd)
writeFileSync(join(cwd, '.npmrc'), `
//localhost:1337/registry/_design/app/_rewrite/:username=integration
//localhost:1337/registry/_design/app/_rewrite/:email=integration@test.com`, null, 2)
writeFileSync(join(cwd, 'package.json'), JSON.stringify({
name,
name: name,
repository: {
url: 'git+https://github.com/semantic-release/test'
},
_npmUser: {
name: 'integration',
email: 'integration@test.com'
},
maintainers: [{
name: 'integration',
email: 'integration@test.com'
}]
release: {
verifyConditions: '../../../src/lib/plugin-noop'
}
}, null, 2))
exec(`
git init &&
git config user.email "integration@test" &&
git config user.name "Integration Test" &&
git add . &&
git commit -m "chore: root"`
, {cwd}, (err, stdout, stderr) => {
exec(
'git init && ' +
'git config user.email "integration@test" && ' +
'git config user.name "Integration Test" && ' +
'git add . && ' +
'git commit -m "chore: root"'
, {cwd: cwd}, function (err, stdout, stderr) {
if (err) {
console.log(stdout, stderr)
return cb(err)