From 4e50d408ce12b7f113d65846bcfb39146f455483 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Thu, 28 Apr 2016 01:06:23 +0300 Subject: [PATCH 01/15] Exclude 4.0.0-win32-ia32 from prebuilts --- appveyor.yml | 6 ++++-- tools/prepublish-to-npm.js | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 86c9a91..e6fd390 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,14 +5,16 @@ environment: secure: jJxKoyWputzRz2EjAT9i/vBzYt2+lcjKZ5D6O5TBaS9+anpYHn2XWbOut5dkOgh0 node_pre_gyp_region: eu-central-1 matrix: + - NODE_VERSION: 6 + platform: x64 + - NODE_VERSION: 6 + platform: x86 - NODE_VERSION: 5 platform: x64 - NODE_VERSION: 5 platform: x86 - NODE_VERSION: 4 platform: x64 - - NODE_VERSION: 4 - platform: x86 - NODE_VERSION: 0.12 platform: x64 - NODE_VERSION: 0.12 diff --git a/tools/prepublish-to-npm.js b/tools/prepublish-to-npm.js index 55f145d..5abc566 100644 --- a/tools/prepublish-to-npm.js +++ b/tools/prepublish-to-npm.js @@ -7,13 +7,17 @@ rimraf.sync('./build'); var versions = ['0.10.0', '0.12.0', '4.0.0', '5.0.0']; var matrix = { x64: ['win32', 'linux', 'darwin'], - ia32: ['win32'] + ia32: ['win32'], + except: { '4.0.0-win32-ia32': true } }; var targets = []; Object.keys(matrix).forEach(function(arch) { matrix[arch].forEach(function(platform) { versions.forEach(function(version) { + var key = version + '-' + platform + '-' + arch; + if (matrix.except[key]) return; + targets.push({ target: version, target_platform: platform, From a4f6efdae93efbbd3d6ba2ed1bc160be961b06b2 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Thu, 28 Apr 2016 01:07:18 +0300 Subject: [PATCH 02/15] Update nan --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21da994..cd59c3f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "main": "v8-debug", "dependencies": { - "nan": "^2.0.4", + "nan": "^2.3.2", "node-pre-gyp": "^0.6.5" }, "devDependencies": { From f837e9345de012e0cb89b3a7760c509f234b8621 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Thu, 28 Apr 2016 01:15:36 +0300 Subject: [PATCH 03/15] 0.7.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cd59c3f..44e4560 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.2", + "version": "0.7.3", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From 937d566be725ca6ebc7d462a9d10fa22eaab3663 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Thu, 28 Apr 2016 02:30:58 +0300 Subject: [PATCH 04/15] fix publishing --- tools/prepublish-to-npm.js | 9 ++++----- tools/release.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/prepublish-to-npm.js b/tools/prepublish-to-npm.js index 5abc566..04fb067 100644 --- a/tools/prepublish-to-npm.js +++ b/tools/prepublish-to-npm.js @@ -4,19 +4,18 @@ var gyp = require('node-pre-gyp'); rimraf.sync('./build'); -var versions = ['0.10.0', '0.12.0', '4.0.0', '5.0.0']; +var versions = ['0.10.0', '0.12.0', '4.0.0', '5.0.0', '6.0.0']; var matrix = { x64: ['win32', 'linux', 'darwin'], - ia32: ['win32'], - except: { '4.0.0-win32-ia32': true } + ia32: ['win32'] }; +var except = { '4.0.0-win32-ia32': true }; var targets = []; Object.keys(matrix).forEach(function(arch) { matrix[arch].forEach(function(platform) { versions.forEach(function(version) { - var key = version + '-' + platform + '-' + arch; - if (matrix.except[key]) return; + if (except[version + '-' + platform + '-' + arch]) return; targets.push({ target: version, diff --git a/tools/release.js b/tools/release.js index f61b13b..960b43d 100644 --- a/tools/release.js +++ b/tools/release.js @@ -1,5 +1,5 @@ var args = process.argv.slice(2); -var version = args.splice(-1); +var version = args.splice(0, 1); var npm = require('./update-npm-version'); var changelog = require('./update-changelog'); From 3f3aaa985425858bc99f38cc8d13ad5484361f5f Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Thu, 28 Apr 2016 02:31:23 +0300 Subject: [PATCH 05/15] 0.7.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44e4560..6098d3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.3", + "version": "0.7.4", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From aa08879f83dc0d5ab55a6fe942e5c7fa3919ea04 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Sun, 8 May 2016 02:24:25 +0300 Subject: [PATCH 06/15] v0.7.5 --- .travis.yml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 08b4373..6a774c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ env: - export NODE_VERSION="0.12" - export NODE_VERSION="4" - export NODE_VERSION="5" + - export NODE_VERSION="6" global: - node_pre_gyp_region="eu-central-1" diff --git a/package.json b/package.json index 6098d3b..faec2fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.4", + "version": "0.7.5", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From b67d28ec4f3a318442ef678bc6101e7a92f0aa35 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Sun, 8 May 2016 13:28:53 +0300 Subject: [PATCH 07/15] 0.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index faec2fb..ea37b8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.5", + "version": "0.7.6", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From 7a2bbe0f4e8b7a35a250b57e0aaffc6b61c5f1d4 Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Tue, 10 May 2016 02:00:56 +0300 Subject: [PATCH 08/15] Return node 4 x86 build --- appveyor.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index e6fd390..eb3ce33 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,6 +15,8 @@ environment: platform: x86 - NODE_VERSION: 4 platform: x64 + - NODE_VERSION: 4 + platform: x86 - NODE_VERSION: 0.12 platform: x64 - NODE_VERSION: 0.12 @@ -33,6 +35,11 @@ install: - IF %NODE_VERSION% LSS 1 npm -g install npm - IF %NODE_VERSION% LSS 1 set PATH=%APPDATA%\npm;%PATH% + # work around an issue with node-gyp v3.3.1 and node 4x + # package.json has no certificates in it so we're cool + # https://github.com/nodejs/node-gyp/issues/921 + - IF %NODE_VERSION% == 4 npm config set -g cafile=package.json + - IF %NODE_VERSION% == 4 npm config set -g strict-ssl=false # Check if new tag released and publish binary in this case. - SET PUBLISH_BINARY=%APPVEYOR_REPO_TAG% From 22957d776a20e438792b45d09946c1915736f98f Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Tue, 10 May 2016 13:06:21 +0300 Subject: [PATCH 09/15] 0.7.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea37b8e..d8d652d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.6", + "version": "0.7.7", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From a7d3acf852027c85088f082c492da39e665d55eb Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Sun, 22 May 2016 01:32:50 +0300 Subject: [PATCH 10/15] Update release script --- tools/annotate-tag.js | 16 ++++--- tools/commit-changes.js | 11 ++--- tools/exec.js | 12 +++-- tools/history.js | 18 +++++--- tools/prepublish-to-npm.js | 59 ++++++++++++------------- tools/publish-to-npm.js | 9 ++-- tools/push-to-githab.js | 10 ++--- tools/release.js | 87 ++++++++++++++++++++----------------- tools/update-npm-version.js | 9 ++-- 9 files changed, 123 insertions(+), 108 deletions(-) diff --git a/tools/annotate-tag.js b/tools/annotate-tag.js index be21f3a..4fcf51e 100644 --- a/tools/annotate-tag.js +++ b/tools/annotate-tag.js @@ -1,7 +1,11 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function tag(version) { - var history = require('./history')(version); - var tagname = 'v' + version; - exec('git tag -a "' + tagname + '" -m "' + history + '"'); -}; +const co = require('co'); +const exec = require('./exec'); + +module.exports = co.wrap(function * (version) { + const history = yield require('./history')(version); + const tagname = 'v' + version; + + return yield exec('git tag -a "' + tagname + '" -m "' + history + '"'); +}); diff --git a/tools/commit-changes.js b/tools/commit-changes.js index 11b9d52..d22bd3a 100644 --- a/tools/commit-changes.js +++ b/tools/commit-changes.js @@ -1,6 +1,7 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function commit(version) { - var changed = [/*'ChangeLog.md',*/ 'package.json'].join(' '); - exec('git commit -m "' + version + '" ' + changed); -}; +const exec = require('./exec'); +const changed = [/*'ChangeLog.md',*/ 'package.json'].join(' '); + +module.exports = + (version) => exec('git commit -m "' + version + '" ' + changed); diff --git a/tools/exec.js b/tools/exec.js index 0115766..84a7d11 100644 --- a/tools/exec.js +++ b/tools/exec.js @@ -1,5 +1,9 @@ -var _exec = require('child_process').execSync; +'use strict'; -module.exports = function(expression) { - return String(_exec(expression)).trim(); -}; +const exec = require('child_process').exec; + +module.exports = + (expression) => new Promise( + (resolve, reject) => exec(expression, + (error, result) => error ? reject(error) : resolve(String(result).trim()) +)); diff --git a/tools/history.js b/tools/history.js index 81c2c9a..87156eb 100644 --- a/tools/history.js +++ b/tools/history.js @@ -1,8 +1,12 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function history() { - var _lasttag = exec('git rev-list --tags --max-count=1'); - var _version = exec('git describe --tags --abbrev=0 ' + _lasttag); - var version = _version ? ' ' + _version + '..' : ''; - return ' ' + exec('git log --no-merges --pretty="format: * %s (%an) %H%n"' + version); -} +const co = require('co'); +const exec = require('./exec'); + +module.exports = co.wrap(function * () { + const _lasttag = yield exec('git rev-list --tags --max-count=1'); + const _version = yield exec('git describe --tags --abbrev=0 ' + _lasttag); + const version = _version ? ' ' + _version + '..' : ''; + + return ' ' + (yield exec('git log --no-merges --pretty="format: * %s (%an) %H%n"' + version)); +}); diff --git a/tools/prepublish-to-npm.js b/tools/prepublish-to-npm.js index 04fb067..31225f1 100644 --- a/tools/prepublish-to-npm.js +++ b/tools/prepublish-to-npm.js @@ -1,42 +1,37 @@ -var rimraf = require('rimraf'); -var extend = require('util')._extend; -var gyp = require('node-pre-gyp'); +'use strict'; -rimraf.sync('./build'); - -var versions = ['0.10.0', '0.12.0', '4.0.0', '5.0.0', '6.0.0']; -var matrix = { +const co = require('co'); +const rimraf = require('rimraf'); +const gyp = require('node-pre-gyp'); +const versions = ['0.10.0', '0.12.0', '4.0.0', '5.0.0', '6.0.0']; +const matrix = { x64: ['win32', 'linux', 'darwin'], ia32: ['win32'] }; -var except = { '4.0.0-win32-ia32': true }; - -var targets = []; -Object.keys(matrix).forEach(function(arch) { - matrix[arch].forEach(function(platform) { - versions.forEach(function(version) { - if (except[version + '-' + platform + '-' + arch]) return; - - targets.push({ - target: version, - target_platform: platform, - target_arch: arch - }); - }); - }); -}, []); -module.exports = function prepublish(err) { - if (err) { - console.log(err.message); - return process.exit(1); +class Target { + constructor(arch, platform, version) { + this.target = version; + this.target_platform = platform; + this.target_arch = arch; } +} - var target = targets.pop(); +const install = target => new Promise((resolve, reject) => { + const prog = Object.assign(new gyp.Run(), {opts: target}); - if (!target) process.exit(0); + prog.commands.install([], error => error ? reject(error) : resolve()); +}); - var prog = extend(new gyp.Run(), {opts: target}); +module.exports = co.wrap(function * () { + rimraf.sync('./build'); - prog.commands.install([], prepublish); -}; + const targets = []; + Object.keys(matrix).forEach( + (arch) => matrix[arch].forEach( + (platform) => versions.forEach( + (version) => targets.push(new Target(arch, platform, version)) + ))); + + while (targets.length) yield install(targets.pop()); +}); diff --git a/tools/publish-to-npm.js b/tools/publish-to-npm.js index 829e8f0..e73f1ca 100644 --- a/tools/publish-to-npm.js +++ b/tools/publish-to-npm.js @@ -1,5 +1,6 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function publish(version) { - exec('npm publish'); -}; +const exec = require('./exec'); + +module.exports = + (version) => exec('npm publish'); diff --git a/tools/push-to-githab.js b/tools/push-to-githab.js index 37314be..be9cd64 100644 --- a/tools/push-to-githab.js +++ b/tools/push-to-githab.js @@ -1,6 +1,6 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function push(version) { - var tag = 'v' + version; - exec('git push && git push origin "' + tag + '"'); -}; +const exec = require('./exec'); + +module.exports = + (version) => exec('git push && git push origin "v' + version + '"'); diff --git a/tools/release.js b/tools/release.js index 960b43d..1abd25a 100644 --- a/tools/release.js +++ b/tools/release.js @@ -1,55 +1,60 @@ -var args = process.argv.slice(2); -var version = args.splice(0, 1); +'use strict'; -var npm = require('./update-npm-version'); -var changelog = require('./update-changelog'); -var tag = require('./annotate-tag'); -var commit = require('./commit-changes'); -var push = require('./push-to-githab'); +const co = require('co'); +const args = process.argv.slice(2); +const version = args.splice(0, 1); -var prepublish = require('./prepublish-to-npm'); -var publish = require('./publish-to-npm'); +const npm = require('./update-npm-version'); +const changelog = require('./update-changelog'); +const tag = require('./annotate-tag'); +const commit = require('./commit-changes'); +const push = require('./push-to-githab'); -var EXAMPLE = ' Example:\n' + +const prepublish = require('./prepublish-to-npm'); +const publish = require('./publish-to-npm'); + +const EXAMPLE = ' Example:\n' + 'node release.js 1.0.0 --build\n' + 'node release.js 1.0.0 --publish' -var SEMVER = /^\d+(\.\d+(\.\d+(-.*)?)?(-.*)?)?(-.*)?$/; +const SEMVER = /^\d+(\.\d+(\.\d+(-.*)?)?(-.*)?)?(-.*)?$/; console.assert(version, 'Wrong usage.' + EXAMPLE); console.assert(SEMVER.test(version), version + ' is not correct semver'); -var BUILD = args.some(function(arg) { - return /^(-b|--build)$/.test(arg); -}); +const BUILD = args.some( + (arg) => /^(-b|--build)$/.test(arg)); -var PUBLISH = args.some(function(arg) { - return /^(-p|--publish)$/.test(arg); -}); +const PUBLISH = args.some( + (arg) => /^(-p|--publish)$/.test(arg)); console.assert(BUILD || PUBLISH, 'No mode selected.' + EXAMPLE); -if (BUILD) { - console.log('--Update the version in package.json--'); - npm(version); - - // TODO: enable changelog on 1.0 version - // console.log('--Update ChangeLog.md--'); - // changelog(); - - console.log('--Commit the changes--'); - commit(version); - - console.log('--Tag the release--') - tag(version); - - console.log('--Push to github--'); - push(version); - -} else if (PUBLISH) { - console.log('--Download prebuilt binaries--'); - prepublish(); - - console.log('--Publish to npm--'); - publish(); -} +return co(function * () { + if (BUILD) { + console.log('--Update the version in package.json--'); + yield npm(version); + + // TODO: enable changelog on 1.0 version + // console.log('--Update ChangeLog.md--'); + // changelog(); + + console.log('--Commit the changes--'); + yield commit(version); + + console.log('--Tag the release--') + yield tag(version); + + console.log('--Push to github--'); + yield push(version); + } else if (PUBLISH) { + console.log('--Download prebuilt binaries--'); + yield prepublish(); + + console.log('--Publish to npm--'); + yield publish(); + } +}).catch((error) => { + console.error(error.stack); + return process.exit(1); +}); diff --git a/tools/update-npm-version.js b/tools/update-npm-version.js index e3216a4..bed668a 100644 --- a/tools/update-npm-version.js +++ b/tools/update-npm-version.js @@ -1,5 +1,6 @@ -var exec = require('./exec'); +'use strict'; -module.exports = function npm(version) { - exec('npm version --git-tag-version=false "' + version + '"'); -}; +const exec = require('./exec'); + +module.exports = + (version) => exec('npm version --git-tag-version=false "' + version + '"'); From 88f74e2ace5833d769fe967e2dffe5c223111a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=98=E5=B0=8F=E6=9D=B0?= Date: Thu, 23 Mar 2017 10:16:46 +0800 Subject: [PATCH 11/15] fix: make it work on node7.x (#38) * fix: make it work on node7.x * fix: sendCommand not work * fix: node 5.x --- .travis.yml | 1 + src/debug.cc | 19 ++++++++++++++++++- v8-debug.js | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a774c4..f7a7544 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - export NODE_VERSION="4" - export NODE_VERSION="5" - export NODE_VERSION="6" + - export NODE_VERSION="7" global: - node_pre_gyp_region="eu-central-1" diff --git a/src/debug.cc b/src/debug.cc index 43482e6..e1af550 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -35,15 +35,24 @@ namespace nodex { } Local fn = Local::Cast(info[0]); - v8::Debug::Call(fn); + #if (NODE_MODULE_VERSION > 48) + Local context = fn->GetIsolate()->GetCurrentContext(); + v8::Debug::Call(context, fn); + #else + v8::Debug::Call(fn); + #endif RETURN(Undefined()); }; static NAN_METHOD(SendCommand) { String::Value command(info[0]); #if (NODE_MODULE_VERSION > 11) + #if (NODE_MODULE_VERSION > 48) + Isolate* debug_isolate = v8::Debug::GetDebugContext(Isolate::GetCurrent())->GetIsolate(); + #else Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate(); + #endif v8::HandleScope debug_scope(debug_isolate); v8::Debug::SendCommand(debug_isolate, *command, command.length()); #else @@ -58,12 +67,20 @@ namespace nodex { if (expression.IsEmpty()) RETURN(Undefined()); + #if (NODE_MODULE_VERSION > 48) + Local debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent()); + #else Local debug_context = v8::Debug::GetDebugContext(); + #endif #if (NODE_MODULE_VERSION > 45) if (debug_context.IsEmpty()) { // Force-load the debug context. v8::Debug::GetMirror(info.GetIsolate()->GetCurrentContext(), info[0]); + #if (NODE_MODULE_VERSION > 48) + debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent()); + #else debug_context = v8::Debug::GetDebugContext(); + #endif } #endif diff --git a/v8-debug.js b/v8-debug.js index 0d94df8..ce8be01 100644 --- a/v8-debug.js +++ b/v8-debug.js @@ -169,7 +169,10 @@ function sendCommand(name, attributes, userdata) { command: name, arguments: attributes || {} }; - binding.sendCommand(JSON.stringify(message)); + // don't know why yet + process.nextTick(function() { + binding.sendCommand(JSON.stringify(message)) + }); }; V8Debug.prototype.commandToEvent = function(request, response) { From 04ee86c7da5d0ed4c0b17af60061de62277f6b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=98=E5=B0=8F=E6=9D=B0?= Date: Thu, 23 Mar 2017 11:45:37 +0800 Subject: [PATCH 12/15] feat: config node7 on appveyor (#39) --- appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index eb3ce33..11ae3e8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,10 @@ environment: secure: jJxKoyWputzRz2EjAT9i/vBzYt2+lcjKZ5D6O5TBaS9+anpYHn2XWbOut5dkOgh0 node_pre_gyp_region: eu-central-1 matrix: + - NODE_VERSION: 7 + platform: x64 + - NODE_VERSION: 7 + platform: x86 - NODE_VERSION: 6 platform: x64 - NODE_VERSION: 6 From 6894f715399154405d1c8933a72a63d724905d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 23 Mar 2017 10:55:58 +0100 Subject: [PATCH 13/15] 1.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: config node7 on appveyor (#39) (淘小杰) * fix: make it work on node7.x (#38) (淘小杰) * Update release script (Yury Puzynya) --- CHANGES.md | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..54be2f8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,343 @@ +2017-03-23, Version 1.0.0 +========================= + + * feat: config node7 on appveyor (#39) (淘小杰) + + * fix: make it work on node7.x (#38) (淘小杰) + + * Update release script (Yury Puzynya) + + +2016-05-10, Version 0.7.7 +========================= + + * Return node 4 x86 build (Yury Puzynya) + + +2016-05-08, Version 0.7.6 +========================= + + + +2016-05-08, Version 0.7.5 +========================= + + + +2016-04-28, Version 0.7.4 +========================= + + * fix publishing (Yury Puzynya) + + +2016-04-28, Version 0.7.3 +========================= + + * Update nan (Yury Puzynya) + + * Exclude 4.0.0-win32-ia32 from prebuilts (Yury Puzynya) + + +2016-03-12, Version 0.7.2 +========================= + + * New release script (Yury Puzynya) + + +2016-01-26, Version 0.7.1 +========================= + + * Fix prepublish script (Yury Puzynya) + + * Fix #21: this.extendedProcessDebugJSONRequest_ is not a function (Shawn Van Ittersum) + + * Update build script (Yury Puzynya) + + * Update prepublish (Yury Puzynya) + + +2015-12-06, Version 0.7.0 +========================= + + * Add prepublish script (Yury Puzynya) + + * Add .npmignore (Yury Puzynya) + + * Update .gitignore (Yury Puzynya) + + +2015-12-06, Version 0.6.2 +========================= + + * Update build scripts (Yury Puzynya) + + +2015-11-29, Version 0.6.1 +========================= + + * Build configuration updated (Yury Puzynya) + + +2015-10-22, Version 0.6.0 +========================= + + * Code prepared for NODE_NEXT logic (Yury Puzynya) + + * InjectedScriptSource updated (Yury Puzynya) + + * Added InjectedScriptHost.cc (Yury Puzynya) + + * Fixed preinstall script (Yury Puzynya) + + +2015-09-17, Version 0.5.4 +========================= + + + +2015-09-13, Version 0.5.3 +========================= + + * Update travis build (Yury Puzynya) + + * Fix src for node v4 (Yury Puzynya) + + * Updated cloud build (Yury Puzynya) + + +2015-08-09, Version 0.5.2 +========================= + + * Version changed to 0.5.2 (3y3) + + * Fix error rethrowing (3y3) + + +2015-08-09, Version 0.5.1 +========================= + + * Version changed to 0.5.1 (3y3) + + * Update cloud build (3y3) + + * Fix build for iojs-3 (3y3) + + * Readme.md updated (3y3) + + +2015-07-23, Version 0.5.0 +========================= + + * Version changed to 0.5.0 (3y3) + + * Readme.md updated (3y3) + + * Added `getFromFrame` func (3y3) + + +2015-05-19, Version 0.4.6 +========================= + + * Version changed to 0.4.6 (3y3) + + * Enable win_delay_load_hook for 1.* (3y3) + + +2015-05-19, Version 0.4.5 +========================= + + * Version changed to 0.4.5 (3y3) + + * Cleanup CI configs (3y3) + + +2015-05-09, Version 0.4.4 +========================= + + * Version changed to 0.4.4 (3y3) + + * Update CI settings (3y3) + + * Unbundle node-pre-gyp (3y3) + + * Update TravisCI badge (3y3) + + +2015-05-01, Version 0.4.3 +========================= + + * Version changed to 0.4.3 (3y3) + + * Update dependencies (3y3) + + * Added npm version badge (3y3) + + +2015-02-22, Version 0.4.2 +========================= + + * Version changed to 0.4.2 (3y3) + + * Webkit API refactoring (3y3) + + * Allocate Debug Context for 0.12+ (3y3) + + +2015-02-19, Version 0.4.1 +========================= + + * Version changed to 0.4.1 (3y3) + + * Fixes for 0.10.36 (3y3) + + * Bump node-pre-gyp to ^0.6.4 for iojs (Jim Cummins) + + +2015-02-15, Version 0.4.0 +========================= + + * Version changed to 0.4.0 (3y3) + + * Temporary fix for io.js testing (3y3) + + * Fix for 0.12 and io.js (3y3) + + * Update build matrix (3y3) + + +2015-02-08, Version 0.3.5 +========================= + + * Version changed to 0.3.5 (3y3) + + * Skip failing test for build (3y3) + + * Add v0.12 to build matrix (3y3) + + * Rename Signal to SendCommand (3y3) + + * Upgrade npm dependencies, notably nan to 1.6.2 (James Ide) + + * Suppress compile warnings (3y3) + + * Added AppVeyor badge (3y3) + + * Update build matrix (3y3) + + * Fix errors and warning when compiling with iojs (Leo Koppelkamm) + + +2015-01-25, Version 0.3.4 +========================= + + * Version changed to 0.3.4 (3y3) + + * Use seq = 0 by default instead of 1 (3y3) + + * Fix Linux compatibility (3y3) + + * Update `nan` to 1.5.0 (3y3) + + * Fix tests race condition (3y3) + + * Fix paths for injected usage (3y3) + + * Added test for registerAgentCommand (3y3) + + * Added Webkit protocol support (3y3) + + * Node-pre-gyp updated to ^0.6.0 (3y3) + + * allow_natives_syntax flag moved to `allowNatives` method (3y3) + + * Depreceted undocumented method `mirror` (3y3) + + +2015-01-10, Version 0.3.3 +========================= + + * Version changed to 0.3.3 (3y3) + + +2015-01-09, Version 0.3.2 +========================= + + * Version changed to 0.3.2 (3y3) + + * Finish prebuild binaries (3y3) + + * Linux/OSX prebuild binaries (3y3) + + * Added `registerAsync` command (3y3) + + * Convert line endings to LF (3y3) + + +2014-12-07, Version 0.3.1 +========================= + + * Windows prebuild binaries (3y3) + + +2014-11-27, Version 0.3.0 +========================= + + * Version changed to 0.3.0 (3y3) + + * Update readme.md (Moshe Kolodny) + + * Readme updated (3y3) + + * API updated (3y3) + + +2014-10-02, Version 0.2.0 +========================= + + * Version changed to 0.2.0 (3y3) + + * Allow natives syntax flag enabled (3y3) + + * Ignore v8 protocol serializer for custom commands (3y3) + + * v8-debug.js refactored (3y3) + + * Added runInDebugContext function (3y3) + + * Fixed newline in readme.md (3y3) + + +2014-09-28, Version 0.1.5 +========================= + + * Version changed to 0.1.5 (3y3) + + * Fix compatibility with 0.10.x (3y3) + + +2014-09-28, Version 0.1.4 +========================= + + * Version changed to 0.1.4 (3y3) + + * Fast fix for Node v0.11.14 (3y3) + + * Move DebugCommandProcessor to closure (3y3) + + * Added mirror API (3y3) + + +2014-06-29, Version 0.1.3 +========================= + + * Version changed to 0.1.3 (3y3) + + * Remove 'v8-debug' from cache after disconnect (3y3) + + * Safely handling errors (3y3) + + +2014-06-26, Version 0.1.2 +========================= + + * First release! diff --git a/package.json b/package.json index d8d652d..1f78c38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "0.7.7", + "version": "1.0.0", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>", From b08781657bdfbd0ae0d0f790adebb814793d1ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=98=E5=B0=8F=E6=9D=B0?= Date: Tue, 28 Mar 2017 14:01:12 +0800 Subject: [PATCH 14/15] fix: fix the deprecated warnings (#40) * fix: fix the deprecated warnings --- src/InjectedScriptHost.cc | 2 +- src/debug.cc | 8 ++++---- test/v8-debug.js | 8 ++++++-- v8-debug.js | 5 +---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/InjectedScriptHost.cc b/src/InjectedScriptHost.cc index 82839ef..561f987 100644 --- a/src/InjectedScriptHost.cc +++ b/src/InjectedScriptHost.cc @@ -170,7 +170,7 @@ namespace nodex { Local constructorSymbol = CHK(New("constructor")); if (object->HasRealNamedProperty(constructorSymbol) && !object->HasRealNamedCallbackProperty(constructorSymbol)) { TryCatch tryCatch; - Local constructor = object->GetRealNamedProperty(constructorSymbol); + Local constructor = Nan::GetRealNamedProperty(object, constructorSymbol).ToLocalChecked(); if (!constructor.IsEmpty() && constructor->IsFunction()) { Local constructorName = functionDisplayName(Handle::Cast(constructor)); if (!constructorName.IsEmpty() && !tryCatch.HasCaught()) diff --git a/src/debug.cc b/src/debug.cc index e1af550..d75e227 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -36,7 +36,7 @@ namespace nodex { Local fn = Local::Cast(info[0]); - #if (NODE_MODULE_VERSION > 48) + #if (NODE_MODULE_VERSION > 47) Local context = fn->GetIsolate()->GetCurrentContext(); v8::Debug::Call(context, fn); #else @@ -48,7 +48,7 @@ namespace nodex { static NAN_METHOD(SendCommand) { String::Value command(info[0]); #if (NODE_MODULE_VERSION > 11) - #if (NODE_MODULE_VERSION > 48) + #if (NODE_MODULE_VERSION > 47) Isolate* debug_isolate = v8::Debug::GetDebugContext(Isolate::GetCurrent())->GetIsolate(); #else Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate(); @@ -67,7 +67,7 @@ namespace nodex { if (expression.IsEmpty()) RETURN(Undefined()); - #if (NODE_MODULE_VERSION > 48) + #if (NODE_MODULE_VERSION > 47) Local debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent()); #else Local debug_context = v8::Debug::GetDebugContext(); @@ -76,7 +76,7 @@ namespace nodex { if (debug_context.IsEmpty()) { // Force-load the debug context. v8::Debug::GetMirror(info.GetIsolate()->GetCurrentContext(), info[0]); - #if (NODE_MODULE_VERSION > 48) + #if (NODE_MODULE_VERSION > 47) debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent()); #else debug_context = v8::Debug::GetDebugContext(); diff --git a/test/v8-debug.js b/test/v8-debug.js index 86671f6..d292f81 100644 --- a/test/v8-debug.js +++ b/test/v8-debug.js @@ -44,7 +44,9 @@ describe('v8-debug', function() { expect(v8debug.registerAgentCommand.bind(v8debug, 'command', [], function() { done(); })).to.not.throw(); - v8debug.sendCommand('command'); + process.nextTick(function() { + v8debug.sendCommand('command'); + }); }); } else { it('enableWebkitProtocol should throw error', function() { @@ -56,7 +58,9 @@ describe('v8-debug', function() { describe('events.', function() { it('Emits `close` on disconnect command', function(done) { v8debug.on('close', done); - v8debug.sendCommand('disconnect'); + process.nextTick(function() { + v8debug.sendCommand('disconnect'); + }); }); }); }); diff --git a/v8-debug.js b/v8-debug.js index ce8be01..0d94df8 100644 --- a/v8-debug.js +++ b/v8-debug.js @@ -169,10 +169,7 @@ function sendCommand(name, attributes, userdata) { command: name, arguments: attributes || {} }; - // don't know why yet - process.nextTick(function() { - binding.sendCommand(JSON.stringify(message)) - }); + binding.sendCommand(JSON.stringify(message)); }; V8Debug.prototype.commandToEvent = function(request, response) { From 4f0e85fec5f6746ac1123f2d3061f1b53c6a404d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 28 Mar 2017 13:58:06 +0200 Subject: [PATCH 15/15] 1.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix the deprecated warnings (#40) (淘小杰) --- CHANGES.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 54be2f8..3ebef4b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +2017-03-28, Version 1.0.1 +========================= + + * fix: fix the deprecated warnings (#40) (淘小杰) + + 2017-03-23, Version 1.0.0 ========================= diff --git a/package.json b/package.json index 1f78c38..bb2b69f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8-debug", - "version": "1.0.0", + "version": "1.0.1", "description": "v8 debugger extending API", "homepage": "http://github.com/node-inspector/v8-debug", "author": "3y3 Ghoti <3y3@bk.ru>",