From 70bd04f7df37b80a4e622586b3a1ab49c6f61347 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Mon, 4 May 2015 13:36:18 +0200 Subject: [PATCH 01/44] Allow 0 to be passed as initialLine --- src/browser/atom-application.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 178755786..c3e97defb 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -518,11 +518,11 @@ class AtomApplication [fileToOpen, initialLine, initialColumn] = path.basename(pathToOpen).split(':') return {pathToOpen} unless initialLine - return {pathToOpen} unless parseInt(initialLine) > 0 + return {pathToOpen} unless parseInt(initialLine) >= 0 # Convert line numbers to a base of 0 - initialLine -= 1 if initialLine - initialColumn -= 1 if initialColumn + initialLine = Math.max(0, initialLine - 1) if initialLine + initialColumn = Math.max(0, initialColumn - 1) if initialColumn pathToOpen = path.join(path.dirname(pathToOpen), fileToOpen) {pathToOpen, initialLine, initialColumn} From bc1f190c2f233c84fbaee35574ebd8c4af76e687 Mon Sep 17 00:00:00 2001 From: Jonas Gebhardt Date: Tue, 5 May 2015 11:22:14 -0700 Subject: [PATCH 02/44] remove babel compatibility option for legacy react versions --- src/babel.coffee | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/babel.coffee b/src/babel.coffee index 286ee45ef..7058c85c2 100644 --- a/src/babel.coffee +++ b/src/babel.coffee @@ -32,11 +32,6 @@ defaultOptions = # Target a version of the regenerator runtime that # supports yield so the transpiled code is cleaner/smaller. 'asyncToGenerator' - - # Because Atom is currently packaged with a fork of React v0.11, - # it makes sense to use the reactCompat transform so the React - # JSX transformer produces pre-v0.12 code. - 'reactCompat' ] # Includes support for es7 features listed at: From e8ca3745b13db049b437470903a51c36918a0538 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 5 May 2015 15:27:09 -0700 Subject: [PATCH 03/44] :arrow_up: language-css@0.29.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54745a3e9..26dadd7fc 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "language-clojure": "0.14.0", "language-coffee-script": "0.40.0", "language-csharp": "0.5.0", - "language-css": "0.28.0", + "language-css": "0.29.0", "language-gfm": "0.71.0", "language-git": "0.10.0", "language-go": "0.25.0", From b563eabd7a70eac5a8228c08b764c361cdb5b992 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 5 May 2015 15:27:24 -0700 Subject: [PATCH 04/44] :arrow_up: language-less@0.27.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26dadd7fc..95d6460e9 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "language-java": "0.15.0", "language-javascript": "0.76.0", "language-json": "0.14.0", - "language-less": "0.26.0", + "language-less": "0.27.0", "language-make": "0.14.0", "language-mustache": "0.11.0", "language-objective-c": "0.15.0", From 3c6e6e4538466d38d36f7ceac120bba384080192 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 5 May 2015 15:27:38 -0700 Subject: [PATCH 05/44] :arrow_up: language-sass@0.37.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 95d6460e9..585e1b451 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "language-python": "0.34.0", "language-ruby": "0.52.0", "language-ruby-on-rails": "0.21.0", - "language-sass": "0.36.0", + "language-sass": "0.37.0", "language-shellscript": "0.14.0", "language-source": "0.9.0", "language-sql": "0.15.0", From fc5927a596af05f49ef596882451dbf4f8e6905d Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 5 May 2015 16:19:50 -0700 Subject: [PATCH 06/44] :arrow_up: settings-view@0.197.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 585e1b451..5fa296cb4 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "open-on-github": "0.36.0", "package-generator": "0.38.0", "release-notes": "0.52.0", - "settings-view": "0.196.0", + "settings-view": "0.197.0", "snippets": "0.89.0", "spell-check": "0.56.0", "status-bar": "0.69.0", From 8e8e82738806f0aa8b8e0e04b51215181b8a1bc2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 6 May 2015 09:34:59 -0700 Subject: [PATCH 07/44] :arrow_up: language-javascript@0.77 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 585e1b451..205b6945a 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "language-html": "0.36.0", "language-hyperlink": "0.13.0", "language-java": "0.15.0", - "language-javascript": "0.76.0", + "language-javascript": "0.77.0", "language-json": "0.14.0", "language-less": "0.27.0", "language-make": "0.14.0", From 61a0927b26a33630875382cec1744c7497a72957 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 6 May 2015 09:56:32 -0700 Subject: [PATCH 08/44] Use apiPreviewMode value when running specs --- src/browser/atom-application.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 178755786..a825b0d34 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -87,7 +87,7 @@ class AtomApplication openWithOptions: ({pathsToOpen, urlsToOpen, test, pidToKillWhenClosed, devMode, safeMode, apiPreviewMode, newWindow, specDirectory, logFile, profileStartup}) -> if test - @runSpecs({exitWhenDone: true, @resourcePath, specDirectory, logFile}) + @runSpecs({exitWhenDone: true, @resourcePath, specDirectory, logFile, apiPreviewMode}) else if pathsToOpen.length > 0 @openPaths({pathsToOpen, pidToKillWhenClosed, newWindow, devMode, safeMode, apiPreviewMode, profileStartup}) else if urlsToOpen.length > 0 @@ -486,7 +486,7 @@ class AtomApplication # :specPath - The directory to load specs from. # :safeMode - A Boolean that, if true, won't run specs from ~/.atom/packages # and ~/.atom/dev/packages, defaults to false. - runSpecs: ({exitWhenDone, resourcePath, specDirectory, logFile, safeMode}) -> + runSpecs: ({exitWhenDone, resourcePath, specDirectory, logFile, safeMode, apiPreviewMode}) -> if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath) resourcePath = @resourcePath @@ -498,7 +498,8 @@ class AtomApplication isSpec = true devMode = true safeMode ?= false - new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, logFile, safeMode}) + apiPreviewMode ?= false + new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, logFile, safeMode, apiPreviewMode}) runBenchmarks: ({exitWhenDone, specDirectory}={}) -> try From aa1dbf3c5eea00d9cc0eed12dea9545025f9558a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 6 May 2015 10:09:55 -0700 Subject: [PATCH 09/44] :arrow_up: apm@0.165 --- apm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm/package.json b/apm/package.json index b09eb087a..52f42c0af 100644 --- a/apm/package.json +++ b/apm/package.json @@ -6,6 +6,6 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "atom-package-manager": "0.164.0" + "atom-package-manager": "0.165.0" } } From 11fe07d5d82ecc061bb8872b1388c984fc88bd1d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 6 May 2015 10:20:10 -0700 Subject: [PATCH 10/44] :arrow_up: symbols-view@0.96 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 205b6945a..542bd7d37 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "spell-check": "0.56.0", "status-bar": "0.69.0", "styleguide": "0.44.0", - "symbols-view": "0.95.0", + "symbols-view": "0.96.0", "tabs": "0.68.0", "timecop": "0.31.0", "tree-view": "0.171.0", From 75289ee3ddce2406bbd64717f100462ae256da9d Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 6 May 2015 10:29:34 -0700 Subject: [PATCH 11/44] Fix some integration test flakiness --- spec/integration/helpers/start-atom.coffee | 28 +++++++++++++++------- spec/integration/startup-spec.coffee | 2 ++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 0de6644b3..646281171 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -15,15 +15,23 @@ ChromedriverPort = 9515 ChromedriverURLBase = "/wd/hub" ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status" -pollChromeDriver = (done) -> +chromeDriverUp = (done) -> checkStatus = -> - http.get(ChromedriverStatusURL, (response) -> - if response.statusCode is 200 - done() - else - pollChromeDriver(done) - ).on("error", -> pollChromeDriver(done)) + http + .get ChromedriverStatusURL, (response) -> + if response.statusCode is 200 + done() + else + chromeDriverUp(done) + .on("error", -> chromeDriverUp(done)) + setTimeout(checkStatus, 100) +chromeDriverDown = (done) -> + checkStatus = -> + http + .get ChromedriverStatusURL, (response) -> + chromeDriverDown(done) + .on("error", done) setTimeout(checkStatus, 100) buildAtomClient = (args, env) -> @@ -137,9 +145,9 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waitsFor("webdriver to start", pollChromeDriver, 15000) + waitsFor("webdriver to start", chromeDriverUp, 15000) - waitsFor("webdriver to finish", (done) -> + waitsFor("tests to run", (done) -> finish = once -> client .simulateQuit() @@ -162,3 +170,5 @@ module.exports = (args, env, fn) -> fn(client.init()).then(finish) , 30000) + + waitsFor("webdriver to stop", chromeDriverDown, 15000) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index b20427954..828193e4d 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -150,10 +150,12 @@ describe "Starting Atom", -> .waitForWindowCount(2, 10000) .then ({value: windowHandles}) -> @window(windowHandles[0]) + .waitForExist("atom-workspace") .treeViewRootDirectories() .then ({value: directories}) -> windowProjectPaths.push(directories) .window(windowHandles[1]) + .waitForExist("atom-workspace") .treeViewRootDirectories() .then ({value: directories}) -> windowProjectPaths.push(directories) From 4c2f48792910b5b2026ad468395938f3250c81ed Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 6 May 2015 11:55:22 -0700 Subject: [PATCH 12/44] :arrow_up: autocomplete@0.45.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5fa296cb4..74d9a7344 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "solarized-dark-syntax": "0.32.0", "solarized-light-syntax": "0.19.0", "archive-view": "0.56.0", - "autocomplete": "0.44.0", + "autocomplete": "0.45.0", "autoflow": "0.22.0", "autosave": "0.20.0", "background-tips": "0.24.0", From 06844ed60a66748802ca7c58c2f3af1d88190926 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 6 May 2015 13:14:10 -0700 Subject: [PATCH 13/44] :arrow_up: autocomplete@0.46.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 542bd7d37..1b5c01480 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "solarized-dark-syntax": "0.32.0", "solarized-light-syntax": "0.19.0", "archive-view": "0.56.0", - "autocomplete": "0.44.0", + "autocomplete": "0.46.0", "autoflow": "0.22.0", "autosave": "0.20.0", "background-tips": "0.24.0", From 9c34e2273fd4c88fc5882d81f808b35b9782b978 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 6 May 2015 13:14:58 -0700 Subject: [PATCH 14/44] Revert ":arrow_up: autocomplete@0.45.0" This reverts commit 4c2f48792910b5b2026ad468395938f3250c81ed. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 74d9a7344..5fa296cb4 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "solarized-dark-syntax": "0.32.0", "solarized-light-syntax": "0.19.0", "archive-view": "0.56.0", - "autocomplete": "0.45.0", + "autocomplete": "0.44.0", "autoflow": "0.22.0", "autosave": "0.20.0", "background-tips": "0.24.0", From 186448fd530102452dfb627794db2d0b2f6ee0eb Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 6 May 2015 17:35:53 -0700 Subject: [PATCH 15/44] :arrow_up: notifications --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d5e66e79..2a43b70c6 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "link": "0.30.0", "markdown-preview": "0.148.0", "metrics": "0.45.0", - "notifications": "0.42.0", + "notifications": "0.43.0", "open-on-github": "0.36.0", "package-generator": "0.38.0", "release-notes": "0.52.0", From b5c130ed18b71de369e5c697231b6f9fc0422c23 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 6 May 2015 18:02:11 -0700 Subject: [PATCH 16/44] :arrow_up: apm@0.166 --- apm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm/package.json b/apm/package.json index 52f42c0af..423e31a12 100644 --- a/apm/package.json +++ b/apm/package.json @@ -6,6 +6,6 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "atom-package-manager": "0.165.0" + "atom-package-manager": "0.166.0" } } From a79a8fa60456a0c41d63c517fdff785b0f4f0a0a Mon Sep 17 00:00:00 2001 From: simurai Date: Thu, 7 May 2015 10:18:41 +0900 Subject: [PATCH 17/44] :arrow_up: one-dark/light-ui@0.8.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2a43b70c6..90e15cfcd 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,10 @@ "atom-light-ui": "0.41.0", "base16-tomorrow-dark-theme": "0.25.0", "base16-tomorrow-light-theme": "0.8.0", - "one-dark-ui": "0.8.0", + "one-dark-ui": "0.8.1", "one-dark-syntax": "0.4.0", "one-light-syntax": "0.5.0", - "one-light-ui": "0.8.0", + "one-light-ui": "0.8.1", "solarized-dark-syntax": "0.32.0", "solarized-light-syntax": "0.19.0", "archive-view": "0.56.0", From 4fd114a1b4c589effbe43b37dde55ada172b8c4a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 09:38:09 -0700 Subject: [PATCH 18/44] Prepare 0.198 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90e15cfcd..65fd5780b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.197.0", + "version": "0.198.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 4f5e9b114d6ecac8762c69ef58bb42fd002670fb Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 7 May 2015 10:31:21 -0700 Subject: [PATCH 19/44] :arrow_up: language-html@0.37.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65fd5780b..98bffd420 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "language-gfm": "0.71.0", "language-git": "0.10.0", "language-go": "0.25.0", - "language-html": "0.36.0", + "language-html": "0.37.0", "language-hyperlink": "0.13.0", "language-java": "0.15.0", "language-javascript": "0.77.0", From a2dcdda972ae07566930063a09f9d856982da5b6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 10:58:44 -0700 Subject: [PATCH 20/44] Prepare 0.199 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98bffd420..f38754551 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.198.0", + "version": "0.199.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From edf0d6f2380f9af1dc0ea267b954468e0cc8b7a0 Mon Sep 17 00:00:00 2001 From: Johnston Jiaa Date: Thu, 7 May 2015 14:18:03 -0400 Subject: [PATCH 21/44] :arrow_up: fs-plus@2.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f38754551..a62460413 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "emissary": "^1.3.3", "event-kit": "^1.1", "first-mate": "^3.1", - "fs-plus": "^2.7.1", + "fs-plus": "^2.8.0", "fstream": "0.1.24", "fuzzaldrin": "^2.1", "git-utils": "^3.0.0", From 4300ba6bb3155eb4340eb9bda42a5ab171bd24c4 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 7 May 2015 11:35:16 -0700 Subject: [PATCH 22/44] Make 'atom' command w/ no args reopen previous windows --- src/browser/main.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/browser/main.coffee b/src/browser/main.coffee index e35632104..746055ea4 100644 --- a/src/browser/main.coffee +++ b/src/browser/main.coffee @@ -133,7 +133,6 @@ parseCommandLine = -> safeMode = args['safe'] apiPreviewMode = args['one'] pathsToOpen = args._ - pathsToOpen = [executedFrom] if executedFrom and pathsToOpen.length is 0 test = args['test'] specDirectory = args['spec-directory'] newWindow = args['new-window'] From 5b8262bd96a9889b880bc1b54b72514c6a753f66 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 7 May 2015 12:56:29 -0700 Subject: [PATCH 23/44] :racehorse: Avoid repeated array allocation in ::getDecorations --- src/display-buffer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index d86fd13be..db39eb432 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -886,7 +886,7 @@ class DisplayBuffer extends Model getDecorations: (propertyFilter) -> allDecorations = [] for markerId, decorations of @decorationsByMarkerId - allDecorations = allDecorations.concat(decorations) if decorations? + allDecorations.push(decorations...) if decorations? if propertyFilter? allDecorations = allDecorations.filter (decoration) -> for key, value of propertyFilter From b7dddeebfe71f710cf495ed7d34e16d4a238df5d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 13:23:14 -0700 Subject: [PATCH 24/44] Guard against no hosted git info Closes #6693 --- .../package-with-invalid-url-package-json/package.json | 4 ++++ spec/package-manager-spec.coffee | 4 ++++ src/package.coffee | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/packages/package-with-invalid-url-package-json/package.json diff --git a/spec/fixtures/packages/package-with-invalid-url-package-json/package.json b/spec/fixtures/packages/package-with-invalid-url-package-json/package.json new file mode 100644 index 000000000..cc119ffaa --- /dev/null +++ b/spec/fixtures/packages/package-with-invalid-url-package-json/package.json @@ -0,0 +1,4 @@ +{ + "name": "package-with-invalid-url-package-json", + "repository": "foo" +} diff --git a/spec/package-manager-spec.coffee b/spec/package-manager-spec.coffee index ebdd1f57a..92dc21a13 100644 --- a/spec/package-manager-spec.coffee +++ b/spec/package-manager-spec.coffee @@ -46,6 +46,10 @@ describe "PackageManager", -> expect(metadata.repository.type).toBe "git" expect(metadata.repository.url).toBe "https://github.com/example/repo.git" + {metadata} = atom.packages.loadPackage("package-with-invalid-url-package-json") + expect(metadata.repository.type).toBe "git" + expect(metadata.repository.url).toBe "foo" + it "returns null if the package is not found in any package directory", -> spyOn(console, 'warn') expect(atom.packages.loadPackage("this-package-cannot-be-found")).toBeNull() diff --git a/src/package.coffee b/src/package.coffee index 05be6c79f..8f5baf44a 100644 --- a/src/package.coffee +++ b/src/package.coffee @@ -34,7 +34,7 @@ class Package repoUrl = metadata.repository?.url if repoUrl info = hostedGitInfo.fromUrl(repoUrl) - if info.getDefaultRepresentation() is 'shortcut' + if info?.getDefaultRepresentation() is 'shortcut' metadata.repository.url = info.https().replace(/^git\+/, '') @loadMetadata: (packagePath, ignoreErrors=false) -> From db3cd61344e2587410988370eb88ffc3838a4321 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 14:35:17 -0700 Subject: [PATCH 25/44] :arrow_up: settings-view@0.198 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a62460413..6a9d42176 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "open-on-github": "0.36.0", "package-generator": "0.38.0", "release-notes": "0.52.0", - "settings-view": "0.197.0", + "settings-view": "0.198.0", "snippets": "0.89.0", "spell-check": "0.56.0", "status-bar": "0.69.0", From 55c0be05f718d57d31a8940a823940f6bf85b75b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 14:35:55 -0700 Subject: [PATCH 26/44] :arrow_up: language-gfm@0.72 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a9d42176..953c69800 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "language-coffee-script": "0.40.0", "language-csharp": "0.5.0", "language-css": "0.29.0", - "language-gfm": "0.71.0", + "language-gfm": "0.72.0", "language-git": "0.10.0", "language-go": "0.25.0", "language-html": "0.37.0", From 858fc53a0cb52a6ed665bb09ea5017f691b83e05 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 7 May 2015 15:42:32 -0700 Subject: [PATCH 27/44] :arrow_up: event-kit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 953c69800..19e5acf9f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "color": "^0.7.3", "delegato": "^1", "emissary": "^1.3.3", - "event-kit": "^1.1", + "event-kit": "^1.1.1", "first-mate": "^3.1", "fs-plus": "^2.8.0", "fstream": "0.1.24", From 523171061b14620a4b8156be1e687799b31f390f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 May 2015 15:57:58 -0700 Subject: [PATCH 28/44] Stop resize if detached or if siblings are missing Closes #6630 --- spec/pane-container-element-spec.coffee | 22 ++++++++++++++++++++++ src/pane-resize-handle-element.coffee | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/spec/pane-container-element-spec.coffee b/spec/pane-container-element-spec.coffee index 0a5b11b39..400904f5c 100644 --- a/spec/pane-container-element-spec.coffee +++ b/spec/pane-container-element-spec.coffee @@ -132,3 +132,25 @@ describe "PaneContainerElement", -> # dynamically close pane, the pane's flexscale will recorver to origin value lowerPane.close() expectPaneScale [leftPane, 0.5], [rightPane, 1.5] + + it "unsubscribes from mouse events when the pane is detached", -> + container.getActivePane().splitRight() + element = getResizeElement(0) + spyOn(document, 'addEventListener').andCallThrough() + spyOn(document, 'removeEventListener').andCallThrough() + spyOn(element, 'resizeStopped').andCallThrough() + + element.dispatchEvent(new MouseEvent('mousedown', + view: window + bubbles: true + button: 0 + )) + + waitsFor -> + document.addEventListener.callCount is 2 + + runs -> + expect(element.resizeStopped.callCount).toBe 0 + container.destroy() + expect(element.resizeStopped.callCount).toBe 1 + expect(document.removeEventListener.callCount).toBe 2 diff --git a/src/pane-resize-handle-element.coffee b/src/pane-resize-handle-element.coffee index 47548bc60..078bb44ac 100644 --- a/src/pane-resize-handle-element.coffee +++ b/src/pane-resize-handle-element.coffee @@ -12,6 +12,9 @@ class PaneResizeHandleElement extends HTMLElement @isHorizontal = @parentElement.classList.contains("horizontal") @classList.add if @isHorizontal then 'horizontal' else 'vertical' + detachedCallback: -> + @resizeStopped() + resizeToFitContent: -> # clear flex-grow css style of both pane @previousSibling.model.setFlexScale(1) @@ -43,6 +46,7 @@ class PaneResizeHandleElement extends HTMLElement resizePane: ({clientX, clientY, which}) -> return @resizeStopped() unless which is 1 + return @resizeStopped() unless @previousSibling? and @nextSibling? if @isHorizontal totalWidth = @previousSibling.clientWidth + @nextSibling.clientWidth From 5f40ee37fa2d32da7e0d6d11e1d883a71a76f770 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:46:57 +0900 Subject: [PATCH 29/44] :arrow_up: atom-dark-syntax@0.27.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19e5acf9f..ffb6c5259 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "underscore-plus": "^1.6.6" }, "packageDependencies": { - "atom-dark-syntax": "0.26.0", + "atom-dark-syntax": "0.27.0", "atom-dark-ui": "0.49.0", "atom-light-syntax": "0.26.0", "atom-light-ui": "0.41.0", From 14b112cf20e78929cc8f723a9a56d91d1fc4c4ce Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:48:09 +0900 Subject: [PATCH 30/44] :arrow_up: atom-light-syntax@0.28.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ffb6c5259..78bdd028b 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "packageDependencies": { "atom-dark-syntax": "0.27.0", "atom-dark-ui": "0.49.0", - "atom-light-syntax": "0.26.0", + "atom-light-syntax": "0.28.0", "atom-light-ui": "0.41.0", "base16-tomorrow-dark-theme": "0.25.0", "base16-tomorrow-light-theme": "0.8.0", From bff5c8496313eae3c2dd0f594f9a096364ff5b65 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:49:12 +0900 Subject: [PATCH 31/44] :arrow_up: base16-tomorrow-dark-theme@0.26.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78bdd028b..d5f157c05 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "atom-dark-ui": "0.49.0", "atom-light-syntax": "0.28.0", "atom-light-ui": "0.41.0", - "base16-tomorrow-dark-theme": "0.25.0", + "base16-tomorrow-dark-theme": "0.26.0", "base16-tomorrow-light-theme": "0.8.0", "one-dark-ui": "0.8.1", "one-dark-syntax": "0.4.0", From 2dde7501572454e7d8ad2bf96868237680b97efc Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:50:14 +0900 Subject: [PATCH 32/44] :arrow_up: base16-tomorrow-light-theme@0.9.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d5f157c05..588a0163d 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "atom-light-syntax": "0.28.0", "atom-light-ui": "0.41.0", "base16-tomorrow-dark-theme": "0.26.0", - "base16-tomorrow-light-theme": "0.8.0", + "base16-tomorrow-light-theme": "0.9.0", "one-dark-ui": "0.8.1", "one-dark-syntax": "0.4.0", "one-light-syntax": "0.5.0", From 1f5dda1ecd7884c6926d3bcafa37627d524fb23d Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:51:15 +0900 Subject: [PATCH 33/44] :arrow_up: one-dark-syntax@0.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 588a0163d..802c30191 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "base16-tomorrow-dark-theme": "0.26.0", "base16-tomorrow-light-theme": "0.9.0", "one-dark-ui": "0.8.1", - "one-dark-syntax": "0.4.0", + "one-dark-syntax": "0.5.0", "one-light-syntax": "0.5.0", "one-light-ui": "0.8.1", "solarized-dark-syntax": "0.32.0", From 99a30dedf8c9ecde62af49fe44261e0866617bf5 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:52:29 +0900 Subject: [PATCH 34/44] :arrow_up: one-light-syntax@0.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 802c30191..381fe7038 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "base16-tomorrow-light-theme": "0.9.0", "one-dark-ui": "0.8.1", "one-dark-syntax": "0.5.0", - "one-light-syntax": "0.5.0", + "one-light-syntax": "0.6.0", "one-light-ui": "0.8.1", "solarized-dark-syntax": "0.32.0", "solarized-light-syntax": "0.19.0", From bd33d8d5281f7a99c4613576a29029019ed87aaa Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 11:58:26 +0900 Subject: [PATCH 35/44] :arrow_up: solarized-dark-syntax@0.35.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 381fe7038..60a86cfcf 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "one-dark-syntax": "0.5.0", "one-light-syntax": "0.6.0", "one-light-ui": "0.8.1", - "solarized-dark-syntax": "0.32.0", + "solarized-dark-syntax": "0.35.0", "solarized-light-syntax": "0.19.0", "archive-view": "0.56.0", "autocomplete": "0.46.0", From fabfd2a68fbd2a0c3bf8a62b44d1d4317d19d92a Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 8 May 2015 12:01:24 +0900 Subject: [PATCH 36/44] :arrow_up: solarized-light-syntax@0.21.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 60a86cfcf..144981d45 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "one-light-syntax": "0.6.0", "one-light-ui": "0.8.1", "solarized-dark-syntax": "0.35.0", - "solarized-light-syntax": "0.19.0", + "solarized-light-syntax": "0.21.0", "archive-view": "0.56.0", "autocomplete": "0.46.0", "autoflow": "0.22.0", From 6a7d5e69459cfd6dc14c2d4e25c97353f84c49c9 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Fri, 8 May 2015 18:05:45 +0200 Subject: [PATCH 37/44] Ignore trailing colons and whitespace when opening files from command line --- src/browser/atom-application.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 6f7f0ac4b..8adba81f2 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -517,6 +517,8 @@ class AtomApplication return {pathToOpen} unless pathToOpen return {pathToOpen} if fs.existsSync(pathToOpen) + pathToOpen = pathToOpen.replace(/[:\s]+$/, '') + [fileToOpen, initialLine, initialColumn] = path.basename(pathToOpen).split(':') return {pathToOpen} unless initialLine return {pathToOpen} unless parseInt(initialLine) >= 0 From 0d310c767f1c9e82d07b410ed342cf7125be6ead Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 8 May 2015 00:54:31 +0200 Subject: [PATCH 38/44] Splice in new DisplayBuffer lines in chunks to avoid stack overflows --- src/display-buffer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index db39eb432..f4c078b17 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -1120,7 +1120,7 @@ class DisplayBuffer extends Model {screenLines, regions} = @buildScreenLines(startBufferRow, endBufferRow + bufferDelta) screenDelta = screenLines.length - (endScreenRow - startScreenRow) - @screenLines[startScreenRow...endScreenRow] = screenLines + _.spliceWithArray(@screenLines, startScreenRow, endScreenRow - startScreenRow, screenLines, 10000) @rowMap.spliceRegions(startBufferRow, endBufferRow - startBufferRow, regions) @findMaxLineLength(startScreenRow, endScreenRow, screenLines, screenDelta) From b8cd0a06283f1bac3b2c51b667f6df3d5ae2b37f Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 8 May 2015 11:19:51 -0700 Subject: [PATCH 39/44] Don't persist dev/safe/api-preview mode settings of windows --- src/browser/atom-application.coffee | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 6f7f0ac4b..46af91ed0 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -424,12 +424,7 @@ class AtomApplication for window in @windows if loadSettings = window.getLoadSettings() unless loadSettings.isSpec - states.push(_.pick(loadSettings, - 'initialPaths' - 'devMode' - 'safeMode' - 'apiPreviewMode' - )) + states.push(initialPaths: loadSettings.initialPaths) @storageFolder.store('application.json', states) loadState: -> @@ -438,9 +433,9 @@ class AtomApplication @openWithOptions({ pathsToOpen: state.initialPaths urlsToOpen: [] - devMode: state.devMode - safeMode: state.safeMode - apiPreviewMode: state.apiPreviewMode + devMode: @devMode + safeMode: @safeMode + apiPreviewMode: @apiPreviewMode }) true else From 9a85164090dd84515e4034c0da8560fce5cf48f4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 May 2015 13:04:42 -0700 Subject: [PATCH 40/44] Add spec for file path with trailing colon/whitespace --- spec/integration/startup-spec.coffee | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index 828193e4d..e0e0e32d1 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -41,6 +41,22 @@ describe "Starting Atom", -> .then ({value}) -> expect(value).toBe "Hello!" .dispatchCommand("editor:delete-line") + it "removes all trailing whitespace and colons from the specified path", -> + runAtom [path.join(tempDirPath, "new-file: ")], {ATOM_HOME: atomHome}, (client) -> + client + .waitForWindowCount(1, 1000) + .waitForExist("atom-workspace", 5000) + .waitForPaneItemCount(1, 1000) + + .treeViewRootDirectories() + .then ({value}) -> expect(value).toEqual([tempDirPath]) + + .waitForExist("atom-text-editor", 5000) + .then (exists) -> expect(exists).toBe true + .click("atom-text-editor") + .execute -> atom.workspace.getActiveTextEditor().getPath() + .then ({value}) -> expect(value).toBe path.join(tempDirPath, "new-file") + describe "when there is already a window open", -> it "reuses that window when opening files, but not when opening directories", -> tempFilePath = path.join(temp.mkdirSync("a-third-dir"), "a-file") From 1e567b62e2ca22e4963df237d74b2ab56f679776 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 May 2015 13:23:28 -0700 Subject: [PATCH 41/44] Add spec for opening file to line number --- spec/integration/startup-spec.coffee | 42 +++++++++++++++++++++------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index e0e0e32d1..94a489021 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -1,10 +1,10 @@ # These tests are excluded by default. To run them from the command line: # # ATOM_INTEGRATION_TESTS_ENABLED=true apm test -return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED +# return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED # Integration tests require a fast machine and, for now, we cannot afford to # run them on Travis. -return if process.env.TRAVIS +# return if process.env.TRAVIS fs = require "fs" path = require "path" @@ -41,21 +41,43 @@ describe "Starting Atom", -> .then ({value}) -> expect(value).toBe "Hello!" .dispatchCommand("editor:delete-line") - it "removes all trailing whitespace and colons from the specified path", -> - runAtom [path.join(tempDirPath, "new-file: ")], {ATOM_HOME: atomHome}, (client) -> + it "opens the parent directory and creates an empty text editor", -> + filePath = path.join(fs.realpathSync(tempDirPath), "new-file") + fs.writeFileSync filePath, """ + 1 + 2 + 3 + 4 + """ + + runAtom ["#{filePath}:3"], {ATOM_HOME: atomHome}, (client) -> client .waitForWindowCount(1, 1000) .waitForExist("atom-workspace", 5000) .waitForPaneItemCount(1, 1000) - - .treeViewRootDirectories() - .then ({value}) -> expect(value).toEqual([tempDirPath]) - .waitForExist("atom-text-editor", 5000) .then (exists) -> expect(exists).toBe true - .click("atom-text-editor") + .execute -> atom.workspace.getActiveTextEditor().getPath() - .then ({value}) -> expect(value).toBe path.join(tempDirPath, "new-file") + .then ({value}) -> expect(value).toBe filePath + + .execute -> atom.workspace.getActiveTextEditor().getCursorBufferPosition() + .then ({value}) -> + expect(value.row).toBe 2 + expect(value.column).toBe 0 + + it "removes all trailing whitespace and colons from the specified path", -> + filePath = path.join(tempDirPath, "new-file") + runAtom ["#{filePath}: "], {ATOM_HOME: atomHome}, (client) -> + client + .waitForWindowCount(1, 1000) + .waitForExist("atom-workspace", 5000) + .waitForPaneItemCount(1, 1000) + .waitForExist("atom-text-editor", 5000) + .then (exists) -> expect(exists).toBe true + + .execute -> atom.workspace.getActiveTextEditor().getPath() + .then ({value}) -> expect(value).toBe filePath describe "when there is already a window open", -> it "reuses that window when opening files, but not when opening directories", -> From 75ac785e77647ca64b40eb78743a8681209f924d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 May 2015 13:24:48 -0700 Subject: [PATCH 42/44] Add spec for opening to line and column --- spec/integration/startup-spec.coffee | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index 94a489021..c2730eaa5 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -41,7 +41,7 @@ describe "Starting Atom", -> .then ({value}) -> expect(value).toBe "Hello!" .dispatchCommand("editor:delete-line") - it "opens the parent directory and creates an empty text editor", -> + it "opens the file to the specified line number", -> filePath = path.join(fs.realpathSync(tempDirPath), "new-file") fs.writeFileSync filePath, """ 1 @@ -66,6 +66,31 @@ describe "Starting Atom", -> expect(value.row).toBe 2 expect(value.column).toBe 0 + it "opens the file to the specified line number and column number", -> + filePath = path.join(fs.realpathSync(tempDirPath), "new-file") + fs.writeFileSync filePath, """ + 1 + 2 + 3 + 4 + """ + + runAtom ["#{filePath}:2:2"], {ATOM_HOME: atomHome}, (client) -> + client + .waitForWindowCount(1, 1000) + .waitForExist("atom-workspace", 5000) + .waitForPaneItemCount(1, 1000) + .waitForExist("atom-text-editor", 5000) + .then (exists) -> expect(exists).toBe true + + .execute -> atom.workspace.getActiveTextEditor().getPath() + .then ({value}) -> expect(value).toBe filePath + + .execute -> atom.workspace.getActiveTextEditor().getCursorBufferPosition() + .then ({value}) -> + expect(value.row).toBe 1 + expect(value.column).toBe 1 + it "removes all trailing whitespace and colons from the specified path", -> filePath = path.join(tempDirPath, "new-file") runAtom ["#{filePath}: "], {ATOM_HOME: atomHome}, (client) -> From 02d1e0be563db5d8889b4b754270e1fbf7d24ba9 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 May 2015 13:25:54 -0700 Subject: [PATCH 43/44] Uncomment env conditionals --- spec/integration/startup-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index c2730eaa5..f1c76c04e 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -1,10 +1,10 @@ # These tests are excluded by default. To run them from the command line: # # ATOM_INTEGRATION_TESTS_ENABLED=true apm test -# return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED +return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED # Integration tests require a fast machine and, for now, we cannot afford to # run them on Travis. -# return if process.env.TRAVIS +return if process.env.TRAVIS fs = require "fs" path = require "path" From 2c23d6f3ab976042f67ed57a47c975b859c7bdcd Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 8 May 2015 13:33:30 -0700 Subject: [PATCH 44/44] :art: --- spec/integration/startup-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index f1c76c04e..54817fedc 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -9,7 +9,7 @@ return if process.env.TRAVIS fs = require "fs" path = require "path" temp = require("temp").track() -runAtom = require("./helpers/start-atom") +runAtom = require "./helpers/start-atom" describe "Starting Atom", -> [tempDirPath, otherTempDirPath, atomHome] = []