diff --git a/build/deprecated-packages.json b/build/deprecated-packages.json index ac980e165..4a8b53442 100644 --- a/build/deprecated-packages.json +++ b/build/deprecated-packages.json @@ -83,6 +83,10 @@ "hasDeprecations": true, "latestHasDeprecations": false }, + "atom-eslint": { + "hasAlternative": true, + "alternative": "linter" + }, "atom-faker": { "version": "<=0.2.0", "hasDeprecations": true, @@ -92,6 +96,10 @@ "hasAlternative": true, "alternative": "linter" }, + "atom-go-format": { + "hasAlternative": true, + "alternative": "go-plus" + }, "atom-grunt-configs": { "version": "<=0.1.0", "hasDeprecations": true, @@ -238,7 +246,7 @@ }, "autocomplete-jedi": { "hasAlternative": true, - "alternative": "autocomplete-plus-python-jedi" + "alternative": "autocomplete-python" }, "autocomplete-paths": { "version": "<=1.0.1", @@ -260,6 +268,10 @@ "hasDeprecations": true, "latestHasDeprecations": true }, + "autocomplete-plus-python-jedi": { + "hasAlternative": true, + "alternative": "autocomplete-python" + }, "autocomplete-snippets": { "version": "<=1.0.0", "hasDeprecations": true, @@ -702,9 +714,8 @@ "latestHasDeprecations": true }, "highlight-css-color": { - "version": "<=1.3.0", - "hasDeprecations": true, - "latestHasDeprecations": true + "hasAlternative": true, + "alternative": "pigments" }, "highlight-line": { "version": "<=0.9.3", @@ -996,9 +1007,8 @@ "latestHasDeprecations": true }, "max-tabs": { - "version": "<=0.3.0", - "hasDeprecations": true, - "latestHasDeprecations": true + "hasAlternative": true, + "alternative": "tidy-tabs" }, "maximize-panes": { "version": "<=0.1.0", @@ -1045,6 +1055,10 @@ "hasDeprecations": true, "latestHasDeprecations": false }, + "nbsp-detect": { + "hasAlternative": true, + "alternative": "core" + }, "node-debugger": { "version": "<=0.2.3", "hasDeprecations": true, @@ -1257,6 +1271,10 @@ "hasDeprecations": true, "latestHasDeprecations": true }, + "remember-session": { + "hasAlternative": true, + "alternative": "core" + }, "remote-atom": { "version": "<=1.2.0", "hasDeprecations": true, @@ -1500,6 +1518,10 @@ "hasDeprecations": true, "latestHasDeprecations": false }, + "ternjs": { + "hasAlternative": true, + "alternative": "atom-ternjs" + }, "test-status": { "version": "<=0.27.1", "hasDeprecations": true, diff --git a/build/package.json b/build/package.json index 4960d6571..deb53bf2a 100644 --- a/build/package.json +++ b/build/package.json @@ -22,7 +22,7 @@ "grunt-contrib-less": "~0.8.0", "grunt-cson": "0.16.0", "grunt-download-electron": "^2.1.1", - "grunt-electron-installer": "1.0.3", + "grunt-electron-installer": "1.0.4", "grunt-lesslint": "0.17.0", "grunt-peg": "~1.1.0", "grunt-shell": "~0.3.1", diff --git a/package.json b/package.json index f04062e0a..e7792571e 100644 --- a/package.json +++ b/package.json @@ -62,10 +62,10 @@ "atom-light-ui": "0.43.0", "base16-tomorrow-dark-theme": "1.0.0", "base16-tomorrow-light-theme": "1.0.0", - "one-dark-ui": "1.1.4", + "one-dark-ui": "1.1.5", "one-dark-syntax": "1.1.1", "one-light-syntax": "1.1.1", - "one-light-ui": "1.1.4", + "one-light-ui": "1.1.5", "solarized-dark-syntax": "0.38.1", "solarized-light-syntax": "0.22.1", "about": "1.1.0", @@ -73,7 +73,7 @@ "autocomplete-atom-api": "0.9.2", "autocomplete-css": "0.11.0", "autocomplete-html": "0.7.2", - "autocomplete-plus": "2.20.0", + "autocomplete-plus": "2.21.0", "autocomplete-snippets": "1.7.1", "autoflow": "0.25.0", "autosave": "0.22.0", @@ -85,7 +85,7 @@ "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", - "find-and-replace": "0.183.0", + "find-and-replace": "0.185.0", "fuzzy-finder": "0.90.0", "git-diff": "0.56.0", "go-to-line": "0.30.0", @@ -113,7 +113,7 @@ "update-package-dependencies": "0.10.0", "welcome": "0.30.0", "whitespace": "0.31.0", - "wrap-guide": "0.37.0", + "wrap-guide": "0.38.0", "language-c": "0.48.0", "language-clojure": "0.17.0", "language-coffee-script": "0.42.0", @@ -126,10 +126,10 @@ "language-hyperlink": "0.14.0", "language-java": "0.16.0", "language-javascript": "0.96.0", - "language-json": "0.16.0", + "language-json": "0.17.0", "language-less": "0.28.2", "language-make": "0.18.0", - "language-mustache": "0.12.0", + "language-mustache": "0.13.0", "language-objective-c": "0.15.0", "language-perl": "0.29.0", "language-php": "0.30.0", diff --git a/spec/git-repository-provider-spec.coffee b/spec/git-repository-provider-spec.coffee index 15e1dcc60..13a0724d6 100644 --- a/spec/git-repository-provider-spec.coffee +++ b/spec/git-repository-provider-spec.coffee @@ -11,7 +11,7 @@ describe "GitRepositoryProvider", -> it "returns a Promise that resolves to a GitRepository", -> waitsForPromise -> provider = new GitRepositoryProvider atom.project - directory = new Directory path.join(__dirname, 'fixtures/git/master.git') + directory = new Directory path.join(__dirname, 'fixtures', 'git', 'master.git') provider.repositoryForDirectory(directory).then (result) -> expect(result).toBeInstanceOf GitRepository expect(provider.pathToRepository[result.getPath()]).toBeTruthy() @@ -24,11 +24,11 @@ describe "GitRepositoryProvider", -> secondRepo = null waitsForPromise -> - directory = new Directory path.join(__dirname, 'fixtures/git/master.git') + directory = new Directory path.join(__dirname, 'fixtures', 'git', 'master.git') provider.repositoryForDirectory(directory).then (result) -> firstRepo = result waitsForPromise -> - directory = new Directory path.join(__dirname, 'fixtures/git/master.git/objects') + directory = new Directory path.join(__dirname, 'fixtures', 'git', 'master.git', 'objects') provider.repositoryForDirectory(directory).then (result) -> secondRepo = result runs -> @@ -56,6 +56,21 @@ describe "GitRepositoryProvider", -> provider.repositoryForDirectory(directory).then (result) -> expect(result).toBe null + describe "when specified a Directory with a valid gitfile-linked repository", -> + it "returns a Promise that resolves to a GitRepository", -> + waitsForPromise -> + provider = new GitRepositoryProvider atom.project + gitDirPath = path.join(__dirname, 'fixtures', 'git', 'master.git') + workDirPath = temp.mkdirSync('git-workdir') + fs.writeFileSync(path.join(workDirPath, '.git'), 'gitdir: ' + gitDirPath+'\n') + + directory = new Directory workDirPath + provider.repositoryForDirectory(directory).then (result) -> + expect(result).toBeInstanceOf GitRepository + expect(provider.pathToRepository[result.getPath()]).toBeTruthy() + expect(result.statusTask).toBeTruthy() + expect(result.getType()).toBe 'git' + describe "when specified a Directory without existsSync()", -> directory = null provider = null diff --git a/src/browser/squirrel-update.coffee b/src/browser/squirrel-update.coffee index be90e6cd6..0e4743a21 100644 --- a/src/browser/squirrel-update.coffee +++ b/src/browser/squirrel-update.coffee @@ -67,9 +67,9 @@ installContextMenu = (callback) -> installMenu = (keyPath, arg, callback) -> args = [keyPath, '/ve', '/d', 'Open with Atom'] addToRegistry args, -> - args = [keyPath, '/v', 'Icon', '/d', process.execPath] + args = [keyPath, '/v', 'Icon', '/d', "\"#{process.execPath}\""] addToRegistry args, -> - args = ["#{keyPath}\\command", '/ve', '/d', "#{process.execPath} \"#{arg}\""] + args = ["#{keyPath}\\command", '/ve', '/d', "\"#{process.execPath}\" \"#{arg}\""] addToRegistry(args, callback) installMenu fileKeyPath, '%1', -> diff --git a/src/git-repository-provider.coffee b/src/git-repository-provider.coffee index 850d30f22..3b4df5d2b 100644 --- a/src/git-repository-provider.coffee +++ b/src/git-repository-provider.coffee @@ -1,6 +1,17 @@ fs = require 'fs' +{Directory} = require 'pathwatcher' GitRepository = require './git-repository' +# Returns the .gitdir path in the agnostic Git symlink .git file given, or +# null if the path is not a valid gitfile. +# +# * `gitFile` {String} path of gitfile to parse +gitFileRegex = RegExp "^gitdir: (.+)" +pathFromGitFile = (gitFile) -> + try + gitFileBuff = fs.readFileSync(gitFile, 'utf8') + return gitFileBuff?.match(gitFileRegex)[1] + # Checks whether a valid `.git` directory is contained within the given # directory or one of its ancestors. If so, a Directory that corresponds to the # `.git` folder will be returned. Otherwise, returns `null`. @@ -11,6 +22,9 @@ findGitDirectorySync = (directory) -> # can return cached values rather than always returning new objects: # getParent(), getFile(), getSubdirectory(). gitDir = directory.getSubdirectory('.git') + gitDirPath = pathFromGitFile(gitDir.getPath?()) + if gitDirPath + gitDir = new Directory(directory.resolve(gitDirPath)) if gitDir.existsSync?() and isValidGitDirectorySync gitDir gitDir else if directory.isRoot() diff --git a/src/gutter.coffee b/src/gutter.coffee index 4f09a27f2..8418823bf 100644 --- a/src/gutter.coffee +++ b/src/gutter.coffee @@ -78,14 +78,11 @@ class Gutter # ## Arguments # # * `marker` A {Marker} you want this decoration to follow. - # * `decorationParams` An {Object} representing the decoration - # * `class` This CSS class will be applied to the decorated line number. - # * `onlyHead` (optional) If `true`, the decoration will only be applied to - # the head of the marker. - # * `onlyEmpty` (optional) If `true`, the decoration will only be applied if - # the associated marker is empty. - # * `onlyNonEmpty` (optional) If `true`, the decoration will only be applied - # if the associated marker is non-empty. + # * `decorationParams` An {Object} representing the decoration. It is passed + # to {TextEditor::decorateMarker} as its `decorationParams` and so supports + # all options documented there. + # * `type` __Caveat__: set to `'line-number'` if this is the line-number + # gutter, `'gutter'` otherwise. This cannot be overridden. # # Returns a {Decoration} object decorateMarker: (marker, options) -> diff --git a/src/text-editor.coffee b/src/text-editor.coffee index f2763f4e2..4d517ac99 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -1258,7 +1258,7 @@ class TextEditor extends Model # is invalidated, or is destroyed, the decoration will be updated to reflect # the marker's state. # - # There are three types of supported decorations: + # The following are the supported decorations types: # # * __line__: Adds your CSS `class` to the line nodes within the range # marked by the marker @@ -1274,36 +1274,46 @@ class TextEditor extends Model #
# # ``` + # * __overlay__: Positions the view associated with the given item at the head + # or tail of the given `Marker`. + # * __gutter__: A decoration that tracks a {Marker} in a {Gutter}. Gutter + # decorations are created by calling {Gutter::decorateMarker} on the + # desired `Gutter` instance. # # ## Arguments # # * `marker` A {Marker} you want this decoration to follow. # * `decorationParams` An {Object} representing the decoration e.g. # `{type: 'line-number', class: 'linter-error'}` - # * `type` There are a few supported decoration types: `line-number`, `line`, - # `highlight`, and `overlay`. The behavior of the types are as follows: - # * `line-number` Adds the given `class` to the line numbers overlapping the - # rows spanned by the marker. + # * `type` There are several supported decoration types. The behavior of the + # types are as follows: # * `line` Adds the given `class` to the lines overlapping the rows - # spanned by the marker. + # spanned by the `Marker`. + # * `line-number` Adds the given `class` to the line numbers overlapping + # the rows spanned by the `Marker`. # * `highlight` Creates a `.highlight` div with the nested class with up - # to 3 nested regions that fill the area spanned by the marker. + # to 3 nested regions that fill the area spanned by the `Marker`. # * `overlay` Positions the view associated with the given item at the - # head or tail of the given marker, depending on the `position` + # head or tail of the given `Marker`, depending on the `position` # property. + # * `gutter` Tracks a {Marker} in a {Gutter}. Created by calling + # {Gutter::decorateMarker} on the desired `Gutter` instance. # * `class` This CSS class will be applied to the decorated line number, # line, highlight, or overlay. + # * `item` (optional) An {HTMLElement} or a model {Object} with a + # corresponding view registered. Only applicable to the `gutter` and + # `overlay` types. # * `onlyHead` (optional) If `true`, the decoration will only be applied to - # the head of the marker. Only applicable to the `line` and `line-number` - # types. - # * `onlyEmpty` (optional) If `true`, the decoration will only be applied if - # the associated marker is empty. Only applicable to the `line` and + # the head of the `Marker`. Only applicable to the `line` and # `line-number` types. + # * `onlyEmpty` (optional) If `true`, the decoration will only be applied if + # the associated `Marker` is empty. Only applicable to the `gutter`, + # `line`, and `line-number` types. # * `onlyNonEmpty` (optional) If `true`, the decoration will only be applied - # if the associated marker is non-empty. Only applicable to the `line` - # and `line-number` types. + # if the associated `Marker` is non-empty. Only applicable to the + # `gutter`, `line`, and `line-number` types. # * `position` (optional) Only applicable to decorations of type `overlay`, - # controls where the overlay view is positioned relative to the marker. + # controls where the overlay view is positioned relative to the `Marker`. # Values can be `'head'` (the default), or `'tail'`. # # Returns a {Decoration} object diff --git a/src/window-event-handler.coffee b/src/window-event-handler.coffee index 666a153ac..270650b2f 100644 --- a/src/window-event-handler.coffee +++ b/src/window-event-handler.coffee @@ -76,11 +76,11 @@ class WindowEventHandler atom.keymaps.handleKeyboardEvent(event) event.stopImmediatePropagation() - handleDrop: (evenDocumentt) -> + handleDrop: (event) -> event.preventDefault() event.stopPropagation() - handleDragover: (Documentevent) -> + handleDragover: (event) -> event.preventDefault() event.stopPropagation() event.dataTransfer.dropEffect = 'none'