Merge branch 'master' into ns-empty-panes

Conflicts:
	package.json
This commit is contained in:
Nathan Sobo 2014-01-16 10:21:59 -07:00
commit 649f0ac246
15 changed files with 77 additions and 52 deletions

View File

@ -2,6 +2,10 @@ fs = require 'fs'
path = require 'path'
os = require 'os'
# Add support for obselete APIs of vm module so we can make some third-party
# modules work under node v0.11.x.
require 'vm-compatibility-layer'
fm = require 'json-front-matter'
_ = require 'underscore-plus'

View File

@ -7,7 +7,7 @@
},
"dependencies": {
"biscotto": "0.0.17",
"first-mate": "~0.10.0",
"first-mate": "~0.13.0",
"formidable": "~1.0.14",
"github-releases": "~0.2.0",
"grunt": "~0.4.1",
@ -28,6 +28,7 @@
"request": "~2.27.0",
"rimraf": "~2.2.2",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0",
"walkdir": "0.0.7",
"grunt-peg": "~1.1.0"
}

View File

@ -39,19 +39,27 @@ module.exports = (grunt) ->
else
nonPackageDirectories.push(directory)
# Put any paths here that shouldn't end up in the built Atom.app
# so that it doesn't becomes larger than it needs to be.
ignoredPaths = [
path.join('git-utils', 'deps')
path.join('oniguruma', 'deps')
path.join('less', 'dist')
path.join('less', 'test')
path.join('bootstrap', 'docs')
path.join('spellchecker', 'vendor')
path.join('xmldom', 'test')
path.join('vendor', 'apm')
path.join('resources', 'mac')
path.join('resources', 'win')
]
ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})"
nodeModulesFilter = new RegExp(ignoredPaths.join('|'))
packageFilter = new RegExp("(#{ignoredPaths.join('|')})|(.+\\.(cson|coffee)$)")
for directory in nonPackageDirectories
cp directory, path.join(appDir, directory), filter: nodeModulesFilter
for directory in packageDirectories
cp directory, path.join(appDir, directory), filter: /.+\.(cson|coffee)$/
cp directory, path.join(appDir, directory), filter: packageFilter
cp 'spec', path.join(appDir, 'spec')
cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/

View File

@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.46.0",
"version": "0.47.0",
"main": "./src/browser/main.js",
"repository": {
"type": "git",
@ -16,10 +16,10 @@
"url": "http://github.com/atom/atom/raw/master/LICENSE.md"
}
],
"atomShellVersion": "0.7.6",
"atomShellVersion": "0.8.5",
"dependencies": {
"async": "0.2.6",
"bootstrap": "git://github.com/benogle/bootstrap.git",
"bootstrap": "git://github.com/atom/bootstrap.git#6af81906189f1747fd6c93479e3d998ebe041372",
"clear-cut": "0.2.0",
"coffee-script": "1.6.3",
"coffeestack": "0.6.0",
@ -28,29 +28,28 @@
"fs-plus": "0.14.0",
"fstream": "0.1.24",
"fuzzaldrin": "0.6.0",
"git-utils": "0.29.0",
"git-utils": "0.33.1",
"guid": "0.0.10",
"jasmine-focused": "~0.15.0",
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
"jasmine-tagged": "0.2.0",
"jasmine-tagged": "0.3.0",
"mkdirp": "0.3.5",
"keytar": "0.13.0",
"keytar": "0.15.1",
"less-cache": "0.10.0",
"serializable": "0.3.0",
"nslog": "0.1.0",
"oniguruma": "0.24.0",
"nslog": "0.3.0",
"oniguruma": "0.26.0",
"optimist": "0.4.0",
"pathwatcher": "0.11.0",
"pathwatcher": "0.14.2",
"pegjs": "0.8.0",
"q": "0.9.7",
"scandal": "0.11.0",
"scandal": "0.13.0",
"season": "0.14.0",
"semver": "1.1.4",
"space-pen": "3.1.0",
"temp": "0.5.0",
"text-buffer": "0.13.0",
"underscore-plus": "0.6.1",
"theorist": "~0.13.0",
"vm-compatibility-layer": "0.1.0",
"theorist": "~0.14.0",
"delegato": "~0.4.0",
"mixto": "~0.4.0",
"property-accessors": "~0.1.0"
@ -69,34 +68,34 @@
"autosave": "0.10.0",
"background-tips": "0.4.0",
"bookmarks": "0.16.0",
"bracket-matcher": "0.18.0",
"command-logger": "0.8.0",
"bracket-matcher": "0.19.0",
"command-logger": "0.9.0",
"command-palette": "0.14.0",
"dev-live-reload": "0.22.0",
"editor-stats": "0.12.0",
"exception-reporting": "0.11.0",
"feedback": "0.22.0",
"find-and-replace": "0.75.0",
"find-and-replace": "0.76.0",
"fuzzy-finder": "0.31.0",
"gists": "0.15.0",
"git-diff": "0.22.0",
"github-sign-in": "0.15.0",
"github-sign-in": "0.16.0",
"go-to-line": "0.15.0",
"grammar-selector": "0.17.0",
"image-view": "0.14.0",
"image-view": "0.15.0",
"keybinding-resolver": "0.8.0",
"markdown-preview": "0.25.0",
"markdown-preview": "0.25.1",
"metrics": "0.21.0",
"package-generator": "0.24.0",
"release-notes": "0.15.0",
"settings-view": "0.56.0",
"release-notes": "0.15.1",
"settings-view": "0.56.1",
"snippets": "0.19.0",
"spell-check": "0.20.0",
"status-bar": "0.32.0",
"styleguide": "0.19.0",
"symbols-view": "0.29.0",
"tabs": "0.17.0",
"terminal": "0.23.0",
"terminal": "0.24.0",
"timecop": "0.13.0",
"to-the-hubs": "0.17.0",
"tree-view": "0.61.0",
@ -122,12 +121,12 @@
"language-objective-c": "0.2.0",
"language-pegjs": "0.1.0",
"language-perl": "0.2.0",
"language-php": "0.2.0",
"language-php": "0.3.0",
"language-property-list": "0.2.0",
"language-puppet": "0.2.0",
"language-python": "0.2.0",
"language-ruby": "0.6.0",
"language-ruby-on-rails": "0.3.0",
"language-ruby": "0.7.0",
"language-ruby-on-rails": "0.4.0",
"language-sass": "0.3.0",
"language-shellscript": "0.2.0",
"language-source": "0.2.0",

View File

@ -31,6 +31,7 @@ if (!fs.existsSync(path.join(apmInstallPath, 'node_modules')))
fs.mkdirSync(path.join(apmInstallPath, 'node_modules'));
var apmFlags = process.env.JANKY_SHA1 || process.argv.indexOf('--no-color') !== -1 ? '--no-color' : '';
var packagesToDedupe = ['nan', 'oniguruma', 'roaster'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var commands = [
'git submodule --quiet sync',
@ -43,6 +44,7 @@ var commands = [
echoNewLine,
'node apm/node_modules/atom-package-manager/bin/apm clean ' + apmFlags,
'node apm/node_modules/atom-package-manager/bin/apm install --quiet ' + apmFlags,
'node apm/node_modules/atom-package-manager/bin/apm dedupe --quiet ' + apmFlags + ' ' + packagesToDedupe.join(' '),
];
process.chdir(path.dirname(__dirname));

View File

@ -73,7 +73,7 @@ describe 'File', ->
fs.moveSync(filePath, newPath)
waitsFor "move event", ->
waitsFor "move event", 30000, ->
moveHandler.callCount > 0
runs ->

View File

@ -187,6 +187,7 @@ describe "Git", ->
newPath = atom.project.resolve('git/working-dir/untracked.txt')
cleanPath = atom.project.resolve('git/working-dir/other.txt')
fs.writeFileSync(newPath, '')
newPath = fs.absolute newPath # specs could be running under symbol path.
afterEach ->
fs.writeFileSync(modifiedPath, originalModifiedPathText)

View File

@ -4,8 +4,7 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
{$, $$} = require 'atom'
window[key] = value for key, value of require '../vendor/jasmine'
require 'jasmine-focused'
require 'jasmine-tagged'
{TerminalReporter} = require 'jasmine-tagged'
TimeReporter = require './time-reporter'
timeReporter = new TimeReporter()
@ -18,8 +17,7 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
process.stderr.write(str)
if atom.getLoadSettings().exitWhenDone
{jasmineNode} = require 'jasmine-node/lib/jasmine-node/reporter'
reporter = new jasmineNode.TerminalReporter
reporter = new TerminalReporter
print: (str) ->
log(str)
onComplete: (runner) ->

View File

@ -38,8 +38,8 @@ describe "ThemeManager", ->
# syntax theme is not a dir at this time, so only two.
expect(paths.length).toBe 2
expect(paths[0]).toContain 'atom-dark-ui'
expect(paths[1]).toContain 'atom-light-ui'
expect(paths[0]).toContain 'atom-light-ui'
expect(paths[1]).toContain 'atom-dark-ui'
it "ignores themes that cannot be resolved to a directory", ->
atom.config.set('core.themes', ['definitely-not-a-theme'])

View File

@ -4,6 +4,7 @@ keytar = require 'keytar'
os = require 'os'
path = require 'path'
remote = require 'remote'
screen = require 'screen'
shell = require 'shell'
dialog = remote.require 'dialog'
app = remote.require 'app'
@ -207,10 +208,11 @@ class Atom extends Model
# Private:
restoreWindowDimensions: ->
workAreaSize = screen.getPrimaryDisplay().workAreaSize
windowDimensions = @state.windowDimensions ? {}
{initialSize} = @getLoadSettings()
windowDimensions.height ?= initialSize?.height ? global.screen.availHeight
windowDimensions.width ?= initialSize?.width ? Math.min(global.screen.availWidth, 1024)
windowDimensions.height ?= initialSize?.height ? workAreaSize.height
windowDimensions.width ?= initialSize?.width ? Math.min(workAreaSize.width, 1024)
@setWindowDimensions(windowDimensions)
# Private:

View File

@ -2,7 +2,6 @@ global.shellStartTime = Date.now()
autoUpdater = require 'auto-updater'
crashReporter = require 'crash-reporter'
delegate = require 'atom-delegate'
app = require 'app'
fs = require 'fs'
module = require 'module'
@ -24,7 +23,7 @@ process.on 'uncaughtException', (error={}) ->
nslog(error.message) if error.message?
nslog(error.stack) if error.stack?
delegate.browserMainParts.preMainMessageLoopRun = ->
start = ->
args = parseCommandLine()
addPathToOpen = (event, pathToOpen) ->
@ -122,3 +121,5 @@ parseCommandLine = ->
resourcePath = path.dirname(path.dirname(__dirname))
{resourcePath, pathsToOpen, executedFrom, test, version, pidToKillWhenClosed, devMode, newWindow, specDirectory, logFile}
start()

View File

@ -128,9 +128,9 @@ class EditorView extends View
'core:delete': => @editor.delete()
'core:undo': => @editor.undo()
'core:redo': => @editor.redo()
'core:cut': => @editor.cutSelection()
'core:copy': => @editor.copySelection()
'core:paste': => @editor.paste()
'core:cut': => @editor.cutSelectedText()
'core:copy': => @editor.copySelectedText()
'core:paste': => @editor.pasteText()
'editor:move-to-previous-word': => @editor.moveCursorToPreviousWord()
'editor:select-word': => @editor.selectWord()
'editor:consolidate-selections': (event) => @consolidateSelections(event)
@ -668,7 +668,7 @@ class EditorView extends View
#
# fontSize - A {Number} indicating the font size in pixels.
setFontSize: (fontSize) ->
@css('font-size', "#{fontSize}px}")
@css('font-size', "#{fontSize}px")
@clearCharacterWidthCache()

View File

@ -42,19 +42,26 @@ class ThemeManager
# Internal-only: adhere to the PackageActivator interface
activatePackages: (themePackages) -> @activateThemes()
# Private: Get the enabled theme names from the config.
#
# Returns an array of theme names in the order that they should be activated.
getEnabledThemeNames: ->
themeNames = atom.config.get('core.themes') ? []
themeNames = [themeNames] unless _.isArray(themeNames)
# Reverse so the first (top) theme is loaded after the others. We want
# the first/top theme to override later themes in the stack.
themeNames.reverse()
# Internal-only:
activateThemes: ->
# atom.config.observe runs the callback once, then on subsequent changes.
atom.config.observe 'core.themes', (themeNames) =>
atom.config.observe 'core.themes', =>
@deactivateThemes()
themeNames = [themeNames] unless _.isArray(themeNames)
# Reverse so the first (top) theme is loaded after the others. We want
# the first/top theme to override later themes in the stack.
themeNames = _.clone(themeNames).reverse()
@refreshLessCache() # Update cache for packages in core.themes config
@packageManager.activatePackage(themeName) for themeName in themeNames
for themeName in @getEnabledThemeNames()
@packageManager.activatePackage(themeName)
@refreshLessCache() # Update cache again now that @getActiveThemes() is populated
@loadUserStylesheet()
@ -85,7 +92,7 @@ class ThemeManager
themePaths = (theme.getStylesheetsPath() for theme in activeThemes when theme)
else
themePaths = []
for themeName in atom.config.get('core.themes') ? []
for themeName in @getEnabledThemeNames()
if themePath = @packageManager.resolvePackagePath(themeName)
themePaths.push(path.join(themePath, AtomPackage.stylesheetsDir))

View File

@ -5,10 +5,12 @@
<script>
window.onload = function() {
var path = require('path');
var currentWindow = require('remote').getCurrentWindow();
try {
require('vm-compatibility-layer');
require('coffee-script');
require('../src/coffee-cache').register();
require(path.resolve(__dirname, '..', 'src', 'coffee-cache')).register();
require(currentWindow.loadSettings.bootstrapScript);
currentWindow.emit('window:loaded');
}

2
vendor/apm vendored

@ -1 +1 @@
Subproject commit 9343bd248c08ed25a1018236a162b4aeeac5cf1d
Subproject commit b843d54a8ac495231efd680ab3648dfd9247896c