mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 00:19:24 +03:00
Merge remote-tracking branch 'remotes/origin/dh-async-repo' into dh-async-repo-relativize-symlinks
This commit is contained in:
commit
411a80dab6
13
package.json
13
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "atom",
|
||||
"productName": "Atom",
|
||||
"version": "1.5.0-dev",
|
||||
"version": "1.6.0-dev",
|
||||
"description": "A hackable text editor for the 21st Century.",
|
||||
"main": "./src/browser/main.js",
|
||||
"repository": {
|
||||
@ -71,7 +71,7 @@
|
||||
"one-light-syntax": "1.1.2",
|
||||
"solarized-dark-syntax": "0.39.0",
|
||||
"solarized-light-syntax": "0.23.0",
|
||||
"about": "1.1.0",
|
||||
"about": "1.3.0",
|
||||
"archive-view": "0.61.0",
|
||||
"autocomplete-atom-api": "0.9.2",
|
||||
"autocomplete-css": "0.11.0",
|
||||
@ -103,7 +103,6 @@
|
||||
"notifications": "0.62.1",
|
||||
"open-on-github": "0.40.0",
|
||||
"package-generator": "0.41.0",
|
||||
"release-notes": "0.53.0",
|
||||
"settings-view": "0.232.3",
|
||||
"snippets": "1.0.1",
|
||||
"spell-check": "0.65.0",
|
||||
@ -122,9 +121,9 @@
|
||||
"language-coffee-script": "0.46.0",
|
||||
"language-csharp": "0.11.0",
|
||||
"language-css": "0.36.0",
|
||||
"language-gfm": "0.82.0",
|
||||
"language-git": "0.11.0",
|
||||
"language-go": "0.41.0",
|
||||
"language-gfm": "0.83.0",
|
||||
"language-git": "0.12.1",
|
||||
"language-go": "0.42.0",
|
||||
"language-html": "0.44.0",
|
||||
"language-hyperlink": "0.16.0",
|
||||
"language-java": "0.17.0",
|
||||
@ -138,7 +137,7 @@
|
||||
"language-php": "0.36.0",
|
||||
"language-property-list": "0.8.0",
|
||||
"language-python": "0.43.0",
|
||||
"language-ruby": "0.67.1",
|
||||
"language-ruby": "0.68.0",
|
||||
"language-ruby-on-rails": "0.25.0",
|
||||
"language-sass": "0.45.0",
|
||||
"language-shellscript": "0.21.0",
|
||||
|
@ -1,4 +1,26 @@
|
||||
# Users may have this environment variable set. Currently, it causes babel to
|
||||
# log to stderr, which causes errors on Windows.
|
||||
# See https://github.com/atom/electron/issues/2033
|
||||
process.env.DEBUG='*'
|
||||
|
||||
path = require('path')
|
||||
temp = require('temp').track()
|
||||
CompileCache = require('../src/compile-cache')
|
||||
|
||||
describe "Babel transpiler support", ->
|
||||
originalCacheDir = null
|
||||
|
||||
beforeEach ->
|
||||
originalCacheDir = CompileCache.getCacheDirectory()
|
||||
CompileCache.setCacheDirectory(temp.mkdirSync('compile-cache'))
|
||||
for cacheKey in Object.keys(require.cache)
|
||||
if cacheKey.startsWith(path.join(__dirname, 'fixtures', 'babel'))
|
||||
console.log('deleting', cacheKey)
|
||||
delete require.cache[cacheKey]
|
||||
|
||||
afterEach ->
|
||||
CompileCache.setCacheDirectory(originalCacheDir)
|
||||
|
||||
describe 'when a .js file starts with /** @babel */;', ->
|
||||
it "transpiles it using babel", ->
|
||||
transpiled = require('./fixtures/babel/babel-comment.js')
|
||||
@ -17,3 +39,12 @@ describe "Babel transpiler support", ->
|
||||
describe "when a .js file does not start with 'use babel';", ->
|
||||
it "does not transpile it using babel", ->
|
||||
expect(-> require('./fixtures/babel/invalid.js')).toThrow()
|
||||
|
||||
it "does not try to log to stdout or stderr while parsing the file", ->
|
||||
spyOn(process.stderr, 'write')
|
||||
spyOn(process.stdout, 'write')
|
||||
|
||||
transpiled = require('./fixtures/babel/babel-double-quotes.js')
|
||||
|
||||
expect(process.stdout.write).not.toHaveBeenCalled()
|
||||
expect(process.stderr.write).not.toHaveBeenCalled()
|
||||
|
@ -1026,6 +1026,16 @@ describe "PackageManager", ->
|
||||
expect(atom.packages.enablePackage("this-doesnt-exist")).toBeNull()
|
||||
expect(console.warn.callCount).toBe 1
|
||||
|
||||
it "does not disable an already disabled package", ->
|
||||
packageName = 'package-with-main'
|
||||
atom.config.pushAtKeyPath('core.disabledPackages', packageName)
|
||||
atom.packages.observeDisabledPackages()
|
||||
expect(atom.config.get('core.disabledPackages')).toContain packageName
|
||||
|
||||
atom.packages.disablePackage(packageName)
|
||||
packagesDisabled = atom.config.get('core.disabledPackages').filter((pack) -> pack is packageName)
|
||||
expect(packagesDisabled.length).toEqual 1
|
||||
|
||||
describe "with themes", ->
|
||||
didChangeActiveThemesHandler = null
|
||||
|
||||
|
@ -42,6 +42,10 @@ exports.getCachePath = function (sourceCode) {
|
||||
exports.compile = function (sourceCode, filePath) {
|
||||
if (!babel) {
|
||||
babel = require('babel-core')
|
||||
var Logger = require('babel-core/lib/transformation/file/logger')
|
||||
var noop = function () {}
|
||||
Logger.prototype.debug = noop
|
||||
Logger.prototype.verbose = noop
|
||||
}
|
||||
|
||||
var options = {filename: filePath}
|
||||
|
@ -369,6 +369,7 @@ class AtomApplication
|
||||
# Get the dimensions for opening a new window by cascading as appropriate to
|
||||
# the platform.
|
||||
getDimensionsForNewWindow: ->
|
||||
return if (@focusedWindow() ? @lastFocusedWindow)?.isMaximized()
|
||||
dimensions = (@focusedWindow() ? @lastFocusedWindow)?.getDimensions()
|
||||
offset = @getWindowOffsetForCurrentPlatform()
|
||||
if dimensions? and offset?
|
||||
|
@ -212,6 +212,8 @@ class AtomWindow
|
||||
|
||||
isFocused: -> @browserWindow.isFocused()
|
||||
|
||||
isMaximized: -> @browserWindow.isMaximized()
|
||||
|
||||
isMinimized: -> @browserWindow.isMinimized()
|
||||
|
||||
isWebViewFocused: -> @browserWindow.isWebViewFocused()
|
||||
|
@ -199,7 +199,10 @@ class PackageManager
|
||||
# Returns the {Package} that was disabled or null if it isn't loaded.
|
||||
disablePackage: (name) ->
|
||||
pack = @loadPackage(name)
|
||||
pack?.disable()
|
||||
|
||||
unless @isPackageDisabled(name)
|
||||
pack?.disable()
|
||||
|
||||
pack
|
||||
|
||||
# Public: Is the package with the given name disabled?
|
||||
|
@ -169,7 +169,8 @@ module.exports = ({commandRegistry, commandInstaller, config}) ->
|
||||
'editor:fold-at-indent-level-8': -> @foldAllAtIndentLevel(7)
|
||||
'editor:fold-at-indent-level-9': -> @foldAllAtIndentLevel(8)
|
||||
'editor:log-cursor-scope': -> @logCursorScope()
|
||||
'editor:copy-path': -> @copyPathToClipboard()
|
||||
'editor:copy-path': -> @copyPathToClipboard(false)
|
||||
'editor:copy-project-path': -> @copyPathToClipboard(true)
|
||||
'editor:toggle-indent-guide': -> config.set('editor.showIndentGuide', not config.get('editor.showIndentGuide'))
|
||||
'editor:toggle-line-numbers': -> config.set('editor.showLineNumbers', not config.get('editor.showLineNumbers'))
|
||||
'editor:scroll-to-cursor': -> @scrollToCursorPosition()
|
||||
|
@ -666,8 +666,9 @@ class TextEditor extends Model
|
||||
isPending: -> Boolean(@pending)
|
||||
|
||||
# Copies the current file path to the native clipboard.
|
||||
copyPathToClipboard: ->
|
||||
copyPathToClipboard: (relative = false) ->
|
||||
if filePath = @getPath()
|
||||
filePath = atom.project.relativize(filePath) if relative
|
||||
@clipboard.write(filePath)
|
||||
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user