From 1a6974afc44bca26181ea6ad3060785f1e6fe6f9 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Mon, 28 Mar 2016 18:36:21 -0400 Subject: [PATCH 01/21] Update meteor apps --- tests/apps/leaderboard/.meteor/.finished-upgraders | 6 ++++++ tests/apps/leaderboard/.meteor/packages | 2 ++ tests/apps/leaderboard/.meteor/release | 2 +- tests/apps/todos/.meteor/.finished-upgraders | 6 ++++++ tests/apps/todos/.meteor/packages | 2 ++ tests/apps/todos/.meteor/release | 2 +- 6 files changed, 18 insertions(+), 2 deletions(-) mode change 100755 => 100644 tests/apps/leaderboard/.meteor/packages mode change 100755 => 100644 tests/apps/todos/.meteor/packages diff --git a/tests/apps/leaderboard/.meteor/.finished-upgraders b/tests/apps/leaderboard/.meteor/.finished-upgraders index 68df3d8..dacc2c0 100644 --- a/tests/apps/leaderboard/.meteor/.finished-upgraders +++ b/tests/apps/leaderboard/.meteor/.finished-upgraders @@ -5,3 +5,9 @@ notices-for-0.9.0 notices-for-0.9.1 0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package diff --git a/tests/apps/leaderboard/.meteor/packages b/tests/apps/leaderboard/.meteor/packages old mode 100755 new mode 100644 index 1cba902..9aeb92c --- a/tests/apps/leaderboard/.meteor/packages +++ b/tests/apps/leaderboard/.meteor/packages @@ -11,3 +11,5 @@ success settings failure timeout +standard-minifier-css +standard-minifier-js diff --git a/tests/apps/leaderboard/.meteor/release b/tests/apps/leaderboard/.meteor/release index b3841a0..4fd7a93 100644 --- a/tests/apps/leaderboard/.meteor/release +++ b/tests/apps/leaderboard/.meteor/release @@ -1 +1 @@ -METEOR@1.0.2 +METEOR@1.3 diff --git a/tests/apps/todos/.meteor/.finished-upgraders b/tests/apps/todos/.meteor/.finished-upgraders index 68df3d8..dacc2c0 100644 --- a/tests/apps/todos/.meteor/.finished-upgraders +++ b/tests/apps/todos/.meteor/.finished-upgraders @@ -5,3 +5,9 @@ notices-for-0.9.0 notices-for-0.9.1 0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package diff --git a/tests/apps/todos/.meteor/packages b/tests/apps/todos/.meteor/packages old mode 100755 new mode 100644 index 893df59..6a3348b --- a/tests/apps/todos/.meteor/packages +++ b/tests/apps/todos/.meteor/packages @@ -11,3 +11,5 @@ jquery preserve-inputs insecure appfails +standard-minifier-css +standard-minifier-js diff --git a/tests/apps/todos/.meteor/release b/tests/apps/todos/.meteor/release index b3841a0..4fd7a93 100644 --- a/tests/apps/todos/.meteor/release +++ b/tests/apps/todos/.meteor/release @@ -1 +1 @@ -METEOR@1.0.2 +METEOR@1.3 From 2380794e41fa0e957ecc0e06ff3ac20b93cbf0e6 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Mon, 28 Mar 2016 18:36:47 -0400 Subject: [PATCH 02/21] Use cross-spawn to add support for windows --- lib/ChildProcess.js | 2 +- package.json | 1 + src/ChildProcess.coffee | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 package.json diff --git a/lib/ChildProcess.js b/lib/ChildProcess.js index cca6858..31346eb 100644 --- a/lib/ChildProcess.js +++ b/lib/ChildProcess.js @@ -11,7 +11,7 @@ path = require('path'); ChildProcess = (function() { - ChildProcess._spawn = require("child_process").spawn; + ChildProcess._spawn = require('cross-spawn'); ChildProcess._exec = require("child_process").exec; diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 5b02d01..0b4dd01 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.6.0-rc1", "dependencies": { "chai": "1.9.2", + "cross-spawn": "^2.1.5", "glob": "4.0.6", "loglevel": "1.1.0", "phantomjs": "1.9.16", diff --git a/src/ChildProcess.coffee b/src/ChildProcess.coffee index 6f0faff..5c93abe 100755 --- a/src/ChildProcess.coffee +++ b/src/ChildProcess.coffee @@ -6,7 +6,7 @@ path = require 'path' class ChildProcess # Design for testability - so we can spy on them / stub them in tests - @_spawn: require("child_process").spawn + @_spawn: require('cross-spawn') @_exec: require("child_process").exec child: null From b9245e06ba682c702da5ad1da29953faf40c31b9 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Fri, 20 May 2016 19:19:47 -0300 Subject: [PATCH 03/21] Wip windows support --- Cakefile | 2 +- lib/ChildProcess.js | 143 ----------------------------- lib/MeteorMongodb.coffee | 55 ++++++++--- lib/get_children.bat | 5 + tests/apps/todos/client/todos.html | 2 +- 5 files changed, 50 insertions(+), 157 deletions(-) delete mode 100644 lib/ChildProcess.js create mode 100755 lib/get_children.bat mode change 100644 => 100755 tests/apps/todos/client/todos.html diff --git a/Cakefile b/Cakefile index 17c29d6..ab04c83 100755 --- a/Cakefile +++ b/Cakefile @@ -1,6 +1,6 @@ ChildProcess = require './lib/ChildProcess' -mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/MeteorTest.coffee" +mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test.coffee" task "compile", "Compile coffee-script library sources", -> child = new ChildProcess() diff --git a/lib/ChildProcess.js b/lib/ChildProcess.js deleted file mode 100644 index 31346eb..0000000 --- a/lib/ChildProcess.js +++ /dev/null @@ -1,143 +0,0 @@ -// Generated by CoffeeScript 1.8.0 -(function() { - var ChildProcess, Pipe, expect, path; - - require('./log'); - - expect = require("chai").expect; - - Pipe = require("./Pipe"); - - path = require('path'); - - ChildProcess = (function() { - ChildProcess._spawn = require('cross-spawn'); - - ChildProcess._exec = require("child_process").exec; - - ChildProcess.prototype.child = null; - - ChildProcess.prototype.descendants = []; - - ChildProcess.prototype.pipe = null; - - ChildProcess.prototype.command = null; - - ChildProcess.prototype.killed = false; - - function ChildProcess() { - log.debug("ChildProcess.constructor()"); - } - - ChildProcess.prototype.exec = function(command, options, cb) { - var innerCB; - log.debug("ChildProcess.exec()", arguments); - expect(this.child).to.be["null"]; - expect(command).to.be.a('string').that.is.ok; - if (options != null) { - expect(options).to.be.an('object'); - } - this.command = command.split(' ', 1)[0]; - expect(this.command).to.be.a('string').that.is.ok; - innerCB = (function(_this) { - return function(err, stdout, stderr) { - _this.killed = true; - if ((err != null ? err.code : void 0) != null) { - log.error("child_process.exec: Error: " + _this.command + " exit code: " + err.code); - } - if ((err != null ? err.signal : void 0) != null) { - log.error("child_process.exec: Error: " + _this.command + " termination signal: " + err.signal); - } - if (cb != null) { - return cb(err, stdout, stderr); - } - }; - })(this); - if (options != null) { - this.child = ChildProcess._exec(command, options, innerCB); - } else { - this.child = ChildProcess._exec(command, innerCB); - } - this.child.stdout.pipe(process.stdout); - return this.child.stderr.pipe(process.stderr); - }; - - ChildProcess.prototype.spawn = function(command, args, options, pipeClass, pipeClassOptions) { - if (args == null) { - args = []; - } - if (options == null) { - options = {}; - } - if (pipeClass == null) { - pipeClass = void 0; - } - if (pipeClassOptions == null) { - pipeClassOptions = void 0; - } - log.debug("ChildProcess.spawn()", command, args); - expect(this.child, "ChildProcess is already running").to.be["null"]; - expect(command, "Invalid @command argument").to.be.a("string"); - expect(args, "Invalid @args argument").to.be.an("array"); - expect(options, "Invalid @options").to.be.an("object"); - if (pipeClass != null) { - expect(pipeClass, "Invalid pipeClass").to.be.a('function'); - } - if (pipeClassOptions != null) { - expect(pipeClassOptions, "Invalid pipeClassOptions").to.be.an('object'); - } - this.command = path.basename(command); - log.info("spacejam: spawning " + this.command); - process.on('exit', (function(_this) { - return function(code) { - log.debug("ChildProcess.process.on 'exit': @command=" + _this.command + " @killed=" + _this.killed + " code=" + code); - return _this.kill(); - }; - })(this)); - this.child = ChildProcess._spawn(command, args, options); - if (pipeClass) { - this.pipe = new pipeClass(this.child.stdout, this.child.stderr, pipeClassOptions); - } else { - this.pipe = new Pipe(this.child.stdout, this.child.stderr); - } - return this.child.on("exit", (function(_this) { - return function(code, signal) { - log.debug("ChildProcess.process.on 'exit': @command=" + _this.command + " @killed=" + _this.killed + " code=" + code + " signal=" + signal); - _this.killed = true; - if (code != null) { - return log.info("spacejam: " + command + " exited with code: " + code); - } else if (signal != null) { - return log.info("spacejam: " + command + " killed with signal: " + signal); - } else { - return log.error("spacejam: " + command + " exited with arguments: " + arguments); - } - }; - })(this)); - }; - - ChildProcess.prototype.kill = function(signal) { - var err, _ref; - if (signal == null) { - signal = "SIGTERM"; - } - log.debug("ChildProcess.kill() signal=" + signal + " @command=" + this.command + " @killed=" + this.killed); - if (this.killed) { - return; - } - log.info("spacejam: killing", this.command); - this.killed = true; - try { - return (_ref = this.child) != null ? _ref.kill(signal) : void 0; - } catch (_error) { - err = _error; - return log.warn("spacejam: Error: While killing " + this.command + " with pid " + this.child.pid + ":\n", err); - } - }; - - return ChildProcess; - - })(); - - module.exports = ChildProcess; - -}).call(this); diff --git a/lib/MeteorMongodb.coffee b/lib/MeteorMongodb.coffee index 843bf0f..cbeb015 100755 --- a/lib/MeteorMongodb.coffee +++ b/lib/MeteorMongodb.coffee @@ -24,18 +24,49 @@ class MeteorMongodb extends EventEmitter findAllChildren: -> log.debug "MeteorMongodb.findAllChildren()", arguments log.debug "@meteorPid", @meteorPid - ps.lookup - command: 'mongod' - psargs: '-l' - ppid: @meteorPid - , (err, resultList )=> - @mongodChilds = resultList - if (err) - log.warn "spacjam: Warning: Couldn't find any mongod children:\n", err - else if resultList.length > 1 - log.warn "spacjam: Warning: Found more than one mongod child:\n", resultList - else - log.debug "Found meteor mongod child with pid: ", resultList[0].pid + if process.platform is 'win32' + resultList = []; + + bat = require('child_process').spawn('cmd.exe', [ + '/c' + "#{__dirname}\\get_children.bat #{@meteorPid}" + ]) + + bat.stdout.setEncoding "utf8" + bat.stderr.setEncoding "utf8" + + bat.stdout.on 'data', (data) -> + + childPid = data.toString().trim() + resultList.push pid: parseInt(childPid) + + bat.stderr.on 'data', (data) -> + log.warn 'spacejam: Warning: Error enumerating mongod children:\n', data + + bat.on 'exit', (code) => + if code != 0 + return log.warn('spacejam: Warning: Enumerating mongod children returned with error code: ', code) + log.info 'MongoDB children:\n', resultList + @mongodChilds = resultList + if resultList.length == 0 + log.warn 'spacejam: Warning: Couldn\'t find any mongod children:\n', err + else if resultList.length > 1 + log.warn 'spacejam: Warning: Found more than one mongod child:\n', resultList + else + log.debug 'Found meteor mongod child with pid: ', resultList[0].pid + else + ps.lookup + command: 'mongod' + psargs: '-l' + ppid: @meteorPid + , (err, resultList )=> + @mongodChilds = resultList + if (err) + log.warn "spacjam: Warning: Couldn't find any mongod children:\n", err + else if resultList.length > 1 + log.warn "spacjam: Warning: Found more than one mongod child:\n", resultList + else + log.debug "Found meteor mongod child with pid: ", resultList[0]?.pid kill: -> diff --git a/lib/get_children.bat b/lib/get_children.bat new file mode 100755 index 0000000..e577df1 --- /dev/null +++ b/lib/get_children.bat @@ -0,0 +1,5 @@ +@echo off & setlocal enabledelayedexpansion +set PPID=%1 +for /F "skip=1 tokens=1" %%a in ('wmic process where "ParentProcessID=%PPID%" get processid') do for %%b in (%%a) do ( + echo %%a +) \ No newline at end of file diff --git a/tests/apps/todos/client/todos.html b/tests/apps/todos/client/todos.html old mode 100644 new mode 100755 index f03e83b..019337e --- a/tests/apps/todos/client/todos.html +++ b/tests/apps/todos/client/todos.html @@ -72,7 +72,7 @@

Todo Lists

{{else}}
- +
{{text}}
{{/if}} From 5915c11473d157cde82bafd35a5859c46b33cb95 Mon Sep 17 00:00:00 2001 From: Serut Date: Thu, 26 May 2016 10:26:14 +0200 Subject: [PATCH 04/21] Fix ../lib/log.coffee not found #55 #56 --- bin/spacejam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/spacejam b/bin/spacejam index f1de6e5..d257c71 100755 --- a/bin/spacejam +++ b/bin/spacejam @@ -1,5 +1,7 @@ #!/usr/bin/env node +require('coffee-script/register'); + require('../lib/log'); require('../lib/CLI').get().exec(); From 886870485326c99b2585822dfcdeb4109c43e5bd Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Wed, 29 Jun 2016 18:54:21 +0000 Subject: [PATCH 05/21] Update to latest meteor version --- tests/apps/failing-app-tests/.meteor/release | 2 +- tests/apps/leaderboard/.meteor/release | 2 +- tests/apps/passing-app-tests/.meteor/release | 2 +- tests/apps/todos/.meteor/release | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/apps/failing-app-tests/.meteor/release b/tests/apps/failing-app-tests/.meteor/release index 4fd7a93..c7ccc08 100644 --- a/tests/apps/failing-app-tests/.meteor/release +++ b/tests/apps/failing-app-tests/.meteor/release @@ -1 +1 @@ -METEOR@1.3 +METEOR@1.3.4.1 \ No newline at end of file diff --git a/tests/apps/leaderboard/.meteor/release b/tests/apps/leaderboard/.meteor/release index 4fd7a93..f80cc1c 100644 --- a/tests/apps/leaderboard/.meteor/release +++ b/tests/apps/leaderboard/.meteor/release @@ -1 +1 @@ -METEOR@1.3 +METEOR@1.3.4.1 diff --git a/tests/apps/passing-app-tests/.meteor/release b/tests/apps/passing-app-tests/.meteor/release index 4fd7a93..c7ccc08 100644 --- a/tests/apps/passing-app-tests/.meteor/release +++ b/tests/apps/passing-app-tests/.meteor/release @@ -1 +1 @@ -METEOR@1.3 +METEOR@1.3.4.1 \ No newline at end of file diff --git a/tests/apps/todos/.meteor/release b/tests/apps/todos/.meteor/release index 4fd7a93..c7ccc08 100644 --- a/tests/apps/todos/.meteor/release +++ b/tests/apps/todos/.meteor/release @@ -1 +1 @@ -METEOR@1.3 +METEOR@1.3.4.1 \ No newline at end of file From 9dbfc3744a60331f3d4b0ca1ba17ad6fef70a034 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Wed, 29 Jun 2016 18:55:24 +0000 Subject: [PATCH 06/21] Fix tests for path.delimiter --- lib/Phantomjs.coffee | 2 +- tests/lib/CLITest.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Phantomjs.coffee b/lib/Phantomjs.coffee index edee612..f212ec5 100755 --- a/lib/Phantomjs.coffee +++ b/lib/Phantomjs.coffee @@ -38,7 +38,7 @@ class Phantomjs extends EventEmitter if useSystemPhantomjs process.env.PATH = DEFAULT_PATH else - process.env.PATH = path.dirname(phantomjs.path) + ':' + DEFAULT_PATH + process.env.PATH = path.dirname(phantomjs.path) + path.delimiter + DEFAULT_PATH @childProcess = new ChildProcess() @childProcess.spawn("phantomjs", spawnArgs, spawnOptions, pipeClass, pipeClassOptions) diff --git a/tests/lib/CLITest.coffee b/tests/lib/CLITest.coffee index 51c5ae8..065d322 100755 --- a/tests/lib/CLITest.coffee +++ b/tests/lib/CLITest.coffee @@ -16,7 +16,7 @@ ChildProcess = require '../../lib/ChildProcess' describe "CLI", -> - @timeout 30000 + @timeout 60000 processArgv = null @@ -99,7 +99,7 @@ describe "CLI", -> try if code is 0 then done() else done("spacejam.done=#{code}") - firstPathEntry = process.env.PATH.split(":")[0] + firstPathEntry = process.env.PATH.split(path.delimiter)[0] expect(firstPathEntry).to.equal(path.dirname(phantomjs.path)) catch err done(err) From 276e8a3bd60f1307f4f81f8a636896850e8fba9d Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Wed, 29 Jun 2016 19:08:40 +0000 Subject: [PATCH 07/21] Add appveyor.yml configuration file --- Cakefile | 2 +- appveyor.yml | 21 +++++++++++++++++++++ package.json | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 appveyor.yml diff --git a/Cakefile b/Cakefile index 0e657da..bf6dd4f 100755 --- a/Cakefile +++ b/Cakefile @@ -1,6 +1,6 @@ ChildProcess = require './lib/ChildProcess' -mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test.coffee" +mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test*.coffee" task "compile", "Compile coffee-script library sources", -> child = new ChildProcess() diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..dc57b29 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,21 @@ +# Test against this version of Node.js +environment: + nodejs_version: "0.10.25" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off \ No newline at end of file diff --git a/package.json b/package.json index ec41ef3..02cde28 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "main": "lib/main.js", "scripts": { - "test": "bin/npm-test.sh", + "test": "cake test", "compile": "cake compile", "prepublish": "cake compile" }, From 19772edf8f0093d7e8e2b8f847caaa969849e054 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Wed, 29 Jun 2016 19:36:21 +0000 Subject: [PATCH 08/21] Bump version to 1.6.2-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02cde28..14d59f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacejam", - "version": "1.6.1", + "version": "1.6.2-rc.1", "dependencies": { "chai": "1.9.2", "cross-spawn": "^2.1.5", From c3c60c2cdea47fae07ecde2e63846320ff28f5ea Mon Sep 17 00:00:00 2001 From: Serut Date: Thu, 7 Jul 2016 14:20:50 +0200 Subject: [PATCH 09/21] Find out the good meteor and mongodb pid and add coffee-script as a package dependency. --- lib/MeteorMongodb.coffee | 73 ++++++++++++++++++++++++---------------- lib/Phantomjs.coffee | 5 ++- package.json | 6 ++-- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/lib/MeteorMongodb.coffee b/lib/MeteorMongodb.coffee index cbeb015..c4351a1 100755 --- a/lib/MeteorMongodb.coffee +++ b/lib/MeteorMongodb.coffee @@ -23,38 +23,21 @@ class MeteorMongodb extends EventEmitter findAllChildren: -> log.debug "MeteorMongodb.findAllChildren()", arguments - log.debug "@meteorPid", @meteorPid if process.platform is 'win32' - resultList = []; + @getChildProcessOnWindows(@meteorPid, (childsPid, _this) -> + _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> + _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> + _this.meteorPid = childsPid[0].pid + log.debug "@meteorPid", _this.meteorPid + _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> + _this.mongodChilds = childsPid + ) + ) + ) + ) - bat = require('child_process').spawn('cmd.exe', [ - '/c' - "#{__dirname}\\get_children.bat #{@meteorPid}" - ]) - - bat.stdout.setEncoding "utf8" - bat.stderr.setEncoding "utf8" - - bat.stdout.on 'data', (data) -> - - childPid = data.toString().trim() - resultList.push pid: parseInt(childPid) - - bat.stderr.on 'data', (data) -> - log.warn 'spacejam: Warning: Error enumerating mongod children:\n', data - - bat.on 'exit', (code) => - if code != 0 - return log.warn('spacejam: Warning: Enumerating mongod children returned with error code: ', code) - log.info 'MongoDB children:\n', resultList - @mongodChilds = resultList - if resultList.length == 0 - log.warn 'spacejam: Warning: Couldn\'t find any mongod children:\n', err - else if resultList.length > 1 - log.warn 'spacejam: Warning: Found more than one mongod child:\n', resultList - else - log.debug 'Found meteor mongod child with pid: ', resultList[0].pid else + log.debug "@meteorPid", @meteorPid ps.lookup command: 'mongod' psargs: '-l' @@ -68,6 +51,38 @@ class MeteorMongodb extends EventEmitter else log.debug "Found meteor mongod child with pid: ", resultList[0]?.pid + getChildProcessOnWindows: (processPid, onSuccess) -> + resultList = []; + bat = require('child_process').spawn('cmd.exe', [ + '/c' + "#{__dirname}\\get_children.bat #{processPid}" + ]) + + bat.stdout.setEncoding "utf8" + bat.stderr.setEncoding "utf8" + + bat.stdout.on 'data', (data) -> + + childPid = data.toString().trim() + resultList.push pid: parseInt(childPid) + + bat.stderr.on 'data', (data) -> + log.warn 'spacejam: Warning: Error enumerating process children:\n', data + + bat.on 'exit', (code) => + if code != 0 + return log.warn('spacejam: Warning: Enumerating child process returned with error code: ', code) + log.debug 'MongoDB children:\n', resultList + if resultList.length == 0 + log.warn 'spacejam: Warning: Couldn\'t find any child process :\n', err + else if resultList.length > 1 + log.warn 'spacejam: Warning: Found more than one child process :\n', resultList + onSuccess(resultList, _this) + else + log.debug 'Found meteor child process with pid: ', resultList[0].pid + onSuccess(resultList, _this) + + kill: -> log.debug "MeteorMongodb.kill() killed=", @killed diff --git a/lib/Phantomjs.coffee b/lib/Phantomjs.coffee index f212ec5..a0cb492 100755 --- a/lib/Phantomjs.coffee +++ b/lib/Phantomjs.coffee @@ -40,8 +40,11 @@ class Phantomjs extends EventEmitter else process.env.PATH = path.dirname(phantomjs.path) + path.delimiter + DEFAULT_PATH + # Get the cross-platform program name + program = path.basename(phantomjs.path) + @childProcess = new ChildProcess() - @childProcess.spawn("phantomjs", spawnArgs, spawnOptions, pipeClass, pipeClassOptions) + @childProcess.spawn(program, spawnArgs, spawnOptions, pipeClass, pipeClassOptions) @childProcess.child.on "exit", (code, signal) => @emit "exit", code, signal diff --git a/package.json b/package.json index 14d59f4..d8fc77a 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,17 @@ "version": "1.6.2-rc.1", "dependencies": { "chai": "1.9.2", - "cross-spawn": "^2.1.5", "glob": "4.0.6", "loglevel": "1.1.0", "phantomjs-prebuilt": "^2.1.7", "psext": "0.0.4", "rc": "0.5.1", "semver": "4.1.0", - "underscore": "1.7.0" + "underscore": "1.7.0", + "coffee-script": "1.8.0", + "cross-spawn": "^4.0.0" }, "devDependencies": { - "coffee-script": "1.8.0", "mocha": "1.21.5", "sinon-chai": "2.6.0", "tmp": "0.0.25", From 46104a0f4c156fcb677c3584d586d9d9902af44f Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 16:35:28 -0400 Subject: [PATCH 10/21] Support latest update of practicalmeteor:mocha --- Cakefile | 1 + lib/Meteor.coffee | 18 ++- package.json | 4 +- tests/apps/failing-app-tests/.meteor/packages | 2 +- tests/apps/failing-app-tests/.meteor/versions | 146 +++++++++--------- tests/apps/passing-app-tests/.meteor/packages | 3 +- tests/apps/passing-app-tests/.meteor/versions | 145 +++++++++-------- tests/lib/FunctionalTests.coffee | 2 +- tests/lib/MeteorTest.coffee | 115 +++++++++++--- 9 files changed, 256 insertions(+), 180 deletions(-) diff --git a/Cakefile b/Cakefile index bf6dd4f..4cc7bb3 100755 --- a/Cakefile +++ b/Cakefile @@ -1,3 +1,4 @@ +require('coffee-script/register'); ChildProcess = require './lib/ChildProcess' mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test*.coffee" diff --git a/lib/Meteor.coffee b/lib/Meteor.coffee index badf914..6dd046d 100755 --- a/lib/Meteor.coffee +++ b/lib/Meteor.coffee @@ -47,6 +47,10 @@ class Meteor extends EventEmitter expect(+options.port, "options.port is not a number.").to.be.ok expect(options.packages, "options.packages is not an array of package names").to.be.an 'array' + # Always use 'practicalmeteor:mocha' package for xunit or console-runner + if options.mocha? or options['driver-package'] is 'practicalmeteor:mocha-console-runner' + options["driver-package"] = "practicalmeteor:mocha" + args = [ command '--driver-package' @@ -56,11 +60,7 @@ class Meteor extends EventEmitter args.push(["--port", options.port]) args.push(["--settings", options.settings]) if options.settings args.push("--production") if options.production - - if options.mocha? - options["driver-package"] = "practicalmeteor:mocha-console-runner" - - + options["root-url"] ?= "http://localhost:#{options.port}/" if command is 'test' @@ -124,6 +124,14 @@ class Meteor extends EventEmitter else delete env.MONGO_URL if env.MONGO_URL? + if @options.mocha? or @options['driver-package'] is 'practicalmeteor:mocha' + if @options.xunit? or @options['xunit-out']? + env.MOCHA_REPORTER = 'xunit' + else + env.MOCHA_REPORTER = 'console' + + + options = { cwd: cwd, env: env, diff --git a/package.json b/package.json index 14d59f4..3644408 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "psext": "0.0.4", "rc": "0.5.1", "semver": "4.1.0", + "sinon": "^1.17.4", "underscore": "1.7.0" }, "devDependencies": { @@ -23,8 +24,7 @@ "main": "lib/main.js", "scripts": { "test": "cake test", - "compile": "cake compile", - "prepublish": "cake compile" + "compile": "cake compile" }, "bin": { "spacejam": "bin/spacejam", diff --git a/tests/apps/failing-app-tests/.meteor/packages b/tests/apps/failing-app-tests/.meteor/packages index d3c0241..2d2b72c 100644 --- a/tests/apps/failing-app-tests/.meteor/packages +++ b/tests/apps/failing-app-tests/.meteor/packages @@ -19,6 +19,6 @@ ecmascript # Enable ECMAScript2015+ syntax in app code autopublish # Publish all data to the clients (for prototyping) insecure # Allow all DB writes from clients (for prototyping) -practicalmeteor:mocha@2.4.5_2 +practicalmeteor:mocha@2.4.5-rc6.2 practicalmeteor:mocha-console-runner@0.2.0 practicalmeteor:chai diff --git a/tests/apps/failing-app-tests/.meteor/versions b/tests/apps/failing-app-tests/.meteor/versions index 15e169b..5d42b3b 100644 --- a/tests/apps/failing-app-tests/.meteor/versions +++ b/tests/apps/failing-app-tests/.meteor/versions @@ -1,77 +1,77 @@ -allow-deny@1.0.2 -autopublish@1.0.5 -autoupdate@1.2.6 -babel-compiler@6.5.2 -babel-runtime@0.1.6 -base64@1.0.6 -binary-heap@1.0.6 -blaze@2.1.5 -blaze-html-templates@1.0.2 -blaze-tools@1.0.6 -boilerplate-generator@1.0.6 -caching-compiler@1.0.2 -caching-html-compiler@1.0.4 -callback-hook@1.0.6 -check@1.1.2 -coffeescript@1.0.15 -ddp@1.2.3 -ddp-client@1.2.3 -ddp-common@1.2.3 -ddp-server@1.2.4 -deps@1.0.10 -diff-sequence@1.0.3 -ecmascript@0.4.1 -ecmascript-runtime@0.2.8 -ejson@1.0.9 -es5-shim@4.5.8 -fastclick@1.0.9 -geojson-utils@1.0.6 -hot-code-push@1.0.2 -html-tools@1.0.7 -htmljs@1.0.7 -http@1.1.3 -id-map@1.0.5 -insecure@1.0.5 -jquery@1.11.6 -launch-screen@1.0.8 -livedata@1.0.16 -logging@1.0.10 -meteor@1.1.12 -meteor-base@1.0.2 -minifier-css@1.1.9 -minifier-js@1.1.9 -minimongo@1.0.12 -mobile-experience@1.0.2 -mobile-status-bar@1.0.10 -modules@0.5.1 -modules-runtime@0.6.1 -mongo@1.1.5 -mongo-id@1.0.2 -npm-mongo@1.4.41 -observe-sequence@1.0.9 -ordered-dict@1.0.5 +allow-deny@1.0.5 +autopublish@1.0.7 +autoupdate@1.2.10 +babel-compiler@6.8.3 +babel-runtime@0.1.9_1 +base64@1.0.9 +binary-heap@1.0.9 +blaze@2.1.8 +blaze-html-templates@1.0.4 +blaze-tools@1.0.9 +boilerplate-generator@1.0.9 +caching-compiler@1.0.5_1 +caching-html-compiler@1.0.6 +callback-hook@1.0.9 +check@1.2.3 +coffeescript@1.1.2_1 +ddp@1.2.5 +ddp-client@1.2.8_1 +ddp-common@1.2.6 +ddp-server@1.2.8_1 +deps@1.0.12 +diff-sequence@1.0.6 +ecmascript@0.4.6_1 +ecmascript-runtime@0.2.11_1 +ejson@1.0.12 +es5-shim@4.5.12_1 +fastclick@1.0.12 +geojson-utils@1.0.9 +hot-code-push@1.0.4 +html-tools@1.0.10 +htmljs@1.0.10 +http@1.1.7 +id-map@1.0.8 +insecure@1.0.7 +jquery@1.11.9 +launch-screen@1.0.12 +livedata@1.0.18 +logging@1.0.13_1 +meteor@1.1.15_1 +meteor-base@1.0.4 +minifier-css@1.1.12_1 +minifier-js@1.1.12_1 +minimongo@1.0.17 +mobile-experience@1.0.4 +mobile-status-bar@1.0.12 +modules@0.6.4 +modules-runtime@0.6.4_1 +mongo@1.1.9_1 +mongo-id@1.0.5 +npm-mongo@1.4.44_1 +observe-sequence@1.0.12 +ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 practicalmeteor:loglevel@1.2.0_2 -practicalmeteor:mocha@2.4.6-rc.1 -practicalmeteor:mocha-console-runner@0.2.1-rc.2 -practicalmeteor:mocha-core@0.1.4 +practicalmeteor:mocha@2.4.5_3 +practicalmeteor:mocha-console-runner@0.2.1 +practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 -promise@0.6.5 -random@1.0.7 -reactive-var@1.0.7 -reload@1.1.6 -retry@1.0.5 -routepolicy@1.0.8 -spacebars@1.0.9 -spacebars-compiler@1.0.9 -standard-minifier-css@1.0.4 -standard-minifier-js@1.0.4 -templating@1.1.7 -templating-tools@1.0.2 +promise@0.7.2_1 +random@1.0.10 +reactive-var@1.0.10 +reload@1.1.10 +retry@1.0.8 +routepolicy@1.0.11 +spacebars@1.0.12 +spacebars-compiler@1.0.12 +standard-minifier-css@1.0.7_1 +standard-minifier-js@1.0.7_1 +templating@1.1.12_1 +templating-tools@1.0.4 tmeasday:test-reporter-helpers@0.2.1 -tracker@1.0.11 -ui@1.0.9 -underscore@1.0.6 -url@1.0.7 -webapp@1.2.6 -webapp-hashing@1.0.7 +tracker@1.0.14 +ui@1.0.11 +underscore@1.0.9 +url@1.0.10 +webapp@1.2.9_1 +webapp-hashing@1.0.9 diff --git a/tests/apps/passing-app-tests/.meteor/packages b/tests/apps/passing-app-tests/.meteor/packages index d3c0241..1e03e6b 100644 --- a/tests/apps/passing-app-tests/.meteor/packages +++ b/tests/apps/passing-app-tests/.meteor/packages @@ -19,6 +19,5 @@ ecmascript # Enable ECMAScript2015+ syntax in app code autopublish # Publish all data to the clients (for prototyping) insecure # Allow all DB writes from clients (for prototyping) -practicalmeteor:mocha@2.4.5_2 -practicalmeteor:mocha-console-runner@0.2.0 +practicalmeteor:mocha@2.4.5-rc6.2 practicalmeteor:chai diff --git a/tests/apps/passing-app-tests/.meteor/versions b/tests/apps/passing-app-tests/.meteor/versions index 15e169b..b36c531 100644 --- a/tests/apps/passing-app-tests/.meteor/versions +++ b/tests/apps/passing-app-tests/.meteor/versions @@ -1,77 +1,76 @@ -allow-deny@1.0.2 -autopublish@1.0.5 -autoupdate@1.2.6 -babel-compiler@6.5.2 -babel-runtime@0.1.6 -base64@1.0.6 -binary-heap@1.0.6 -blaze@2.1.5 -blaze-html-templates@1.0.2 -blaze-tools@1.0.6 -boilerplate-generator@1.0.6 -caching-compiler@1.0.2 -caching-html-compiler@1.0.4 -callback-hook@1.0.6 -check@1.1.2 -coffeescript@1.0.15 -ddp@1.2.3 -ddp-client@1.2.3 -ddp-common@1.2.3 -ddp-server@1.2.4 -deps@1.0.10 -diff-sequence@1.0.3 -ecmascript@0.4.1 -ecmascript-runtime@0.2.8 -ejson@1.0.9 -es5-shim@4.5.8 -fastclick@1.0.9 -geojson-utils@1.0.6 -hot-code-push@1.0.2 -html-tools@1.0.7 -htmljs@1.0.7 -http@1.1.3 -id-map@1.0.5 -insecure@1.0.5 -jquery@1.11.6 -launch-screen@1.0.8 -livedata@1.0.16 -logging@1.0.10 -meteor@1.1.12 -meteor-base@1.0.2 -minifier-css@1.1.9 -minifier-js@1.1.9 -minimongo@1.0.12 -mobile-experience@1.0.2 -mobile-status-bar@1.0.10 -modules@0.5.1 -modules-runtime@0.6.1 -mongo@1.1.5 -mongo-id@1.0.2 -npm-mongo@1.4.41 -observe-sequence@1.0.9 -ordered-dict@1.0.5 +allow-deny@1.0.5 +autopublish@1.0.7 +autoupdate@1.2.10 +babel-compiler@6.8.3 +babel-runtime@0.1.9_1 +base64@1.0.9 +binary-heap@1.0.9 +blaze@2.1.8 +blaze-html-templates@1.0.4 +blaze-tools@1.0.9 +boilerplate-generator@1.0.9 +caching-compiler@1.0.5_1 +caching-html-compiler@1.0.6 +callback-hook@1.0.9 +check@1.2.3 +coffeescript@1.1.2_1 +ddp@1.2.5 +ddp-client@1.2.8_1 +ddp-common@1.2.6 +ddp-server@1.2.8_1 +deps@1.0.12 +diff-sequence@1.0.6 +ecmascript@0.4.6_1 +ecmascript-runtime@0.2.11_1 +ejson@1.0.12 +es5-shim@4.5.12_1 +fastclick@1.0.12 +geojson-utils@1.0.9 +hot-code-push@1.0.4 +html-tools@1.0.10 +htmljs@1.0.10 +http@1.1.7 +id-map@1.0.8 +insecure@1.0.7 +jquery@1.11.9 +launch-screen@1.0.12 +livedata@1.0.18 +logging@1.0.13_1 +meteor@1.1.15_1 +meteor-base@1.0.4 +minifier-css@1.1.12_1 +minifier-js@1.1.12_1 +minimongo@1.0.17 +mobile-experience@1.0.4 +mobile-status-bar@1.0.12 +modules@0.6.4 +modules-runtime@0.6.4_1 +mongo@1.1.9_1 +mongo-id@1.0.5 +npm-mongo@1.4.44_1 +observe-sequence@1.0.12 +ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 practicalmeteor:loglevel@1.2.0_2 -practicalmeteor:mocha@2.4.6-rc.1 -practicalmeteor:mocha-console-runner@0.2.1-rc.2 -practicalmeteor:mocha-core@0.1.4 +practicalmeteor:mocha@2.4.5-rc6.2 +practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 -promise@0.6.5 -random@1.0.7 -reactive-var@1.0.7 -reload@1.1.6 -retry@1.0.5 -routepolicy@1.0.8 -spacebars@1.0.9 -spacebars-compiler@1.0.9 -standard-minifier-css@1.0.4 -standard-minifier-js@1.0.4 -templating@1.1.7 -templating-tools@1.0.2 +promise@0.7.2_1 +random@1.0.10 +reactive-var@1.0.10 +reload@1.1.10 +retry@1.0.8 +routepolicy@1.0.11 +spacebars@1.0.12 +spacebars-compiler@1.0.12 +standard-minifier-css@1.0.7_1 +standard-minifier-js@1.0.7_1 +templating@1.1.12_1 +templating-tools@1.0.4 tmeasday:test-reporter-helpers@0.2.1 -tracker@1.0.11 -ui@1.0.9 -underscore@1.0.6 -url@1.0.7 -webapp@1.2.6 -webapp-hashing@1.0.7 +tracker@1.0.14 +ui@1.0.11 +underscore@1.0.9 +url@1.0.10 +webapp@1.2.9_1 +webapp-hashing@1.0.9 diff --git a/tests/lib/FunctionalTests.coffee b/tests/lib/FunctionalTests.coffee index 1796a2a..1e74031 100755 --- a/tests/lib/FunctionalTests.coffee +++ b/tests/lib/FunctionalTests.coffee @@ -14,7 +14,7 @@ log.info spacejamBin describe "spacejam", -> - @timeout 120000 + @timeout 150000 spacejamChild = null diff --git a/tests/lib/MeteorTest.coffee b/tests/lib/MeteorTest.coffee index 17ae1b5..93a65c2 100755 --- a/tests/lib/MeteorTest.coffee +++ b/tests/lib/MeteorTest.coffee @@ -66,29 +66,6 @@ describe "Meteor", -> expectedSpawnOptions.env.MONGO_URL = mongoUrl if mongoUrl? return expectedSpawnOptions - - it "getTestArgs() - get common args for test and test-packages command", -> - options = { - "driver-package": "package" - "release": 'release' - "port": '3000' - "settings": 'settings' - "production": true - "packages": ['pkg1', 'pkg2'] - } - - args = meteor.getTestArgs('test', options) - - expect(args).to.be.deep.equal([ - "test", - "--driver-package", "package", - "--release", "release", - "--port", "3000", - "--settings", "settings" - "--production" - ]) - - describe "getTestArgs()", -> beforeEach -> @@ -103,6 +80,29 @@ describe "Meteor", -> meteor.options = @options + it "get common args for test and test-packages command", -> + options = { + "driver-package": "package" + "release": 'release' + "port": '3000' + "settings": 'settings' + "production": true + "packages": ['pkg1', 'pkg2'] + } + + args = meteor.getTestArgs('test', options) + + expect(args).to.be.deep.equal([ + "test", + "--driver-package", "package", + "--release", "release", + "--port", "3000", + "--settings", "settings" + "--production" + ]) + + + it "create args for test-packages command", -> args = meteor.getTestArgs('test-packages', @options) @@ -138,6 +138,75 @@ describe "Meteor", -> "--full-app" ]) + it "use package practicalmeteor:mocha if mocha practicalmeteor:mocha-console-runner as driver-package", -> + + expectedArgs = [ + "test", + "--driver-package", "practicalmeteor:mocha", + "--release", "release", + "--port", "3000", + "--settings", "settings", + "--production", + "--test-app-path", "/tmp/app", + "--full-app" + ] + + opts = _.extend(_.clone(@options),{ + "test-app-path": "/tmp/app" + "full-app": true, + "mocha": true + }); + + args = meteor.getTestArgs('test', opts) + + expect(args, "--mocha").to.be.deep.equal(expectedArgs) + + opts = _.extend(_.clone(@options),{ + "test-app-path": "/tmp/app" + "full-app": true, + "xunit": true, + "mocha": true + }); + + args = meteor.getTestArgs('test', opts) + + expect(args, "--xunit").to.be.deep.equal(expectedArgs) + + opts = _.extend(_.clone(@options),{ + "test-app-path": "/tmp/app" + "full-app": true, + "driver-package": "practicalmeteor:mocha-console-runner" + }); + + args = meteor.getTestArgs('test', opts) + + expect(args, "--driver-package=practicalmeteor:mocha-console-runner").to.be.deep.equal(expectedArgs) + + + describe "runTestCommand", -> + + beforeEach -> + @expectedSpawnArgs = [ + "test", + "--driver-package", "practicalmeteor:mocha" + "--port", defaultTestPort + ] + @expectedSpawnOptions = getExpectedSpawnOptions(4096) + @expectedSpawnOptions.env.MOCHA_REPORTER = 'console' + + it "should spawn meteor with env var MOCHA_REPORTER to console if mocha option or practicalmeteor:mocha as driver-package", -> + + meteor.runTestCommand("test",{"mocha": true}) + expect(spawnStub.args[0]).to.eql(["meteor", @expectedSpawnArgs, @expectedSpawnOptions]) + + meteor = new Meteor() + meteor.runTestCommand("test",{"driver-package": "practicalmeteor:mocha"}) + expect(spawnStub.args[0]).to.eql(["meteor", @expectedSpawnArgs, @expectedSpawnOptions]) + + + it "should spawn meteor with env var MOCHA_REPORTER to console with practicalmeteor:mocha-console-runner as driver-package", -> + meteor.runTestCommand("test", {"driver-package": "practicalmeteor:mocha-console-runner"}) + expect(spawnStub.args[0]).to.eql(["meteor", @expectedSpawnArgs, @expectedSpawnOptions]) it "testApp - should spawn meteor with correct arguments", -> meteor.testApp({"full-app": true}) From f799d0fcd51f3deed25dcef76b3fd978fce80fd9 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 16:37:50 -0400 Subject: [PATCH 11/21] Cleanup logging --- lib/MeteorMongodb.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MeteorMongodb.coffee b/lib/MeteorMongodb.coffee index cbeb015..6c8f68c 100755 --- a/lib/MeteorMongodb.coffee +++ b/lib/MeteorMongodb.coffee @@ -46,7 +46,7 @@ class MeteorMongodb extends EventEmitter bat.on 'exit', (code) => if code != 0 return log.warn('spacejam: Warning: Enumerating mongod children returned with error code: ', code) - log.info 'MongoDB children:\n', resultList + log.debug 'MongoDB children:\n', resultList @mongodChilds = resultList if resultList.length == 0 log.warn 'spacejam: Warning: Couldn\'t find any mongod children:\n', err From 4bd7434f7bbe8a50ac172186cd0e92091363944d Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 16:45:07 -0400 Subject: [PATCH 12/21] Bump version to 1.6.2-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8979b1..0887ca0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacejam", - "version": "1.6.2-rc.1", + "version": "1.6.2-rc.2", "dependencies": { "chai": "1.9.2", "glob": "4.0.6", From ca184deeb2ac702afaf9a31d6947857880d1193e Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 21:16:42 +0000 Subject: [PATCH 13/21] Add prepublish script again --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0887ca0..278cd68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacejam", - "version": "1.6.2-rc.2", + "version": "1.6.2-rc.3", "dependencies": { "chai": "1.9.2", "glob": "4.0.6", @@ -24,7 +24,8 @@ "main": "lib/main.js", "scripts": { "test": "cake test", - "compile": "cake compile" + "compile": "cake compile", + "prepublish": "cake compile" }, "bin": { "spacejam": "bin/spacejam", From 40cdf8a0c95ff14a127fe40bc92ba8cf889574de Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 21:26:50 +0000 Subject: [PATCH 14/21] Bump version to 1.6.2-rc.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 278cd68..5716e65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacejam", - "version": "1.6.2-rc.3", + "version": "1.6.2-rc.4", "dependencies": { "chai": "1.9.2", "glob": "4.0.6", From 948fe10cd4caffbc6428bb0f5552ca8d72798d3d Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 7 Jul 2016 21:43:42 +0000 Subject: [PATCH 15/21] Skipt scripts tests if you are running in windows --- tests/lib/ScriptsTests.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/lib/ScriptsTests.coffee b/tests/lib/ScriptsTests.coffee index 7efbc9d..9b40eb5 100755 --- a/tests/lib/ScriptsTests.coffee +++ b/tests/lib/ScriptsTests.coffee @@ -3,7 +3,11 @@ ChildProcess = require '../../lib/ChildProcess' path = require 'path' _ = require('underscore') -describe "scripts", -> +describe "scripts", -> + + if process.platform is 'win32' + console.log("spacejam scripts are not supported in windows") + return spacejamBinDir = path.resolve(__dirname, "../../bin") meteorStubDir = path.resolve(__dirname, "../bin") From b73d75196b1499d25948964805abb4331ed082e3 Mon Sep 17 00:00:00 2001 From: Serut Date: Fri, 8 Jul 2016 19:36:38 +0200 Subject: [PATCH 16/21] Add try-thread-sleep (cross-spawn + spacejam supports the node version 0.10) and remove Cake compilation of lib/*.coffee otherwise it creates a mess with windows pid --- Cakefile | 4 ++-- lib/MeteorMongodb.coffee | 10 +++------- package.json | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cakefile b/Cakefile index 4cc7bb3..392b7e2 100755 --- a/Cakefile +++ b/Cakefile @@ -4,8 +4,8 @@ ChildProcess = require './lib/ChildProcess' mochaCmdLine = "mocha --colors --compilers coffee:coffee-script/register --reporter spec tests/lib/*Test*.coffee" task "compile", "Compile coffee-script library sources", -> - child = new ChildProcess() - child.exec "coffee -o lib -c lib" +# child = new ChildProcess() +# child.exec "coffee -o lib -c lib" child = new ChildProcess() child.exec "coffee -o tests/lib -c tests/lib" diff --git a/lib/MeteorMongodb.coffee b/lib/MeteorMongodb.coffee index c4351a1..ba6931c 100755 --- a/lib/MeteorMongodb.coffee +++ b/lib/MeteorMongodb.coffee @@ -25,15 +25,11 @@ class MeteorMongodb extends EventEmitter log.debug "MeteorMongodb.findAllChildren()", arguments if process.platform is 'win32' @getChildProcessOnWindows(@meteorPid, (childsPid, _this) -> - _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> + _this.meteorPid = childsPid[0].pid + log.debug "@meteorPid", _this.meteorPid _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> - _this.meteorPid = childsPid[0].pid - log.debug "@meteorPid", _this.meteorPid - _this.getChildProcessOnWindows(childsPid[0].pid, (childsPid, _this) -> - _this.mongodChilds = childsPid - ) + _this.mongodChilds = childsPid ) - ) ) else diff --git a/package.json b/package.json index 5716e65..389222e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "underscore": "1.7.0", "sinon": "^1.17.4", "coffee-script": "1.8.0", + "try-thread-sleep": "1.0.0", "cross-spawn": "^4.0.0" }, "devDependencies": { From b1d4c17d23a3afff510c0e5c539aad14f77705f6 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Mon, 11 Jul 2016 19:36:49 +0000 Subject: [PATCH 17/21] Fix functional tests --- lib/Phantomjs.coffee | 3 ++- lib/get_children.bat | 8 ++++---- tests/lib/FunctionalTests.coffee | 16 ++++++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/Phantomjs.coffee b/lib/Phantomjs.coffee index a0cb492..6a1fcdb 100755 --- a/lib/Phantomjs.coffee +++ b/lib/Phantomjs.coffee @@ -41,7 +41,8 @@ class Phantomjs extends EventEmitter process.env.PATH = path.dirname(phantomjs.path) + path.delimiter + DEFAULT_PATH # Get the cross-platform program name - program = path.basename(phantomjs.path) +# program = path.basename(phantomjs.path) + program = phantomjs.path @childProcess = new ChildProcess() @childProcess.spawn(program, spawnArgs, spawnOptions, pipeClass, pipeClassOptions) diff --git a/lib/get_children.bat b/lib/get_children.bat index e577df1..5a67bbc 100755 --- a/lib/get_children.bat +++ b/lib/get_children.bat @@ -1,5 +1,5 @@ -@echo off & setlocal enabledelayedexpansion -set PPID=%1 -for /F "skip=1 tokens=1" %%a in ('wmic process where "ParentProcessID=%PPID%" get processid') do for %%b in (%%a) do ( - echo %%a +@echo off & setlocal enabledelayedexpansion +set PPID=%1 +for /F "skip=1 tokens=1" %%a in ('wmic process where "ParentProcessID=%PPID%" get processid') do for %%b in (%%a) do ( + echo %%a ) \ No newline at end of file diff --git a/tests/lib/FunctionalTests.coffee b/tests/lib/FunctionalTests.coffee index 1e74031..6acbc83 100755 --- a/tests/lib/FunctionalTests.coffee +++ b/tests/lib/FunctionalTests.coffee @@ -2,7 +2,7 @@ path = require 'path' fs = require 'fs' DOMParser = require('xmldom').DOMParser xpath = require('xpath') - +os = require("os") expect = require("chai").expect CLI = require '../../lib/CLI' @@ -12,8 +12,9 @@ spacejamBin = require.resolve("../../bin/spacejam") log.info spacejamBin - +#should exit with 0 with successful tests describe "spacejam", -> + @timeout 150000 spacejamChild = null @@ -146,16 +147,18 @@ describe "spacejam", -> done() - it "should save xunit output to file, if --xunit-out is specified", (done)-> + it "should save xunit output to file, if --xunit-out is specified", (done)-> spacejamChild = new ChildProcess() # TODO: Have a global singleton to provide the port testPort = "20096" - args = ["test-packages", "--port", testPort, '--xunit-out', '/tmp/xunit.xml', "success"] + + xunitFile = path.join(os.tmpdir(), 'xunit.xml') + args = ["test-packages", "--port", testPort, '--xunit-out', xunitFile, "success"] spacejamChild.spawn(spacejamBin,args) spacejamChild.child.on "close", (code, signal) => try expect(code,"spacejam exited with errors").to.equal Spacejam.DONE.TEST_SUCCESS - xml = fs.readFileSync('/tmp/xunit.xml', encoding: 'utf8') + xml = fs.readFileSync(xunitFile, encoding: 'utf8') log.debug xml expect(xml).to.be.ok xmlDom = new DOMParser().parseFromString(xml) @@ -181,7 +184,8 @@ describe "spacejam", -> it "should print the package version", (done)-> process.chdir(__dirname + "/../packages/standalone-package") spacejamChild = new ChildProcess() - spacejamChild.exec "#{spacejamBin} package-version", null, (err, stdout, stderr)=> + # Using also node to avoid problems with windows + spacejamChild.exec "node #{spacejamBin} package-version", null, (err, stdout, stderr)=> try expect(err).to.be.null expect(stdout.toString()).to.contain '0.9.5' From efe92c616adc3c0d9bd128be69128967e9700876 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 14 Jul 2016 16:55:59 -0400 Subject: [PATCH 18/21] Add mainTests file --- .gitignore | 1 + tests/lib/MeteorTest.coffee | 2 +- tests/lib/ScriptsTests.coffee | 1 + tests/lib/mainTest.coffee | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/lib/mainTest.coffee diff --git a/.gitignore b/.gitignore index 5da931f..2cf6237 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules/ *.pid versions.json .meteor/versions +.meteor/dev_bundle diff --git a/tests/lib/MeteorTest.coffee b/tests/lib/MeteorTest.coffee index 93a65c2..b04980a 100755 --- a/tests/lib/MeteorTest.coffee +++ b/tests/lib/MeteorTest.coffee @@ -300,7 +300,7 @@ describe "Meteor", -> it "kill() - should kill internal mongodb child processes", (done)-> - @timeout 60000 + @timeout 120000 spawnStub.restore() spawnStub = null ChildProcess.prototype.child = null diff --git a/tests/lib/ScriptsTests.coffee b/tests/lib/ScriptsTests.coffee index 9b40eb5..eb7becc 100755 --- a/tests/lib/ScriptsTests.coffee +++ b/tests/lib/ScriptsTests.coffee @@ -65,6 +65,7 @@ describe "scripts", -> delete childEnv.TEST_ROOT_URL delete childEnv.TEST_MONGO_URL delete childEnv.TEST_METEOR_SETTINGS_PATH + delete childEnv.METEOR_ENV execOptions = env: childEnv diff --git a/tests/lib/mainTest.coffee b/tests/lib/mainTest.coffee new file mode 100644 index 0000000..8894a0e --- /dev/null +++ b/tests/lib/mainTest.coffee @@ -0,0 +1 @@ +log.setLevel("debug") \ No newline at end of file From 80bbdf9c0f45e0a72263035206b706f51225c7bb Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 14 Jul 2016 17:51:58 -0400 Subject: [PATCH 19/21] Update tests apps to latest meteor version --- .travis.yml | 1 + .../apps/failing-app-tests/.meteor/.gitignore | 1 + tests/apps/failing-app-tests/.meteor/release | 2 +- tests/apps/failing-app-tests/.meteor/versions | 44 +++++++++---------- tests/apps/leaderboard/.meteor/.gitignore | 1 + tests/apps/leaderboard/.meteor/release | 2 +- .../apps/passing-app-tests/.meteor/.gitignore | 1 + tests/apps/passing-app-tests/.meteor/release | 2 +- tests/apps/passing-app-tests/.meteor/versions | 44 +++++++++---------- tests/apps/todos/.meteor/.gitignore | 1 + tests/apps/todos/.meteor/release | 2 +- 11 files changed, 53 insertions(+), 48 deletions(-) diff --git a/.travis.yml b/.travis.yml index abee2b6..b4b7071 100755 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,5 @@ before_install: - export PATH="$HOME/.meteor:$PATH" - meteor --version - npm install -g coffee-script@1.8.0 +- npm install -g phantomjs-prebuilt@2.1.7 - phantomjs -v diff --git a/tests/apps/failing-app-tests/.meteor/.gitignore b/tests/apps/failing-app-tests/.meteor/.gitignore index 4083037..501f92e 100644 --- a/tests/apps/failing-app-tests/.meteor/.gitignore +++ b/tests/apps/failing-app-tests/.meteor/.gitignore @@ -1 +1,2 @@ +dev_bundle local diff --git a/tests/apps/failing-app-tests/.meteor/release b/tests/apps/failing-app-tests/.meteor/release index c7ccc08..f6a1c79 100644 --- a/tests/apps/failing-app-tests/.meteor/release +++ b/tests/apps/failing-app-tests/.meteor/release @@ -1 +1 @@ -METEOR@1.3.4.1 \ No newline at end of file +METEOR@1.3.4.4 \ No newline at end of file diff --git a/tests/apps/failing-app-tests/.meteor/versions b/tests/apps/failing-app-tests/.meteor/versions index 5d42b3b..a87e72f 100644 --- a/tests/apps/failing-app-tests/.meteor/versions +++ b/tests/apps/failing-app-tests/.meteor/versions @@ -1,7 +1,7 @@ allow-deny@1.0.5 autopublish@1.0.7 -autoupdate@1.2.10 -babel-compiler@6.8.3 +autoupdate@1.2.11 +babel-compiler@6.8.4 babel-runtime@0.1.9_1 base64@1.0.9 binary-heap@1.0.9 @@ -9,45 +9,45 @@ blaze@2.1.8 blaze-html-templates@1.0.4 blaze-tools@1.0.9 boilerplate-generator@1.0.9 -caching-compiler@1.0.5_1 +caching-compiler@1.0.6 caching-html-compiler@1.0.6 callback-hook@1.0.9 check@1.2.3 -coffeescript@1.1.2_1 +coffeescript@1.1.3 ddp@1.2.5 -ddp-client@1.2.8_1 +ddp-client@1.2.9 ddp-common@1.2.6 -ddp-server@1.2.8_1 +ddp-server@1.2.9 deps@1.0.12 diff-sequence@1.0.6 -ecmascript@0.4.6_1 -ecmascript-runtime@0.2.11_1 +ecmascript@0.4.7 +ecmascript-runtime@0.2.12 ejson@1.0.12 -es5-shim@4.5.12_1 +es5-shim@4.5.13 fastclick@1.0.12 geojson-utils@1.0.9 hot-code-push@1.0.4 html-tools@1.0.10 htmljs@1.0.10 -http@1.1.7 +http@1.1.8 id-map@1.0.8 insecure@1.0.7 jquery@1.11.9 launch-screen@1.0.12 livedata@1.0.18 -logging@1.0.13_1 -meteor@1.1.15_1 +logging@1.0.14 +meteor@1.1.16 meteor-base@1.0.4 -minifier-css@1.1.12_1 -minifier-js@1.1.12_1 +minifier-css@1.1.13 +minifier-js@1.1.13 minimongo@1.0.17 mobile-experience@1.0.4 mobile-status-bar@1.0.12 -modules@0.6.4 -modules-runtime@0.6.4_1 +modules@0.6.5 +modules-runtime@0.6.5 mongo@1.1.9_1 mongo-id@1.0.5 -npm-mongo@1.4.44_1 +npm-mongo@1.4.45 observe-sequence@1.0.12 ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 @@ -56,7 +56,7 @@ practicalmeteor:mocha@2.4.5_3 practicalmeteor:mocha-console-runner@0.2.1 practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 -promise@0.7.2_1 +promise@0.7.3 random@1.0.10 reactive-var@1.0.10 reload@1.1.10 @@ -64,14 +64,14 @@ retry@1.0.8 routepolicy@1.0.11 spacebars@1.0.12 spacebars-compiler@1.0.12 -standard-minifier-css@1.0.7_1 -standard-minifier-js@1.0.7_1 -templating@1.1.12_1 +standard-minifier-css@1.0.8 +standard-minifier-js@1.0.8 +templating@1.1.13 templating-tools@1.0.4 tmeasday:test-reporter-helpers@0.2.1 tracker@1.0.14 ui@1.0.11 underscore@1.0.9 url@1.0.10 -webapp@1.2.9_1 +webapp@1.2.10 webapp-hashing@1.0.9 diff --git a/tests/apps/leaderboard/.meteor/.gitignore b/tests/apps/leaderboard/.meteor/.gitignore index 41144ec..f2a2095 100644 --- a/tests/apps/leaderboard/.meteor/.gitignore +++ b/tests/apps/leaderboard/.meteor/.gitignore @@ -1,2 +1,3 @@ +dev_bundle local versions diff --git a/tests/apps/leaderboard/.meteor/release b/tests/apps/leaderboard/.meteor/release index f80cc1c..e5b4dc1 100644 --- a/tests/apps/leaderboard/.meteor/release +++ b/tests/apps/leaderboard/.meteor/release @@ -1 +1 @@ -METEOR@1.3.4.1 +METEOR@1.3.4.4 diff --git a/tests/apps/passing-app-tests/.meteor/.gitignore b/tests/apps/passing-app-tests/.meteor/.gitignore index 4083037..501f92e 100644 --- a/tests/apps/passing-app-tests/.meteor/.gitignore +++ b/tests/apps/passing-app-tests/.meteor/.gitignore @@ -1 +1,2 @@ +dev_bundle local diff --git a/tests/apps/passing-app-tests/.meteor/release b/tests/apps/passing-app-tests/.meteor/release index c7ccc08..f6a1c79 100644 --- a/tests/apps/passing-app-tests/.meteor/release +++ b/tests/apps/passing-app-tests/.meteor/release @@ -1 +1 @@ -METEOR@1.3.4.1 \ No newline at end of file +METEOR@1.3.4.4 \ No newline at end of file diff --git a/tests/apps/passing-app-tests/.meteor/versions b/tests/apps/passing-app-tests/.meteor/versions index b36c531..a36bd61 100644 --- a/tests/apps/passing-app-tests/.meteor/versions +++ b/tests/apps/passing-app-tests/.meteor/versions @@ -1,7 +1,7 @@ allow-deny@1.0.5 autopublish@1.0.7 -autoupdate@1.2.10 -babel-compiler@6.8.3 +autoupdate@1.2.11 +babel-compiler@6.8.4 babel-runtime@0.1.9_1 base64@1.0.9 binary-heap@1.0.9 @@ -9,45 +9,45 @@ blaze@2.1.8 blaze-html-templates@1.0.4 blaze-tools@1.0.9 boilerplate-generator@1.0.9 -caching-compiler@1.0.5_1 +caching-compiler@1.0.6 caching-html-compiler@1.0.6 callback-hook@1.0.9 check@1.2.3 -coffeescript@1.1.2_1 +coffeescript@1.1.3 ddp@1.2.5 -ddp-client@1.2.8_1 +ddp-client@1.2.9 ddp-common@1.2.6 -ddp-server@1.2.8_1 +ddp-server@1.2.9 deps@1.0.12 diff-sequence@1.0.6 -ecmascript@0.4.6_1 -ecmascript-runtime@0.2.11_1 +ecmascript@0.4.7 +ecmascript-runtime@0.2.12 ejson@1.0.12 -es5-shim@4.5.12_1 +es5-shim@4.5.13 fastclick@1.0.12 geojson-utils@1.0.9 hot-code-push@1.0.4 html-tools@1.0.10 htmljs@1.0.10 -http@1.1.7 +http@1.1.8 id-map@1.0.8 insecure@1.0.7 jquery@1.11.9 launch-screen@1.0.12 livedata@1.0.18 -logging@1.0.13_1 -meteor@1.1.15_1 +logging@1.0.14 +meteor@1.1.16 meteor-base@1.0.4 -minifier-css@1.1.12_1 -minifier-js@1.1.12_1 +minifier-css@1.1.13 +minifier-js@1.1.13 minimongo@1.0.17 mobile-experience@1.0.4 mobile-status-bar@1.0.12 -modules@0.6.4 -modules-runtime@0.6.4_1 +modules@0.6.5 +modules-runtime@0.6.5 mongo@1.1.9_1 mongo-id@1.0.5 -npm-mongo@1.4.44_1 +npm-mongo@1.4.45 observe-sequence@1.0.12 ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 @@ -55,7 +55,7 @@ practicalmeteor:loglevel@1.2.0_2 practicalmeteor:mocha@2.4.5-rc6.2 practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 -promise@0.7.2_1 +promise@0.7.3 random@1.0.10 reactive-var@1.0.10 reload@1.1.10 @@ -63,14 +63,14 @@ retry@1.0.8 routepolicy@1.0.11 spacebars@1.0.12 spacebars-compiler@1.0.12 -standard-minifier-css@1.0.7_1 -standard-minifier-js@1.0.7_1 -templating@1.1.12_1 +standard-minifier-css@1.0.8 +standard-minifier-js@1.0.8 +templating@1.1.13 templating-tools@1.0.4 tmeasday:test-reporter-helpers@0.2.1 tracker@1.0.14 ui@1.0.11 underscore@1.0.9 url@1.0.10 -webapp@1.2.9_1 +webapp@1.2.10 webapp-hashing@1.0.9 diff --git a/tests/apps/todos/.meteor/.gitignore b/tests/apps/todos/.meteor/.gitignore index 41144ec..f2a2095 100644 --- a/tests/apps/todos/.meteor/.gitignore +++ b/tests/apps/todos/.meteor/.gitignore @@ -1,2 +1,3 @@ +dev_bundle local versions diff --git a/tests/apps/todos/.meteor/release b/tests/apps/todos/.meteor/release index c7ccc08..f6a1c79 100644 --- a/tests/apps/todos/.meteor/release +++ b/tests/apps/todos/.meteor/release @@ -1 +1 @@ -METEOR@1.3.4.1 \ No newline at end of file +METEOR@1.3.4.4 \ No newline at end of file From 9bed040ebaa3de3e51172286e728f68647d44d70 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 14 Jul 2016 18:09:45 -0400 Subject: [PATCH 20/21] Add bin/npm-test.sh as npm test script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 389222e..236a3ad 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "main": "lib/main.js", "scripts": { - "test": "cake test", + "test": "bin/npm-test.sh", "compile": "cake compile", "prepublish": "cake compile" }, From 070f65985e4ef55244a4624d468281924f275813 Mon Sep 17 00:00:00 2001 From: Juan Sepulveda Date: Thu, 14 Jul 2016 22:41:21 +0000 Subject: [PATCH 21/21] Update to latest practicalmeteor:mocha --- tests/apps/failing-app-tests/.meteor/packages | 3 +-- tests/apps/failing-app-tests/.meteor/versions | 1 - tests/apps/passing-app-tests/.meteor/packages | 2 +- tests/apps/passing-app-tests/.meteor/versions | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/apps/failing-app-tests/.meteor/packages b/tests/apps/failing-app-tests/.meteor/packages index 2d2b72c..50a6ace 100644 --- a/tests/apps/failing-app-tests/.meteor/packages +++ b/tests/apps/failing-app-tests/.meteor/packages @@ -19,6 +19,5 @@ ecmascript # Enable ECMAScript2015+ syntax in app code autopublish # Publish all data to the clients (for prototyping) insecure # Allow all DB writes from clients (for prototyping) -practicalmeteor:mocha@2.4.5-rc6.2 -practicalmeteor:mocha-console-runner@0.2.0 +practicalmeteor:mocha@2.4.5_6 practicalmeteor:chai diff --git a/tests/apps/failing-app-tests/.meteor/versions b/tests/apps/failing-app-tests/.meteor/versions index a87e72f..7fd234b 100644 --- a/tests/apps/failing-app-tests/.meteor/versions +++ b/tests/apps/failing-app-tests/.meteor/versions @@ -53,7 +53,6 @@ ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 practicalmeteor:loglevel@1.2.0_2 practicalmeteor:mocha@2.4.5_3 -practicalmeteor:mocha-console-runner@0.2.1 practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 promise@0.7.3 diff --git a/tests/apps/passing-app-tests/.meteor/packages b/tests/apps/passing-app-tests/.meteor/packages index 1e03e6b..50a6ace 100644 --- a/tests/apps/passing-app-tests/.meteor/packages +++ b/tests/apps/passing-app-tests/.meteor/packages @@ -19,5 +19,5 @@ ecmascript # Enable ECMAScript2015+ syntax in app code autopublish # Publish all data to the clients (for prototyping) insecure # Allow all DB writes from clients (for prototyping) -practicalmeteor:mocha@2.4.5-rc6.2 +practicalmeteor:mocha@2.4.5_6 practicalmeteor:chai diff --git a/tests/apps/passing-app-tests/.meteor/versions b/tests/apps/passing-app-tests/.meteor/versions index a36bd61..4df14b7 100644 --- a/tests/apps/passing-app-tests/.meteor/versions +++ b/tests/apps/passing-app-tests/.meteor/versions @@ -52,7 +52,7 @@ observe-sequence@1.0.12 ordered-dict@1.0.8 practicalmeteor:chai@2.1.0_1 practicalmeteor:loglevel@1.2.0_2 -practicalmeteor:mocha@2.4.5-rc6.2 +practicalmeteor:mocha@2.4.5_6 practicalmeteor:mocha-core@1.0.1 practicalmeteor:sinon@1.14.1_2 promise@0.7.3