From 01a692a2767ad847dc6fe467692237ad114c914b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:11:06 -0700 Subject: [PATCH 01/42] Use grunt-download-electron --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index 3298b4a63..f197ae93d 100644 --- a/build/package.json +++ b/build/package.json @@ -21,7 +21,7 @@ "grunt-contrib-csslint": "~0.2.0", "grunt-contrib-less": "~0.8.0", "grunt-cson": "0.14.0", - "grunt-download-atom-shell": "~0.15.1", + "grunt-download-electron": "^2.1.1", "grunt-electron-installer": "1.0.0", "grunt-lesslint": "0.17.0", "grunt-peg": "~1.1.0", From 0262ae3c9d2da59350fbeb8d60bee73f5996a5df Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:12:09 -0700 Subject: [PATCH 02/42] Update build to use electron --- build/Gruntfile.coffee | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index d21e8fa4a..1fbdf591e 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -43,7 +43,7 @@ module.exports = (grunt) -> installDir = grunt.option('install-dir') home = if process.platform is 'win32' then process.env.USERPROFILE else process.env.HOME - atomShellDownloadDir = path.join(home, '.atom', 'atom-shell') + electronDownloadDir = path.join(home, '.atom', 'electron') symbolsDir = path.join(buildDir, 'Atom.breakpad.syms') shellAppDir = path.join(buildDir, appName) @@ -225,10 +225,10 @@ module.exports = (grunt) -> 'static/**/*.less' ] - 'download-atom-shell': - version: packageJson.atomShellVersion - outputDir: 'atom-shell' - downloadDir: atomShellDownloadDir + 'download-electron': + version: packageJson.electronVersion + outputDir: 'electron' + downloadDir: electronDownloadDir rebuild: true # rebuild native modules after atom-shell is updated token: process.env.ATOM_ACCESS_TOKEN diff --git a/package.json b/package.json index e85d130e6..e4bdfddb7 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "atomShellVersion": "0.22.3", + "atomShellVersion": "0.26.0", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From d2e91e5630a8e682aa3d9f061adf58d19a856ee3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:12:52 -0700 Subject: [PATCH 03/42] Add ~/.atom/electron to clean script --- script/clean | 1 + 1 file changed, 1 insertion(+) diff --git a/script/clean b/script/clean index d9c6c1a72..6a7824756 100755 --- a/script/clean +++ b/script/clean @@ -26,6 +26,7 @@ var commands = [ [home, '.atom', '.npm'], [home, '.atom', 'compile-cache'], [home, '.atom', 'atom-shell'], + [home, '.atom', 'electron'], [tmpdir, 'atom-build'], [tmpdir, 'atom-cached-atom-shells'], ]; From 7bc88c154c4faa218196ff9caa3cc05da518675a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:13:19 -0700 Subject: [PATCH 04/42] atomShellVersion -> electronVersion --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4bdfddb7..cc9a00e32 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "atomShellVersion": "0.26.0", + "electronVersion": "0.26.0", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 23fc3deedad0037b53c11c66d50e8bb2b5fef10c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:21:14 -0700 Subject: [PATCH 05/42] Ignore root electron folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1257ab371..dee2ac3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ npm-debug.log debug.log /tags /atom-shell/ +/electron/ docs/output docs/includes spec/fixtures/evil-files/ From 66f312fdfc0ffc1f3eda875a7eb7f116f947fe04 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:21:18 -0700 Subject: [PATCH 06/42] Rename atom shell tasks --- build/Gruntfile.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 1fbdf591e..175a5ecae 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -23,7 +23,7 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-contrib-coffee') grunt.loadNpmTasks('grunt-contrib-less') grunt.loadNpmTasks('grunt-shell') - grunt.loadNpmTasks('grunt-download-atom-shell') + grunt.loadNpmTasks('grunt-download-electron') grunt.loadNpmTasks('grunt-electron-installer') grunt.loadNpmTasks('grunt-peg') grunt.loadTasks('tasks') @@ -254,7 +254,7 @@ module.exports = (grunt) -> grunt.registerTask('lint', ['standard', 'coffeelint', 'csslint', 'lesslint']) grunt.registerTask('test', ['shell:kill-atom', 'run-specs']) - ciTasks = ['output-disk-space', 'download-atom-shell', 'download-atom-shell-chromedriver', 'build'] + ciTasks = ['output-disk-space', 'download-electron', 'download-electron-chromedriver', 'build'] ciTasks.push('dump-symbols') if process.platform isnt 'win32' ciTasks.push('set-version', 'check-licenses', 'lint', 'generate-asar') ciTasks.push('mkdeb') if process.platform is 'linux' @@ -266,6 +266,6 @@ module.exports = (grunt) -> ciTasks.push('publish-build') unless process.env.TRAVIS grunt.registerTask('ci', ciTasks) - defaultTasks = ['download-atom-shell', 'download-atom-shell-chromedriver', 'build', 'set-version', 'generate-asar'] + defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) From c807675d990a7e9fa2f200076583dbb85f8b2b63 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:24:24 -0700 Subject: [PATCH 07/42] Remove log suppressing --- build/Gruntfile.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 175a5ecae..37a733306 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -31,10 +31,6 @@ module.exports = (grunt) -> # This allows all subsequent paths to the relative to the root of the repo grunt.file.setBase(path.resolve('..')) - if not grunt.option('verbose') - grunt.log.writeln = (args...) -> grunt.log - grunt.log.write = (args...) -> grunt.log - [major, minor, patch] = packageJson.version.split('.') tmpDir = os.tmpdir() appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom' @@ -268,4 +264,5 @@ module.exports = (grunt) -> defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] defaultTasks.push 'install' unless process.platform is 'linux' + console.log buildDir grunt.registerTask('default', defaultTasks) From 49e7c6fd8619ea331c8c7c3f3a7059782f338536 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:27:50 -0700 Subject: [PATCH 08/42] Copy electron folder --- build/Gruntfile.coffee | 1 - build/tasks/build-task.coffee | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 37a733306..894326a4c 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,6 +263,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - defaultTasks.push 'install' unless process.platform is 'linux' console.log buildDir grunt.registerTask('default', defaultTasks) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 6c2c4f309..256a0c8ed 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -15,9 +15,9 @@ module.exports = (grunt) -> mkdir path.dirname(buildDir) if process.platform is 'darwin' - cp 'atom-shell/Atom.app', shellAppDir, filter: /default_app/ + cp 'electron/Electron.app', shellAppDir, filter: /default_app/ else - cp 'atom-shell', shellAppDir, filter: /default_app/ + cp 'electron', shellAppDir, filter: /default_app/ mkdir appDir From 3bfef54f44d83f8aafc3ee6e9c7ad8300ae0f4ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:36:30 -0700 Subject: [PATCH 09/42] Rename Electron exe to Atom --- build/Gruntfile.coffee | 1 + build/tasks/build-task.coffee | 2 ++ 2 files changed, 3 insertions(+) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 894326a4c..adfcd6971 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,5 +263,6 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] + # defaultTasks.push 'install' unless process.platform is 'linux' console.log buildDir grunt.registerTask('default', defaultTasks) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 256a0c8ed..405b13d39 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -16,9 +16,11 @@ module.exports = (grunt) -> if process.platform is 'darwin' cp 'electron/Electron.app', shellAppDir, filter: /default_app/ + fs.renameSync path.join(shellAppDir, 'Contents', 'MacOS', 'Electron'), path.join(shellAppDir, 'Contents', 'MacOS', 'Atom') else cp 'electron', shellAppDir, filter: /default_app/ + mkdir appDir if process.platform isnt 'win32' From 80837fc837d13c6579e4771cd9c37913d32d6d1b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 12:36:45 -0700 Subject: [PATCH 10/42] Uncoment install task --- build/Gruntfile.coffee | 3 +-- build/tasks/build-task.coffee | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index adfcd6971..bcdf89ac6 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,6 +263,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - # defaultTasks.push 'install' unless process.platform is 'linux' - console.log buildDir + defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 405b13d39..f70346a33 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -20,7 +20,6 @@ module.exports = (grunt) -> else cp 'electron', shellAppDir, filter: /default_app/ - mkdir appDir if process.platform isnt 'win32' From 5e3c0ca08e16f732913f7404779ddd69d62a8a83 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:27:00 -0700 Subject: [PATCH 11/42] :arrow_up: onigiruma@4.2.2 --- build/Gruntfile.coffee | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index bcdf89ac6..441a5abe4 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,5 +263,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - defaultTasks.push 'install' unless process.platform is 'linux' + # defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) diff --git a/package.json b/package.json index cc9a00e32..cf415657f 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "mixto": "^1", "normalize-package-data": "^2.0.0", "nslog": "^2.0.0", - "oniguruma": "^4.1", "pathwatcher": "^4.4.3", + "oniguruma": "^4.2.2", "property-accessors": "^1.1.3", "q": "^1.1.2", "random-words": "0.0.1", From 94a7f13f92f207d3165d456d6007513cd939a86b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:35:04 -0700 Subject: [PATCH 12/42] :arrow_up: grunt-cson@0.15 --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index f197ae93d..4a96ceac9 100644 --- a/build/package.json +++ b/build/package.json @@ -20,7 +20,7 @@ "grunt-contrib-coffee": "~0.12.0", "grunt-contrib-csslint": "~0.2.0", "grunt-contrib-less": "~0.8.0", - "grunt-cson": "0.14.0", + "grunt-cson": "0.15.0", "grunt-download-electron": "^2.1.1", "grunt-electron-installer": "1.0.0", "grunt-lesslint": "0.17.0", From 69f3222e850683d6ec01155bc048ae3d14a0b5e2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:35:18 -0700 Subject: [PATCH 13/42] Re-enable install --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 441a5abe4..bcdf89ac6 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,5 +263,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - # defaultTasks.push 'install' unless process.platform is 'linux' + defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) From 8088c16b5cd46e062b87ea0efc0dcfe27437c236 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:43:49 -0700 Subject: [PATCH 14/42] Rename Electron Helper to Atom Helper --- build/Gruntfile.coffee | 2 +- build/tasks/build-task.coffee | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index bcdf89ac6..441a5abe4 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,5 +263,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - defaultTasks.push 'install' unless process.platform is 'linux' + # defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index f70346a33..8cd7319b5 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -17,6 +17,8 @@ module.exports = (grunt) -> if process.platform is 'darwin' cp 'electron/Electron.app', shellAppDir, filter: /default_app/ fs.renameSync path.join(shellAppDir, 'Contents', 'MacOS', 'Electron'), path.join(shellAppDir, 'Contents', 'MacOS', 'Atom') + fs.renameSync path.join(shellAppDir, 'Contents', 'Frameworks', 'Electron Helper.app'), path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app') + fs.renameSync path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app', 'Contents', 'MacOS', 'Electron Helper'), path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app', 'Contents', 'MacOS', 'Atom Helper') else cp 'electron', shellAppDir, filter: /default_app/ From 41c2a61b5a77d93ec94372ed9ce8acdd38388ea5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:48:11 -0700 Subject: [PATCH 15/42] Add --no-install option to script/build --- build/Gruntfile.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 441a5abe4..d65592d8d 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -263,5 +263,6 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar'] - # defaultTasks.push 'install' unless process.platform is 'linux' + unless process.platform is 'linux' or grunt.option('no-install') + defaultTasks.push 'install' grunt.registerTask('default', defaultTasks) From a04515b8973b9b7aa1c38c19aba449238527dfcc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:50:52 -0700 Subject: [PATCH 16/42] atom-shell -> electron --- build/Gruntfile.coffee | 2 +- build/tasks/clean-task.coffee | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index d65592d8d..3a7df725b 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -225,7 +225,7 @@ module.exports = (grunt) -> version: packageJson.electronVersion outputDir: 'electron' downloadDir: electronDownloadDir - rebuild: true # rebuild native modules after atom-shell is updated + rebuild: true # rebuild native modules after electron is updated token: process.env.ATOM_ACCESS_TOKEN 'create-windows-installer': diff --git a/build/tasks/clean-task.coffee b/build/tasks/clean-task.coffee index 97f0a9105..498bf9b4c 100644 --- a/build/tasks/clean-task.coffee +++ b/build/tasks/clean-task.coffee @@ -12,6 +12,7 @@ module.exports = (grunt) -> rm require('../src/less-compile-cache').cacheDir rm path.join(tmpdir, 'atom-cached-atom-shells') rm 'atom-shell' + rm 'electron' grunt.registerTask 'clean', 'Delete all the build files', -> homeDir = process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME'] From 7a929d60ca54f15ce6d30d42eaf209bd7c48cfec Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 14:56:04 -0700 Subject: [PATCH 17/42] Rename electron executable on Linux and Windows --- build/tasks/build-task.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 8cd7319b5..803249c1c 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -22,6 +22,11 @@ module.exports = (grunt) -> else cp 'electron', shellAppDir, filter: /default_app/ + if process.platform is 'win32' + fs.renameSync path.join(shellAppDir, 'electron.exe'), path.join(shellAppDir, 'atom.exe') + else + fs.renameSync path.join(shellAppDir, 'electron'), path.join(shellAppDir, 'atom') + mkdir appDir if process.platform isnt 'win32' From ddb6b1c37ba268011bb1c97424dadd6ab85a6d54 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 15:05:48 -0700 Subject: [PATCH 18/42] Set ATOM_NODE_VERSION env var from electronVersion in package.json --- script/bootstrap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/bootstrap b/script/bootstrap index 4c9435852..4b6e4e547 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -83,6 +83,9 @@ function bootstrap() { if (process.env.JANKY_SHA1 && process.platform === 'win32') apmInstallCommand += ' --arch=ia32'; + if (!process.env.ATOM_NODE_VERSION) + process.env.ATOM_NODE_VERSION = require('../package.json').electronVersion + var commands = [ { command: buildInstallCommand, From f64d84f22bd58db3dae5054140c2c3f042159764 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 May 2015 15:06:08 -0700 Subject: [PATCH 19/42] Add a ; --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 4b6e4e547..8182cf7e9 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -84,7 +84,7 @@ function bootstrap() { apmInstallCommand += ' --arch=ia32'; if (!process.env.ATOM_NODE_VERSION) - process.env.ATOM_NODE_VERSION = require('../package.json').electronVersion + process.env.ATOM_NODE_VERSION = require('../package.json').electronVersion; var commands = [ { From 6091ea8cafdcee71c6cd4346c9784758a84bf746 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 21 May 2015 16:18:26 -0700 Subject: [PATCH 20/42] :arrow_up: electron@0.26.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cf415657f..2d34b6969 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.26.0", + "electronVersion": "0.26.1", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 1cfdf48c77a16b04ee035e8b291d32d74f3873db Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 1 Jun 2015 14:13:59 +0800 Subject: [PATCH 21/42] :arrow_up: asar@0.7.0 --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index 4a96ceac9..a909f8cd4 100644 --- a/build/package.json +++ b/build/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "asar": "^0.5.0", + "asar": "^0.7.1", "async": "~0.2.9", "donna": "1.0.10", "formidable": "~1.0.14", From 4fe210a36bc926500577e5aa017da4196b426e8c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 2 Jun 2015 11:41:00 +0800 Subject: [PATCH 22/42] :arrow_up: electron@0.27.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2d34b6969..17ed96ba3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.26.1", + "electronVersion": "0.27.2", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From e3f9074f4a98f15a4436a79a2209e2fdece85dd4 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 2 Jun 2015 11:41:19 +0800 Subject: [PATCH 23/42] Object.create doesn't work well with CustomEvent in Chrome 43 --- src/command-registry.coffee | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/command-registry.coffee b/src/command-registry.coffee index e41a637ef..14fd794e5 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -175,11 +175,14 @@ class CommandRegistry # * `commandName` {String} indicating the name of the command to dispatch. dispatch: (target, commandName, detail) -> event = new CustomEvent(commandName, {bubbles: true, detail}) - eventWithTarget = Object.create event, + eventWithTarget = Object.create {}, target: value: target preventDefault: value: -> stopPropagation: value: -> stopImmediatePropagation: value: -> + # In Chrome 43, Object.create doesn't work well with CustomEvent. + for k, v of event when k not in eventWithTarget + eventWithTarget[k] = v @handleCommandEvent(eventWithTarget) # Public: Invoke the given callback before dispatching a command event. @@ -214,7 +217,7 @@ class CommandRegistry matched = false currentTarget = originalEvent.target - syntheticEvent = Object.create originalEvent, + syntheticEvent = Object.create {}, eventPhase: value: Event.BUBBLING_PHASE currentTarget: get: -> currentTarget preventDefault: value: -> @@ -228,6 +231,9 @@ class CommandRegistry immediatePropagationStopped = true abortKeyBinding: value: -> originalEvent.abortKeyBinding?() + # In Chrome 43, Object.create doesn't work well with CustomEvent. + for k, v of originalEvent when k not in syntheticEvent + syntheticEvent[k] = v @emitter.emit 'will-dispatch', syntheticEvent From 9c692f48b2b5969aac61c1b01b520bbe0ea109e8 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Mon, 13 Jul 2015 23:00:38 +0200 Subject: [PATCH 24/42] :arrow_up: electron@0.29.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 17ed96ba3..db892b69f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.27.2", + "electronVersion": "0.29.2", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 3f6184deb5ecc79b6b41ac1ac84c9b6900ae1dbf Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Mon, 20 Jul 2015 21:16:30 +0200 Subject: [PATCH 25/42] :arrow_up: electron@0.30.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db892b69f..4d5a151ad 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.29.2", + "electronVersion": "0.30.0", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 93348f7e3f92fce9afc310b43a58aeb14dd4c52f Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Tue, 28 Jul 2015 20:18:55 +0200 Subject: [PATCH 26/42] :arrow_up: electron@0.30.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d5a151ad..c7c72d4ef 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.0", + "electronVersion": "0.30.1", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 405eaf14d15a686a0a6b8178ffde51f9d0d4e1df Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Tue, 28 Jul 2015 22:47:10 +0200 Subject: [PATCH 27/42] :see_no_evil: Add temporary hack to work around issue with CustomEvent Since it's no longer possible to "properly" extend CustomEvent, we will need to figure out a way to shadow the prototype chain, or some such. See https://code.google.com/p/chromium/issues/detail?id=495437 for more details. --- src/command-registry.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command-registry.coffee b/src/command-registry.coffee index 14fd794e5..a2ceb1ad2 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -220,6 +220,7 @@ class CommandRegistry syntheticEvent = Object.create {}, eventPhase: value: Event.BUBBLING_PHASE currentTarget: get: -> currentTarget + target: value: currentTarget # TODO: Find a better way to solve this. preventDefault: value: -> originalEvent.preventDefault() stopPropagation: value: -> @@ -232,6 +233,7 @@ class CommandRegistry abortKeyBinding: value: -> originalEvent.abortKeyBinding?() # In Chrome 43, Object.create doesn't work well with CustomEvent. + # NOTE: We should "properly" shadow the prototype chain (CustomEvent + Event) here. for k, v of originalEvent when k not in syntheticEvent syntheticEvent[k] = v From 2a61707a59da8f2c5b1ec872c217c7f3ee3c4308 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 29 Jul 2015 18:34:12 +0800 Subject: [PATCH 28/42] Install gcc 4.8 on travis CI --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index b1fe95f83..f429fc4f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,11 @@ notifications: addons: apt: + sources: + - ubuntu-toolchain-r-test packages: + - gcc-4.8 + - g++-4.8 - build-essential - git - libgnome-keyring-dev From 6dbb9c63a7af933a4f567a761fc9b017b7f3209f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 29 Jul 2015 18:43:57 +0800 Subject: [PATCH 29/42] Use clang to build native modules --- script/cibuild | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/cibuild b/script/cibuild index 08ff65c6e..6c57ba039 100755 --- a/script/cibuild +++ b/script/cibuild @@ -22,11 +22,16 @@ function loadEnvironmentVariables(filePath) { } function readEnvironmentVariables() { - if (process.platform === 'win32') + if (process.platform === 'win32') { loadEnvironmentVariables(path.resolve('/jenkins/config/atomcredentials')); - else if (process.platform === 'darwin') { + } else if (process.platform === 'darwin') { loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials'); loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain'); + } else if (process.platform === 'linux') { + // Use clang for building native code, the GCC on precise is too old. + process.env['CC'] = 'clang'; + process.env['CXX'] = 'clang++'; + process.env['npm_config_clang'] = '1'; } } From 02b4da4819d5220d2a0133b98ed258f8ee708900 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 29 Jul 2015 18:48:09 +0800 Subject: [PATCH 30/42] Use clang as compiler on travis CI --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f429fc4f2..c9157d207 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ env: - ATOM_ACCESS_TOKEN=da809a6077bb1b0aa7c5623f7b2d5f1fec2faae4 - NODE_VERSION=0.12 +compiler: clang + matrix: include: - os: linux @@ -35,11 +37,7 @@ notifications: addons: apt: - sources: - - ubuntu-toolchain-r-test packages: - - gcc-4.8 - - g++-4.8 - build-essential - git - libgnome-keyring-dev From ddc90533b521e8d88b525f22a39b62e7dd163235 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 30 Jul 2015 14:57:47 +0800 Subject: [PATCH 31/42] :arrow_up: electron@0.30.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7c72d4ef..f14ef04fc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.1", + "electronVersion": "0.30.2", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 38a096bd05e1dbadc458b2f1dcd4cbf956999cd8 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Fri, 31 Jul 2015 06:51:26 +0200 Subject: [PATCH 32/42] :art: Set environment variables using dot notation --- script/cibuild | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/cibuild b/script/cibuild index 6c57ba039..d366af79a 100755 --- a/script/cibuild +++ b/script/cibuild @@ -28,10 +28,10 @@ function readEnvironmentVariables() { loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials'); loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain'); } else if (process.platform === 'linux') { - // Use clang for building native code, the GCC on precise is too old. - process.env['CC'] = 'clang'; - process.env['CXX'] = 'clang++'; - process.env['npm_config_clang'] = '1'; + // Use Clang for building native code, the GCC on Precise is too old. + process.env.CC = 'clang'; + process.env.CXX = 'clang++'; + process.env.npm_config_clang = '1'; } } From b483fc68053a7a1fca5623a8788800f5243f31f5 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Fri, 31 Jul 2015 04:08:50 -0700 Subject: [PATCH 33/42] Set App User Model ID on Win32 --- src/browser/main.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/browser/main.coffee b/src/browser/main.coffee index 33a58289c..8e5444921 100644 --- a/src/browser/main.coffee +++ b/src/browser/main.coffee @@ -13,6 +13,9 @@ start = -> setupCompileCache() return if handleStartupEventWithSquirrel() + # NB: This prevents Win10 from showing dupe items in the taskbar + app.setAppUserModelId('com.squirrel.atom.atom') + args = parseCommandLine() addPathToOpen = (event, pathToOpen) -> From 6294bc22d71418a0a535eb2c3ec29ea4eb054b3a Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Wed, 5 Aug 2015 23:58:36 +0200 Subject: [PATCH 34/42] Simplify workaround, and describe issue with Object.create + CustomEvent --- src/command-registry.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/command-registry.coffee b/src/command-registry.coffee index a2ceb1ad2..d2fa1c019 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -180,9 +180,11 @@ class CommandRegistry preventDefault: value: -> stopPropagation: value: -> stopImmediatePropagation: value: -> - # In Chrome 43, Object.create doesn't work well with CustomEvent. - for k, v of event when k not in eventWithTarget - eventWithTarget[k] = v + # NOTE: In Chrome 43, Object.create doesn't work well with CustomEvent; + # However utilizing _.defaults here doesn't really do anything since all properties have been + # moved from "own" to the prototype, so we should update this to fully shadowing the properties + # from Event.prototype (+ detail property from CustomEvent). + eventWithTarget = _.defaults(eventWithTarget, event) @handleCommandEvent(eventWithTarget) # Public: Invoke the given callback before dispatching a command event. @@ -220,7 +222,7 @@ class CommandRegistry syntheticEvent = Object.create {}, eventPhase: value: Event.BUBBLING_PHASE currentTarget: get: -> currentTarget - target: value: currentTarget # TODO: Find a better way to solve this. + target: value: currentTarget preventDefault: value: -> originalEvent.preventDefault() stopPropagation: value: -> @@ -232,10 +234,8 @@ class CommandRegistry immediatePropagationStopped = true abortKeyBinding: value: -> originalEvent.abortKeyBinding?() - # In Chrome 43, Object.create doesn't work well with CustomEvent. - # NOTE: We should "properly" shadow the prototype chain (CustomEvent + Event) here. - for k, v of originalEvent when k not in syntheticEvent - syntheticEvent[k] = v + # NOTE: See similar scenario in ::dispatch. + syntheticEvent = _.defaults(syntheticEvent, originalEvent) @emitter.emit 'will-dispatch', syntheticEvent From 6753077c6ae75d3a6f897aea6a66ec93f2767aa0 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Mon, 10 Aug 2015 12:42:51 +0200 Subject: [PATCH 35/42] :arrow_up: electron@0.30.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f14ef04fc..7405ed041 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.2", + "electronVersion": "0.30.3", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 1f54cfb881925a4ed6a9758f5ce0c4e6d5b9862d Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Tue, 11 Aug 2015 11:39:08 +0200 Subject: [PATCH 36/42] :arrow_up: electron@0.30.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7405ed041..aaf0f0542 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.3", + "electronVersion": "0.30.4", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From 9820afd1810e0b183cff494aa971f9ff5fccb4cc Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Fri, 21 Aug 2015 15:41:04 +0200 Subject: [PATCH 37/42] :arrow_up: electron@0.30.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aaf0f0542..a399111da 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.4", + "electronVersion": "0.30.5", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10", From c312541399e770ce08b7e8ba7f83d77f756b2a54 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Fri, 21 Aug 2015 18:51:30 +0200 Subject: [PATCH 38/42] :art: Fix non-alphabetical ordering of dependencies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a399111da..c1c5ab3f6 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "mixto": "^1", "normalize-package-data": "^2.0.0", "nslog": "^2.0.0", - "pathwatcher": "^4.4.3", "oniguruma": "^4.2.2", + "pathwatcher": "^4.4.3", "property-accessors": "^1.1.3", "q": "^1.1.2", "random-words": "0.0.1", From 27f1af380eb8b3b68e8fc0b237782c20a54e4ae2 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Fri, 21 Aug 2015 18:53:55 +0200 Subject: [PATCH 39/42] :fire: Remove unnecessary ATOM_NODE_VERSION bootstrapping --- script/bootstrap | 3 --- 1 file changed, 3 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 8182cf7e9..4c9435852 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -83,9 +83,6 @@ function bootstrap() { if (process.env.JANKY_SHA1 && process.platform === 'win32') apmInstallCommand += ' --arch=ia32'; - if (!process.env.ATOM_NODE_VERSION) - process.env.ATOM_NODE_VERSION = require('../package.json').electronVersion; - var commands = [ { command: buildInstallCommand, From aed785924d886a76f72dd4dbdc1ded3addb259cf Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 24 Aug 2015 16:15:48 -0600 Subject: [PATCH 40/42] Continue to dispatch CustomEvent instances in CommandRegistry This changes the approach used to synthesize an event to dispatch. Since we can no longer point to the original event as our prototype, we build a new CustomEvent instance and override select properties with Object.defineProperty. This preserves the contract with event handlers by giving them a true CustomEvent instance. --- src/command-registry.coffee | 58 +++++++++++++++---------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/src/command-registry.coffee b/src/command-registry.coffee index d2fa1c019..5543737c1 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -175,17 +175,8 @@ class CommandRegistry # * `commandName` {String} indicating the name of the command to dispatch. dispatch: (target, commandName, detail) -> event = new CustomEvent(commandName, {bubbles: true, detail}) - eventWithTarget = Object.create {}, - target: value: target - preventDefault: value: -> - stopPropagation: value: -> - stopImmediatePropagation: value: -> - # NOTE: In Chrome 43, Object.create doesn't work well with CustomEvent; - # However utilizing _.defaults here doesn't really do anything since all properties have been - # moved from "own" to the prototype, so we should update this to fully shadowing the properties - # from Event.prototype (+ detail property from CustomEvent). - eventWithTarget = _.defaults(eventWithTarget, event) - @handleCommandEvent(eventWithTarget) + Object.defineProperty(event, 'target', value: target) + @handleCommandEvent(event) # Public: Invoke the given callback before dispatching a command event. # @@ -213,37 +204,36 @@ class CommandRegistry @selectorBasedListenersByCommandName[commandName] = listeners.slice() return - handleCommandEvent: (originalEvent) => + handleCommandEvent: (event) => propagationStopped = false immediatePropagationStopped = false matched = false - currentTarget = originalEvent.target + currentTarget = event.target + {preventDefault, stopPropagation, stopImmediatePropagation, abortKeyBinding} = event - syntheticEvent = Object.create {}, - eventPhase: value: Event.BUBBLING_PHASE - currentTarget: get: -> currentTarget - target: value: currentTarget - preventDefault: value: -> - originalEvent.preventDefault() - stopPropagation: value: -> - originalEvent.stopPropagation() - propagationStopped = true - stopImmediatePropagation: value: -> - originalEvent.stopImmediatePropagation() - propagationStopped = true - immediatePropagationStopped = true - abortKeyBinding: value: -> - originalEvent.abortKeyBinding?() - # NOTE: See similar scenario in ::dispatch. - syntheticEvent = _.defaults(syntheticEvent, originalEvent) + dispatchedEvent = new CustomEvent(event.type, {bubbles: true, detail: event.detail}) + Object.defineProperty dispatchedEvent, 'eventPhase', value: Event.BUBBLING_PHASE + Object.defineProperty dispatchedEvent, 'currentTarget', get: -> currentTarget + Object.defineProperty dispatchedEvent, 'target', value: currentTarget + Object.defineProperty dispatchedEvent, 'preventDefault', value: -> + event.preventDefault() + Object.defineProperty dispatchedEvent, 'stopPropagation', value: -> + event.stopPropagation() + propagationStopped = true + Object.defineProperty dispatchedEvent, 'stopImmediatePropagation', value: -> + event.stopImmediatePropagation() + propagationStopped = true + immediatePropagationStopped = true + Object.defineProperty dispatchedEvent, 'abortKeyBinding', value: -> + event.abortKeyBinding?() - @emitter.emit 'will-dispatch', syntheticEvent + @emitter.emit 'will-dispatch', dispatchedEvent loop - listeners = @inlineListenersByCommandName[originalEvent.type]?.get(currentTarget) ? [] + listeners = @inlineListenersByCommandName[event.type]?.get(currentTarget) ? [] if currentTarget.webkitMatchesSelector? selectorBasedListeners = - (@selectorBasedListenersByCommandName[originalEvent.type] ? []) + (@selectorBasedListenersByCommandName[event.type] ? []) .filter (listener) -> currentTarget.webkitMatchesSelector(listener.selector) .sort (a, b) -> a.compare(b) listeners = listeners.concat(selectorBasedListeners) @@ -252,7 +242,7 @@ class CommandRegistry for listener in listeners break if immediatePropagationStopped - listener.callback.call(currentTarget, syntheticEvent) + listener.callback.call(currentTarget, dispatchedEvent) break if currentTarget is window break if propagationStopped From 919445cf8a501df9993c67511384addb12172a6a Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Tue, 25 Aug 2015 08:34:02 +0200 Subject: [PATCH 41/42] :bug: Fix undefined reference to syntheticEvent --- src/command-registry.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command-registry.coffee b/src/command-registry.coffee index 5543737c1..0ad8a7fe2 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -248,7 +248,7 @@ class CommandRegistry break if propagationStopped currentTarget = currentTarget.parentNode ? window - @emitter.emit 'did-dispatch', syntheticEvent + @emitter.emit 'did-dispatch', dispatchedEvent matched From f58a133fd5f780c68916d33f20a5460d7ef2275e Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Wed, 26 Aug 2015 15:08:23 +0200 Subject: [PATCH 42/42] :arrow_up: electron@0.30.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1c5ab3f6..43f2beead 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.30.5", + "electronVersion": "0.30.6", "dependencies": { "async": "0.2.6", "atom-keymap": "^5.1.10",