From eab26fb3a60b4422ffddf0ae30719915eb4191fc Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Jan 2014 19:19:42 -0700 Subject: [PATCH 01/33] Properly exit when render process crashes if exitWhenDone option is true Previously, we were referring to an undefined `atom` global to exit when the render process crashed in specs. Now we only exit when exitWhenDone is true, which will only exit in headless specs. Also, we now call .exit on an object that's actually defined. --- src/browser/atom-application.coffee | 2 ++ src/browser/atom-window.coffee | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 3e9aacc18..fa18a59c1 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -52,6 +52,8 @@ class AtomApplication resourcePath: null version: null + exit: (status) -> app.exit(status) + constructor: (options) -> {@resourcePath, @version, @devMode} = options global.atomApplication = this diff --git a/src/browser/atom-window.coffee b/src/browser/atom-window.coffee index 9a15c251b..0f09bfaa4 100644 --- a/src/browser/atom-window.coffee +++ b/src/browser/atom-window.coffee @@ -18,7 +18,7 @@ class AtomWindow isSpec: null constructor: (settings={}) -> - {@resourcePath, pathToOpen, initialLine, @isSpec} = settings + {@resourcePath, pathToOpen, initialLine, @isSpec, @exitWhenDone} = settings global.atomApplication.addWindow(this) @setupNodePath(@resourcePath) @@ -82,7 +82,7 @@ class AtomWindow @browserWindow.destroy() if chosen is 0 @browserWindow.on 'crashed', => - atom.exit(100) if @isSpec + global.atomApplication.exit(100) if @exitWhenDone chosen = dialog.showMessageBox @browserWindow, type: 'warning' From c397b3cc6081f74ddd708ce3a09c82c9b443d062 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Jan 2014 08:53:29 -0800 Subject: [PATCH 02/33] Upgrade to first-mate@0.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdafe5e37..5b7e537ad 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "coffee-script": "1.6.3", "coffeestack": "0.6.0", "emissary": "0.19.0", - "first-mate": "0.11.0", + "first-mate": "0.14.0", "fs-plus": "0.14.0", "fstream": "0.1.24", "fuzzaldrin": "0.5.0", From ca6da5f9c1f0c76c996e9ba0efe0026c93ed3786 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 9 Jan 2014 10:01:25 -0800 Subject: [PATCH 03/33] Update expcetion-reporting --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b7e537ad..a87f4bfb2 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "command-palette": "0.14.0", "dev-live-reload": "0.22.0", "editor-stats": "0.12.0", - "exception-reporting": "0.9.0", + "exception-reporting": "0.10.0", "feedback": "0.22.0", "find-and-replace": "0.68.0", "fuzzy-finder": "0.30.0", From d3c6bd2f98a8a924619124556c7a8c03b4bff02f Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 9 Jan 2014 13:47:51 -0800 Subject: [PATCH 04/33] Use close instead of exit stdio might still be open when exit is called (http://nodejs.org/api/child_process.html#child_process_event_exit). With close you are guaranteed that there will be no more output. --- build/tasks/task-helpers.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/task-helpers.coffee b/build/tasks/task-helpers.coffee index 4362393d0..f83430884 100644 --- a/build/tasks/task-helpers.coffee +++ b/build/tasks/task-helpers.coffee @@ -39,7 +39,7 @@ module.exports = (grunt) -> proc = childProcess.spawn(options.cmd, options.args, options.opts) proc.stdout.on 'data', (data) -> stdout.push(data.toString()) proc.stderr.on 'data', (data) -> stderr.push(data.toString()) - proc.on 'exit', (exitCode, signal) -> + proc.on 'close', (exitCode, signal) -> error = new Error(signal) if exitCode != 0 results = {stderr: stderr.join(''), stdout: stdout.join(''), code: exitCode} grunt.log.error results.stderr if exitCode != 0 From 69f9f10c6b477ffec4f92504d384c93029040187 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Jan 2014 13:56:15 -0800 Subject: [PATCH 05/33] Upgrade to find-and-replace@0.69.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a87f4bfb2..8c33aa824 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.10.0", "feedback": "0.22.0", - "find-and-replace": "0.68.0", + "find-and-replace": "0.69.0", "fuzzy-finder": "0.30.0", "gists": "0.13.0", "git-diff": "0.21.0", From a1f8a21c7cf2df9e264b04cdc87fd99476ed8665 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 9 Jan 2014 13:55:45 -0800 Subject: [PATCH 06/33] Output warning/error if diskspace on CI server is getting low. --- build/Gruntfile.coffee | 2 +- build/tasks/output-disk-space.coffee | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 build/tasks/output-disk-space.coffee diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 831f18a15..7833ac0ac 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -210,7 +210,7 @@ module.exports = (grunt) -> grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson']) grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint']) grunt.registerTask('test', ['shell:kill-atom', 'run-specs']) - grunt.registerTask('ci', ['download-atom-shell', 'build', 'set-development-version', 'lint', 'test', 'publish-build']) + grunt.registerTask('ci', ['output-disk-space', 'download-atom-shell', 'build', 'set-development-version', 'lint', 'test', 'publish-build']) grunt.registerTask('deploy', ['partial-clean', 'download-atom-shell', 'build', 'codesign']) grunt.registerTask('docs', ['markdown:guides', 'build-docs']) grunt.registerTask('default', ['download-atom-shell', 'build', 'set-development-version', 'install']) diff --git a/build/tasks/output-disk-space.coffee b/build/tasks/output-disk-space.coffee new file mode 100644 index 000000000..9767c7b8d --- /dev/null +++ b/build/tasks/output-disk-space.coffee @@ -0,0 +1,25 @@ +module.exports = (grunt) -> + {spawn} = require('./task-helpers')(grunt) + + grunt.registerTask 'output-disk-space', 'Print diskspace available', -> + return unless process.platform is 'darwin' + + done = @async() + + cmd = 'df' + args = ['-Hl'] + spawn {cmd, args}, (error, result, code) -> + return done(error) if error? + + lines = result.stdout.split("\n") + + for line in lines[1..] + [filesystem, size, used, avail, capacity, extra] = line.split(/\s+/) + capacity = parseInt(capacity) + + if capacity > 90 + grunt.log.error("#{filesystem} is at #{capacity}% capacity!") + else if capacity > 80 + grunt.log.error("#{filesystem} is at #{capacity}% capacity.") + + done() From e435b487508c89e404eb8b41fd6b07bb3f7f3888 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 9 Jan 2014 13:58:24 -0800 Subject: [PATCH 07/33] Display warning if disk space is kind of full --- build/tasks/output-disk-space.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/output-disk-space.coffee b/build/tasks/output-disk-space.coffee index 9767c7b8d..372ead672 100644 --- a/build/tasks/output-disk-space.coffee +++ b/build/tasks/output-disk-space.coffee @@ -20,6 +20,6 @@ module.exports = (grunt) -> if capacity > 90 grunt.log.error("#{filesystem} is at #{capacity}% capacity!") else if capacity > 80 - grunt.log.error("#{filesystem} is at #{capacity}% capacity.") + grunt.log.ok("#{filesystem} is at #{capacity}% capacity.") done() From d96b63d791c28f315b70340fdbb022966cbfe0b7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Jan 2014 14:13:46 -0800 Subject: [PATCH 08/33] Move enable/disable to parent Package class This was previously unimplemented in TextMatePackage causing exceptions when trying to enable/disable a package of that type. --- src/atom-package.coffee | 6 ------ src/package.coffee | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/atom-package.coffee b/src/atom-package.coffee index aa62359e9..6546945bb 100644 --- a/src/atom-package.coffee +++ b/src/atom-package.coffee @@ -52,12 +52,6 @@ class AtomPackage extends Package console.warn "Failed to load package named '#{@name}'", e.stack ? e this - enable: -> - atom.config.removeAtKeyPath('core.disabledPackages', @metadata.name) - - disable: -> - atom.config.pushAtKeyPath('core.disabledPackages', @metadata.name) - reset: -> @stylesheets = [] @keymaps = [] diff --git a/src/package.coffee b/src/package.coffee index 4d8112466..f7dac9ffe 100644 --- a/src/package.coffee +++ b/src/package.coffee @@ -47,6 +47,12 @@ class Package isActive: -> atom.packages.isPackageActive(@name) + enable: -> + atom.config.removeAtKeyPath('core.disabledPackages', @metadata.name) + + disable: -> + atom.config.pushAtKeyPath('core.disabledPackages', @metadata.name) + isTheme: -> !!@metadata?.theme From 20ee7b432c85d3c5be69c78ef2e6f25746658f0d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Jan 2014 15:07:01 -0800 Subject: [PATCH 09/33] Wrap item in array since it is a trigger call --- src/pane-container.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pane-container.coffee b/src/pane-container.coffee index 4ecda8359..7f9bd44f7 100644 --- a/src/pane-container.coffee +++ b/src/pane-container.coffee @@ -66,7 +66,7 @@ class PaneContainer extends View panes[nextIndex].makeActive() itemDestroyed: (item) -> - @trigger 'item-destroyed', item + @trigger 'item-destroyed', [item] getRoot: -> @children().first().view() From a0346e95cf796486d450839613ea782690211f17 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Jan 2014 15:37:08 -0800 Subject: [PATCH 10/33] Upgrade to markdow-preview@0.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c33aa824..ffa887605 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "grammar-selector": "0.16.0", "image-view": "0.14.0", "keybinding-resolver": "0.8.0", - "markdown-preview": "0.22.0", + "markdown-preview": "0.23.0", "metrics": "0.20.0", "package-generator": "0.23.0", "release-notes": "0.15.0", From fbcfad28c32d32a73b12ce46431f04c0b41f6b6a Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 9 Jan 2014 17:00:34 -0800 Subject: [PATCH 11/33] Reject is broken. Ugh. Just resolve it --- src/project.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project.coffee b/src/project.coffee index 7a32a933e..333f5c7bc 100644 --- a/src/project.coffee +++ b/src/project.coffee @@ -300,7 +300,7 @@ class Project extends Model promise = deferred.promise promise.cancel = -> task.terminate() - deferred.reject('cancelled') + deferred.resolve('cancelled') promise # Public: Performs a replace across all the specified files in the project. From d33a962848517643bcd35d6e4d9fbb7b62afc2f2 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 9 Jan 2014 17:12:33 -0800 Subject: [PATCH 12/33] Upgrade to find-and-replace@0.70.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ffa887605..aa7369c8f 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.10.0", "feedback": "0.22.0", - "find-and-replace": "0.69.0", + "find-and-replace": "0.70.0", "fuzzy-finder": "0.30.0", "gists": "0.13.0", "git-diff": "0.21.0", From 6eacfa7077ec0b19b1b446cbd9fbb57dc6c62040 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 9 Jan 2014 19:04:52 -0700 Subject: [PATCH 13/33] Call Range::toString, not ::inspect in DisplayBufferMarker::inspect --- src/display-buffer-marker.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display-buffer-marker.coffee b/src/display-buffer-marker.coffee index 1bbd6633e..8c08b3c9e 100644 --- a/src/display-buffer-marker.coffee +++ b/src/display-buffer-marker.coffee @@ -168,7 +168,7 @@ class DisplayBufferMarker # Returns a {String} representation of the marker inspect: -> - "DisplayBufferMarker(id: #{@id}, bufferRange: #{@getBufferRange().inspect()})" + "DisplayBufferMarker(id: #{@id}, bufferRange: #{@getBufferRange()})" ### Internal ### From 4fc1f5b24827d890046cbda642474023df1f3047 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 09:34:23 -0800 Subject: [PATCH 14/33] Upgrade to find-and-replace@0.71.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa7369c8f..9d1f2d06b 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.10.0", "feedback": "0.22.0", - "find-and-replace": "0.70.0", + "find-and-replace": "0.71.0", "fuzzy-finder": "0.30.0", "gists": "0.13.0", "git-diff": "0.21.0", From 3b7f1467e146807ca51fddefc8cebcf89c216530 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 09:42:09 -0800 Subject: [PATCH 15/33] Upgrade to background-tips@0.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d1f2d06b..b8685b014 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "autocomplete": "0.19.0", "autoflow": "0.11.0", "autosave": "0.10.0", - "background-tips": "0.3.0", + "background-tips": "0.4.0", "bookmarks": "0.15.0", "bracket-matcher": "0.16.0", "command-logger": "0.8.0", From e707ab544193968b85270654e89be5a995dadd5e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 09:52:30 -0800 Subject: [PATCH 16/33] Remove unused require --- src/key-binding.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/key-binding.coffee b/src/key-binding.coffee index 11b4505d0..1b39895e4 100644 --- a/src/key-binding.coffee +++ b/src/key-binding.coffee @@ -1,4 +1,3 @@ -{$} = require './space-pen-extensions' _ = require 'underscore-plus' fs = require 'fs-plus' {specificity} = require 'clear-cut' From e099f00739b6e4f170232a5928db13eed14fb256 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 09:57:11 -0800 Subject: [PATCH 17/33] :lipstick: Use unless instead of if not --- src/key-binding.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key-binding.coffee b/src/key-binding.coffee index 1b39895e4..66a6dc278 100644 --- a/src/key-binding.coffee +++ b/src/key-binding.coffee @@ -19,7 +19,7 @@ class KeyBinding normalizedKeystroke.join(' ') @getParser: -> - if not KeyBinding.parser + unless KeyBinding.parser? keystrokePattern = fs.readFileSync(require.resolve('./keystroke-pattern.pegjs'), 'utf8') KeyBinding.parser = PEG.buildParser(keystrokePattern) From 32158711cef9d13cf562739995503949b407b891 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 10:09:47 -0800 Subject: [PATCH 18/33] Upgrade to pegjs@0.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8685b014..371e7c344 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "oniguruma": "0.24.0", "optimist": "0.4.0", "pathwatcher": "0.11.0", - "pegjs": "0.7.0", + "pegjs": "0.8.0", "q": "0.9.7", "scandal": "0.11.0", "season": "0.14.0", From 8cb565ad2a6ad5112502ce25cef428c08d2bbc71 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 10:10:08 -0800 Subject: [PATCH 19/33] Add parseKeystroke function --- src/key-binding.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/key-binding.coffee b/src/key-binding.coffee index 66a6dc278..12fc07266 100644 --- a/src/key-binding.coffee +++ b/src/key-binding.coffee @@ -12,18 +12,18 @@ class KeyBinding @normalizeKeystroke: (keystroke) -> normalizedKeystroke = keystroke.split(/\s+/).map (keystroke) => - keys = @getParser().parse(keystroke) + keys = @parseKeystroke(keystroke) modifiers = keys[0...-1] modifiers.sort() [modifiers..., _.last(keys)].join('-') normalizedKeystroke.join(' ') - @getParser: -> + @parseKeystroke: (keystroke) -> unless KeyBinding.parser? keystrokePattern = fs.readFileSync(require.resolve('./keystroke-pattern.pegjs'), 'utf8') KeyBinding.parser = PEG.buildParser(keystrokePattern) - KeyBinding.parser + KeyBinding.parser.parse(keystroke) constructor: (source, command, keystroke, selector) -> @source = source From c39d8d9aa711a37994fc60090594096f81eb0fab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 11:32:40 -0800 Subject: [PATCH 20/33] Precompile pegjs parsers --- build/Gruntfile.coffee | 13 ++++++++++++- build/package.json | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 7833ac0ac..85edc9c49 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -25,6 +25,7 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-markdown') grunt.loadNpmTasks('grunt-shell') grunt.loadNpmTasks('grunt-download-atom-shell') + grunt.loadNpmTasks('grunt-peg') grunt.loadTasks('tasks') # This allows all subsequent paths to the relative to the root of the repo @@ -102,6 +103,13 @@ module.exports = (grunt) -> dest: appDir ext: '.json' + pegConfig = + glob_to_multiple: + expand: true + src: ['src/**/*.pegjs'] + dest: appDir + ext: '.js' + for child in fs.readdirSync('node_modules') when child isnt '.bin' directory = path.join('node_modules', child) {engines, theme} = grunt.file.readJSON(path.join(directory, 'package.json')) @@ -110,6 +118,7 @@ module.exports = (grunt) -> lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less") prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson") + pegConfig.glob_to_multiple.src.push("#{directory}/**/*.pegjs") grunt.initConfig pkg: grunt.file.readJSON('package.json') @@ -124,6 +133,8 @@ module.exports = (grunt) -> cson: csonConfig + peg: pegConfig + coffeelint: options: no_empty_param_list: @@ -207,7 +218,7 @@ module.exports = (grunt) -> stderr: false failOnError: false - grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson']) + grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson', 'peg']) grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint']) grunt.registerTask('test', ['shell:kill-atom', 'run-specs']) grunt.registerTask('ci', ['output-disk-space', 'download-atom-shell', 'build', 'set-development-version', 'lint', 'test', 'publish-build']) diff --git a/build/package.json b/build/package.json index 221dc69c2..1f74aaf3c 100644 --- a/build/package.json +++ b/build/package.json @@ -28,6 +28,7 @@ "request": "~2.27.0", "rimraf": "~2.2.2", "unzip": "~0.1.9", - "walkdir": "0.0.7" + "walkdir": "0.0.7", + "grunt-peg": "~1.1.0" } } From ba9f353c4a7b05bfcac67053820dca708fac01e8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 11:43:45 -0800 Subject: [PATCH 21/33] Use precompile pattern when available --- src/key-binding.coffee | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/key-binding.coffee b/src/key-binding.coffee index 12fc07266..d5a12e4ef 100644 --- a/src/key-binding.coffee +++ b/src/key-binding.coffee @@ -1,7 +1,6 @@ _ = require 'underscore-plus' fs = require 'fs-plus' {specificity} = require 'clear-cut' -PEG = require 'pegjs' ### Internal ### @@ -19,11 +18,15 @@ class KeyBinding normalizedKeystroke.join(' ') @parseKeystroke: (keystroke) -> - unless KeyBinding.parser? - keystrokePattern = fs.readFileSync(require.resolve('./keystroke-pattern.pegjs'), 'utf8') - KeyBinding.parser = PEG.buildParser(keystrokePattern) + unless @parser? + try + @parser = require './keystroke-pattern' + catch + keystrokePattern = fs.readFileSync(require.resolve('./keystroke-pattern.pegjs'), 'utf8') + PEG = require 'pegjs' + @parser = PEG.buildParser(keystrokePattern) - KeyBinding.parser.parse(keystroke) + @parser.parse(keystroke) constructor: (source, command, keystroke, selector) -> @source = source From de25b8ea37ae4ff3d9a6212922c5aca4c86b475a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 12:01:56 -0800 Subject: [PATCH 22/33] Cache specificities --- src/key-binding.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/key-binding.coffee b/src/key-binding.coffee index d5a12e4ef..1f3ad1d65 100644 --- a/src/key-binding.coffee +++ b/src/key-binding.coffee @@ -8,6 +8,15 @@ module.exports = class KeyBinding @parser: null @currentIndex: 1 + @specificities: null + + @calculateSpecificity: (selector) -> + @specificities ?= {} + value = @specificities[selector] + unless value? + value = specificity(selector) + @specificities[selector] = value + value @normalizeKeystroke: (keystroke) -> normalizedKeystroke = keystroke.split(/\s+/).map (keystroke) => @@ -33,7 +42,7 @@ class KeyBinding @command = command @keystroke = KeyBinding.normalizeKeystroke(keystroke) @selector = selector.replace(/!important/g, '') - @specificity = specificity(selector) + @specificity = KeyBinding.calculateSpecificity(selector) @index = KeyBinding.currentIndex++ matches: (keystroke) -> From a127d3c4ebf5a7b3249ffc60a13ea8faf9a15bf3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 12:57:12 -0800 Subject: [PATCH 23/33] Upgrade to fuzzaldrin@0.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 371e7c344..69135ecab 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "first-mate": "0.14.0", "fs-plus": "0.14.0", "fstream": "0.1.24", - "fuzzaldrin": "0.5.0", + "fuzzaldrin": "0.6.0", "git-utils": "0.29.0", "guid": "0.0.10", "jasmine-focused": "~0.15.0", From 50ab49aedb03f8212668978a0fc016bb65fb19bc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 12:57:35 -0800 Subject: [PATCH 24/33] Upgrade to first-mate@0.17.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 69135ecab..e14e1a791 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "coffee-script": "1.6.3", "coffeestack": "0.6.0", "emissary": "0.19.0", - "first-mate": "0.14.0", + "first-mate": "0.17.0", "fs-plus": "0.14.0", "fstream": "0.1.24", "fuzzaldrin": "0.6.0", From 164a121de94aa9ce60851a861e8d1e0cc430e5c4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 13:02:19 -0800 Subject: [PATCH 25/33] Upgrade to snippets@0.18.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e14e1a791..b16684097 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "package-generator": "0.23.0", "release-notes": "0.15.0", "settings-view": "0.55.0", - "snippets": "0.17.0", + "snippets": "0.18.0", "spell-check": "0.18.0", "status-bar": "0.30.0", "styleguide": "0.19.0", From 43257de7cdc773fb459b422089be9a245a005088 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 14:08:05 -0800 Subject: [PATCH 26/33] Upgrade to metrics@0.21.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b16684097..0c93a2fa7 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "image-view": "0.14.0", "keybinding-resolver": "0.8.0", "markdown-preview": "0.23.0", - "metrics": "0.20.0", + "metrics": "0.21.0", "package-generator": "0.23.0", "release-notes": "0.15.0", "settings-view": "0.55.0", From 893e9873a1c6c0564bb5c2cbfdfb8be85d0a00ee Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 14:34:51 -0800 Subject: [PATCH 27/33] Upgrade to exception-reporting@0.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c93a2fa7..7da90eaee 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "command-palette": "0.14.0", "dev-live-reload": "0.22.0", "editor-stats": "0.12.0", - "exception-reporting": "0.10.0", + "exception-reporting": "0.11.0", "feedback": "0.22.0", "find-and-replace": "0.71.0", "fuzzy-finder": "0.30.0", From 81b4803d5604280bb72a8466b6283c28566e6599 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 14:44:22 -0800 Subject: [PATCH 28/33] Upgrade to tree-view@0.59.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7da90eaee..338d9f528 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "terminal": "0.23.0", "timecop": "0.12.0", "to-the-hubs": "0.17.0", - "tree-view": "0.58.0", + "tree-view": "0.59.0", "visual-bell": "0.6.0", "welcome": "0.4.0", "whitespace": "0.10.0", From 993f1ac2d669b2e713cbc8fed5b1088ff7d4513c Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 10 Jan 2014 15:31:19 -0800 Subject: [PATCH 29/33] Update status-bar@0.31.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 338d9f528..d214f226f 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "settings-view": "0.55.0", "snippets": "0.18.0", "spell-check": "0.18.0", - "status-bar": "0.30.0", + "status-bar": "0.31.0", "styleguide": "0.19.0", "symbols-view": "0.27.0", "tabs": "0.16.0", From c703cf205057a9cf9f0f4b91aa81165627ea3858 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 10 Jan 2014 15:38:04 -0800 Subject: [PATCH 30/33] Upgrade to find-and-replace@0.72.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d214f226f..e59009231 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.11.0", "feedback": "0.22.0", - "find-and-replace": "0.71.0", + "find-and-replace": "0.72.0", "fuzzy-finder": "0.30.0", "gists": "0.13.0", "git-diff": "0.21.0", From 82d5577bdc88c5b4daf6e0f6cc81e6d829a115de Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 10 Jan 2014 15:59:51 -0800 Subject: [PATCH 31/33] Upgrade to find-and-replace@0.73.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e59009231..c225f140b 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.11.0", "feedback": "0.22.0", - "find-and-replace": "0.72.0", + "find-and-replace": "0.73.0", "fuzzy-finder": "0.30.0", "gists": "0.13.0", "git-diff": "0.21.0", From 3c32a8e8fb3e09baebfb47bb31258e2e3b2128df Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sat, 11 Jan 2014 17:23:51 -0800 Subject: [PATCH 32/33] Throw error when sending to terminated process Mirrors behavior of start method --- src/task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/task.coffee b/src/task.coffee index de8d3de10..80eaa81b8 100644 --- a/src/task.coffee +++ b/src/task.coffee @@ -91,6 +91,7 @@ class Task # * message: # The message to send send: (message) -> + throw new Error("Cannot send message to terminated process") unless @childProcess? @childProcess.send(message) # Public: Forcefully stop the running task. From 9b0d8ec2424615383df3babc90cd19a7f0334776 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sat, 11 Jan 2014 17:51:59 -0800 Subject: [PATCH 33/33] :lipstick: Sort dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c225f140b..e9fce3bd8 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "space-pen": "3.0.3", "temp": "0.5.0", "text-buffer": "0.12.0", - "underscore-plus": "0.6.1", - "theorist": "~0.7.0" + "theorist": "~0.7.0", + "underscore-plus": "0.6.1" }, "packageDependencies": { "atom-dark-syntax": "0.10.0",