From 46f90f09841e220b28a81a5c207421c63c9bc573 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 10:39:54 -0700 Subject: [PATCH 01/28] :arrow_up: grunt-download-atom-shell@0.14 --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index 3f0a3caef..e4612eb6f 100644 --- a/build/package.json +++ b/build/package.json @@ -20,7 +20,7 @@ "grunt-contrib-csslint": "~0.1.2", "grunt-contrib-less": "~0.8.0", "grunt-cson": "0.14.0", - "grunt-download-atom-shell": "~0.12.0", + "grunt-download-atom-shell": "~0.14.0", "grunt-lesslint": "0.13.0", "grunt-peg": "~1.1.0", "grunt-shell": "~0.3.1", From 96b0938c7cf9a78caeef29c256c015cd04e3e9df Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sat, 18 Apr 2015 12:21:46 +1200 Subject: [PATCH 02/28] :art: --- spec/config-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index 4aeb46c68..b3af6f931 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -854,7 +854,7 @@ describe "Config", -> expect(atom.config.get('foo.bar')).toBe 'baz' expect(atom.config.get('foo.baz')).toBe 'ok' - describe 'when the default value is a complex value', -> + describe "when the default value is a complex value", -> beforeEach -> atom.config.setSchema 'foo.bar', type: 'array' @@ -877,7 +877,7 @@ describe "Config", -> expect(atom.config.get('foo.bar')).toEqual ['baz', 'ok'] expect(atom.config.get('foo.baz')).toBe 'another' - describe 'when scoped settings are used', -> + describe "when scoped settings are used", -> it "fires a change event for scoped settings that are removed", -> scopedSpy = jasmine.createSpy() atom.config.onDidChange('foo.scoped', scope: ['.source.ruby'], scopedSpy) From d1c44dcb54994eb733eff0bfde69c8454aeff22c Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sat, 18 Apr 2015 12:39:20 +1200 Subject: [PATCH 03/28] Never load config settings from disk when a save is pending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #5771 We load the user’s settings from disk when we detect a change to their config.cson file. However, if there’s a save pending, doing this will end up blowing away the values we intend to save. --- spec/config-spec.coffee | 17 +++++++++++++++++ src/config.coffee | 24 ++++++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index b3af6f931..2c5ba2fc2 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -486,6 +486,7 @@ describe "Config", -> atom.config.set('foo.bar.baz', "value 1") expect(observeHandler).toHaveBeenCalledWith("value 1") + advanceClock(100) # complete pending save that was requested in ::set observeHandler.reset() atom.config.loadUserConfig() @@ -789,6 +790,22 @@ describe "Config", -> expect(warnSpy).toHaveBeenCalled() expect(warnSpy.mostRecentCall.args[0]).toContain "foo.int" + describe "when there is a pending save", -> + it "does not change the config settings", -> + fs.writeFileSync atom.config.configFilePath, "'*': foo: bar: 'baz'" + + atom.config.set("foo.bar", "quux") + atom.config.loadUserConfig() + expect(atom.config.get("foo.bar")).toBe "quux" + + advanceClock(100) + expect(atom.config.save.callCount).toBe 1 + + expect(atom.config.get("foo.bar")).toBe "quux" + atom.config.loadUserConfig() + expect(atom.config.get("foo.bar")).toBe "baz" + + describe ".observeUserConfig()", -> updatedHandler = null diff --git a/src/config.coffee b/src/config.coffee index 6c440f219..b97ce99ec 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -332,9 +332,16 @@ class Config @configFilePath = fs.resolve(@configDirPath, 'config', ['json', 'cson']) @configFilePath ?= path.join(@configDirPath, 'config.cson') @transactDepth = 0 + @savePending = false - @debouncedSave = _.debounce(@save, 100) - @debouncedLoad = _.debounce(@loadUserConfig, 100) + @requestLoad = _.debounce(@loadUserConfig, 100) + @requestSave = => + @savePending = true + debouncedSave.call(this) + save = => + @savePending = false + @save() + debouncedSave = _.debounce(save, 100) ### Section: Config Subscription @@ -605,7 +612,7 @@ class Config else @setRawValue(keyPath, value) - @debouncedSave() if source is @getUserConfigPath() and shouldSave and not @configFileHasErrors + @requestSave() if source is @getUserConfigPath() and shouldSave and not @configFileHasErrors true # Essential: Restore the setting at `keyPath` to its default value. @@ -635,7 +642,7 @@ class Config _.setValueForKeyPath(settings, keyPath, undefined) settings = withoutEmptyObjects(settings) @set(null, settings, {scopeSelector, source, priority: @priorityForSource(source)}) if settings? - @debouncedSave() + @requestSave() else @scopedSettingsStore.removePropertiesForSourceAndSelector(source, scopeSelector) @emitChangeEvent() @@ -757,9 +764,10 @@ class Config CSON.writeFileSync(@configFilePath, {}) try - userConfig = CSON.readFileSync(@configFilePath) - @resetUserSettings(userConfig) - @configFileHasErrors = false + unless @savePending + userConfig = CSON.readFileSync(@configFilePath) + @resetUserSettings(userConfig) + @configFileHasErrors = false catch error @configFileHasErrors = true message = "Failed to load `#{path.basename(@configFilePath)}`" @@ -776,7 +784,7 @@ class Config observeUserConfig: -> try @watchSubscription ?= pathWatcher.watch @configFilePath, (eventType) => - @debouncedLoad() if eventType is 'change' and @watchSubscription? + @requestLoad() if eventType is 'change' and @watchSubscription? catch error @notifyFailure """ Unable to watch path: `#{path.basename(@configFilePath)}`. Make sure you have permissions to From 7a9b1674c8f28718cec3f1bd81691f3ec1ad03e3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 15:47:17 -0700 Subject: [PATCH 04/28] :arrow_up: fs-plus@2.7.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fcb6c185..d616f739e 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.6", + "fs-plus": "^2.7.1", "fstream": "0.1.24", "fuzzaldrin": "^2.1", "git-utils": "^3.0.0", From d39fa88ae558384a6297031e088566e521033bd4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 16:09:09 -0700 Subject: [PATCH 05/28] :arrow_up: settings-view@0.193 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d616f739e..7d7f070ba 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "open-on-github": "0.36.0", "package-generator": "0.38.0", "release-notes": "0.52.0", - "settings-view": "0.192.0", + "settings-view": "0.193.0", "snippets": "0.88.0", "spell-check": "0.55.0", "status-bar": "0.69.0", From 1530d68a08e29decabc8f2b49d4c207e5296bada Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:24:36 -0700 Subject: [PATCH 06/28] Only compile .pegjs files in lib/ --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 7c687ac92..1a34b70f2 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -128,7 +128,7 @@ module.exports = (grunt) -> lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less") prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson") - pegConfig.glob_to_multiple.src.push("#{directory}/**/*.pegjs") + pegConfig.glob_to_multiple.src.push("#{directory}/lib/*.pegjs") grunt.initConfig pkg: grunt.file.readJSON('package.json') From f12eb04339dcc015075677bce0c512c7d2a43d13 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:25:05 -0700 Subject: [PATCH 07/28] Don't compile package specs --- build/Gruntfile.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 1a34b70f2..c3261ad90 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -125,9 +125,13 @@ module.exports = (grunt) -> {engines, theme} = grunt.file.readJSON(metadataPath) if engines?.atom? coffeeConfig.glob_to_multiple.src.push("#{directory}/**/*.coffee") + coffeeConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.coffee") + lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less") prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme + csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson") + pegConfig.glob_to_multiple.src.push("#{directory}/lib/*.pegjs") grunt.initConfig From 931ea2f198b54482f28a8e79e947e5e670fa0c25 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:28:17 -0700 Subject: [PATCH 08/28] Ignore package spec folder --- build/tasks/build-task.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 3411f4dae..2530aab79 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -26,6 +26,7 @@ module.exports = (grunt) -> cp 'package.json', path.join(appDir, 'package.json') + packageNames = [] packageDirectories = [] nonPackageDirectories = [ 'benchmark' @@ -39,6 +40,7 @@ module.exports = (grunt) -> directory = path.join('node_modules', child) if isAtomPackage(directory) packageDirectories.push(directory) + packageNames.push(child) else nonPackageDirectories.push(directory) @@ -92,6 +94,9 @@ module.exports = (grunt) -> '.pairs' '.travis.yml' ] + + packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) + ignoredPaths = ignoredPaths.map (ignoredPath) -> _.escapeRegExp(ignoredPath) # Add .* to avoid matching hunspell_dictionaries. From 91eb0b3b9ff53aff90d3f63a7e26f62ab3a02320 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:28:39 -0700 Subject: [PATCH 09/28] Remove unneeded atom-keymap ignores --- build/tasks/build-task.coffee | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 2530aab79..43b1b81ee 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -81,9 +81,6 @@ module.exports = (grunt) -> path.join('resources', 'win') # These are only require in dev mode when the grammar isn't precompiled - path.join('atom-keymap', 'node_modules', 'loophole') - path.join('atom-keymap', 'node_modules', 'pegjs') - path.join('atom-keymap', 'node_modules', '.bin', 'pegjs') path.join('snippets', 'node_modules', 'loophole') path.join('snippets', 'node_modules', 'pegjs') path.join('snippets', 'node_modules', '.bin', 'pegjs') From 32a475a5a2453224cd7b33290bc90b6d00524661 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:32:27 -0700 Subject: [PATCH 10/28] Don't compile spec .less/.cson files --- build/Gruntfile.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index c3261ad90..55a465e40 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -128,9 +128,11 @@ module.exports = (grunt) -> coffeeConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.coffee") lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less") + lessConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.less") prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson") + csonConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.cson") pegConfig.glob_to_multiple.src.push("#{directory}/lib/*.pegjs") From e633e5d8de82367ed2cf79f5901b23e0e9c4b343 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:36:37 -0700 Subject: [PATCH 11/28] Remove empty keymaps/menus folders --- build/tasks/compile-packages-slug-task.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/tasks/compile-packages-slug-task.coffee b/build/tasks/compile-packages-slug-task.coffee index 613a4a380..a56ed6e18 100644 --- a/build/tasks/compile-packages-slug-task.coffee +++ b/build/tasks/compile-packages-slug-task.coffee @@ -54,15 +54,19 @@ module.exports = (grunt) -> mainPath = require.resolve(path.resolve(moduleDirectory, metadata.main)) pack.main = path.relative(appDir, mainPath) - for keymapPath in fs.listSync(path.join(moduleDirectory, 'keymaps'), ['.cson', '.json']) + keymapsPath = path.join(moduleDirectory, 'keymaps') + for keymapPath in fs.listSync(keymapsPath, ['.cson', '.json']) relativePath = path.relative(appDir, keymapPath) pack.keymaps[relativePath] = CSON.readFileSync(keymapPath) rm keymapPath + rm keymapsPath if fs.listSync(keymapsPath).length is 0 - for menuPath in fs.listSync(path.join(moduleDirectory, 'menus'), ['.cson', '.json']) + menusPath = path.join(moduleDirectory, 'menus') + for menuPath in fs.listSync(menusPath, ['.cson', '.json']) relativePath = path.relative(appDir, menuPath) pack.menus[relativePath] = CSON.readFileSync(menuPath) rm menuPath + rm menusPath if fs.listSync(menusPath).length is 0 packages[metadata.name] = pack From bc0acf47a3674b371d98202e39a2b97d24d1c9d6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:46:02 -0700 Subject: [PATCH 12/28] Ignore bundle testla from get-parameter-names This should have been a dev dependency --- 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 43b1b81ee..67791af2d 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -63,6 +63,8 @@ module.exports = (grunt) -> path.join('npm', 'node_modules', '.bin', 'clear') path.join('npm', 'node_modules', '.bin', 'starwars') path.join('pegjs', 'examples') + path.join('get-parameter-names', 'node_modules', 'testla') + path.join('get-parameter-names', '.bin', 'testla') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') path.join('jasmine-node', 'spec') From f4b8d88143a128b1087b6f85f18a50fe64af9a90 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:46:18 -0700 Subject: [PATCH 13/28] Don't bundle appveyor.yml files --- 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 67791af2d..af9d26144 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -92,6 +92,7 @@ module.exports = (grunt) -> '.npmignore' '.pairs' '.travis.yml' + 'appveyor.yml' ] packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) From 5703aeff2c3c8b67250f11ee82b1311eb9d92709 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:46:28 -0700 Subject: [PATCH 14/28] Don't bundle .idea folders --- 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 af9d26144..fd9d296f9 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -93,6 +93,7 @@ module.exports = (grunt) -> '.pairs' '.travis.yml' 'appveyor.yml' + '.idea' ] packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) From 592641801c618083d5cf4a4b31921567a4187a48 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:46:42 -0700 Subject: [PATCH 15/28] Add _ prefix/suffix to test folder pattern --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index fd9d296f9..302e53a70 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -126,7 +126,7 @@ module.exports = (grunt) -> ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries') ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})" - testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}te?sts?#{_.escapeRegExp(path.sep)}") + testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}_*te?sts?_*#{_.escapeRegExp(path.sep)}") exampleFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}examples?#{_.escapeRegExp(path.sep)}") benchmarkFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}benchmarks?#{_.escapeRegExp(path.sep)}") From d5f7151096e558272fcd4dfb6429fe0ef8a53a4c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:47:15 -0700 Subject: [PATCH 16/28] Add missing node_modules segment --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 302e53a70..6a9ed7e35 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -64,7 +64,7 @@ module.exports = (grunt) -> path.join('npm', 'node_modules', '.bin', 'starwars') path.join('pegjs', 'examples') path.join('get-parameter-names', 'node_modules', 'testla') - path.join('get-parameter-names', '.bin', 'testla') + path.join('get-parameter-names', 'node_modules', '.bin', 'testla') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') path.join('jasmine-node', 'spec') From 2a8d08db4224025aacb2b7e14e33384f3f0cbe85 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:51:24 -0700 Subject: [PATCH 17/28] Don't bundle config files --- build/tasks/build-task.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 6a9ed7e35..e053678aa 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -94,6 +94,10 @@ module.exports = (grunt) -> '.travis.yml' 'appveyor.yml' '.idea' + '.editorconfig' + '.lint' + '.lintignore' + '.eslintrc' ] packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) From 426a2e5e6b620857b6544daade3f72d94f38f954 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:54:05 -0700 Subject: [PATCH 18/28] Don't bundle .jshintignore files --- 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 e053678aa..066ee3481 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -98,6 +98,7 @@ module.exports = (grunt) -> '.lint' '.lintignore' '.eslintrc' + '.jshintignore' ] packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) From cb47dde7b00a43a1bab40c79fcf8f881bdc11f40 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 13:54:14 -0700 Subject: [PATCH 19/28] Don't bundle .git* 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 066ee3481..0b71a7a36 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -99,6 +99,8 @@ module.exports = (grunt) -> '.lintignore' '.eslintrc' '.jshintignore' + '.gitattributes' + '.gitkeep' ] packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec')) From 175d717d8c6bcbd7143669e70e8a41b6f9d31bc7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 14:08:54 -0700 Subject: [PATCH 20/28] Don't bundle es6-weak-map --- build/tasks/build-task.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 0b71a7a36..a6f74bffd 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -87,6 +87,10 @@ module.exports = (grunt) -> path.join('snippets', 'node_modules', 'pegjs') path.join('snippets', 'node_modules', '.bin', 'pegjs') + # These aren't needed since WeakMap is built-in + path.join('emissary', 'node_modules', 'es6-weak-map') + path.join('property-accessors', 'node_modules', 'es6-weak-map') + '.DS_Store' '.jshintrc' '.npmignore' From 0cd8a300f8322eb0bdaef2885e88727ee783e27b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 14:09:31 -0700 Subject: [PATCH 21/28] Don't bundle spec .less files in cache --- build/Gruntfile.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 55a465e40..14fbd6e5d 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -129,7 +129,10 @@ module.exports = (grunt) -> lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less") lessConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.less") - prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme + + unless theme + prebuildLessConfig.src.push("#{directory}/**/*.less") + prebuildLessConfig.src.push("!#{directory}/spec/**/*.less") csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson") csonConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.cson") From 65cc9486474afa8f9db5cf7d6b6800d573e2d83b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 15:10:27 -0700 Subject: [PATCH 22/28] Don't bundle native source files --- 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 a6f74bffd..0fb967019 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -125,6 +125,7 @@ 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('keyboard-layout', 'src') + path.sep)}.*\\.(cc|h|mm)*" # Ignore build files ignoredPaths.push "#{_.escapeRegExp(path.sep)}binding\\.gyp$" From e4007f7c8f87ee4110cc1eb40c2081c1f1bc2ba2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 15:28:26 -0700 Subject: [PATCH 23/28] Precompile spec/ CoffeeScript files --- build/Gruntfile.coffee | 2 ++ build/tasks/build-task.coffee | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 14fbd6e5d..b48c7a773 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -69,6 +69,8 @@ module.exports = (grunt) -> expand: true src: [ 'src/**/*.coffee' + 'spec/*.coffee' + '!spec/*-spec.coffee' 'exports/**/*.coffee' 'static/**/*.coffee' ] diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 0fb967019..343960f61 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -162,7 +162,6 @@ module.exports = (grunt) -> for directory in packageDirectories cp directory, path.join(appDir, directory), filter: filterPackage - cp 'spec', path.join(appDir, 'spec'), filter: /fixtures|integration|.+-spec\.coffee/ cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/ cp 'static', path.join(appDir, 'static') From dfc30830ffce970ca829a68860761f191b230c95 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 16:23:41 -0700 Subject: [PATCH 24/28] Recurse into .asar files --- build/tasks/output-build-filetypes.coffee | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build/tasks/output-build-filetypes.coffee b/build/tasks/output-build-filetypes.coffee index 64b952bbe..9d51ca30c 100644 --- a/build/tasks/output-build-filetypes.coffee +++ b/build/tasks/output-build-filetypes.coffee @@ -1,3 +1,4 @@ +asar = require 'asar' path = require 'path' module.exports = (grunt) -> @@ -5,11 +6,19 @@ module.exports = (grunt) -> shellAppDir = grunt.config.get('atom.shellAppDir') types = {} - grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) -> - extension = path.extname(fileName) or fileName + registerFile = (filePath) -> + extension = path.extname(filePath) or path.basename(filePath) types[extension] ?= 0 types[extension]++ + if extension is '.asar' + asar.listPackage(filePath).forEach (archivePath) -> + archivePath = archivePath.substring(1) + unless asar.statFile(filePath, archivePath, true).files + registerFile(archivePath) + + grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) -> registerFile(absolutePath) + extensions = Object.keys(types).sort (extension1, extension2) -> diff = types[extension2] - types[extension1] if diff is 0 From 2d575808817782a71a75f71949a12e894e5b5dc8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 16:31:28 -0700 Subject: [PATCH 25/28] Add --extension option to log out all found paths --- build/tasks/output-build-filetypes.coffee | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build/tasks/output-build-filetypes.coffee b/build/tasks/output-build-filetypes.coffee index 9d51ca30c..2d7b292f6 100644 --- a/build/tasks/output-build-filetypes.coffee +++ b/build/tasks/output-build-filetypes.coffee @@ -8,8 +8,8 @@ module.exports = (grunt) -> types = {} registerFile = (filePath) -> extension = path.extname(filePath) or path.basename(filePath) - types[extension] ?= 0 - types[extension]++ + types[extension] ?= [] + types[extension].push(filePath) if extension is '.asar' asar.listPackage(filePath).forEach (archivePath) -> @@ -20,11 +20,15 @@ module.exports = (grunt) -> grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) -> registerFile(absolutePath) extensions = Object.keys(types).sort (extension1, extension2) -> - diff = types[extension2] - types[extension1] + diff = types[extension2].length - types[extension1].length if diff is 0 extension1.toLowerCase().localeCompare(extension2.toLowerCase()) else diff - extensions.forEach (extension) -> - grunt.log.error "#{extension}: #{types[extension]}" + if extension = grunt.option('extension') + types[extension]?.sort().forEach (filePath) -> + console.log filePath + else + extensions.forEach (extension) -> + grunt.log.error "#{extension}: #{types[extension].length}" From ab9a6c12b34eae94434134ba8869c364bc0b9607 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 16:34:55 -0700 Subject: [PATCH 26/28] Only log out top 25 file types --- build/tasks/output-build-filetypes.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tasks/output-build-filetypes.coffee b/build/tasks/output-build-filetypes.coffee index 2d7b292f6..1b8aeb330 100644 --- a/build/tasks/output-build-filetypes.coffee +++ b/build/tasks/output-build-filetypes.coffee @@ -28,7 +28,7 @@ module.exports = (grunt) -> if extension = grunt.option('extension') types[extension]?.sort().forEach (filePath) -> - console.log filePath + grunt.log.error filePath else - extensions.forEach (extension) -> + extensions[0...25].forEach (extension) -> grunt.log.error "#{extension}: #{types[extension].length}" From 1cc5c83af7ad3a5579bcbafc7981910b46cf082a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 20 Apr 2015 17:56:17 -0700 Subject: [PATCH 27/28] :arrow_up: notifications@0.39 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d7f070ba..29be99f96 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "link": "0.30.0", "markdown-preview": "0.148.0", "metrics": "0.45.0", - "notifications": "0.38.0", + "notifications": "0.39.0", "open-on-github": "0.36.0", "package-generator": "0.38.0", "release-notes": "0.52.0", From 4fb59af3cc5205de3f3a20416d83d102dcfe1cb1 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 20 Apr 2015 18:33:51 -0700 Subject: [PATCH 28/28] Add fallback syntax var for attributes --- static/variables/syntax-variables.less | 1 + 1 file changed, 1 insertion(+) diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less index f569773e8..608943cf4 100644 --- a/static/variables/syntax-variables.less +++ b/static/variables/syntax-variables.less @@ -39,5 +39,6 @@ @syntax-color-class: #E5C17C; @syntax-color-keyword: #555; @syntax-color-tag: #555; +@syntax-color-attribute: #87400d; @syntax-color-import: #97C378; @syntax-color-snippet: #97C378;