From 500afb0f206c23c9b1a844e2ad07a2f286e36453 Mon Sep 17 00:00:00 2001 From: Aaron Contreras Date: Tue, 4 Aug 2015 01:47:55 +0200 Subject: [PATCH 01/77] Improve split API, add new commands and rewrite existing ones Allow empty splits, as well as moving (instead of copying) active item --- keymaps/darwin.cson | 8 ++++---- keymaps/linux.cson | 8 ++++---- keymaps/win32.cson | 8 ++++---- src/pane.coffee | 2 ++ src/register-default-commands.coffee | 16 ++++++++++++---- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/keymaps/darwin.cson b/keymaps/darwin.cson index bf2e43a33..4859f9b67 100644 --- a/keymaps/darwin.cson +++ b/keymaps/darwin.cson @@ -81,10 +81,10 @@ 'cmd-_': 'window:decrease-font-size' 'cmd-0': 'window:reset-font-size' - 'cmd-k up': 'pane:split-up' # Atom Specific - 'cmd-k down': 'pane:split-down' # Atom Specific - 'cmd-k left': 'pane:split-left' # Atom Specific - 'cmd-k right': 'pane:split-right' # Atom Specific + 'cmd-k up': 'pane:split-up-and-copy-active-item' # Atom Specific + 'cmd-k down': 'pane:split-down-and-copy-active-item' # Atom Specific + 'cmd-k left': 'pane:split-left-and-copy-active-item' # Atom Specific + 'cmd-k right': 'pane:split-right-and-copy-active-item' # Atom Specific 'cmd-k cmd-w': 'pane:close' # Atom Specific 'cmd-k alt-cmd-w': 'pane:close-other-items' # Atom Specific 'cmd-k cmd-p': 'window:focus-previous-pane' diff --git a/keymaps/linux.cson b/keymaps/linux.cson index 536a1d75d..9ddb760e2 100644 --- a/keymaps/linux.cson +++ b/keymaps/linux.cson @@ -60,10 +60,10 @@ 'ctrl-_': 'window:decrease-font-size' 'ctrl-0': 'window:reset-font-size' - 'ctrl-k up': 'pane:split-up' # Atom Specific - 'ctrl-k down': 'pane:split-down' # Atom Specific - 'ctrl-k left': 'pane:split-left' # Atom Specific - 'ctrl-k right': 'pane:split-right' # Atom Specific + 'ctrl-k up': 'pane:split-up-and-copy-active-item' # Atom Specific + 'ctrl-k down': 'pane:split-down-and-copy-active-item' # Atom Specific + 'ctrl-k left': 'pane:split-left-and-copy-active-item' # Atom Specific + 'ctrl-k right': 'pane:split-right-and-copy-active-item' # Atom Specific 'ctrl-k ctrl-w': 'pane:close' # Atom Specific 'ctrl-k alt-ctrl-w': 'pane:close-other-items' # Atom Specific 'ctrl-k ctrl-p': 'window:focus-previous-pane' diff --git a/keymaps/win32.cson b/keymaps/win32.cson index cb291f493..e4703bac8 100644 --- a/keymaps/win32.cson +++ b/keymaps/win32.cson @@ -66,10 +66,10 @@ 'ctrl-_': 'window:decrease-font-size' 'ctrl-0': 'window:reset-font-size' - 'ctrl-k up': 'pane:split-up' # Atom Specific - 'ctrl-k down': 'pane:split-down' # Atom Specific - 'ctrl-k left': 'pane:split-left' # Atom Specific - 'ctrl-k right': 'pane:split-right' # Atom Specific + 'ctrl-k up': 'pane:split-up-and-copy-active-item' # Atom Specific + 'ctrl-k down': 'pane:split-down-and-copy-active-item' # Atom Specific + 'ctrl-k left': 'pane:split-left-and-copy-active-item' # Atom Specific + 'ctrl-k right': 'pane:split-right-and-copy-active-item' # Atom Specific 'ctrl-k ctrl-w': 'pane:close' # Atom Specific 'ctrl-k alt-ctrl-w': 'pane:close-other-items' # Atom Specific 'ctrl-k ctrl-p': 'window:focus-previous-pane' diff --git a/src/pane.coffee b/src/pane.coffee index df8889aac..0a5cca4c3 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -666,6 +666,8 @@ class Pane extends Model when 'before' then @parent.insertChildBefore(this, newPane) when 'after' then @parent.insertChildAfter(this, newPane) + @moveItemToPane(@activeItem, newPane) if params?.moveActiveItem + newPane.activate() newPane diff --git a/src/register-default-commands.coffee b/src/register-default-commands.coffee index b4649f70e..a738a5c42 100644 --- a/src/register-default-commands.coffee +++ b/src/register-default-commands.coffee @@ -65,10 +65,18 @@ module.exports = ({commandRegistry, commandInstaller, config}) -> commandRegistry.add 'atom-pane', 'pane:save-items': -> @getModel().saveItems() - 'pane:split-left': -> @getModel().splitLeft(copyActiveItem: true) - 'pane:split-right': -> @getModel().splitRight(copyActiveItem: true) - 'pane:split-up': -> @getModel().splitUp(copyActiveItem: true) - 'pane:split-down': -> @getModel().splitDown(copyActiveItem: true) + 'pane:split-left': -> @getModel().splitLeft() + 'pane:split-right': -> @getModel().splitRight() + 'pane:split-up': -> @getModel().splitUp() + 'pane:split-down': -> @getModel().splitDown() + 'pane:split-left-and-copy-active-item': -> @getModel().splitLeft(copyActiveItem: true) + 'pane:split-right-and-copy-active-item': -> @getModel().splitRight(copyActiveItem: true) + 'pane:split-up-and-copy-active-item': -> @getModel().splitUp(copyActiveItem: true) + 'pane:split-down-and-copy-active-item': -> @getModel().splitDown(copyActiveItem: true) + 'pane:split-left-and-move-active-item': -> @getModel().splitLeft(moveActiveItem: true) + 'pane:split-right-and-move-active-item': -> @getModel().splitRight(moveActiveItem: true) + 'pane:split-up-and-move-active-item': -> @getModel().splitUp(moveActiveItem: true) + 'pane:split-down-and-move-active-item': -> @getModel().splitDown(moveActiveItem: true) 'pane:close': -> @getModel().close() 'pane:close-other-items': -> @getModel().destroyInactiveItems() 'pane:increase-size': -> @getModel().increaseSize() From 5532ff6ba2708e2647be092c9a69e4d3dd40f9ab Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Wed, 3 Feb 2016 18:16:21 -0500 Subject: [PATCH 02/77] Copy apm.cmd to the build directory when building --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index a86c7c1f4..b350fc9eb 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -178,6 +178,7 @@ module.exports = (grunt) -> cp path.join('resources', 'win', 'atom.cmd'), path.join(shellAppDir, 'resources', 'cli', 'atom.cmd') cp path.join('resources', 'win', 'atom.sh'), path.join(shellAppDir, 'resources', 'cli', 'atom.sh') cp path.join('resources', 'win', 'atom.js'), path.join(shellAppDir, 'resources', 'cli', 'atom.js') + cp path.join('resources', 'win', 'apm.cmd'), path.join(shellAppDir, 'resources', 'cli', 'apm.cmd') cp path.join('resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh') if process.platform is 'linux' From f2d2ff6f3cb3e51299def00e937e13223c5c9e00 Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 5 Feb 2016 16:15:48 -0500 Subject: [PATCH 03/77] The flow annotation implies babel. --- build/lib/uses-babel.coffee | 1 + src/babel.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/lib/uses-babel.coffee b/build/lib/uses-babel.coffee index dcd480d4e..eebbb6159 100644 --- a/build/lib/uses-babel.coffee +++ b/build/lib/uses-babel.coffee @@ -4,6 +4,7 @@ BABEL_PREFIXES = [ "'use babel'" '"use babel"' '/** @babel */' + '/* @flow */' ] PREFIX_LENGTH = Math.max(BABEL_PREFIXES.map((prefix) -> prefix.length)...) diff --git a/src/babel.js b/src/babel.js index 1f450ff96..74035d8ee 100644 --- a/src/babel.js +++ b/src/babel.js @@ -10,7 +10,8 @@ var babelVersionDirectory = null var PREFIXES = [ '/** @babel */', '"use babel"', - '\'use babel\'' + '\'use babel\'', + '/* @flow */' ] var PREFIX_LENGTH = Math.max.apply(Math, PREFIXES.map(function (prefix) { From 563984a7b2fb54d22efe5d4f247f6e45e4117ee2 Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 5 Feb 2016 16:16:38 -0500 Subject: [PATCH 04/77] Test it. --- spec/babel-spec.coffee | 5 +++++ spec/fixtures/babel/flow-comment.js | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 spec/fixtures/babel/flow-comment.js diff --git a/spec/babel-spec.coffee b/spec/babel-spec.coffee index 3959a4753..02f0583ee 100644 --- a/spec/babel-spec.coffee +++ b/spec/babel-spec.coffee @@ -36,6 +36,11 @@ describe "Babel transpiler support", -> transpiled = require('./fixtures/babel/babel-double-quotes.js') expect(transpiled(3)).toBe 4 + describe 'when a .js file starts with /* @flow */', -> + it "transpiles it using babel", -> + transpiled = require('./fixtures/babel/flow-comment.js') + expect(transpiled(3)).toBe 4 + describe "when a .js file does not start with 'use babel';", -> it "does not transpile it using babel", -> expect(-> require('./fixtures/babel/invalid.js')).toThrow() diff --git a/spec/fixtures/babel/flow-comment.js b/spec/fixtures/babel/flow-comment.js new file mode 100644 index 000000000..57579b0e1 --- /dev/null +++ b/spec/fixtures/babel/flow-comment.js @@ -0,0 +1,4 @@ +/* @flow */ + +const f: Function = v => v + 1 +module.exports = f From 17bf2b40abb026f465539c32bcf5c231772f6ad9 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Fri, 5 Feb 2016 20:49:54 -0500 Subject: [PATCH 05/77] :arrow_up: language-json@0.17.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b0235380..7f7bb13b0 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "language-hyperlink": "0.16.0", "language-java": "0.17.0", "language-javascript": "0.109.0", - "language-json": "0.17.3", + "language-json": "0.17.4", "language-less": "0.29.0", "language-make": "0.21.0", "language-mustache": "0.13.0", From 355d6c5cd4b9b1a5d52ac624ae5af706c813786d Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 7 Feb 2016 21:23:50 -0500 Subject: [PATCH 06/77] :arrow_up: language-javascript@0.110.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f7bb13b0..35e8a2a37 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "language-html": "0.44.0", "language-hyperlink": "0.16.0", "language-java": "0.17.0", - "language-javascript": "0.109.0", + "language-javascript": "0.110.0", "language-json": "0.17.4", "language-less": "0.29.0", "language-make": "0.21.0", From 5127789a680bb9bd9540dea85ee251a942bae673 Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 7 Feb 2016 21:26:13 -0500 Subject: [PATCH 07/77] Update tokenized buffer spec --- spec/tokenized-buffer-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/tokenized-buffer-spec.coffee b/spec/tokenized-buffer-spec.coffee index 160a859df..72b292cc2 100644 --- a/spec/tokenized-buffer-spec.coffee +++ b/spec/tokenized-buffer-spec.coffee @@ -234,7 +234,7 @@ describe "TokenizedBuffer", -> it "updates tokens to reflect the change", -> buffer.setTextInRange([[0, 0], [2, 0]], "foo()\n7\n") - expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[1]).toEqual(value: '(', scopes: ['source.js', 'meta.function-call.js', 'punctuation.definition.arguments.begin.js']) + expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[1]).toEqual(value: '(', scopes: ['source.js', 'meta.function-call.js', 'meta.arguments.js', 'punctuation.definition.arguments.begin.bracket.round.js']) expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: '7', scopes: ['source.js', 'constant.numeric.decimal.js']) # line 2 is unchanged expect(tokenizedBuffer.tokenizedLineForRow(2).tokens[2]).toEqual(value: 'if', scopes: ['source.js', 'keyword.control.js']) From 1f0aacaedd5686802cde29b35161116081682837 Mon Sep 17 00:00:00 2001 From: Damien Guard Date: Sun, 7 Feb 2016 23:08:08 -0800 Subject: [PATCH 08/77] Clarify some build errors + VS2015 gotcha with Git Shell --- docs/build-instructions/windows.md | 48 ++++++++++++++++++------------ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/docs/build-instructions/windows.md b/docs/build-instructions/windows.md index 7eb2ed03d..b9c4f3823 100644 --- a/docs/build-instructions/windows.md +++ b/docs/build-instructions/windows.md @@ -3,32 +3,40 @@ ## Requirements ### General - * [Node.js](http://nodejs.org/en/download/) v4.x - * [Python](https://www.python.org/downloads/) v2.7.x + * [Node.js](http://nodejs.org/en/download/) v4.x + * [Python](https://www.python.org/downloads/) v2.7.x * The python.exe must be available at `%SystemDrive%\Python27\python.exe`. If it is installed elsewhere, you can create a symbolic link to the directory containing the python.exe using: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27` - * [GitHub Desktop](http://desktop.github.com/) -### On Windows 7 - * [Visual Studio 2013 Update 5](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4) +### Visual Studio -### On Windows 8 or 10 - * [Visual Studio Express 2013 or 2015 for Windows Desktop](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_2) - * To ensure that node-gyp knows what version of Visual Studio is installed, set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (e.g. `2013` or `2015`) +You can use either: + + * [Visual Studio 2013 Update 5](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Express or better) on Windows 7, 8 or 10 + * [Visual Studio 2015](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Community or better) with Windows 8 or 10 + +Whichever version you use ensure that: + + * The default installation folder is chosen so the build tools can find it + * Visual C++ support is installed + * You set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (e.g. `2013` or `2015`) + * The git command is in your path ## Instructions +You can run these commands using Command Prompt, PowerShell or Git Shell via [GitHub Desktop](http://desktop.github.com/). These instructions will assume the use of Bash from Git Shell - if you are using Command Prompt use a backslash instead: i.e. `script\build`. + +**VS2015 + Git Shell users** should note that the default path supplied with Git Shell includes reference to an older version of msbuild that will fail. It is recommended you use a PowerShell window that has git in the path at this time. + ```bash -# Use the Git Shell program which was installed by GitHub Desktop cd C:\ git clone https://github.com/atom/atom/ cd atom -script/build # Creates application in the `Program Files` directory +script/build ``` -Note: If you use cmd or Powershell instead of Git Shell, use a backslash instead: i.e. `script\build`. -These instructions will assume the use of Git Shell. +This will create the Atom application in the `Program Files` folder. ### `script/build` Options * `--install-dir` - Creates the final built application in this directory. Example (trailing slash is optional): @@ -41,14 +49,15 @@ These instructions will assume the use of Git Shell. ``` * `--verbose` - Verbose mode. A lot more information output. -## Why do I have to use GitHub Desktop? +## Do I have to use GitHub Desktop? -You don't. You can use your existing Git! GitHub Desktop's Git Shell is just easier to set up. +No, you can use your existing Git! GitHub Desktop's Git Shell is just easier to set up. If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your powershell or command window. -Note that you may have to open your command window as administrator. For powershell that doesn't seem to always be the case, though. -If none of this works, do install Github Desktop and use its Git shell. Makes life easier. +Note that you may have to open your Command Prompt as Administrator. For PowerShell that doesn't seem to always be the case, though. + +If none of this works, do install Github Desktop and use its Git Shell as it makes life easier. ## Troubleshooting @@ -75,15 +84,16 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * See the next item. -* `error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.` +* `error MSB8020: The build tools for Visual Studio 201? (Platform Toolset = 'v1?0') cannot be found.` - * If you're building Atom with Visual Studio 2013 or above make sure the `GYP_MSVS_VERSION` environment variable is set, and then re-run `script/build`: + * If you're building Atom with Visual Studio 2013 or above make sure the `GYP_MSVS_VERSION` environment variable is set, and then re-run `script/build` after a clean: ```bash $env:GYP_MSVS_VERSION='2013' # '2015' if using Visual Studio 2015, and so on + script/clean script/build ``` - * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required. + * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required and ensure you have Visual C++ language support installed. * Other `node-gyp` errors on first build attempt, even though the right node and python versions are installed. * Do try the build command one more time, as experience shows it often works on second try in many of these cases. From 130b0c7fb6fc31cd82b13d7a5f951ac44c839b42 Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 8 Feb 2016 11:13:38 -0500 Subject: [PATCH 09/77] :arrow_up: autoflow@0.27 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f7bb13b0..722963db1 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "autocomplete-html": "0.7.2", "autocomplete-plus": "2.25.0", "autocomplete-snippets": "1.10.0", - "autoflow": "0.26.0", + "autoflow": "0.27.0", "autosave": "0.23.0", "background-tips": "0.26.0", "bookmarks": "0.38.2", From 5ce50a5c6ff1bac45a8a3009ab508c7ff2d52cf1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Feb 2016 15:24:00 -0800 Subject: [PATCH 10/77] Don't bundle nodegit vendor folder --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index a86c7c1f4..036b5638e 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -54,6 +54,7 @@ module.exports = (grunt) -> # so that it doesn't becomes larger than it needs to be. ignoredPaths = [ path.join('git-utils', 'deps') + path.join('nodegit', 'vendor') path.join('oniguruma', 'deps') path.join('less', 'dist') path.join('bootstrap', 'docs') From 2525cbbd5e4cb577be0a890d9e7c7449c53a69a6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Feb 2016 15:42:54 -0800 Subject: [PATCH 11/77] Ignore nodegit src .cc/.h files --- build/tasks/build-task.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 036b5638e..7adbaf19a 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -120,6 +120,8 @@ module.exports = (grunt) -> # Ignore *.cc and *.h files from native modules ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('nodegit', 'src') + path.sep)}.*\\.(cc|h)?" + ignoredPaths.push "#{_.escapeRegExp(path.join('nodegit', 'generate') + path.sep)}.*\\.(cc|h)?" ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.(cc|h)*" From 86b9aa2dd11c201a3ae5323df0bfa8d74ccc7686 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Feb 2016 15:45:33 -0800 Subject: [PATCH 12/77] Don't bundle native module files --- build/tasks/build-task.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 7adbaf19a..cfa7f47a4 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -129,6 +129,8 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('runas', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('cached-run-in-this-context', 'src') + path.sep)}.*\\.(cc|h)?" + ignoredPaths.push "#{_.escapeRegExp(path.join('marker-index', 'src') + path.sep)}.*\\.(cc|h)?" ignoredPaths.push "#{_.escapeRegExp(path.join('keyboard-layout', 'src') + path.sep)}.*\\.(cc|h|mm)*" # Ignore build files From 67ed26bc0d10e6c6c2c1b29cf0870baa682312e5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Feb 2016 16:45:42 -0800 Subject: [PATCH 13/77] Don't bundle nodegit's node-pre-gyp module --- build/tasks/build-task.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index cfa7f47a4..b64f27d99 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -55,6 +55,8 @@ module.exports = (grunt) -> ignoredPaths = [ path.join('git-utils', 'deps') path.join('nodegit', 'vendor') + path.join('nodegit', 'node_modules', 'node-pre-gyp') + path.join('nodegit', 'node_modules', '.bin') path.join('oniguruma', 'deps') path.join('less', 'dist') path.join('bootstrap', 'docs') From 99c3ece3d3e0379f6bd1a552b940e7280668ef41 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 5 Feb 2016 16:46:52 -0800 Subject: [PATCH 14/77] Don't bundle nodegit's include headers --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index b64f27d99..e2439ee31 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -124,6 +124,7 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('nodegit', 'src') + path.sep)}.*\\.(cc|h)?" ignoredPaths.push "#{_.escapeRegExp(path.join('nodegit', 'generate') + path.sep)}.*\\.(cc|h)?" + ignoredPaths.push "#{_.escapeRegExp(path.join('nodegit', 'include') + path.sep)}.*\\.(cc|h)?" ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.(cc|h)*" From f5d13e3e3cae9776cb95658a2bdde13b081b0c80 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 8 Feb 2016 12:08:08 -0800 Subject: [PATCH 15/77] :arrow_up: status-bar@0.83.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 722963db1..a71d54b22 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "settings-view": "0.232.3", "snippets": "1.0.1", "spell-check": "0.65.0", - "status-bar": "0.82.0", + "status-bar": "0.83.0", "styleguide": "0.45.1", "symbols-view": "0.110.1", "tabs": "0.90.0", From 8ca107116802dec5e36eae57f26886f5dfd5b315 Mon Sep 17 00:00:00 2001 From: Wliu Date: Mon, 8 Feb 2016 16:52:47 -0500 Subject: [PATCH 16/77] Update presenter specs --- spec/text-editor-presenter-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index 05b0e2708..9253ff103 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -472,7 +472,7 @@ describe "TextEditorPresenter", -> expect(getState(presenter).horizontalScrollbar.scrollWidth).toBe 10 * maxLineLength + 1 expectStateUpdate presenter, -> - presenter.getLinesYardstick().setScopedCharacterWidth(['source.js', 'support.function.js'], 'p', 20) + presenter.getLinesYardstick().setScopedCharacterWidth(['source.js', 'meta.method-call.js', 'support.function.js'], 'p', 20) presenter.measurementsChanged() expect(getState(presenter).horizontalScrollbar.scrollWidth).toBe (10 * (maxLineLength - 2)) + (20 * 2) + 1 # 2 of the characters are 20px wide now instead of 10px wide @@ -866,7 +866,7 @@ describe "TextEditorPresenter", -> expect(getState(presenter).content.scrollWidth).toBe 10 * maxLineLength + 1 expectStateUpdate presenter, -> - presenter.getLinesYardstick().setScopedCharacterWidth(['source.js', 'support.function.js'], 'p', 20) + presenter.getLinesYardstick().setScopedCharacterWidth(['source.js', 'meta.method-call.js', 'support.function.js'], 'p', 20) presenter.measurementsChanged() expect(getState(presenter).content.scrollWidth).toBe (10 * (maxLineLength - 2)) + (20 * 2) + 1 # 2 of the characters are 20px wide now instead of 10px wide From f9ec7b56913c995b356b008f721ca6fdec3d6826 Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 8 Feb 2016 17:02:50 -0500 Subject: [PATCH 17/77] Save window dimensions before reloading. --- src/atom-environment.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index e8d656a43..7d920b82a 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -11,7 +11,7 @@ Model = require './model' WindowEventHandler = require './window-event-handler' StylesElement = require './styles-element' StorageFolder = require './storage-folder' -{getWindowLoadSettings} = require './window-load-settings-helpers' +{getWindowLoadSettings, setWindowLoadSettings} = require './window-load-settings-helpers' registerDefaultCommands = require './register-default-commands' DeserializerManager = require './deserializer-manager' @@ -492,6 +492,8 @@ class AtomEnvironment extends Model # Extended: Reload the current window. reload: -> + @saveWindowDimensions() + @applicationDelegate.restartWindow() # Extended: Returns a {Boolean} that is `true` if the current window is maximized. @@ -780,6 +782,11 @@ class AtomEnvironment extends Model @blobStore.save() + saveWindowDimensions: -> + loadSettings = getWindowLoadSettings() + loadSettings['windowDimensions'] = @getWindowDimensions() + setWindowLoadSettings(loadSettings) + saveStateSync: -> return unless @enablePersistence From f2d7b3953e3b02451658a119512e887b0cb942db Mon Sep 17 00:00:00 2001 From: Damien Guard Date: Mon, 8 Feb 2016 15:27:53 -0800 Subject: [PATCH 18/77] More Windows build instruction tweaks --- docs/build-instructions/windows.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/build-instructions/windows.md b/docs/build-instructions/windows.md index b9c4f3823..fdd55fdde 100644 --- a/docs/build-instructions/windows.md +++ b/docs/build-instructions/windows.md @@ -17,16 +17,16 @@ You can use either: * [Visual Studio 2013 Update 5](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Express or better) on Windows 7, 8 or 10 * [Visual Studio 2015](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Community or better) with Windows 8 or 10 -Whichever version you use ensure that: +Whichever version you use, ensure that: * The default installation folder is chosen so the build tools can find it * Visual C++ support is installed - * You set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (e.g. `2013` or `2015`) + * You set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (`2013` or `2015`), e.g. , e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell or set it in Windows advanced system settings control panel. * The git command is in your path ## Instructions -You can run these commands using Command Prompt, PowerShell or Git Shell via [GitHub Desktop](http://desktop.github.com/). These instructions will assume the use of Bash from Git Shell - if you are using Command Prompt use a backslash instead: i.e. `script\build`. +You can run these commands using Command Prompt, PowerShell or Git Shell via [GitHub Desktop](https://desktop.github.com/). These instructions will assume the use of Bash from Git Shell - if you are using Command Prompt use a backslash instead: i.e. `script\build`. **VS2015 + Git Shell users** should note that the default path supplied with Git Shell includes reference to an older version of msbuild that will fail. It is recommended you use a PowerShell window that has git in the path at this time. @@ -53,9 +53,9 @@ This will create the Atom application in the `Program Files` folder. No, you can use your existing Git! GitHub Desktop's Git Shell is just easier to set up. -If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your powershell or command window. +If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your PowerShell or Command Prompt. -Note that you may have to open your Command Prompt as Administrator. For PowerShell that doesn't seem to always be the case, though. +It is also recommended you open your Command Prompt or PowerShell as Administrator. If none of this works, do install Github Desktop and use its Git Shell as it makes life easier. @@ -64,10 +64,10 @@ If none of this works, do install Github Desktop and use its Git Shell as it mak ### Common Errors * `node is not recognized` - * If you just installed node, you'll need to restart your computer before node is - available on your Path. + * If you just installed Node.js, you'll need to restart your PowerShell/Command Prompt/Git Shell before the node + command is available on your Path. -* `script/build` outputs only the Node and Python versions before returning +* `script/build` outputs only the Node.js and Python versions before returning * Try moving the repository to `C:\atom`. Most likely, the path is too long. See [issue #2200](https://github.com/atom/atom/issues/2200). @@ -76,7 +76,7 @@ If none of this works, do install Github Desktop and use its Git Shell as it mak * This can occur because your home directory (`%USERPROFILE%`) has non-ASCII characters in it. This is a bug in [gyp](https://code.google.com/p/gyp/) - which is used to build native node modules and there is no known workaround. + which is used to build native Node.js modules and there is no known workaround. * https://github.com/TooTallNate/node-gyp/issues/297 * https://code.google.com/p/gyp/issues/detail?id=393 @@ -95,9 +95,9 @@ If none of this works, do install Github Desktop and use its Git Shell as it mak ``` * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required and ensure you have Visual C++ language support installed. -* Other `node-gyp` errors on first build attempt, even though the right node and python versions are installed. +* Other `node-gyp` errors on first build attempt, even though the right Node.js and Python versions are installed. * Do try the build command one more time, as experience shows it often works on second try in many of these cases. ### Windows build error reports in atom/atom * If all fails, use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows, and see if yours has already been reported. - * If it hasn't, please open a new issue with your Windows version, architecture (x86 or amd64), and a screenshot of your build output, including the Node and Python versions. + * If it hasn't, please open a new issue with your Windows version, architecture (x86 or amd64), and a screenshot of your build output, including the Node.js and Python versions. From 6b118a8061690757c343bed14033d29e77e2a34c Mon Sep 17 00:00:00 2001 From: Aaron Contreras Date: Wed, 27 Jan 2016 02:23:28 +0100 Subject: [PATCH 19/77] Add convenience commands to copy/move active item between panes Give focus to destination pane and set the copied/moved item as active --- src/pane-container-element.coffee | 21 +++++++++++++++++++++ src/pane-container.coffee | 9 +++++++++ src/register-default-commands.coffee | 8 ++++++++ src/workspace-element.coffee | 8 ++++++++ 4 files changed, 46 insertions(+) diff --git a/src/pane-container-element.coffee b/src/pane-container-element.coffee index 9da452558..fa530d7cc 100644 --- a/src/pane-container-element.coffee +++ b/src/pane-container-element.coffee @@ -36,6 +36,27 @@ class PaneContainerElement extends HTMLElement focusPaneViewOnRight: -> @nearestPaneInDirection('right')?.focus() + moveActiveItemToPaneAbove: (params) -> + @moveActiveItemToNearestPaneInDirection('above', params) + + moveActiveItemToPaneBelow: (params) -> + @moveActiveItemToNearestPaneInDirection('below', params) + + moveActiveItemToPaneOnLeft: (params) -> + @moveActiveItemToNearestPaneInDirection('left', params) + + moveActiveItemToPaneOnRight: (params) -> + @moveActiveItemToNearestPaneInDirection('right', params) + + moveActiveItemToNearestPaneInDirection: (direction, params) -> + destPane = @nearestPaneInDirection(direction)?.getModel() + return unless destPane? + if params?.keepOriginal + @model.copyActiveItemToPane(destPane) + else + @model.moveActiveItemToPane(destPane) + destPane.focus() + nearestPaneInDirection: (direction) -> distance = (pointA, pointB) -> x = pointB.x - pointA.x diff --git a/src/pane-container.coffee b/src/pane-container.coffee index 8ad082a5f..f52d94d51 100644 --- a/src/pane-container.coffee +++ b/src/pane-container.coffee @@ -164,6 +164,15 @@ class PaneContainer extends Model else false + moveActiveItemToPane: (destPane) -> + item = @activePane.getActiveItem() + @activePane.moveItemToPane(item, destPane) + destPane.setActiveItem(item) + + copyActiveItemToPane: (destPane) -> + item = @activePane.copyActiveItem() + destPane.activateItem(item) + destroyEmptyPanes: -> pane.destroy() for pane in @getPanes() when pane.items.length is 0 return diff --git a/src/register-default-commands.coffee b/src/register-default-commands.coffee index a738a5c42..32c74569b 100644 --- a/src/register-default-commands.coffee +++ b/src/register-default-commands.coffee @@ -50,6 +50,14 @@ module.exports = ({commandRegistry, commandInstaller, config}) -> 'window:focus-pane-below': -> @focusPaneViewBelow() 'window:focus-pane-on-left': -> @focusPaneViewOnLeft() 'window:focus-pane-on-right': -> @focusPaneViewOnRight() + 'window:move-active-item-to-pane-above': -> @moveActiveItemToPaneAbove() + 'window:move-active-item-to-pane-below': -> @moveActiveItemToPaneBelow() + 'window:move-active-item-to-pane-on-left': -> @moveActiveItemToPaneOnLeft() + 'window:move-active-item-to-pane-on-right': -> @moveActiveItemToPaneOnRight() + 'window:copy-active-item-to-pane-above': -> @moveActiveItemToPaneAbove(keepOriginal: true) + 'window:copy-active-item-to-pane-below': -> @moveActiveItemToPaneBelow(keepOriginal: true) + 'window:copy-active-item-to-pane-on-left': -> @moveActiveItemToPaneOnLeft(keepOriginal: true) + 'window:copy-active-item-to-pane-on-right': -> @moveActiveItemToPaneOnRight(keepOriginal: true) 'window:save-all': -> @getModel().saveAll() 'window:toggle-invisibles': -> config.set("editor.showInvisibles", not config.get("editor.showInvisibles")) 'window:log-deprecation-warnings': -> Grim.logDeprecations() diff --git a/src/workspace-element.coffee b/src/workspace-element.coffee index 163cdc152..f7805ed57 100644 --- a/src/workspace-element.coffee +++ b/src/workspace-element.coffee @@ -104,6 +104,14 @@ class WorkspaceElement extends HTMLElement focusPaneViewOnRight: -> @paneContainer.focusPaneViewOnRight() + moveActiveItemToPaneAbove: (params) -> @paneContainer.moveActiveItemToPaneAbove(params) + + moveActiveItemToPaneBelow: (params) -> @paneContainer.moveActiveItemToPaneBelow(params) + + moveActiveItemToPaneOnLeft: (params) -> @paneContainer.moveActiveItemToPaneOnLeft(params) + + moveActiveItemToPaneOnRight: (params) -> @paneContainer.moveActiveItemToPaneOnRight(params) + runPackageSpecs: -> if activePath = @workspace.getActivePaneItem()?.getPath?() [projectPath] = @project.relativizePath(activePath) From ee86cee4e07ae4f9f5a55de601c9b8747201f8e7 Mon Sep 17 00:00:00 2001 From: Aaron Contreras Date: Sun, 31 Jan 2016 20:17:20 +0100 Subject: [PATCH 20/77] :white_check_mark: Add specs for new commands, update old specs --- spec/pane-container-element-spec.coffee | 118 +++++++++++++++++++++--- spec/pane-container-spec.coffee | 24 +++++ spec/pane-spec.coffee | 25 ++++- 3 files changed, 154 insertions(+), 13 deletions(-) diff --git a/spec/pane-container-element-spec.coffee b/spec/pane-container-element-spec.coffee index 98cfffd56..fe57e89af 100644 --- a/spec/pane-container-element-spec.coffee +++ b/spec/pane-container-element-spec.coffee @@ -231,10 +231,14 @@ describe "PaneContainerElement", -> expect(leftPane.getFlexScale()).toBe 1/1.1 expect(rightPane.getFlexScale()).toBe 1/1.1 - describe "changing focus directionally between panes", -> - [containerElement, pane1, pane2, pane3, pane4, pane5, pane6, pane7, pane8, pane9] = [] + describe "changing focus, copying and moving items directionally between panes", -> + [item1, item2, item3, item4, item5, item6, item7, item8, item9, + pane1, pane2, pane3, pane4, pane5, pane6, pane7, pane8, pane9, + container, containerElement] = [] beforeEach -> + atom.config.set("core.destroyEmptyPanes", false) + # Set up a grid of 9 panes, in the following arrangement, where the # numbers correspond to the variable names below. # @@ -250,22 +254,30 @@ describe "PaneContainerElement", -> element = document.createElement('div') element.textContent = id element.tabIndex = -1 + element.copy = -> + element.cloneNode(true) element container = new PaneContainer(config: atom.config, confirm: atom.confirm.bind(atom)) + + [item1, item2, item3, item4, item5, item6, item7, item8, item9] = + [buildElement('1'), buildElement('2'), buildElement('3'), + buildElement('4'), buildElement('5'), buildElement('6'), + buildElement('7'), buildElement('8'), buildElement('9')] + pane1 = container.getActivePane() - pane1.activateItem(buildElement('1')) - pane4 = pane1.splitDown(items: [buildElement('4')]) - pane7 = pane4.splitDown(items: [buildElement('7')]) + pane1.activateItem(item1) + pane4 = pane1.splitDown(items: [item4]) + pane7 = pane4.splitDown(items: [item7]) - pane2 = pane1.splitRight(items: [buildElement('2')]) - pane3 = pane2.splitRight(items: [buildElement('3')]) + pane2 = pane1.splitRight(items: [item2]) + pane3 = pane2.splitRight(items: [item3]) - pane5 = pane4.splitRight(items: [buildElement('5')]) - pane6 = pane5.splitRight(items: [buildElement('6')]) + pane5 = pane4.splitRight(items: [item5]) + pane6 = pane5.splitRight(items: [item6]) - pane8 = pane7.splitRight(items: [buildElement('8')]) - pane9 = pane8.splitRight(items: [buildElement('9')]) + pane8 = pane7.splitRight(items: [item8]) + pane9 = pane8.splitRight(items: [item9]) containerElement = atom.views.getView(container) containerElement.style.height = '400px' @@ -323,3 +335,87 @@ describe "PaneContainerElement", -> pane6.activate() containerElement.focusPaneViewOnRight() expect(document.activeElement).toBe pane6.getActiveItem() + + describe "::moveActiveItemToPaneAbove(keepOriginal)", -> + describe "when there are multiple rows above the focused pane", -> + it "moves the active item up to the adjacent row", -> + pane8.activate() + containerElement.moveActiveItemToPaneAbove() + expect(container.paneForItem(item8)).toBe pane5 + expect(pane5.getActiveItem()).toBe item8 + + describe "when there are no rows above the focused pane", -> + it "keeps the active item in the focused pane", -> + pane2.activate() + containerElement.moveActiveItemToPaneAbove() + expect(container.paneForItem(item2)).toBe pane2 + + describe "when `keepOriginal: true` is passed in the params", -> + it "keeps the item and adds a copy of it to the adjacent pane", -> + pane8.activate() + containerElement.moveActiveItemToPaneAbove(keepOriginal: true) + expect(container.paneForItem(item8)).toBe pane8 + expect(pane5.getActiveItem().textContent).toBe '8' + + describe "::moveActiveItemToPaneBelow(keepOriginal)", -> + describe "when there are multiple rows below the focused pane", -> + it "moves the active item down to the adjacent row", -> + pane2.activate() + containerElement.moveActiveItemToPaneBelow() + expect(container.paneForItem(item2)).toBe pane5 + expect(pane5.getActiveItem()).toBe item2 + + describe "when there are no rows below the focused pane", -> + it "keeps the active item in the focused pane", -> + pane8.activate() + containerElement.moveActiveItemToPaneBelow() + expect(container.paneForItem(item8)).toBe pane8 + + describe "when `keepOriginal: true` is passed in the params", -> + it "keeps the item and adds a copy of it to the adjacent pane", -> + pane2.activate() + containerElement.moveActiveItemToPaneBelow(keepOriginal: true) + expect(container.paneForItem(item2)).toBe pane2 + expect(pane5.getActiveItem().textContent).toBe '2' + + describe "::moveActiveItemToPaneOnLeft(keepOriginal)", -> + describe "when there are multiple columns to the left of the focused pane", -> + it "moves the active item left to the adjacent column", -> + pane6.activate() + containerElement.moveActiveItemToPaneOnLeft() + expect(container.paneForItem(item6)).toBe pane5 + expect(pane5.getActiveItem()).toBe item6 + + describe "when there are no columns to the left of the focused pane", -> + it "keeps the active item in the focused pane", -> + pane4.activate() + containerElement.moveActiveItemToPaneOnLeft() + expect(container.paneForItem(item4)).toBe pane4 + + describe "when `keepOriginal: true` is passed in the params", -> + it "keeps the item and adds a copy of it to the adjacent pane", -> + pane6.activate() + containerElement.moveActiveItemToPaneOnLeft(keepOriginal: true) + expect(container.paneForItem(item6)).toBe pane6 + expect(pane5.getActiveItem().textContent).toBe '6' + + describe "::moveActiveItemToPaneOnRight(keepOriginal)", -> + describe "when there are multiple columns to the right of the focused pane", -> + it "moves the active item right to the adjacent column", -> + pane4.activate() + containerElement.moveActiveItemToPaneOnRight() + expect(container.paneForItem(item4)).toBe pane5 + expect(pane5.getActiveItem()).toBe item4 + + describe "when there are no columns to the right of the focused pane", -> + it "keeps the active item in the focused pane", -> + pane6.activate() + containerElement.moveActiveItemToPaneOnRight() + expect(container.paneForItem(item6)).toBe pane6 + + describe "when `keepOriginal: true` is passed in the params", -> + it "keeps the item and adds a copy of it to the adjacent pane", -> + pane4.activate() + containerElement.moveActiveItemToPaneOnRight(keepOriginal: true) + expect(container.paneForItem(item4)).toBe pane4 + expect(pane5.getActiveItem().textContent).toBe '4' diff --git a/spec/pane-container-spec.coffee b/spec/pane-container-spec.coffee index 2002bccd1..3bfff400d 100644 --- a/spec/pane-container-spec.coffee +++ b/spec/pane-container-spec.coffee @@ -325,3 +325,27 @@ describe "PaneContainer", -> expect(item1.saved).toBe true expect(item2.saved).toBe false expect(item3.saved).toBe true + + describe "::moveActiveItemToPane(destPane) and ::copyActiveItemToPane(destPane)", -> + [container, pane1, pane2, item1] = [] + + beforeEach -> + class TestItem + constructor: (id) -> @id = id + copy: -> new TestItem(@id) + + container = new PaneContainer(params) + pane1 = container.getRoot() + item1 = new TestItem('1') + pane2 = pane1.splitRight(items: [item1]) + + describe "::::moveActiveItemToPane(destPane)", -> + it "moves active item to given pane and focuses it", -> + container.moveActiveItemToPane(pane1) + expect(pane1.getActiveItem()).toBe item1 + + describe "::::copyActiveItemToPane(destPane)", -> + it "copies active item to given pane and focuses it", -> + container.copyActiveItemToPane(pane1) + expect(container.paneForItem(item1)).toBe pane2 + expect(pane1.getActiveItem().id).toBe item1.id diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index 494dbc91a..8c228e2a8 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -606,12 +606,13 @@ describe "Pane", -> expect(item4.isDestroyed()).toBe false describe "split methods", -> - [pane1, container] = [] + [pane1, item1, container] = [] beforeEach -> container = new PaneContainer(config: atom.config, confirm: confirm, deserializerManager: atom.deserializers) pane1 = container.getActivePane() - pane1.addItem(new Item("A")) + item1 = new Item("A") + pane1.addItem(item1) describe "::splitLeft(params)", -> describe "when the parent is the container root", -> @@ -621,6 +622,11 @@ describe "Pane", -> expect(container.root.orientation).toBe 'horizontal' expect(container.root.children).toEqual [pane2, pane3, pane1] + describe "when `moveActiveItem: true` is passed in the params", -> + it "moves the active item", -> + pane2 = pane1.splitLeft(moveActiveItem: true) + expect(pane2.getActiveItem()).toBe item1 + describe "when `copyActiveItem: true` is passed in the params", -> it "duplicates the active item", -> pane2 = pane1.splitLeft(copyActiveItem: true) @@ -643,6 +649,11 @@ describe "Pane", -> expect(container.root.orientation).toBe 'horizontal' expect(container.root.children).toEqual [pane1, pane3, pane2] + describe "when `moveActiveItem: true` is passed in the params", -> + it "moves the active item", -> + pane2 = pane1.splitLeft(moveActiveItem: true) + expect(pane2.getActiveItem()).toBe item1 + describe "when `copyActiveItem: true` is passed in the params", -> it "duplicates the active item", -> pane2 = pane1.splitRight(copyActiveItem: true) @@ -665,6 +676,11 @@ describe "Pane", -> expect(container.root.orientation).toBe 'vertical' expect(container.root.children).toEqual [pane2, pane3, pane1] + describe "when `moveActiveItem: true` is passed in the params", -> + it "moves the active item", -> + pane2 = pane1.splitLeft(moveActiveItem: true) + expect(pane2.getActiveItem()).toBe item1 + describe "when `copyActiveItem: true` is passed in the params", -> it "duplicates the active item", -> pane2 = pane1.splitUp(copyActiveItem: true) @@ -687,6 +703,11 @@ describe "Pane", -> expect(container.root.orientation).toBe 'vertical' expect(container.root.children).toEqual [pane1, pane3, pane2] + describe "when `moveActiveItem: true` is passed in the params", -> + it "moves the active item", -> + pane2 = pane1.splitLeft(moveActiveItem: true) + expect(pane2.getActiveItem()).toBe item1 + describe "when `copyActiveItem: true` is passed in the params", -> it "duplicates the active item", -> pane2 = pane1.splitDown(copyActiveItem: true) From cbff7394c64a36fc9f40ae484a7f166ee64445c0 Mon Sep 17 00:00:00 2001 From: Aaron Contreras Date: Thu, 28 Jan 2016 00:21:46 +0100 Subject: [PATCH 21/77] :bug: Reuse scroll position on text editor's copy. Fixes #8765 :white_check_mark: Update specs to avoid regressions --- spec/text-editor-spec.coffee | 4 ++++ src/text-editor.coffee | 1 + 2 files changed, 5 insertions(+) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index d77844015..426eb3129 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -88,6 +88,8 @@ describe "TextEditor", -> it "returns a different edit session with the same initial state", -> editor.setSelectedBufferRange([[1, 2], [3, 4]]) editor.addSelectionForBufferRange([[5, 6], [7, 8]], reversed: true) + editor.firstVisibleScreenRow = 5 + editor.firstVisibleScreenColumn = 5 editor.foldBufferRow(4) expect(editor.isFoldedAtBufferRow(4)).toBeTruthy() @@ -95,6 +97,8 @@ describe "TextEditor", -> expect(editor2.id).not.toBe editor.id expect(editor2.getSelectedBufferRanges()).toEqual editor.getSelectedBufferRanges() expect(editor2.getSelections()[1].isReversed()).toBeTruthy() + expect(editor2.getFirstVisibleScreenRow()).toBe 5 + expect(editor2.getFirstVisibleScreenColumn()).toBe 5 expect(editor2.isFoldedAtBufferRow(4)).toBeTruthy() # editor2 can now diverge from its origin edit session diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 0658d1d23..2ba45a3ba 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -497,6 +497,7 @@ class TextEditor extends Model newEditor = new TextEditor({ @buffer, displayBuffer, selectionsMarkerLayer, @tabLength, softTabs, suppressCursorCreation: true, @config, @notificationManager, @packageManager, + @firstVisibleScreenRow, @firstVisibleScreenColumn, @clipboard, @viewRegistry, @grammarRegistry, @project, @assert, @applicationDelegate }) newEditor From 03e33b44742a02f8fee791058bc5042c8870235d Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 8 Feb 2016 21:20:36 -0500 Subject: [PATCH 22/77] Use default dimensions the first time we load a window, but saved dimensions after that. --- src/atom-environment.coffee | 26 ++++++++++++++++-------- src/browser/atom-window.coffee | 1 + src/initialize-application-window.coffee | 1 + 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 7d920b82a..8d230d489 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -384,6 +384,9 @@ class AtomEnvironment extends Model inSpecMode: -> @specMode ?= @getLoadSettings().isSpec + isFirstLoad: -> + @firstLoad ?= @getLoadSettings().firstLoad + # Public: Get the version of the Atom application. # # Returns the version text {String}. @@ -492,8 +495,6 @@ class AtomEnvironment extends Model # Extended: Reload the current window. reload: -> - @saveWindowDimensions() - @applicationDelegate.restartWindow() # Extended: Returns a {Boolean} that is `true` if the current window is maximized. @@ -532,6 +533,11 @@ class AtomEnvironment extends Model @setFullScreen(true) if @workspace?.fullScreen @maximize() if dimensions?.maximized and process.platform isnt 'darwin' + if @isFirstLoad() + loadSettings = getWindowLoadSettings() + loadSettings.firstLoad = false + setWindowLoadSettings(loadSettings) + # Get the dimensions of this window. # # Returns an {Object} with the following keys: @@ -593,7 +599,14 @@ class AtomEnvironment extends Model {x: 0, y: 0, width: Math.min(1024, width), height} restoreWindowDimensions: -> - dimensions = @state.windowDimensions + dimensions = null + + # The first time the window's loaded we want to use the default dimensions. + # But after that, e.g., when the window's been reloaded, we want to use the + # dimensions we've saved for it. + if !@isFirstLoad() + dimensions = @state.windowDimensions + unless @isValidDimensions(dimensions) dimensions = @getDefaultWindowDimensions() @setWindowDimensions(dimensions) @@ -625,7 +638,7 @@ class AtomEnvironment extends Model @registerDefaultTargetForKeymaps() @packages.loadPackages() - @loadStateSync() + @document.body.appendChild(@views.getView(@workspace)) @watchProjectPath() @@ -782,11 +795,6 @@ class AtomEnvironment extends Model @blobStore.save() - saveWindowDimensions: -> - loadSettings = getWindowLoadSettings() - loadSettings['windowDimensions'] = @getWindowDimensions() - setWindowLoadSettings(loadSettings) - saveStateSync: -> return unless @enablePersistence diff --git a/src/browser/atom-window.coffee b/src/browser/atom-window.coffee index 6e2d39266..20ba2ad5c 100644 --- a/src/browser/atom-window.coffee +++ b/src/browser/atom-window.coffee @@ -49,6 +49,7 @@ class AtomWindow loadSettings.devMode ?= false loadSettings.safeMode ?= false loadSettings.atomHome = process.env.ATOM_HOME + loadSettings.firstLoad = true # Only send to the first non-spec window created if @constructor.includeShellLoadTime and not @isSpec diff --git a/src/initialize-application-window.coffee b/src/initialize-application-window.coffee index 57aa33ce0..5c5e936c5 100644 --- a/src/initialize-application-window.coffee +++ b/src/initialize-application-window.coffee @@ -23,6 +23,7 @@ module.exports = ({blobStore}) -> enablePersistence: true }) + atom.loadStateSync() atom.displayWindow() atom.startEditorWindow() From 6131beef66309f063bf913566c3abe8fb1b098cd Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 8 Feb 2016 21:24:41 -0500 Subject: [PATCH 23/77] Document @isFirstLoad. --- src/atom-environment.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 8d230d489..8e5857cee 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -384,6 +384,8 @@ class AtomEnvironment extends Model inSpecMode: -> @specMode ?= @getLoadSettings().isSpec + # Returns a {Boolean} indicating whether this the first time the window's been + # loaded. isFirstLoad: -> @firstLoad ?= @getLoadSettings().firstLoad From 7695c20e39b5e578c775c1f720a1ba16c6402795 Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 8 Feb 2016 23:13:43 -0500 Subject: [PATCH 24/77] De-lint. --- src/atom-environment.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 8e5857cee..49fe81f0d 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -606,7 +606,7 @@ class AtomEnvironment extends Model # The first time the window's loaded we want to use the default dimensions. # But after that, e.g., when the window's been reloaded, we want to use the # dimensions we've saved for it. - if !@isFirstLoad() + if not @isFirstLoad() dimensions = @state.windowDimensions unless @isValidDimensions(dimensions) From 69df5d08362adced494a40325eaaaa87da1cf2f4 Mon Sep 17 00:00:00 2001 From: joshaber Date: Tue, 9 Feb 2016 13:40:36 -0500 Subject: [PATCH 25/77] 1.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6815ed9c6..f1dee8def 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.5.0-beta3", + "version": "1.5.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 1b416c789e16d98617ba74aa36c0f9fcd96e02b8 Mon Sep 17 00:00:00 2001 From: joshaber Date: Tue, 9 Feb 2016 13:40:37 -0500 Subject: [PATCH 26/77] 1.6.0-beta0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b430a90f..e1b386a76 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.6.0-dev", + "version": "1.6.0-beta0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 017bd2f716609731d2c927b88f8127cbe44f5c1f Mon Sep 17 00:00:00 2001 From: joshaber Date: Tue, 9 Feb 2016 13:40:38 -0500 Subject: [PATCH 27/77] 1.7.0-dev --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b430a90f..34124f481 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.6.0-dev", + "version": "1.7.0-dev", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 3cca5cdc3e124860ebc67cfb926d2efbba3ab477 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Tue, 9 Feb 2016 20:14:56 -0500 Subject: [PATCH 28/77] :arrow_up: language-coffee-script@0.46.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 34124f481..7b96bb061 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "wrap-guide": "0.38.1", "language-c": "0.51.1", "language-clojure": "0.19.1", - "language-coffee-script": "0.46.0", + "language-coffee-script": "0.46.1", "language-csharp": "0.11.0", "language-css": "0.36.0", "language-gfm": "0.84.0", From 28a2f2773cb6e6f131d1062fd4cfd3b85cbad37f Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 17 Oct 2015 19:25:36 -0400 Subject: [PATCH 29/77] permit any whole number for tabLength from #8261 --- src/config-schema.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config-schema.coffee b/src/config-schema.coffee index 88e00c71d..15e5223b8 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -171,7 +171,7 @@ module.exports = tabLength: type: 'integer' default: 2 - enum: [1, 2, 3, 4, 6, 8] + minimum: 1 description: 'Number of spaces used to represent a tab.' softWrap: type: 'boolean' From fff2a54258f7796ebec19fe1733b231ff89bfd2c Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 9 Feb 2016 20:27:50 -0500 Subject: [PATCH 30/77] :white_check_mark: Specs for variable tabLength For #9198 --- spec/text-editor-spec.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 426eb3129..6959d4da5 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -139,6 +139,15 @@ describe "TextEditor", -> expect(editor2.getSoftTabs()).toBe true expect(editor2.getEncoding()).toBe 'macroman' + atom.config.set('editor.tabLength', -1) + expect(editor2.getTabLength()).toBe 1 + atom.config.set('editor.tabLength', 2) + expect(editor2.getTabLength()).toBe 2 + atom.config.set('editor.tabLength', 17) + expect(editor2.getTabLength()).toBe 17 + atom.config.set('editor.tabLength', 128) + expect(editor2.getTabLength()).toBe 128 + it "uses scoped `core.fileEncoding` values", -> editor1 = null editor2 = null From 0c6235de71f03a78dfaaf4f9d9525b373f935765 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 10:59:46 -0500 Subject: [PATCH 31/77] Add failing test. --- spec/git-spec.coffee | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index cda2afaa8..b64b48e03 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -205,7 +205,7 @@ describe "GitRepository", -> expect(repo.isStatusModified(repo.getDirectoryStatus(directoryPath))).toBe true describe ".refreshStatus()", -> - [newPath, modifiedPath, cleanPath, originalModifiedPathText] = [] + [newPath, modifiedPath, cleanPath, originalModifiedPathText, workingDirectory] = [] beforeEach -> workingDirectory = copyRepository() @@ -231,6 +231,35 @@ describe "GitRepository", -> expect(repo.isStatusNew(repo.getCachedPathStatus(newPath))).toBeTruthy() expect(repo.isStatusModified(repo.getCachedPathStatus(modifiedPath))).toBeTruthy() + it 'caches the proper statuses when a subdir is open', -> + subDir = path.join(workingDirectory, 'dir') + fs.mkdirSync(subDir) + + filePath = path.join(subDir, 'b.txt') + fs.writeFileSync(filePath, '') + + atom.project.setPaths([subDir]) + + waitsForPromise -> + atom.workspace.open('b.txt') + + statusHandler = null + runs -> + repo = atom.project.getRepositories()[0] + + statusHandler = jasmine.createSpy('statusHandler') + repo.onDidChangeStatuses statusHandler + repo.refreshStatus() + + waitsFor -> + statusHandler.callCount > 0 + + runs -> + filePath = path.join(subDir, 'b.txt') + status = repo.getCachedPathStatus(filePath) + expect(repo.isStatusModified(status)).toBe false + expect(repo.isStatusNew(status)).toBe false + describe "buffer events", -> [editor] = [] From c1a3535ab24d2b50e7ec29621d935c94d88a6980 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 11:09:52 -0500 Subject: [PATCH 32/77] Don't need to repeat ourselves here. --- spec/git-spec.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index b64b48e03..e6b5d4df6 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -255,7 +255,6 @@ describe "GitRepository", -> statusHandler.callCount > 0 runs -> - filePath = path.join(subDir, 'b.txt') status = repo.getCachedPathStatus(filePath) expect(repo.isStatusModified(status)).toBe false expect(repo.isStatusNew(status)).toBe false From ea91588f878b08fcfbececb4ca1fbaac86ed99ef Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 14:19:44 -0500 Subject: [PATCH 33/77] :arrow_up: git-utils@4.1.2. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b96bb061..6e6bbec21 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "fs-plus": "^2.8.0", "fstream": "0.1.24", "fuzzaldrin": "^2.1", - "git-utils": "^4.1.0", + "git-utils": "^4.1.2", "grim": "1.5.0", "jasmine-json": "~0.0", "jasmine-tagged": "^1.1.4", From 98a63d1d68b12eb2adafeb145ccfe2b62b28a659 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 14:25:05 -0500 Subject: [PATCH 34/77] Glob it. --- src/git-repository.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/git-repository.coffee b/src/git-repository.coffee index 2fdcd790a..44b86a433 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -485,6 +485,7 @@ class GitRepository relativeProjectPaths = @project?.getPaths() .map (path) => @relativize(path) .filter (path) -> path.length > 0 + .map (path) -> path + '/**' @statusTask?.terminate() @statusTask = Task.once @handlerPath, @getPath(), relativeProjectPaths, ({statuses, upstream, branch, submodules}) => From 45c50e56356470a971c45f8f99d5d88d3edbf9b1 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 14:50:59 -0500 Subject: [PATCH 35/77] :arrow_up: symbols-view@0.111.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b96bb061..d466f7920 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "spell-check": "0.65.0", "status-bar": "0.83.0", "styleguide": "0.45.1", - "symbols-view": "0.110.1", + "symbols-view": "0.111.0", "tabs": "0.90.0", "timecop": "0.33.0", "tree-view": "0.201.0", From b7da70a7e9b3c18139cbc84b8850bb3788ec6072 Mon Sep 17 00:00:00 2001 From: Josh Abernathy Date: Wed, 10 Feb 2016 15:15:10 -0500 Subject: [PATCH 36/77] Merge pull request #10758 from atom/fix-status-in-subdir Fix status in subdir --- package.json | 2 +- spec/git-spec.coffee | 30 +++++++++++++++++++++++++++++- src/git-repository.coffee | 1 + 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f1dee8def..802221fb6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "fs-plus": "^2.8.0", "fstream": "0.1.24", "fuzzaldrin": "^2.1", - "git-utils": "^4.1.0", + "git-utils": "^4.1.2", "grim": "1.5.0", "jasmine-json": "~0.0", "jasmine-tagged": "^1.1.4", diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index 31ac176f7..c84ff6aa9 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -195,7 +195,7 @@ describe "GitRepository", -> expect(repo.isStatusModified(repo.getDirectoryStatus(directoryPath))).toBe true describe ".refreshStatus()", -> - [newPath, modifiedPath, cleanPath, originalModifiedPathText] = [] + [newPath, modifiedPath, cleanPath, originalModifiedPathText, workingDirectory] = [] beforeEach -> workingDirectory = copyRepository() @@ -221,6 +221,34 @@ describe "GitRepository", -> expect(repo.isStatusNew(repo.getCachedPathStatus(newPath))).toBeTruthy() expect(repo.isStatusModified(repo.getCachedPathStatus(modifiedPath))).toBeTruthy() + it 'caches the proper statuses when a subdir is open', -> + subDir = path.join(workingDirectory, 'dir') + fs.mkdirSync(subDir) + + filePath = path.join(subDir, 'b.txt') + fs.writeFileSync(filePath, '') + + atom.project.setPaths([subDir]) + + waitsForPromise -> + atom.workspace.open('b.txt') + + statusHandler = null + runs -> + repo = atom.project.getRepositories()[0] + + statusHandler = jasmine.createSpy('statusHandler') + repo.onDidChangeStatuses statusHandler + repo.refreshStatus() + + waitsFor -> + statusHandler.callCount > 0 + + runs -> + status = repo.getCachedPathStatus(filePath) + expect(repo.isStatusModified(status)).toBe false + expect(repo.isStatusNew(status)).toBe false + describe "buffer events", -> [editor] = [] diff --git a/src/git-repository.coffee b/src/git-repository.coffee index ee27f87a5..cf85cb076 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -466,6 +466,7 @@ class GitRepository relativeProjectPaths = @project?.getPaths() .map (path) => @relativize(path) .filter (path) -> path.length > 0 + .map (path) -> path + '/**' @statusTask?.terminate() @statusTask = Task.once @handlerPath, @getPath(), relativeProjectPaths, ({statuses, upstream, branch, submodules}) => From 88524b19ce457f83e11eec55f298cbfeb5c4935e Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 10 Feb 2016 15:17:43 -0500 Subject: [PATCH 37/77] 1.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 802221fb6..a92749be0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.5.0", + "version": "1.5.1", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 6f4e98898c04a5a68c5d5119ee2a7a37aaed4f5b Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Wed, 10 Feb 2016 16:33:05 -0500 Subject: [PATCH 38/77] :arrow_up: language-ruby@0.68.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cad9c051e..45c2b0f5d 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "language-php": "0.37.0", "language-property-list": "0.8.0", "language-python": "0.43.0", - "language-ruby": "0.68.0", + "language-ruby": "0.68.1", "language-ruby-on-rails": "0.25.0", "language-sass": "0.45.0", "language-shellscript": "0.21.0", From d77c334d237781ac69d69bc06d8021823635becc Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Wed, 10 Feb 2016 16:33:46 -0500 Subject: [PATCH 39/77] :arrow_up: language-xml@0.34.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45c2b0f5d..6dc272858 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "language-text": "0.7.0", "language-todo": "0.27.0", "language-toml": "0.18.0", - "language-xml": "0.34.2", + "language-xml": "0.34.3", "language-yaml": "0.25.1" }, "private": true, From 9c0aa629d79054707580218406ce35d9dcb34154 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 10 Feb 2016 14:28:57 -0800 Subject: [PATCH 40/77] Let packages define deserializers & view providers as main module methods --- .../deserializer-1.js | 6 ---- .../deserializer-2.js | 6 ---- .../package-with-deserializers/index.js | 16 ++++++++++- .../package-with-deserializers/package.json | 4 +-- .../deserializer.js | 3 -- .../package-with-view-providers/index.js | 24 +++++++++++++++- .../package-with-view-providers/package.json | 6 ++-- .../view-provider-1.js | 9 ------ .../view-provider-2.js | 9 ------ spec/package-manager-spec.coffee | 6 ++-- src/package.coffee | 28 +++++++++---------- 11 files changed, 59 insertions(+), 58 deletions(-) delete mode 100644 spec/fixtures/packages/package-with-deserializers/deserializer-1.js delete mode 100644 spec/fixtures/packages/package-with-deserializers/deserializer-2.js delete mode 100644 spec/fixtures/packages/package-with-view-providers/deserializer.js delete mode 100644 spec/fixtures/packages/package-with-view-providers/view-provider-1.js delete mode 100644 spec/fixtures/packages/package-with-view-providers/view-provider-2.js diff --git a/spec/fixtures/packages/package-with-deserializers/deserializer-1.js b/spec/fixtures/packages/package-with-deserializers/deserializer-1.js deleted file mode 100644 index f4d7a1488..000000000 --- a/spec/fixtures/packages/package-with-deserializers/deserializer-1.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function (state) { - return { - wasDeserializedBy: 'Deserializer1', - state: state - } -} diff --git a/spec/fixtures/packages/package-with-deserializers/deserializer-2.js b/spec/fixtures/packages/package-with-deserializers/deserializer-2.js deleted file mode 100644 index 3099d2b15..000000000 --- a/spec/fixtures/packages/package-with-deserializers/deserializer-2.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function (state) { - return { - wasDeserializedBy: 'Deserializer2', - state: state - } -} diff --git a/spec/fixtures/packages/package-with-deserializers/index.js b/spec/fixtures/packages/package-with-deserializers/index.js index 19bba5ecb..b9be23854 100644 --- a/spec/fixtures/packages/package-with-deserializers/index.js +++ b/spec/fixtures/packages/package-with-deserializers/index.js @@ -1,3 +1,17 @@ module.exports = { - activate: function() {} + activate () {}, + + deserializeMethod1 (state) { + return { + wasDeserializedBy: 'deserializeMethod1', + state: state + } + }, + + deserializeMethod2 (state) { + return { + wasDeserializedBy: 'deserializeMethod2', + state: state + } + } } diff --git a/spec/fixtures/packages/package-with-deserializers/package.json b/spec/fixtures/packages/package-with-deserializers/package.json index daa5776bf..bae0776a6 100644 --- a/spec/fixtures/packages/package-with-deserializers/package.json +++ b/spec/fixtures/packages/package-with-deserializers/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "main": "./index", "deserializers": { - "Deserializer1": "./deserializer-1.js", - "Deserializer2": "./deserializer-2.js" + "Deserializer1": "deserializeMethod1", + "Deserializer2": "deserializeMethod2" } } diff --git a/spec/fixtures/packages/package-with-view-providers/deserializer.js b/spec/fixtures/packages/package-with-view-providers/deserializer.js deleted file mode 100644 index 334e7b2ab..000000000 --- a/spec/fixtures/packages/package-with-view-providers/deserializer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (state) { - return {state: state} -} diff --git a/spec/fixtures/packages/package-with-view-providers/index.js b/spec/fixtures/packages/package-with-view-providers/index.js index 19bba5ecb..66e62171d 100644 --- a/spec/fixtures/packages/package-with-view-providers/index.js +++ b/spec/fixtures/packages/package-with-view-providers/index.js @@ -1,3 +1,25 @@ +'use strict' + module.exports = { - activate: function() {} + activate () {}, + + theDeserializerMethod (state) { + return {state: state} + }, + + viewProviderMethod1 (model) { + if (model.worksWithViewProvider1) { + let element = document.createElement('div') + element.dataset['createdBy'] = 'view-provider-1' + return element + } + }, + + viewProviderMethod2 (model) { + if (model.worksWithViewProvider2) { + let element = document.createElement('div') + element.dataset['createdBy'] = 'view-provider-2' + return element + } + } } diff --git a/spec/fixtures/packages/package-with-view-providers/package.json b/spec/fixtures/packages/package-with-view-providers/package.json index f67477280..eb5c80025 100644 --- a/spec/fixtures/packages/package-with-view-providers/package.json +++ b/spec/fixtures/packages/package-with-view-providers/package.json @@ -3,10 +3,10 @@ "main": "./index", "version": "1.0.0", "deserializers": { - "DeserializerFromPackageWithViewProviders": "./deserializer" + "DeserializerFromPackageWithViewProviders": "theDeserializerMethod" }, "viewProviders": [ - "./view-provider-1", - "./view-provider-2" + "viewProviderMethod1", + "viewProviderMethod2" ] } diff --git a/spec/fixtures/packages/package-with-view-providers/view-provider-1.js b/spec/fixtures/packages/package-with-view-providers/view-provider-1.js deleted file mode 100644 index e4f0dcc0b..000000000 --- a/spec/fixtures/packages/package-with-view-providers/view-provider-1.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -module.exports = function (model) { - if (model.worksWithViewProvider1) { - let element = document.createElement('div') - element.dataset['createdBy'] = 'view-provider-1' - return element - } -} diff --git a/spec/fixtures/packages/package-with-view-providers/view-provider-2.js b/spec/fixtures/packages/package-with-view-providers/view-provider-2.js deleted file mode 100644 index a3b58a3aa..000000000 --- a/spec/fixtures/packages/package-with-view-providers/view-provider-2.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -module.exports = function (model) { - if (model.worksWithViewProvider2) { - let element = document.createElement('div') - element.dataset['createdBy'] = 'view-provider-2' - return element - } -} diff --git a/spec/package-manager-spec.coffee b/spec/package-manager-spec.coffee index 46d1d11ee..5c10ed2fc 100644 --- a/spec/package-manager-spec.coffee +++ b/spec/package-manager-spec.coffee @@ -88,18 +88,16 @@ describe "PackageManager", -> state1 = {deserializer: 'Deserializer1', a: 'b'} expect(atom.deserializers.deserialize(state1)).toEqual { - wasDeserializedBy: 'Deserializer1' + wasDeserializedBy: 'deserializeMethod1' state: state1 } state2 = {deserializer: 'Deserializer2', c: 'd'} expect(atom.deserializers.deserialize(state2)).toEqual { - wasDeserializedBy: 'Deserializer2' + wasDeserializedBy: 'deserializeMethod2' state: state2 } - expect(pack.mainModule).toBeNull() - describe "when there are view providers specified in the package's package.json", -> model1 = {worksWithViewProvider1: true} model2 = {worksWithViewProvider2: true} diff --git a/src/package.coffee b/src/package.coffee index 8230ce4e4..ba5d34439 100644 --- a/src/package.coffee +++ b/src/package.coffee @@ -84,7 +84,7 @@ class Package @loadKeymaps() @loadMenus() @loadStylesheets() - @loadDeserializers() + @registerDeserializerMethods() @configSchemaRegisteredOnLoad = @registerConfigSchemaFromMetadata() @settingsPromise = @loadSettings() if @shouldRequireMainModuleOnLoad() and not @mainModule? @@ -277,24 +277,24 @@ class Package @stylesheets = @getStylesheetPaths().map (stylesheetPath) => [stylesheetPath, @themeManager.loadStylesheet(stylesheetPath, true)] - loadDeserializers: -> + registerDeserializerMethods: -> if @metadata.deserializers? - for name, implementationPath of @metadata.deserializers - do => - deserializePath = path.join(@path, implementationPath) - deserializeFunction = null - atom.deserializers.add - name: name, - deserialize: => - @registerViewProviders() - deserializeFunction ?= require(deserializePath) - deserializeFunction.apply(this, arguments) + Object.keys(@metadata.deserializers).forEach (deserializerName) => + methodName = @metadata.deserializers[deserializerName] + atom.deserializers.add + name: deserializerName, + deserialize: (state, atomEnvironment) => + @registerViewProviders() + @requireMainModule() + @mainModule[methodName](state, atomEnvironment) return registerViewProviders: -> if @metadata.viewProviders? and not @registeredViewProviders - for implementationPath in @metadata.viewProviders - @viewRegistry.addViewProvider(require(path.join(@path, implementationPath))) + @metadata.viewProviders.forEach (methodName) => + @viewRegistry.addViewProvider (model) => + @requireMainModule() + @mainModule[methodName](model) @registeredViewProviders = true getStylesheetsPath: -> From 262459829ccc7a91b96593ce378db134955fc345 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Wed, 10 Feb 2016 17:04:04 -0800 Subject: [PATCH 41/77] :arrow_up: tree-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7783579b2..d9187684e 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "symbols-view": "0.110.1", "tabs": "0.90.0", "timecop": "0.33.0", - "tree-view": "0.201.0", + "tree-view": "0.201.1", "update-package-dependencies": "0.10.0", "welcome": "0.33.0", "whitespace": "0.32.1", From 7ed8623480b788e85762a6556c36876140ecd645 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Wed, 10 Feb 2016 17:05:47 -0800 Subject: [PATCH 42/77] 1.6.0-beta2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d9187684e..4cc92242d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.6.0-beta1", + "version": "1.6.0-beta2", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From e8693f45c902f1b371aae15ec01271d841bbc94e Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 10 Feb 2016 17:40:55 -0800 Subject: [PATCH 43/77] Move lazy main module require out of loop --- src/package.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.coffee b/src/package.coffee index ba5d34439..94e759947 100644 --- a/src/package.coffee +++ b/src/package.coffee @@ -291,9 +291,9 @@ class Package registerViewProviders: -> if @metadata.viewProviders? and not @registeredViewProviders + @requireMainModule() @metadata.viewProviders.forEach (methodName) => @viewRegistry.addViewProvider (model) => - @requireMainModule() @mainModule[methodName](model) @registeredViewProviders = true From 58ba84d9fa00a332ba9971ede827b7e59f2aaf86 Mon Sep 17 00:00:00 2001 From: Baptist BENOIST Date: Thu, 11 Feb 2016 22:55:43 +0100 Subject: [PATCH 44/77] :memo: Fix minor typo in CONTRIBUTING.md [ci skip] --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ada420a40..466355903 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -365,7 +365,7 @@ Please open an issue on `atom/atom` if you have suggestions for new labels, and | `blocked` | [search][search-atom-repo-label-blocked] | [search][search-atom-org-label-blocked] | Issues blocked on other issues. | | `duplicate` | [search][search-atom-repo-label-duplicate] | [search][search-atom-org-label-duplicate] | Issues which are duplicates of other issues, i.e. they have been reported before. | | `wontfix` | [search][search-atom-repo-label-wontfix] | [search][search-atom-org-label-wontfix] | The Atom core team has decided not to fix these issues for now, either because they're working as intended or for some other reason. | -| `invalid` | [search][search-atom-repo-label-invalid] | [search][search-atom-org-label-invalid] | Issues which are't valid (e.g. user errors). | +| `invalid` | [search][search-atom-repo-label-invalid] | [search][search-atom-org-label-invalid] | Issues which aren't valid (e.g. user errors). | | `package-idea` | [search][search-atom-repo-label-package-idea] | [search][search-atom-org-label-package-idea] | Feature request which might be good candidates for new packages, instead of extending Atom or core Atom packages. | | `wrong-repo` | [search][search-atom-repo-label-wrong-repo] | [search][search-atom-org-label-wrong-repo] | Issues reported on the wrong repository (e.g. a bug related to the [Settings View package](https://github.com/atom/settings-view) was reported on [Atom core](https://github.com/atom/atom)). | From 11e83a7d6f4fecd0dd4e33a5c5d726631bfba94b Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 16:32:28 -0800 Subject: [PATCH 45/77] :arrow_up: one ui themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b0e4edf2a..8abbafc66 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ "atom-light-ui": "0.43.0", "base16-tomorrow-dark-theme": "1.1.0", "base16-tomorrow-light-theme": "1.1.1", - "one-dark-ui": "1.1.9", - "one-light-ui": "1.1.9", + "one-dark-ui": "1.2.0", + "one-light-ui": "1.2.0", "one-dark-syntax": "1.2.0", "one-light-syntax": "1.2.0", "solarized-dark-syntax": "1.0.0", From 6bb26c4e66f57d2c4863ae10c6a6e953dfb24db1 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 16:34:08 -0800 Subject: [PATCH 46/77] :arrow_up: about --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8abbafc66..c564abb6f 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "one-light-syntax": "1.2.0", "solarized-dark-syntax": "1.0.0", "solarized-light-syntax": "1.0.0", - "about": "1.3.0", + "about": "1.3.1", "archive-view": "0.61.0", "autocomplete-atom-api": "0.10.0", "autocomplete-css": "0.11.0", From e18e5e303aa4cba6c75a27eccddcaba8e2efeb78 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:22:22 -0800 Subject: [PATCH 47/77] :arrow_up: autosave --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c564abb6f..be6816b2a 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "autocomplete-plus": "2.25.0", "autocomplete-snippets": "1.10.0", "autoflow": "0.27.0", - "autosave": "0.23.0", + "autosave": "0.23.1", "background-tips": "0.26.0", "bookmarks": "0.38.2", "bracket-matcher": "0.79.0", From b0800ed78bfc04e935fbc2254f4f67d17398f5b3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:23:57 -0800 Subject: [PATCH 48/77] :arrow_up: bracket-matcher --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be6816b2a..7ac302eb0 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "autosave": "0.23.1", "background-tips": "0.26.0", "bookmarks": "0.38.2", - "bracket-matcher": "0.79.0", + "bracket-matcher": "0.79.1", "command-palette": "0.38.0", "deprecation-cop": "0.54.0", "dev-live-reload": "0.47.0", From a40b221bd3de88be129feeb148a4153bc02a30ea Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:24:45 -0800 Subject: [PATCH 49/77] :arrow_up: deprecation-cop --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ac302eb0..27d9dc9be 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "bookmarks": "0.38.2", "bracket-matcher": "0.79.1", "command-palette": "0.38.0", - "deprecation-cop": "0.54.0", + "deprecation-cop": "0.54.1", "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", From 4d21e21850916762a7dd455e71f23bfa49ba1615 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:26:21 -0800 Subject: [PATCH 50/77] :arrow_up: find-and-replace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27d9dc9be..59f0f8198 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", - "find-and-replace": "0.197.1", + "find-and-replace": "0.197.2", "fuzzy-finder": "0.94.0", "git-diff": "0.57.0", "go-to-line": "0.30.0", From 41c057702a8e74ff56e0c04efad4142def8ec408 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:27:31 -0800 Subject: [PATCH 51/77] :arrow_up: fuzzy-finder --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 59f0f8198..c80504f48 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", "find-and-replace": "0.197.2", - "fuzzy-finder": "0.94.0", + "fuzzy-finder": "0.94.1", "git-diff": "0.57.0", "go-to-line": "0.30.0", "grammar-selector": "0.48.0", From 53238e2b62d57ba6f8e691d4605d535b452c3944 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:28:11 -0800 Subject: [PATCH 52/77] :arrow_up: git-diff --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c80504f48..ec61ef638 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "exception-reporting": "0.37.0", "find-and-replace": "0.197.2", "fuzzy-finder": "0.94.1", - "git-diff": "0.57.0", + "git-diff": "0.57.1", "go-to-line": "0.30.0", "grammar-selector": "0.48.0", "image-view": "0.56.0", From 118817d88a973462651fe904324ae820cdc62f53 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:29:00 -0800 Subject: [PATCH 53/77] :arrow_up: grammar-selector --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec61ef638..4b124ecc5 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "fuzzy-finder": "0.94.1", "git-diff": "0.57.1", "go-to-line": "0.30.0", - "grammar-selector": "0.48.0", + "grammar-selector": "0.48.1", "image-view": "0.56.0", "incompatible-packages": "0.25.0", "keybinding-resolver": "0.33.0", From eed8b0000427f9c6e7768426dba2aa2639086a3b Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:29:37 -0800 Subject: [PATCH 54/77] :arrow_up: incompatible-packages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b124ecc5..540ce01dd 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "go-to-line": "0.30.0", "grammar-selector": "0.48.1", "image-view": "0.56.0", - "incompatible-packages": "0.25.0", + "incompatible-packages": "0.25.1", "keybinding-resolver": "0.33.0", "line-ending-selector": "0.3.0", "link": "0.31.0", From 3230eb2650e60b22ef7a3b2ce4d52c08bdb39920 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:31:02 -0800 Subject: [PATCH 55/77] :arrow_up: line-ending-selector --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 540ce01dd..bf9645d7b 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "image-view": "0.56.0", "incompatible-packages": "0.25.1", "keybinding-resolver": "0.33.0", - "line-ending-selector": "0.3.0", + "line-ending-selector": "0.3.1", "link": "0.31.0", "markdown-preview": "0.157.2", "metrics": "0.53.1", From 551742f211b27513539c532c22ad1f38b8819633 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:32:27 -0800 Subject: [PATCH 56/77] :arrow_up: markdown-preview --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf9645d7b..a01758ee5 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "keybinding-resolver": "0.33.0", "line-ending-selector": "0.3.1", "link": "0.31.0", - "markdown-preview": "0.157.2", + "markdown-preview": "0.157.3", "metrics": "0.53.1", "notifications": "0.62.1", "open-on-github": "0.41.0", From bd90d8a84f06da30b8233820464224b618762c72 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:33:01 -0800 Subject: [PATCH 57/77] :arrow_up: notifications --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a01758ee5..c6fa944ee 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "link": "0.31.0", "markdown-preview": "0.157.3", "metrics": "0.53.1", - "notifications": "0.62.1", + "notifications": "0.62.2", "open-on-github": "0.41.0", "package-generator": "0.41.0", "settings-view": "0.232.3", From 27963169c92b3ac5e1a54ec8960b36ee7b984413 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:34:03 -0800 Subject: [PATCH 58/77] :arrow_up: open-on-github --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6fa944ee..512b4a71b 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "markdown-preview": "0.157.3", "metrics": "0.53.1", "notifications": "0.62.2", - "open-on-github": "0.41.0", + "open-on-github": "0.41.1", "package-generator": "0.41.0", "settings-view": "0.232.3", "snippets": "1.0.1", From 45298d4c3c93a3ade23624b7203fd59a838282ae Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:34:56 -0800 Subject: [PATCH 59/77] :arrow_up: package-generator --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 512b4a71b..e526f24ee 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "metrics": "0.53.1", "notifications": "0.62.2", "open-on-github": "0.41.1", - "package-generator": "0.41.0", + "package-generator": "0.41.1", "settings-view": "0.232.3", "snippets": "1.0.1", "spell-check": "0.65.0", From 42397a2d01c0d3002b57be7ae94649f554db41a8 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:35:40 -0800 Subject: [PATCH 60/77] :arrow_up: status-bar --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e526f24ee..7092a0b27 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "settings-view": "0.232.3", "snippets": "1.0.1", "spell-check": "0.65.0", - "status-bar": "0.83.0", + "status-bar": "0.83.1", "styleguide": "0.45.1", "symbols-view": "0.111.0", "tabs": "0.90.0", From e0ddba741ebf2668140440c6d9018c08758ec7bf Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:37:09 -0800 Subject: [PATCH 61/77] :arrow_up: spell-check --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7092a0b27..7045ff987 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "package-generator": "0.41.1", "settings-view": "0.232.3", "snippets": "1.0.1", - "spell-check": "0.65.0", + "spell-check": "0.66.1", "status-bar": "0.83.1", "styleguide": "0.45.1", "symbols-view": "0.111.0", From eccf5e69d8365a1bd0aa89a2c9aaac1c5fe14a4e Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:38:12 -0800 Subject: [PATCH 62/77] :arrow_up: styleguide --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7045ff987..c40f6738c 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "snippets": "1.0.1", "spell-check": "0.66.1", "status-bar": "0.83.1", - "styleguide": "0.45.1", + "styleguide": "0.45.2", "symbols-view": "0.111.0", "tabs": "0.90.0", "timecop": "0.33.0", From c9909e551d872512e265ef32fd5f6c795d501940 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:38:46 -0800 Subject: [PATCH 63/77] :arrow_up: symbols-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c40f6738c..6db9be317 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "spell-check": "0.66.1", "status-bar": "0.83.1", "styleguide": "0.45.2", - "symbols-view": "0.111.0", + "symbols-view": "0.111.1", "tabs": "0.90.0", "timecop": "0.33.0", "tree-view": "0.201.1", From 7f65c50c85f1acda909c6fb88e3d3e4fbbc1fdda Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:39:21 -0800 Subject: [PATCH 64/77] :arrow_up: timecop --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6db9be317..143ccbaf1 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "styleguide": "0.45.2", "symbols-view": "0.111.1", "tabs": "0.90.0", - "timecop": "0.33.0", + "timecop": "0.33.1", "tree-view": "0.201.1", "update-package-dependencies": "0.10.0", "welcome": "0.33.0", From 096af6d5cc442c1330abd858d274cd829fa76311 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:39:55 -0800 Subject: [PATCH 65/77] :arrow_up: tree-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 143ccbaf1..e7fac52fe 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "symbols-view": "0.111.1", "tabs": "0.90.0", "timecop": "0.33.1", - "tree-view": "0.201.1", + "tree-view": "0.201.2", "update-package-dependencies": "0.10.0", "welcome": "0.33.0", "whitespace": "0.32.1", From aa14d6b19e8ca5e3527d6c11bbf9991134701129 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:40:37 -0800 Subject: [PATCH 66/77] :arrow_up: welcome --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7fac52fe..9275016bd 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "timecop": "0.33.1", "tree-view": "0.201.2", "update-package-dependencies": "0.10.0", - "welcome": "0.33.0", + "welcome": "0.33.1", "whitespace": "0.32.1", "wrap-guide": "0.38.1", "language-c": "0.51.1", From 2ef3f0adc229cf869b220679683e1690c1adaea5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:41:27 -0800 Subject: [PATCH 67/77] :arrow_up: whitespace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9275016bd..cddd51ea3 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "tree-view": "0.201.2", "update-package-dependencies": "0.10.0", "welcome": "0.33.1", - "whitespace": "0.32.1", + "whitespace": "0.32.2", "wrap-guide": "0.38.1", "language-c": "0.51.1", "language-clojure": "0.19.1", From 54d3c72cb1b0266a2bcebd3ecf76bf9d368845d8 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 17:42:20 -0800 Subject: [PATCH 68/77] :arrow_up: settings-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cddd51ea3..f4e8300b8 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "notifications": "0.62.2", "open-on-github": "0.41.1", "package-generator": "0.41.1", - "settings-view": "0.232.3", + "settings-view": "0.232.4", "snippets": "1.0.1", "spell-check": "0.66.1", "status-bar": "0.83.1", From 3d13af270aeb6b7d5cece115493b6dcb4c626f81 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Thu, 11 Feb 2016 21:46:35 -0500 Subject: [PATCH 69/77] :arrow_up: language-html@0.44.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4e8300b8..27b962063 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "language-gfm": "0.84.0", "language-git": "0.12.1", "language-go": "0.42.0", - "language-html": "0.44.0", + "language-html": "0.44.1", "language-hyperlink": "0.16.0", "language-java": "0.17.0", "language-javascript": "0.110.0", From 795bb72ec8fa259eb6a1b744d4a2d7835ace7398 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 12 Feb 2016 10:17:29 +0100 Subject: [PATCH 70/77] :arrow_up: text-buffer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27b962063..64dcbfb3f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "service-hub": "^0.7.0", "source-map-support": "^0.3.2", "temp": "0.8.1", - "text-buffer": "8.2.1", + "text-buffer": "8.3.0", "typescript-simple": "1.0.0", "underscore-plus": "^1.6.6", "yargs": "^3.23.0" From 9cd59e8a51c0e23354ff5b79be38cf03dd2a1d1b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 12 Feb 2016 10:18:09 +0100 Subject: [PATCH 71/77] :arrow_up: autocomplete-plus --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64dcbfb3f..1494fc6fa 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "autocomplete-atom-api": "0.10.0", "autocomplete-css": "0.11.0", "autocomplete-html": "0.7.2", - "autocomplete-plus": "2.25.0", + "autocomplete-plus": "2.27.1", "autocomplete-snippets": "1.10.0", "autoflow": "0.27.0", "autosave": "0.23.1", From d9f659206c215fd1fe81576fff8a95b6351f12e3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 12 Feb 2016 10:49:21 -0800 Subject: [PATCH 72/77] :arrow_up: tabs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1494fc6fa..4f735ad42 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "status-bar": "0.83.1", "styleguide": "0.45.2", "symbols-view": "0.111.1", - "tabs": "0.90.0", + "tabs": "0.90.2", "timecop": "0.33.1", "tree-view": "0.201.2", "update-package-dependencies": "0.10.0", From 98a051080bea623d0a195028e442d4675ff8f737 Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 12 Feb 2016 14:43:55 -0500 Subject: [PATCH 73/77] Failing test. --- spec/git-spec.coffee | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index e6b5d4df6..f239f763a 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -259,6 +259,37 @@ describe "GitRepository", -> expect(repo.isStatusModified(status)).toBe false expect(repo.isStatusNew(status)).toBe false + fit 'caches the proper statuses when multiple project are open', -> + otherWorkingDirectory = copyRepository() + + atom.project.setPaths([workingDirectory, otherWorkingDirectory]) + + waitsForPromise -> + atom.workspace.open('b.txt') + + statusHandler = null + runs -> + repo = atom.project.getRepositories()[0] + console.log(repo.getPath()) + + statusHandler = jasmine.createSpy('statusHandler') + repo.onDidChangeStatuses statusHandler + repo.refreshStatus() + + waitsFor -> + statusHandler.callCount > 0 + + runs -> + subDir = path.join(workingDirectory, 'dir') + fs.mkdirSync(subDir) + + filePath = path.join(subDir, 'b.txt') + fs.writeFileSync(filePath, '') + + status = repo.getCachedPathStatus(filePath) + expect(repo.isStatusModified(status)).toBe true + expect(repo.isStatusNew(status)).toBe false + describe "buffer events", -> [editor] = [] From 25e58eb1a25ddf3356ebb05bcfd0589bdf15ee09 Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 12 Feb 2016 14:45:05 -0500 Subject: [PATCH 74/77] Stop logging. --- spec/git-spec.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index f239f763a..7d2c46729 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -270,7 +270,6 @@ describe "GitRepository", -> statusHandler = null runs -> repo = atom.project.getRepositories()[0] - console.log(repo.getPath()) statusHandler = jasmine.createSpy('statusHandler') repo.onDidChangeStatuses statusHandler From 0e8161f30edba29efe32c1f2d9c01993562799f9 Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 12 Feb 2016 14:45:21 -0500 Subject: [PATCH 75/77] Always search the repo itself. --- src/git-repository.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/git-repository.coffee b/src/git-repository.coffee index 44b86a433..0513c2293 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -484,8 +484,7 @@ class GitRepository relativeProjectPaths = @project?.getPaths() .map (path) => @relativize(path) - .filter (path) -> path.length > 0 - .map (path) -> path + '/**' + .map (path) -> if path.length > 0 then path + '/**' else '*' @statusTask?.terminate() @statusTask = Task.once @handlerPath, @getPath(), relativeProjectPaths, ({statuses, upstream, branch, submodules}) => From 72f3d0b30918a45f783ce702fa05af7e4f5c956f Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 12 Feb 2016 14:45:26 -0500 Subject: [PATCH 76/77] Unfocused. --- spec/git-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index 7d2c46729..22c40c19a 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -259,7 +259,7 @@ describe "GitRepository", -> expect(repo.isStatusModified(status)).toBe false expect(repo.isStatusNew(status)).toBe false - fit 'caches the proper statuses when multiple project are open', -> + it 'caches the proper statuses when multiple project are open', -> otherWorkingDirectory = copyRepository() atom.project.setPaths([workingDirectory, otherWorkingDirectory]) From 7ecdc390f21f0131c26b0c83f6c61cd6fee25482 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 12 Feb 2016 12:45:12 -0800 Subject: [PATCH 77/77] :arrow_up: archive-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f735ad42..8ec83f54c 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "solarized-dark-syntax": "1.0.0", "solarized-light-syntax": "1.0.0", "about": "1.3.1", - "archive-view": "0.61.0", + "archive-view": "0.61.1", "autocomplete-atom-api": "0.10.0", "autocomplete-css": "0.11.0", "autocomplete-html": "0.7.2",