Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use q-io@2 to exclude wrongly implemented "Array.prototype.find"-method #6

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
sudo: false
language: "node_js"
node_js:
- "4.2"
- "5.0"
- "4"
- "5"
- "6"
script:
- npm install istanbul
- istanbul cover ./node_modules/.bin/_mocha --report lcovonly
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ environment:
matrix:
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"

# Install scripts. (runs after repo cloning)
install:
Expand Down
2 changes: 1 addition & 1 deletion lib/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'

var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var path = require('path')
var qcp = require('../lib/q-child-process.js')

Expand Down
2 changes: 1 addition & 1 deletion lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'use strict'

var cpp = require('../lib/q-child-process')
var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var path = require('path')
var moment = require('moment')
var debug = require('debug')('thoughtful-release:git')
Expand Down
2 changes: 1 addition & 1 deletion lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var path = require('path')
var semver = require('semver')
var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var Q = require('q')
var _ = {
defaultsDeep: require('lodash.defaultsdeep')
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
"lodash.isplainobject": "^3",
"lodash.isstring": "^3.0.1",
"lodash.toarray": "^3.0.2",
"m-io": "*",
"mkdirp": "^0.5.1",
"moment": "^2.11.1",
"q": "^1.4.1",
"q-io": "^1.13.2",
"semver": "^5.1.0"
},
"devDependencies": {
Expand All @@ -68,7 +69,7 @@
},
"config": {
"ghooks": {
"pre-commit": "thoughtful precommit && standard && thought run -a"
"pre-commit": "thoughtful precommit && standard"
}
},
"keywords": []
Expand Down
4 changes: 2 additions & 2 deletions test/changelog-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ var chaiAsPromised = require('chai-as-promised')
chai.use(chaiAsPromised)
var expect = chai.expect
var changelog = require('../lib/changelog.js')
var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var path = require('path')
require('trace')
require('./trace')

function fixture (filename) {
return require('fs').readFileSync(path.join('test', 'fixtures', filename), {encoding: 'utf-8'})
Expand Down
3 changes: 2 additions & 1 deletion test/git-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ var chaiAsPromised = require('chai-as-promised')
chai.use(chaiAsPromised)
var expect = chai.expect
var git = require('../lib/git.js')
var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var Q = require('q')
var path = require('path')
require('./trace')

describe('git-library:', () => {
afterEach(() => {
Expand Down
15 changes: 10 additions & 5 deletions test/index-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

'use strict'

require('trace')
require('./trace')

var chai = require('chai')
var chaiAsPromised = require('chai-as-promised')
chai.use(chaiAsPromised)
var expect = chai.expect
var qcp = require('../lib/q-child-process')
var qfs = require('q-io/fs')
var qfs = require('m-io/fs')
var path = require('path')
var Q = require('q')
var _ = {
Expand Down Expand Up @@ -123,9 +123,14 @@ describe('main-module:', () => {
this.timeout(5000)
// Update changelog and bump version
var changelogContents = thoughtful.updateChangelog({release: 'minor'})
.then(() => qcp.execFile('npm', ['version', 'minor'], {cwd: workDir()}))
// On Windows, we need to call the '.cmd' file
.catch(() => qcp.execFile('npm.cmd', ['version', 'minor'], {cwd: workDir()}))
.then(() => {
if (process.platform.match(/^win/i)) {
// On Windows, we need to call the '.cmd' file
return qcp.execFile('npm.cmd', ['version', 'minor'], {cwd: workDir()})
} else {
return qcp.execFile('npm', ['version', 'minor'], {cwd: workDir()})
}
})
// Add another file
.then(() => qfs.write(workDir('index.js'), "'use strict'"))
.then(() => qcp.execFile('git', ['add', 'index.js'], {cwd: workDir()}))
Expand Down
1 change: 1 addition & 0 deletions test/npm-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var chaiAsPromised = require('chai-as-promised')
chai.use(chaiAsPromised)
var expect = chai.expect
var npm = require('../lib/npm.js')
require('./trace')

describe('The npm-helper lib:', () => {
describe('The version method', () => {
Expand Down
1 change: 1 addition & 0 deletions test/q-child-process-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ chai.use(chaiAsPromised)
var expect = chai.expect
var path = require('path')
var qcp = require('../lib/q-child-process')
require('./trace')

describe('q-child-process-library:', () => {
describe('the spawn-method', () => {
Expand Down
Empty file added test/test.js
Empty file.
9 changes: 9 additions & 0 deletions test/trace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* A shortcut for loding `trace` only with compatible versions (i.e. node 6)
*/

'use strict'

if (process.version.match(/v6/)) {
require('trace')
}