mirror of
https://github.com/atom/atom.git
synced 2026-02-03 03:05:05 -05:00
Merge remote-tracking branch 'refs/remotes/origin/master' into wl-electron-35
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015 GitHub Inc.
|
||||
Copyright (c) 2016 GitHub Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"less-cache": "0.22",
|
||||
"line-top-index": "0.2.0",
|
||||
"marked": "^0.3.4",
|
||||
"nodegit": "0.7.0",
|
||||
"nodegit": "0.8.0",
|
||||
"normalize-package-data": "^2.0.0",
|
||||
"nslog": "^3",
|
||||
"oniguruma": "^5",
|
||||
@@ -128,7 +128,7 @@
|
||||
"language-html": "0.44.0",
|
||||
"language-hyperlink": "0.16.0",
|
||||
"language-java": "0.17.0",
|
||||
"language-javascript": "0.105.0",
|
||||
"language-javascript": "0.106.0",
|
||||
"language-json": "0.17.3",
|
||||
"language-less": "0.29.0",
|
||||
"language-make": "0.21.0",
|
||||
|
||||
@@ -89,6 +89,12 @@ function bootstrap() {
|
||||
// proper binaries.
|
||||
var electronVersion = require('../package.json').electronVersion;
|
||||
moduleInstallEnv.npm_config_target = electronVersion;
|
||||
|
||||
// Force 32-bit modules on Windows.
|
||||
// /cc https://github.com/atom/atom/issues/10450
|
||||
if (process.platform === 'win32') {
|
||||
moduleInstallEnv.npm_config_target_arch = 'ia32';
|
||||
}
|
||||
var moduleInstallOptions = {env: moduleInstallEnv};
|
||||
|
||||
if (process.argv.indexOf('--no-quiet') === -1) {
|
||||
@@ -102,7 +108,7 @@ function bootstrap() {
|
||||
|
||||
// apm ships with 32-bit node so make sure its native modules are compiled
|
||||
// for a 32-bit target architecture
|
||||
if (process.platform === 'win32')
|
||||
if (process.env.JANKY_SHA1 && process.platform === 'win32')
|
||||
apmInstallCommand += ' --arch=ia32';
|
||||
|
||||
var commands = [
|
||||
|
||||
@@ -230,11 +230,13 @@ describe('GitRepositoryAsync', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('.checkoutHeadForEditor(editor)', () => {
|
||||
// @joshaber: Disabling for now. There seems to be some race with path
|
||||
// subscriptions leading to intermittent test failures, e.g.: https://travis-ci.org/atom/atom/jobs/102702554
|
||||
xdescribe('.checkoutHeadForEditor(editor)', () => {
|
||||
let filePath
|
||||
let editor
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
spyOn(atom, 'confirm')
|
||||
|
||||
const workingDirPath = copyRepository()
|
||||
@@ -242,12 +244,7 @@ describe('GitRepositoryAsync', () => {
|
||||
filePath = path.join(workingDirPath, 'a.txt')
|
||||
fs.writeFileSync(filePath, 'ch ch changes')
|
||||
|
||||
waitsForPromise(() => atom.workspace.open(filePath))
|
||||
runs(() => editor = atom.workspace.getActiveTextEditor())
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
editor = null
|
||||
editor = await atom.workspace.open(filePath)
|
||||
})
|
||||
|
||||
it('displays a confirmation dialog by default', async () => {
|
||||
|
||||
@@ -37,7 +37,7 @@ class DefaultDirectoryProvider
|
||||
# * `uri` {String} The path to the directory to add. This is guaranteed not to
|
||||
# be contained by a {Directory} in `atom.project`.
|
||||
#
|
||||
# Returns a Promise that resolves to:
|
||||
# Returns a {Promise} that resolves to:
|
||||
# * {Directory} if the given URI is compatible with this provider.
|
||||
# * `null` if the given URI is not compatibile with this provider.
|
||||
directoryForURI: (uri) ->
|
||||
|
||||
@@ -32,6 +32,8 @@ export default class GitRepositoryAsync {
|
||||
}
|
||||
|
||||
constructor (_path, options = {}) {
|
||||
Git.enableThreadSafety()
|
||||
|
||||
this.emitter = new Emitter()
|
||||
this.subscriptions = new CompositeDisposable()
|
||||
this.pathStatusCache = {}
|
||||
|
||||
@@ -329,7 +329,7 @@ class Project extends Model
|
||||
#
|
||||
# * `filePath` A {String} representing a path. If `null`, an "Untitled" buffer is created.
|
||||
#
|
||||
# Returns a promise that resolves to the {TextBuffer}.
|
||||
# Returns a {Promise} that resolves to the {TextBuffer}.
|
||||
bufferForPath: (absoluteFilePath) ->
|
||||
existingBuffer = @findBufferForPath(absoluteFilePath) if absoluteFilePath?
|
||||
if existingBuffer
|
||||
@@ -349,7 +349,7 @@ class Project extends Model
|
||||
# * `absoluteFilePath` A {String} representing a path.
|
||||
# * `text` The {String} text to use as a buffer.
|
||||
#
|
||||
# Returns a promise that resolves to the {TextBuffer}.
|
||||
# Returns a {Promise} that resolves to the {TextBuffer}.
|
||||
buildBuffer: (absoluteFilePath) ->
|
||||
buffer = new TextBuffer({filePath: absoluteFilePath})
|
||||
@addBuffer(buffer)
|
||||
|
||||
@@ -403,7 +403,7 @@ class Workspace extends Model
|
||||
# If `false`, only the active pane will be searched for
|
||||
# an existing item for the same URI. Defaults to `false`.
|
||||
#
|
||||
# Returns a promise that resolves to the {TextEditor} for the file URI.
|
||||
# Returns a {Promise} that resolves to the {TextEditor} for the file URI.
|
||||
open: (uri, options={}) ->
|
||||
searchAllPanes = options.searchAllPanes
|
||||
split = options.split
|
||||
@@ -546,7 +546,7 @@ class Workspace extends Model
|
||||
# Public: Asynchronously reopens the last-closed item's URI if it hasn't already been
|
||||
# reopened.
|
||||
#
|
||||
# Returns a promise that is resolved when the item is opened
|
||||
# Returns a {Promise} that is resolved when the item is opened
|
||||
reopenItem: ->
|
||||
if uri = @destroyedItemURIs.pop()
|
||||
@open(uri)
|
||||
@@ -883,7 +883,7 @@ class Workspace extends Model
|
||||
# with number of paths searched.
|
||||
# * `iterator` {Function} callback on each file found.
|
||||
#
|
||||
# Returns a `Promise` with a `cancel()` method that will cancel all
|
||||
# Returns a {Promise} with a `cancel()` method that will cancel all
|
||||
# of the underlying searches that were started as part of this scan.
|
||||
scan: (regex, options={}, iterator) ->
|
||||
if _.isFunction(options)
|
||||
@@ -986,7 +986,7 @@ class Workspace extends Model
|
||||
# * `iterator` A {Function} callback on each file with replacements:
|
||||
# * `options` {Object} with keys `filePath` and `replacements`.
|
||||
#
|
||||
# Returns a `Promise`.
|
||||
# Returns a {Promise}.
|
||||
replace: (regex, replacementText, filePaths, iterator) ->
|
||||
new Promise (resolve, reject) =>
|
||||
openPaths = (buffer.getPath() for buffer in @project.getBuffers())
|
||||
|
||||
Reference in New Issue
Block a user