├── spec ├── fixtures │ ├── dir │ │ ├── file1 │ │ ├── b │ │ ├── a-dir │ │ │ └── oh-git │ │ └── a │ ├── cson.cson │ ├── git │ │ ├── working-dir │ │ │ ├── a.txt │ │ │ ├── .gitignore │ │ │ └── git.git │ │ │ │ ├── HEAD │ │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ └── master │ │ │ │ ├── index │ │ │ │ ├── config │ │ │ │ └── objects │ │ │ │ ├── 16 │ │ │ │ └── 735fb793d7b038818219c4b8c6295346e20eef │ │ │ │ ├── 52 │ │ │ │ └── f56457b6fca045ce41bb9d32e6ca79d23192af │ │ │ │ ├── 65 │ │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ │ ├── 66 │ │ │ │ └── dc9051da651c15d98d017a88658263cab28f02 │ │ │ │ ├── 06 │ │ │ │ └── 15f9a45968b3515e0a202530ef9f61aba26b6c │ │ │ │ ├── 5b │ │ │ │ └── 24ab4c3baadf534242b1acc220c8fa051b9b20 │ │ │ │ ├── 8a │ │ │ │ └── 9c86f1cb1f14b8f436eb91f4b052c8802ca99e │ │ │ │ ├── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ │ ├── ec │ │ │ │ └── 5e386905ff2d36e291086a1207f2585aaa8920 │ │ │ │ ├── ef │ │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ │ │ │ ├── fe │ │ │ │ └── bde178cdf35e9df6279d87aa27590c6d92e354 │ │ │ │ └── ff │ │ │ │ └── c8218bd2240a0cb92f6f02548d45784428349b │ │ ├── repo-with-submodules │ │ │ ├── README │ │ │ ├── git.git │ │ │ │ ├── HEAD │ │ │ │ ├── modules │ │ │ │ │ ├── jstips │ │ │ │ │ │ ├── gitdir │ │ │ │ │ │ ├── HEAD │ │ │ │ │ │ ├── ORIG_HEAD │ │ │ │ │ │ ├── refs │ │ │ │ │ │ │ ├── heads │ │ │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ │ └── master │ │ │ │ │ │ │ └── remotes │ │ │ │ │ │ │ │ └── origin │ │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ ├── description │ │ │ │ │ │ ├── index │ │ │ │ │ │ ├── packed-refs │ │ │ │ │ │ ├── logs │ │ │ │ │ │ │ ├── refs │ │ │ │ │ │ │ │ ├── heads │ │ │ │ │ │ │ │ │ ├── master │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ └── remotes │ │ │ │ │ │ │ │ │ └── origin │ │ │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ ├── objects │ │ │ │ │ │ │ ├── 05 │ │ │ │ │ │ │ │ └── 25ef667328cb1f86b1ddf523db4a064e1590fa │ │ │ │ │ │ │ ├── 1a │ │ │ │ │ │ │ │ └── dd860234dad4a8bf59340363e9c88bb0457cb7 │ │ │ │ │ │ │ ├── 5b │ │ │ │ │ │ │ │ └── 35953562dbb4f2debe88fcc9ac1805064e1e5a │ │ │ │ │ │ │ └── pack │ │ │ │ │ │ │ │ ├── pack-e568a55e02b6b7b75582924204669e4f3ed5276f.idx │ │ │ │ │ │ │ │ └── pack-e568a55e02b6b7b75582924204669e4f3ed5276f.pack │ │ │ │ │ │ ├── hooks │ │ │ │ │ │ │ ├── post-update.sample │ │ │ │ │ │ │ ├── pre-applypatch.sample │ │ │ │ │ │ │ ├── applypatch-msg.sample │ │ │ │ │ │ │ ├── commit-msg.sample │ │ │ │ │ │ │ └── prepare-commit-msg.sample │ │ │ │ │ │ ├── COMMIT_EDITMSG │ │ │ │ │ │ ├── info │ │ │ │ │ │ │ └── exclude │ │ │ │ │ │ └── config │ │ │ │ │ └── You-Dont-Need-jQuery │ │ │ │ │ │ ├── gitdir │ │ │ │ │ │ ├── HEAD │ │ │ │ │ │ ├── ORIG_HEAD │ │ │ │ │ │ ├── refs │ │ │ │ │ │ ├── heads │ │ │ │ │ │ │ └── master │ │ │ │ │ │ └── remotes │ │ │ │ │ │ │ └── origin │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ ├── description │ │ │ │ │ │ ├── packed-refs │ │ │ │ │ │ ├── index │ │ │ │ │ │ ├── logs │ │ │ │ │ │ ├── refs │ │ │ │ │ │ │ ├── remotes │ │ │ │ │ │ │ │ └── origin │ │ │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ │ └── heads │ │ │ │ │ │ │ │ └── master │ │ │ │ │ │ └── HEAD │ │ │ │ │ │ ├── objects │ │ │ │ │ │ ├── a7 │ │ │ │ │ │ │ └── 8b35a896b890f0a2a4f1f924c5739776415250 │ │ │ │ │ │ ├── ae │ │ │ │ │ │ │ └── 897dce6e0590f08dddfe9a5152e237e955ca57 │ │ │ │ │ │ ├── be │ │ │ │ │ │ │ └── 8ed228c0a080145d28ed625a5f487caae6a3f9 │ │ │ │ │ │ └── pack │ │ │ │ │ │ │ ├── pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.idx │ │ │ │ │ │ │ └── pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.pack │ │ │ │ │ │ ├── hooks │ │ │ │ │ │ ├── post-update.sample │ │ │ │ │ │ ├── pre-applypatch.sample │ │ │ │ │ │ ├── applypatch-msg.sample │ │ │ │ │ │ ├── commit-msg.sample │ │ │ │ │ │ └── prepare-commit-msg.sample │ │ │ │ │ │ ├── info │ │ │ │ │ │ └── exclude │ │ │ │ │ │ ├── COMMIT_EDITMSG │ │ │ │ │ │ └── config │ │ │ │ ├── refs │ │ │ │ │ ├── heads │ │ │ │ │ │ └── master │ │ │ │ │ └── remotes │ │ │ │ │ │ └── origin │ │ │ │ │ │ └── master │ │ │ │ ├── description │ │ │ │ ├── index │ │ │ │ ├── objects │ │ │ │ │ ├── 40 │ │ │ │ │ │ └── f4e79926a85134d4c905d04e70573b6616f3bc │ │ │ │ │ ├── 50 │ │ │ │ │ │ └── b89367d8f0acd312ef5aa012eac20a75c91351 │ │ │ │ │ ├── 54 │ │ │ │ │ │ └── 3b9bebdc6bd5c4b22136034a95dd097a57d3dd │ │ │ │ │ ├── 3e │ │ │ │ │ │ └── 2fe2f8226faab789f70d6d8a7231e4f2bd54df │ │ │ │ │ ├── d2 │ │ │ │ │ │ └── b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 │ │ │ │ │ ├── d3 │ │ │ │ │ │ └── e073baf592c56614c68ead9e2cd0a3880140cd │ │ │ │ │ └── e6 │ │ │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ │ ├── hooks │ │ │ │ │ ├── post-update.sample │ │ │ │ │ ├── pre-applypatch.sample │ │ │ │ │ ├── applypatch-msg.sample │ │ │ │ │ ├── commit-msg.sample │ │ │ │ │ └── prepare-commit-msg.sample │ │ │ │ ├── info │ │ │ │ │ └── exclude │ │ │ │ ├── logs │ │ │ │ │ ├── HEAD │ │ │ │ │ └── refs │ │ │ │ │ │ └── heads │ │ │ │ │ │ └── master │ │ │ │ ├── COMMIT_EDITMSG │ │ │ │ └── config │ │ │ ├── jstips │ │ │ │ ├── git.git │ │ │ │ ├── resources │ │ │ │ │ ├── log.js │ │ │ │ │ └── jstips-header-blog.gif │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── You-Dont-Need-jQuery │ │ │ │ ├── test │ │ │ │ │ ├── css.spec.js │ │ │ │ │ ├── dom.spec.js │ │ │ │ │ ├── utilities.spec.js │ │ │ │ │ └── README.md │ │ │ │ ├── .babelrc │ │ │ │ ├── git.git │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── .eslintrc │ │ │ │ └── LICENSE │ │ │ └── .gitmodules │ │ ├── ignore.git │ │ │ ├── info │ │ │ │ └── exclude │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ └── master │ │ │ ├── index │ │ │ ├── config │ │ │ └── objects │ │ │ │ ├── 65 │ │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ │ ├── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ │ └── ef │ │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ │ └── master.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ └── heads │ │ │ │ └── master │ │ │ ├── index │ │ │ ├── config │ │ │ └── objects │ │ │ ├── 65 │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ ├── e6 │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ └── ef │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ ├── testdir │ │ ├── sample-theme-1 │ │ │ ├── readme │ │ │ └── src │ │ │ │ └── js │ │ │ │ └── main.js │ │ └── sample-theme-2 │ │ │ ├── readme │ │ │ └── src │ │ │ └── js │ │ │ ├── main.js │ │ │ └── plugin │ │ │ └── main.js │ ├── sample.txt │ ├── packages │ │ ├── package-with-empty-menu │ │ │ ├── menus │ │ │ │ └── menu.cson │ │ │ └── package.json │ │ ├── package-with-empty-keymap │ │ │ ├── keymaps │ │ │ │ └── keymap.cson │ │ │ └── package.json │ │ ├── theme-with-invalid-styles │ │ │ ├── index.less │ │ │ └── package.json │ │ ├── package-with-incompatible-native-module │ │ │ ├── main.js │ │ │ ├── node_modules │ │ │ │ └── native-module │ │ │ │ │ ├── build │ │ │ │ │ └── Release │ │ │ │ │ │ └── native.node │ │ │ │ │ ├── main.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── theme-with-syntax-variables │ │ │ ├── styles │ │ │ │ └── editor.less │ │ │ └── package.json │ │ ├── package-with-cached-incompatible-native-module │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── package-with-ignored-incompatible-native-module │ │ │ ├── main.js │ │ │ ├── node_modules │ │ │ │ ├── compatible-native-module │ │ │ │ │ ├── main.js │ │ │ │ │ ├── build │ │ │ │ │ │ └── Release │ │ │ │ │ │ │ └── native.node │ │ │ │ │ └── package.json │ │ │ │ └── native-module │ │ │ │ │ ├── build │ │ │ │ │ └── Release │ │ │ │ │ │ └── native.node │ │ │ │ │ ├── main.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── package-with-invalid-styles │ │ │ ├── styles │ │ │ │ └── index.less │ │ │ └── package.json │ │ ├── package-with-styles │ │ │ └── styles │ │ │ │ ├── 4.css │ │ │ │ ├── 1.css │ │ │ │ ├── 3.test-context.css │ │ │ │ └── 2.less │ │ ├── package-with-broken-keymap │ │ │ └── keymaps │ │ │ │ └── broken.json │ │ ├── package-with-broken-package-json │ │ │ └── package.json │ │ ├── package-with-invalid-grammar │ │ │ ├── grammars │ │ │ │ └── grammar.json │ │ │ └── package.json │ │ ├── package-with-invalid-settings │ │ │ ├── settings │ │ │ │ └── settings.json │ │ │ └── package.json │ │ ├── package-with-no-activate │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── package-without-module │ │ │ └── package.cson │ │ ├── theme-with-index-css │ │ │ ├── package.json │ │ │ └── index.css │ │ ├── package-with-index │ │ │ └── index.coffee │ │ ├── package-with-serialize-error │ │ │ ├── package.cson │ │ │ └── index.coffee │ │ ├── theme-with-index-less │ │ │ ├── package.json │ │ │ └── index.less │ │ ├── package-with-main │ │ │ ├── main-module.coffee │ │ │ └── package.cson │ │ ├── package-with-menus-manifest │ │ │ ├── package.cson │ │ │ └── menus │ │ │ │ ├── menu-3.cson │ │ │ │ ├── menu-1.cson │ │ │ │ └── menu-2.cson │ │ ├── package-with-style-sheets-manifest │ │ │ ├── package.cson │ │ │ └── styles │ │ │ │ ├── 1.css │ │ │ │ ├── 3.css │ │ │ │ └── 2.less │ │ ├── package-with-stylesheets-manifest │ │ │ └── package.cson │ │ ├── package-with-keymaps-manifest │ │ │ ├── package.cson │ │ │ └── keymaps │ │ │ │ ├── keymap-3.cson │ │ │ │ ├── keymap-1.json │ │ │ │ └── keymap-2.cson │ │ ├── package-with-empty-activation-commands │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-empty-activation-hooks │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-keymaps │ │ │ └── keymaps │ │ │ │ ├── keymap-1.cson │ │ │ │ ├── keymap-2.cson │ │ │ │ └── keymap-3.cjson │ │ ├── wordcount │ │ │ └── package.json │ │ ├── sublime-tabs │ │ │ └── package.json │ │ ├── package-with-deactivate │ │ │ └── index.coffee │ │ ├── package-with-tree-sitter-grammar │ │ │ └── grammars │ │ │ │ ├── fake-parser.js │ │ │ │ └── some-language.cson │ │ ├── package-that-throws-an-exception │ │ │ └── index.coffee │ │ ├── theme-with-ui-variables │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ └── editor.less │ │ ├── package-with-activation-commands │ │ │ ├── package.cson │ │ │ └── index.coffee │ │ ├── package-with-settings │ │ │ └── settings │ │ │ │ └── omg.cson │ │ ├── package-with-missing-consumed-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-missing-provided-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-rb-filetype │ │ │ ├── package.json │ │ │ └── grammars │ │ │ │ └── rb.cson │ │ ├── theme-with-incomplete-ui-variables │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ ├── ui-variables.less │ │ │ │ └── editor.less │ │ ├── theme-without-package-file │ │ │ └── styles │ │ │ │ ├── b.css │ │ │ │ ├── c.less │ │ │ │ ├── a.css │ │ │ │ └── d.csv │ │ ├── package-with-invalid-context-menu │ │ │ ├── package.json │ │ │ └── menus │ │ │ │ └── menu.json │ │ ├── theme-with-package-file │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ ├── last.css │ │ │ │ ├── first.css │ │ │ │ └── second.less │ │ ├── package-with-activation-hooks │ │ │ ├── index.coffee │ │ │ └── package.cson │ │ ├── package-with-different-directory-name │ │ │ └── package.json │ │ ├── package-with-invalid-url-package-json │ │ │ └── package.json │ │ ├── package-with-url-main │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── package-with-short-url-package-json │ │ │ └── package.json │ │ ├── package-with-uri-handler │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── package-that-throws-on-activate │ │ │ └── index.coffee │ │ ├── package-that-throws-on-deactivate │ │ │ └── index.coffee │ │ ├── package-with-config-defaults │ │ │ └── index.coffee │ │ ├── package-with-eval-time-api-calls │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── package-with-serialization │ │ │ └── index.coffee │ │ ├── package-with-deprecated-pane-item-method │ │ │ └── index.coffee │ │ ├── package-with-injection-selector │ │ │ └── grammars │ │ │ │ └── grammar.cson │ │ ├── package-with-menus │ │ │ └── menus │ │ │ │ ├── menu-2.cson │ │ │ │ ├── menu-1.cson │ │ │ │ └── menu-3.cson │ │ ├── package-with-consumed-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-invalid-activation-commands │ │ │ └── package.json │ │ ├── package-with-deserializers │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── package-with-grammars │ │ │ └── grammars │ │ │ │ ├── alot.cson │ │ │ │ └── alittle.cson │ │ ├── package-with-json-config-schema │ │ │ └── package.json │ │ ├── package-with-config-schema │ │ │ └── index.coffee │ │ ├── package-with-directory-provider │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── package-with-view-providers │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── package-with-provided-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ └── package-with-prefixed-and-suffixed-repo-url │ │ │ └── package.json │ ├── module-cache │ │ └── file.json │ ├── script.js │ ├── shebang │ ├── typescript │ │ ├── invalid.ts │ │ └── valid.ts │ ├── native-cache │ │ ├── file-1.js │ │ ├── file-2.js │ │ ├── file-3.js │ │ └── file-4.js │ ├── babel │ │ ├── babel-comment.js │ │ ├── babel-double-quotes.js │ │ ├── babel-single-quotes.js │ │ ├── invalid.js │ │ └── flow-comment.js │ ├── script-with-deprecations.js │ ├── task-spec-handler.coffee │ ├── css.css │ ├── sample.less │ ├── sample-with-tabs.coffee │ ├── task-handler-with-deprecations.coffee │ ├── sample-with-many-folds.js │ ├── sample-with-tabs-and-leading-comment.coffee │ ├── sample.js │ ├── coffee.coffee │ └── sample-with-comments.js ├── sample-with-comments.js ├── atom-protocol-handler-spec.coffee ├── typescript-spec.coffee ├── clipboard-spec.coffee ├── keymap-extensions-spec.coffee ├── application-delegate-spec.js ├── default-directory-searcher-spec.coffee ├── spec-helper-platform.coffee ├── main-process │ ├── mocha-test-runner.js │ └── parse-command-line.test.js ├── helpers │ └── random.js ├── buffered-node-process-spec.coffee ├── pane-axis-element-spec.coffee ├── workspace-center-spec.js └── integration │ ├── helpers │ └── atom-launcher.sh │ └── smoke-spec.coffee ├── .python-version ├── .coffeelintignore ├── docs ├── contributing.md ├── contributing-to-packages.md ├── apm-rest-api.md ├── build-instructions │ ├── macOS.md │ ├── linux.md │ └── windows.md ├── README.md └── native-profiling.md ├── CHANGELOG.md ├── resources ├── win │ ├── apm.cmd │ ├── apm.sh │ ├── file.ico │ ├── folder.ico │ ├── loading.gif │ ├── atom.js │ ├── atom.sh │ └── atom.cmd ├── mac │ ├── file.icns │ └── helper-Info.plist ├── app-icons │ ├── dev │ │ ├── atom.ico │ │ ├── atom.icns │ │ └── png │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 24.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 48.png │ │ │ ├── 512.png │ │ │ ├── 64.png │ │ │ └── 1024.png │ ├── beta │ │ ├── atom.icns │ │ ├── atom.ico │ │ └── png │ │ │ ├── 16.png │ │ │ ├── 24.png │ │ │ ├── 32.png │ │ │ ├── 48.png │ │ │ ├── 64.png │ │ │ ├── 1024.png │ │ │ ├── 128.png │ │ │ ├── 256.png │ │ │ └── 512.png │ └── stable │ │ ├── atom.ico │ │ ├── atom.icns │ │ └── png │ │ ├── 16.png │ │ ├── 24.png │ │ ├── 32.png │ │ ├── 48.png │ │ ├── 64.png │ │ ├── 1024.png │ │ ├── 128.png │ │ ├── 256.png │ │ └── 512.png └── linux │ ├── debian │ ├── lintian-overrides │ └── control.in │ └── atom.desktop.in ├── dot-atom ├── packages │ └── README.md ├── .gitignore ├── init.coffee ├── snippets.cson ├── styles.less └── keymap.cson ├── static ├── octicons.woff ├── atomicons.woff ├── octicons-2.1.2.woff ├── images │ ├── octocat-spinner-128.gif │ └── transparent-background.gif ├── babelrc.json ├── linux.less ├── index.html ├── workspace-view.less ├── scaffolding.less ├── atom.less ├── syntax.less ├── panels.less ├── cursors.less └── variables │ └── octicon-mixins.less ├── apm ├── README.md └── package.json ├── script ├── build.cmd ├── clean.cmd ├── lint.cmd ├── test.cmd ├── bootstrap.cmd ├── cibuild ├── lib │ ├── clean-output-directory.js │ ├── install-apm.js │ ├── install-script-dependencies.js │ ├── read-files.js │ ├── kill-running-atom-instances.js │ ├── expand-glob-paths.js │ ├── delete-msbuild-from-path.js │ ├── clean-package-lock.js │ ├── run-apm-install.js │ ├── download-file-from-github.js │ ├── handle-tilde.js │ ├── spawn-sync.js │ ├── clean-caches.js │ ├── clean-dependencies.js │ ├── transpile-babel-paths.js │ ├── lint-coffee-script-paths.js │ ├── transpile-peg-js-paths.js │ ├── generate-module-cache.js │ ├── transpile-cson-paths.js │ ├── lint-java-script-paths.js │ ├── dependencies-fingerprint.js │ ├── transpile-coffee-script-paths.js │ └── get-license-text.js ├── verify-snapshot-script ├── clean ├── lint ├── bootstrap └── package.json ├── src ├── special-token-symbols.coffee ├── safe-clipboard.coffee ├── get-window-load-settings.js ├── crash-reporter-start.js ├── first-mate-helpers.js ├── item-registry.js ├── model.coffee ├── replace-handler.coffee ├── custom-event-mixin.coffee ├── scoped-properties.coffee ├── token.coffee ├── null-grammar.js ├── main-process │ ├── context-menu.coffee │ └── main.js ├── window.js ├── pane-container-element.js ├── less-compile-cache.coffee ├── delegated-listener.js ├── core-uri-handlers.js ├── coffee-script.js ├── deprecated-packages.coffee ├── storage-folder.js ├── ipc-helpers.js └── theme-package.js ├── .gitignore ├── exports ├── shell.js ├── remote.js ├── ipc.js ├── clipboard.js ├── web-frame.js └── atom.js ├── Dockerfile ├── .gitattributes ├── SUPPORT.md ├── coffeelint.json ├── .github └── lock.yml ├── stylelint.config.js ├── LICENSE.md └── circle.yml /spec/fixtures/dir/file1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 2.7.13 2 | -------------------------------------------------------------------------------- /spec/fixtures/cson.cson: -------------------------------------------------------------------------------- 1 | a: 4 2 | -------------------------------------------------------------------------------- /spec/fixtures/dir/b: -------------------------------------------------------------------------------- 1 | aaa ccc 2 | -------------------------------------------------------------------------------- /.coffeelintignore: -------------------------------------------------------------------------------- 1 | spec/fixtures 2 | -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /spec/fixtures/dir/a-dir/oh-git: -------------------------------------------------------------------------------- 1 | bbb aaaa -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/a.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/sample-with-comments.js: -------------------------------------------------------------------------------- 1 | undefined -------------------------------------------------------------------------------- /spec/fixtures/testdir/sample-theme-1/readme: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/testdir/sample-theme-2/readme: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | See https://atom.io/releases 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/sample.txt: -------------------------------------------------------------------------------- 1 | Some textSome text. 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/info/exclude: -------------------------------------------------------------------------------- 1 | a.txt 2 | -------------------------------------------------------------------------------- /spec/fixtures/testdir/sample-theme-1/src/js/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/testdir/sample-theme-2/src/js/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/dir/a: -------------------------------------------------------------------------------- 1 | aaa bbb 2 | cc aa cc 3 | dollar$bill -------------------------------------------------------------------------------- /spec/fixtures/testdir/sample-theme-2/src/js/plugin/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-menu/menus/menu.cson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/.gitignore: -------------------------------------------------------------------------------- 1 | poop 2 | ignored.txt 3 | -------------------------------------------------------------------------------- /spec/fixtures/module-cache/file.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-keymap/keymaps/keymap.cson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-invalid-styles/index.less: -------------------------------------------------------------------------------- 1 | <> 2 | -------------------------------------------------------------------------------- /spec/fixtures/script.js: -------------------------------------------------------------------------------- 1 | process.stdout.write(process.argv[2]); 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-syntax-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/win/apm.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | "%~dp0\..\app\apm\bin\apm.cmd" %* 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/gitdir: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-cached-incompatible-native-module/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-styles/styles/index.less: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/4.css: -------------------------------------------------------------------------------- 1 | a { color: red } 2 | -------------------------------------------------------------------------------- /spec/fixtures/shebang: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | puts "Atom fixture test" 4 | -------------------------------------------------------------------------------- /spec/fixtures/typescript/invalid.ts: -------------------------------------------------------------------------------- 1 | var foo = 123 123; // Syntax error 2 | -------------------------------------------------------------------------------- /spec/fixtures/typescript/valid.ts: -------------------------------------------------------------------------------- 1 | var inc = v => v + 1 2 | export = inc 3 | -------------------------------------------------------------------------------- /spec/fixtures/native-cache/file-1.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { return 1; } 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-cache/file-2.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { return 2; } 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-cache/file-3.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { return 3; } 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-broken-keymap/keymaps/broken.json: -------------------------------------------------------------------------------- 1 | INVALID 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-broken-package-json/package.json: -------------------------------------------------------------------------------- 1 | INVALID 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-grammar/grammars/grammar.json: -------------------------------------------------------------------------------- 1 | >< 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-settings/settings/settings.json: -------------------------------------------------------------------------------- 1 | >< 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-no-activate/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-without-module/package.cson: -------------------------------------------------------------------------------- 1 | "name": "perfect" 2 | -------------------------------------------------------------------------------- /resources/win/apm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | "$(dirname "$0")/../app/apm/bin/apm" "$@" 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/jstips/git.git: -------------------------------------------------------------------------------- 1 | gitdir: ../.git/modules/jstips 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-css/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui" 3 | } 4 | -------------------------------------------------------------------------------- /dot-atom/packages/README.md: -------------------------------------------------------------------------------- 1 | All packages in this directory will be automatically loaded 2 | -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-comment.js: -------------------------------------------------------------------------------- 1 | /** @babel */ 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | ef046e9eecaa5255ea5e9817132d4001724d6ae1 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | ef046e9eecaa5255ea5e9817132d4001724d6ae1 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/gitdir: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/test 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-cache/file-4.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { return "file-4" } 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-index/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialize-error/package.cson: -------------------------------------------------------------------------------- 1 | 'main': 'index.coffee' 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-less/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui" 3 | } 4 | -------------------------------------------------------------------------------- /static/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/static/octicons.woff -------------------------------------------------------------------------------- /resources/win/file.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/win/file.ico -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-double-quotes.js: -------------------------------------------------------------------------------- 1 | "use babel"; 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-single-quotes.js: -------------------------------------------------------------------------------- 1 | 'use babel'; 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-main/main-module.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/package.cson: -------------------------------------------------------------------------------- 1 | menus: ["menu-2", "menu-1"] 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/package.cson: -------------------------------------------------------------------------------- 1 | styleSheets: ['2', '1'] 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-stylesheets-manifest/package.cson: -------------------------------------------------------------------------------- 1 | styleSheets: ['2', '1'] 2 | -------------------------------------------------------------------------------- /static/atomicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/static/atomicons.woff -------------------------------------------------------------------------------- /resources/mac/file.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/mac/file.icns -------------------------------------------------------------------------------- /resources/win/folder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/win/folder.ico -------------------------------------------------------------------------------- /resources/win/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/win/loading.gif -------------------------------------------------------------------------------- /spec/fixtures/babel/invalid.js: -------------------------------------------------------------------------------- 1 | 'use 6to6'; 2 | 3 | module.exports = async function* hello() {} 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/css.spec.js: -------------------------------------------------------------------------------- 1 | // test for CSS related -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 8a9c86f1cb1f14b8f436eb91f4b052c8802ca99e 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/package.cson: -------------------------------------------------------------------------------- 1 | keymaps: ["keymap-2", "keymap-1"] 2 | -------------------------------------------------------------------------------- /dot-atom/.gitignore: -------------------------------------------------------------------------------- 1 | blob-store 2 | compile-cache 3 | dev 4 | storage 5 | .apm 6 | .node-gyp 7 | .npm 8 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-commands/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = activate: -> 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-hooks/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = activate: -> 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-1.cson: -------------------------------------------------------------------------------- 1 | ".test-1": 2 | "ctrl-z": "test-1" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-2.cson: -------------------------------------------------------------------------------- 1 | ".test-2": 2 | "ctrl-z": "test-2" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-3.cjson: -------------------------------------------------------------------------------- 1 | ".test-3": 2 | "ctrl-z": "test-3" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/1.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 1px; 3 | } 4 | -------------------------------------------------------------------------------- /static/octicons-2.1.2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/static/octicons-2.1.2.woff -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/dom.spec.js: -------------------------------------------------------------------------------- 1 | // test for CSS and style related -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/utilities.spec.js: -------------------------------------------------------------------------------- 1 | // test for Utilities related -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | d2b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/jstips/resources/log.js: -------------------------------------------------------------------------------- 1 | (() => { 2 | console.log('Hello world'); 3 | })(); -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-main/package.cson: -------------------------------------------------------------------------------- 1 | 'main': 'main-module.coffee' 2 | 'version': '2.3.4' 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-css/index.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 1234px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/wordcount/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wordcount", 3 | "version": "2.0.9" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/script-with-deprecations.js: -------------------------------------------------------------------------------- 1 | require('fs').existsSync('hi'); 2 | process.stdout.write('hi'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/task-spec-handler.coffee: -------------------------------------------------------------------------------- 1 | module.exports = -> 2 | emit("some-event", 1, 2, 3) 3 | 'hello' 4 | -------------------------------------------------------------------------------- /resources/app-icons/dev/atom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/atom.ico -------------------------------------------------------------------------------- /spec/fixtures/babel/flow-comment.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const f: Function = v => v + 1 4 | module.exports = f 5 | -------------------------------------------------------------------------------- /spec/fixtures/css.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 1234px; 3 | width: 110%; 4 | font-weight: bold !important; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ["es2015", "stage-0"] 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/git.git: -------------------------------------------------------------------------------- 1 | gitdir: ../.git/modules/You-Dont-Need-jQuery 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/ORIG_HEAD: -------------------------------------------------------------------------------- 1 | 9f0218b7652b622afea799a4723490c43e1af1fe 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/refs/remotes/origin/master: -------------------------------------------------------------------------------- 1 | d2b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/compatible-native-module/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/build/Release/native.node: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-3.cson: -------------------------------------------------------------------------------- 1 | ".test-3": 2 | "ctrl-y": "keymap-3" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/sublime-tabs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sublime-tabs", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /resources/app-icons/beta/atom.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/atom.icns -------------------------------------------------------------------------------- /resources/app-icons/beta/atom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/atom.ico -------------------------------------------------------------------------------- /resources/app-icons/beta/png/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/16.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/24.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/32.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/48.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/64.png -------------------------------------------------------------------------------- /resources/app-icons/dev/atom.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/atom.icns -------------------------------------------------------------------------------- /resources/app-icons/dev/png/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/128.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/16.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/24.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/256.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/32.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/48.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/512.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/64.png -------------------------------------------------------------------------------- /resources/app-icons/stable/atom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/atom.ico -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/ignore.git/index -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/master.git/index -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/refs/heads/test: -------------------------------------------------------------------------------- 1 | 0525ef667328cb1f86b1ddf523db4a064e1590fa 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/refs/remotes/origin/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/remotes/origin/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deactivate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | deactivate: -> 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/native-module/build/Release/native.node: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/1.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 1px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/3.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 3px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/3.test-context.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 3px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-tree-sitter-grammar/grammars/fake-parser.js: -------------------------------------------------------------------------------- 1 | exports.isFakeTreeSitterParser = true 2 | -------------------------------------------------------------------------------- /spec/fixtures/sample.less: -------------------------------------------------------------------------------- 1 | @color: #4D926F; 2 | 3 | #header { 4 | color: @color; 5 | } 6 | h2 { 7 | color: @color; 8 | } -------------------------------------------------------------------------------- /apm/README.md: -------------------------------------------------------------------------------- 1 | This folder is where [apm](https://github.com/atom/apm) is installed to so that 2 | it is bundled with Atom. 3 | -------------------------------------------------------------------------------- /resources/app-icons/beta/png/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/1024.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/128.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/256.png -------------------------------------------------------------------------------- /resources/app-icons/beta/png/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/beta/png/512.png -------------------------------------------------------------------------------- /resources/app-icons/dev/png/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/dev/png/1024.png -------------------------------------------------------------------------------- /resources/app-icons/stable/atom.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/atom.icns -------------------------------------------------------------------------------- /resources/app-icons/stable/png/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/16.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/24.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/32.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/48.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/64.png -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/refs/heads/master: -------------------------------------------------------------------------------- 1 | 9f0218b7652b622afea799a4723490c43e1af1fe 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-an-exception/index.coffee: -------------------------------------------------------------------------------- 1 | throw new Error("This package throws an exception") 2 | -------------------------------------------------------------------------------- /static/images/octocat-spinner-128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/static/images/octocat-spinner-128.gif -------------------------------------------------------------------------------- /docs/contributing-to-packages.md: -------------------------------------------------------------------------------- 1 | See https://flight-manual.atom.io/hacking-atom/sections/contributing-to-official-atom-packages/ 2 | -------------------------------------------------------------------------------- /resources/app-icons/stable/png/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/1024.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/128.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/256.png -------------------------------------------------------------------------------- /resources/app-icons/stable/png/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/resources/app-icons/stable/png/512.png -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | node_modules 4 | coverage 5 | logs 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/ORIG_HEAD: -------------------------------------------------------------------------------- 1 | 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/2.less: -------------------------------------------------------------------------------- 1 | @size: 2px; 2 | 3 | #jasmine-content { 4 | font-size: @size; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-ui-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /static/images/transparent-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/static/images/transparent-background.gif -------------------------------------------------------------------------------- /script/build.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\build" %* 3 | ) ELSE ( 4 | node "%~dp0\build" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/clean.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\clean" %* 3 | ) ELSE ( 4 | node "%~dp0\clean" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/lint.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\lint" %* 3 | ) ELSE ( 4 | node "%~dp0\lint" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/test.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\test" %* 3 | ) ELSE ( 4 | node "%~dp0\test" %* 5 | ) 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/refs/heads/master: -------------------------------------------------------------------------------- 1 | a78b35a896b890f0a2a4f1f924c5739776415250 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/refs/remotes/origin/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/remotes/origin/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-commands/package.cson: -------------------------------------------------------------------------------- 1 | 'activationCommands': 2 | '.workspace': 'activation-command' 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-menu", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/compatible-native-module/build/Release/native.node: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-settings/settings/omg.cson: -------------------------------------------------------------------------------- 1 | '.source.omg': 2 | 'editor': 3 | 'increaseIndentPattern': '^a' 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-invalid-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "theme-with-invalid-styles", 3 | "theme": "ui" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-syntax-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "syntax", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/index -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-keymap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-keymap", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-1.json: -------------------------------------------------------------------------------- 1 | { 2 | ".test-1": { 3 | "ctrl-z": "keymap-1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-2.cson: -------------------------------------------------------------------------------- 1 | ".test-1": 2 | "ctrl-z": "keymap-2" 3 | "ctrl-n": "keymap-2" 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-consumed-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-provided-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-no-activate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-no-activate", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-rb-filetype/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-rb-filetype", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-less/index.less: -------------------------------------------------------------------------------- 1 | @padding: 4321px; 2 | 3 | atom-text-editor { 4 | padding-top: @padding; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-grammar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-grammar", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-styles", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/2.less: -------------------------------------------------------------------------------- 1 | @size: 2px; 2 | 3 | #jasmine-content { 4 | font-size: @size; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/b.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-right: 20px; 3 | padding-bottom: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/c.less: -------------------------------------------------------------------------------- 1 | @number: 30px; 2 | 3 | atom-text-editor { 4 | padding-bottom: @number; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-settings/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-settings", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-tabs.coffee: -------------------------------------------------------------------------------- 1 | # Econ 101 2 | if this.studyingEconomics 3 | buy() while supply > demand 4 | sell() until supply > demand 5 | -------------------------------------------------------------------------------- /spec/fixtures/task-handler-with-deprecations.coffee: -------------------------------------------------------------------------------- 1 | {deprecate} = require 'grim' 2 | 3 | deprecate('Fake task deprecation') 4 | module.exports = -> 5 | -------------------------------------------------------------------------------- /script/bootstrap.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\bootstrap" %* 3 | ) ELSE ( 4 | node "%~dp0\bootstrap" %* 5 | ) 6 | 7 | -------------------------------------------------------------------------------- /script/cibuild: -------------------------------------------------------------------------------- 1 | echo "Builds for this version of Atom no longer run on Janky." 2 | echo "See https://github.com/atom/atom/pull/12410 for more information." 3 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/index -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-context-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-context-menu", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["first.css", "second.less", "last.css"] 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-hooks/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activateCallCount: 0 3 | 4 | activate: -> 5 | @activateCallCount++ 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-different-directory-name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-a-totally-different-name", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-url-package-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-url-package-json", 3 | "repository": "foo" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-3.cson: -------------------------------------------------------------------------------- 1 | 'context-menu': 2 | '.test-1': [ 3 | {label: 'Menu item 3', command: 'command-3'} 4 | ] 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-url-main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-url-main", 3 | "version": "1.0.0", 4 | "urlMain": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/main.js: -------------------------------------------------------------------------------- 1 | throw new Error("this simulates a native module's failure to load") 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "native-module", 3 | "main": "./main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-short-url-package-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-short-url-package-json", 3 | "repository": "example/repo" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-uri-handler/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | activate: () => null, 3 | deactivate: () => null, 4 | handleURI: () => null, 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-url-main/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function initialize() { 2 | global.reachedUrlMain = true; 3 | return Promise.resolve(); 4 | }; 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/last.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | /* padding-top: 103px; 3 | padding-right: 103px;*/ 4 | padding-bottom: 103px; 5 | } -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/a.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 10px; 3 | padding-right: 10px; 4 | padding-bottom: 10px; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-on-activate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> throw new Error('Top that') 3 | deactivate: -> 4 | serialize: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | deactivate: -> throw new Error('Top that') 4 | serialize: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-config-defaults/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | configDefaults: 3 | numbers: { one: 1, two: 2 } 4 | 5 | activate: -> # no-op 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/native-module/main.js: -------------------------------------------------------------------------------- 1 | throw new Error("this simulates a native module's failure to load") 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-uri-handler/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-uri-handler", 3 | "uriHandler": { 4 | "method": "handleURI" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/d.csv: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 100px; 3 | padding-right: 100px; 4 | padding-bottom: 100px; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-eval-time-api-calls/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-eval-time-api-calls", 3 | "version": "1.2.3", 4 | "main": "./index" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "native-module", 3 | "main": "./main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-many-folds.js: -------------------------------------------------------------------------------- 1 | 1; 2 | 2; 3 | function f3() { 4 | return 4; 5 | }; 6 | 6; 7 | 7; 8 | function f8() { 9 | return 9; 10 | }; 11 | 11; 12 | 12; 13 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-tabs-and-leading-comment.coffee: -------------------------------------------------------------------------------- 1 | # This is a comment 2 | if this.studyingEconomics 3 | buy() while supply > demand 4 | sell() until supply > demand 5 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/index -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled fully-peeled 2 | 9f0218b7652b622afea799a4723490c43e1af1fe refs/remotes/origin/master 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-hooks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-activation-hooks", 3 | "version": "0.1.0", 4 | "activationHooks": [] 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialization/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: ({@someNumber}) -> 3 | @someNumber ?= 1 4 | 5 | serialize: -> 6 | {@someNumber} 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/first.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 101px; 3 | padding-right: 101px; 4 | padding-bottom: 101px; 5 | 6 | color: red; 7 | } -------------------------------------------------------------------------------- /static/babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "breakConfig": true, 3 | "sourceMap": "inline", 4 | "blacklist": ["es6.forOf", "useStrict"], 5 | "optional": ["asyncToGenerator"], 6 | "stage": 0 7 | } 8 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deprecated-pane-item-method/index.coffee: -------------------------------------------------------------------------------- 1 | class TestItem 2 | getUri: -> "test" 3 | 4 | exports.activate = -> 5 | atom.workspace.addOpener -> new TestItem 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-incompatible-native-module", 3 | "version": "1.0.0", 4 | "main": "./main.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled fully-peeled 2 | 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a refs/remotes/origin/master 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/compatible-native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "compatible-native-module", 3 | "main": "./main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialize-error/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | serialize: -> 7 | throw new Error("I'm no good at this.") 8 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-injection-selector/grammars/grammar.cson: -------------------------------------------------------------------------------- 1 | 'name': 'test' 2 | 'scopeName': 'source.test' 3 | 'injectionSelector': 'comment' 4 | 'patterns': [{'include': 'source.sql'}] 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/second.less: -------------------------------------------------------------------------------- 1 | @number: 102px; 2 | 3 | atom-text-editor { 4 | /* padding-top: 102px;*/ 5 | padding-right: @number; 6 | padding-bottom: @number; 7 | } -------------------------------------------------------------------------------- /docs/apm-rest-api.md: -------------------------------------------------------------------------------- 1 | # Atom.io package and update API 2 | 3 | The information that was here has been moved to [a permanent home inside Atom's Flight Manual.](https://flight-manual.atom.io/atom-server-side-apis/) -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/ignore.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/ignore.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/ignore.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/master.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/master.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/master.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/jstips/resources/jstips-header-blog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/jstips/resources/jstips-header-blog.gif -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-hooks/package.cson: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-activation-hooks", 3 | "version": "0.1.0", 4 | "activationHooks": ['language-fictitious:grammar-used'] 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-2.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 2', command: 'command-2'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/index -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-eval-time-api-calls/index.js: -------------------------------------------------------------------------------- 1 | atom.deserializers.add('MyDeserializer', function (state) { 2 | return {state: state, a: 'b'} 3 | }) 4 | 5 | exports.activate = function () {} 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-1.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | {'label': 'Second to Last'} 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 1', command: 'command-1'} 8 | ] 9 | -------------------------------------------------------------------------------- /docs/build-instructions/macOS.md: -------------------------------------------------------------------------------- 1 | See the [Hacking on Atom Core](https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/#platform-mac) section in the [Atom Flight Manual](https://flight-manual.atom.io). 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-commands/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-activation-commands", 3 | "version": "0.1.0", 4 | "activationCommands": {"atom-workspace": []} 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-1.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 1', command: 'command-1'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-3.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Second to Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 3', command: 'command-3'} 8 | ] 9 | -------------------------------------------------------------------------------- /src/special-token-symbols.coffee: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | SoftTab: Symbol('SoftTab') 3 | HardTab: Symbol('HardTab') 4 | PairedCharacter: Symbol('PairedCharacter') 5 | SoftWrapIndent: Symbol('SoftWrapIndent') 6 | } 7 | -------------------------------------------------------------------------------- /docs/build-instructions/linux.md: -------------------------------------------------------------------------------- 1 | See the [Hacking on Atom Core](https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/#platform-linux) section in the [Atom Flight Manual](https://flight-manual.atom.io). 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/06/15f9a45968b3515e0a202530ef9f61aba26b6c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/06/15f9a45968b3515e0a202530ef9f61aba26b6c -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/16/735fb793d7b038818219c4b8c6295346e20eef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/16/735fb793d7b038818219c4b8c6295346e20eef -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/52/f56457b6fca045ce41bb9d32e6ca79d23192af: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/52/f56457b6fca045ce41bb9d32e6ca79d23192af -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/5b/24ab4c3baadf534242b1acc220c8fa051b9b20: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/5b/24ab4c3baadf534242b1acc220c8fa051b9b20 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/66/dc9051da651c15d98d017a88658263cab28f02: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/66/dc9051da651c15d98d017a88658263cab28f02 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/8a/9c86f1cb1f14b8f436eb91f4b052c8802ca99e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/8a/9c86f1cb1f14b8f436eb91f4b052c8802ca99e -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ec/5e386905ff2d36e291086a1207f2585aaa8920: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/ec/5e386905ff2d36e291086a1207f2585aaa8920 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/fe/bde178cdf35e9df6279d87aa27590c6d92e354: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/fe/bde178cdf35e9df6279d87aa27590c6d92e354 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ff/c8218bd2240a0cb92f6f02548d45784428349b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/working-dir/git.git/objects/ff/c8218bd2240a0cb92f6f02548d45784428349b -------------------------------------------------------------------------------- /docs/build-instructions/windows.md: -------------------------------------------------------------------------------- 1 | See the [Hacking on Atom Core](https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/#platform-windows) section in the [Atom Flight Manual](https://flight-manual.atom.io). 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-2.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Second to Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 2', command: 'command-2'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/styles/ui-variables.less: -------------------------------------------------------------------------------- 1 | // This does not contain all of the ui-variables available. 2 | @app-background-color: #00f; // Changed 3 | @input-background-color: #f00; // Changed 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-context-menu/menus/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "context-menu": { 3 | "<>": [ 4 | { 5 | "label": "Hello", 6 | "command:": "world" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/3e/2fe2f8226faab789f70d6d8a7231e4f2bd54df: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/3e/2fe2f8226faab789f70d6d8a7231e4f2bd54df -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/40/f4e79926a85134d4c905d04e70573b6616f3bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/40/f4e79926a85134d4c905d04e70573b6616f3bc -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/50/b89367d8f0acd312ef5aa012eac20a75c91351: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/50/b89367d8f0acd312ef5aa012eac20a75c91351 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/54/3b9bebdc6bd5c4b22136034a95dd097a57d3dd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/54/3b9bebdc6bd5c4b22136034a95dd097a57d3dd -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/d2/b0ad9cbc6f6c4372e8956e5cc5af771b2342e5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/d2/b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/d3/e073baf592c56614c68ead9e2cd0a3880140cd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/d3/e073baf592c56614c68ead9e2cd0a3880140cd -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-consumed-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | consumeFirstServiceV3: -> 7 | 8 | consumeFirstServiceV4: -> 9 | 10 | consumeSecondService: -> 11 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9f0218b7652b622afea799a4723490c43e1af1fe joshaber 1452186187 -0500 clone: from https://github.com/loverajoel/jstips 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-activation-commands/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-activation-commands", 3 | "version": "1.0.0", 4 | "activationCommands": { 5 | "<>": [ 6 | "foo:bar" 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "jstips"] 2 | path = jstips 3 | url = https://github.com/loverajoel/jstips 4 | [submodule "You-Dont-Need-jQuery"] 5 | path = You-Dont-Need-jQuery 6 | url = https://github.com/oneuijs/You-Dont-Need-jQuery 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/logs/refs/remotes/origin/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9f0218b7652b622afea799a4723490c43e1af1fe joshaber 1452186187 -0500 clone: from https://github.com/loverajoel/jstips 2 | -------------------------------------------------------------------------------- /src/safe-clipboard.coffee: -------------------------------------------------------------------------------- 1 | # Using clipboard in renderer process is not safe on Linux. 2 | module.exports = 3 | if process.platform is 'linux' and process.type is 'renderer' 4 | require('electron').remote.clipboard 5 | else 6 | require('electron').clipboard 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5" 4 | - "4" 5 | before_script: 6 | - export DISPLAY=:99.0 7 | - sh -e /etc/init.d/xvfb start 8 | script: 9 | - npm run lint 10 | - npm test 11 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/05/25ef667328cb1f86b1ddf523db4a064e1590fa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/05/25ef667328cb1f86b1ddf523db4a064e1590fa -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/1a/dd860234dad4a8bf59340363e9c88bb0457cb7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/1a/dd860234dad4a8bf59340363e9c88bb0457cb7 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/5b/35953562dbb4f2debe88fcc9ac1805064e1e5a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/5b/35953562dbb4f2debe88fcc9ac1805064e1e5a -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *~ 3 | .DS_Store 4 | Thumbs.db 5 | .project 6 | .svn 7 | .nvm-version 8 | node_modules 9 | npm-debug.log 10 | debug.log 11 | /tags 12 | /atom-shell/ 13 | /out/ 14 | docs/output 15 | docs/includes 16 | spec/fixtures/evil-files/ 17 | out/ 18 | /electron/ 19 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/README.md: -------------------------------------------------------------------------------- 1 | # Test cases for all the tips 2 | 3 | ## Usage 4 | 5 | run all tests once 6 | ``` 7 | npm run test 8 | ``` 9 | 10 | run tests on TDD(Test Driven Development) mode 11 | ``` 12 | npm run tdd 13 | ``` 14 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/hooks/post-update.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, rename this file to "post-update". 7 | 8 | exec git update-server-info 9 | -------------------------------------------------------------------------------- /apm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "atom-bundled-apm", 3 | "description": "Atom's bundled apm", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/atom/atom.git" 7 | }, 8 | "dependencies": { 9 | "atom-package-manager": "1.19.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/logs/refs/remotes/origin/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a joshaber 1452186236 -0500 clone: from https://github.com/oneuijs/You-Dont-Need-jQuery 2 | -------------------------------------------------------------------------------- /static/linux.less: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar-corner { 2 | background-color: transparent; 3 | } 4 | 5 | ::-webkit-scrollbar { 6 | width: 8px; 7 | height: 8px; 8 | } 9 | 10 | ::-webkit-scrollbar-thumb { 11 | border-radius: 2px; 12 | background: rgba(150, 150, 150, .33); 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/a7/8b35a896b890f0a2a4f1f924c5739776415250: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/a7/8b35a896b890f0a2a4f1f924c5739776415250 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/ae/897dce6e0590f08dddfe9a5152e237e955ca57: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/ae/897dce6e0590f08dddfe9a5152e237e955ca57 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/be/8ed228c0a080145d28ed625a5f487caae6a3f9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/be/8ed228c0a080145d28ed625a5f487caae6a3f9 -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/pack/pack-e568a55e02b6b7b75582924204669e4f3ed5276f.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/pack/pack-e568a55e02b6b7b75582924204669e4f3ed5276f.idx -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/pack/pack-e568a55e02b6b7b75582924204669e4f3ed5276f.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/objects/pack/pack-e568a55e02b6b7b75582924204669e4f3ed5276f.pack -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-ui-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | atom-text-editor { 4 | padding-top: @component-padding; 5 | padding-right: @component-padding; 6 | padding-bottom: @component-padding; 7 | 8 | color: @input-background-color; 9 | } 10 | -------------------------------------------------------------------------------- /exports/shell.js: -------------------------------------------------------------------------------- 1 | module.exports = require('electron').shell 2 | 3 | const Grim = require('grim') 4 | Grim.deprecate('Use `require("electron").shell` instead of `require("shell")`') 5 | 6 | // Ensure each package that requires this shim causes a deprecation warning 7 | delete require.cache[__filename] 8 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/hooks/post-update.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, rename this file to "post-update". 7 | 8 | exec git update-server-info 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deserializers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-deserializers", 3 | "version": "1.0.0", 4 | "main": "./index", 5 | "deserializers": { 6 | "Deserializer1": "deserializeMethod1", 7 | "Deserializer2": "deserializeMethod2" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-grammars/grammars/alot.cson: -------------------------------------------------------------------------------- 1 | 'fileTypes': ['alot', 'foobizbang'] 2 | 'name': 'Alot' 3 | 'scopeName': 'source.alot' 4 | 5 | 'patterns': [ 6 | { 7 | 'captures': 8 | '0': 9 | 'name': 'keyword.alot' 10 | 'match': 'alot' 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /exports/remote.js: -------------------------------------------------------------------------------- 1 | module.exports = require('electron').remote 2 | 3 | const Grim = require('grim') 4 | Grim.deprecate('Use `require("electron").remote` instead of `require("remote")`') 5 | 6 | // Ensure each package that requires this shim causes a deprecation warning 7 | delete require.cache[__filename] 8 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-grammars/grammars/alittle.cson: -------------------------------------------------------------------------------- 1 | 'fileTypes': ['alittle'] 2 | 'name': 'Alittle' 3 | 'scopeName': 'source.alittle' 4 | 5 | 'patterns': [ 6 | { 7 | 'captures': 8 | '0': 9 | 'name': 'keyword.alittle' 10 | 'match': 'alittle' 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-consumed-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-missing-consumed-services", 3 | 4 | "consumedServices": { 5 | "service-1": { 6 | "versions": { 7 | ">=0.1": "consumeMissingService" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /exports/ipc.js: -------------------------------------------------------------------------------- 1 | module.exports = require('electron').ipcRenderer 2 | 3 | const Grim = require('grim') 4 | Grim.deprecate('Use `require("electron").ipcRenderer` instead of `require("ipc")`') 5 | 6 | // Ensure each package that requires this shim causes a deprecation warning 7 | delete require.cache[__filename] 8 | -------------------------------------------------------------------------------- /exports/clipboard.js: -------------------------------------------------------------------------------- 1 | module.exports = require('electron').clipboard 2 | 3 | const Grim = require('grim') 4 | Grim.deprecate('Use `require("electron").clipboard` instead of `require("clipboard")`') 5 | 6 | // Ensure each package that requires this shim causes a deprecation warning 7 | delete require.cache[__filename] 8 | -------------------------------------------------------------------------------- /exports/web-frame.js: -------------------------------------------------------------------------------- 1 | module.exports = require('electron').webFrame 2 | 3 | const Grim = require('grim') 4 | Grim.deprecate('Use `require("electron").webFrame` instead of `require("web-frame")`') 5 | 6 | // Ensure each package that requires this shim causes a deprecation warning 7 | delete require.cache[__filename] 8 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/hooks/post-update.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, rename this file to "post-update". 7 | 8 | exec git update-server-info 9 | -------------------------------------------------------------------------------- /src/get-window-load-settings.js: -------------------------------------------------------------------------------- 1 | const {remote} = require('electron') 2 | 3 | let windowLoadSettings = null 4 | 5 | module.exports = () => { 6 | if (!windowLoadSettings) { 7 | windowLoadSettings = JSON.parse(remote.getCurrentWindow().loadSettingsJSON) 8 | } 9 | return windowLoadSettings 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-rb-filetype/grammars/rb.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Test Ruby' 2 | 'scopeName': 'test.rb' 3 | 'firstLineMatch': '^\\#!.*(?:\\s|\\/)(?:testruby)(?:$|\\s)' 4 | 'fileTypes': [ 5 | 'rb' 6 | ] 7 | 'patterns': [ 8 | { 9 | 'match': 'ruby' 10 | 'name': 'meta.class.ruby' 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /script/lib/clean-output-directory.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const CONFIG = require('../config') 3 | 4 | module.exports = function () { 5 | if (fs.existsSync(CONFIG.buildOutputPath)) { 6 | console.log(`Cleaning ${CONFIG.buildOutputPath}`) 7 | fs.removeSync(CONFIG.buildOutputPath) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /script/verify-snapshot-script: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const fs = require('fs') 3 | const vm = require('vm') 4 | const snapshotScriptPath = process.argv[2] 5 | const snapshotScript = fs.readFileSync(snapshotScriptPath, 'utf8') 6 | vm.runInNewContext(snapshotScript, undefined, {filename: snapshotScriptPath, displayErrors: true}) 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/pack/pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/pack/pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.idx -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/pack/pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jborovicka/atom/master/spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/objects/pack/pack-d38b3bc339acd655e8dae9c0dcea8bb2ec174d16.pack -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | whitespace is nicespace 2 | # Please enter the commit message for your changes. Lines starting 3 | # with '#' will be ignored, and an empty message aborts the commit. 4 | # On branch test 5 | # Changes to be committed: 6 | # modified: README.md 7 | # 8 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-commands/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activateCallCount: 0 3 | activationCommandCallCount: 0 4 | 5 | activate: -> 6 | @activateCallCount++ 7 | 8 | atom.commands.add 'atom-workspace', 'activation-command', => 9 | @activationCommandCallCount++ 10 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-json-config-schema/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-json-config-schema", 3 | "configSchema": { 4 | "a": { 5 | "type": "number", 6 | "default": 5 7 | }, 8 | "b": { 9 | "type": "string", 10 | "default": "five" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-tree-sitter-grammar/grammars/some-language.cson: -------------------------------------------------------------------------------- 1 | name: 'Some Language' 2 | 3 | id: 'some-language' 4 | 5 | type: 'tree-sitter' 6 | 7 | parser: './fake-parser' 8 | 9 | fileTypes: [ 10 | 'somelang' 11 | ] 12 | 13 | scopes: 14 | 'class > identifier': 'entity.name.type.class' 15 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /src/crash-reporter-start.js: -------------------------------------------------------------------------------- 1 | module.exports = function (extra) { 2 | const {crashReporter} = require('electron') 3 | crashReporter.start({ 4 | productName: 'Atom', 5 | companyName: 'GitHub', 6 | submitURL: 'https://crashreporter.atom.io', 7 | uploadToServer: false, 8 | extra: extra 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /src/first-mate-helpers.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | fromFirstMateScopeId (firstMateScopeId) { 3 | let atomScopeId = -firstMateScopeId 4 | if ((atomScopeId & 1) === 0) atomScopeId-- 5 | return atomScopeId + 256 6 | }, 7 | 8 | toFirstMateScopeId (atomScopeId) { 9 | return -(atomScopeId - 256) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-config-schema/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | config: 3 | numbers: 4 | type: 'object' 5 | properties: 6 | one: 7 | type: 'integer' 8 | default: 1 9 | two: 10 | type: 'integer' 11 | default: 2 12 | 13 | activate: -> # no-op 14 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-provided-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-missing-provided-services", 3 | 4 | "providedServices": { 5 | "service-1": { 6 | "description": "The first service", 7 | "versions": { 8 | "0.2.9": "provideMissingService" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /resources/linux/debian/lintian-overrides: -------------------------------------------------------------------------------- 1 | atom: arch-dependent-file-in-usr-share 2 | atom: changelog-file-missing-in-native-package 3 | atom: copyright-file-contains-full-apache-2-license 4 | atom: copyright-should-refer-to-common-license-file-for-apache-2 5 | atom: embedded-library 6 | atom: package-installs-python-bytecode 7 | atom: unstripped-binary-or-object 8 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/logs/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 d3e073baf592c56614c68ead9e2cd0a3880140cd joshaber 1452185922 -0500 commit (initial): first 2 | d3e073baf592c56614c68ead9e2cd0a3880140cd d2b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 joshaber 1452186239 -0500 commit: submodules 3 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 d3e073baf592c56614c68ead9e2cd0a3880140cd joshaber 1452185922 -0500 commit (initial): first 2 | d3e073baf592c56614c68ead9e2cd0a3880140cd d2b0ad9cbc6f6c4372e8956e5cc5af771b2342e5 joshaber 1452186239 -0500 commit: submodules 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-directory-provider/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-directory-provider", 3 | 4 | "providedServices": { 5 | "atom.directory-provider": { 6 | "description": "Provides custom Directory instances", 7 | "versions": { 8 | "0.1.1": "provideDirectoryProvider" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /resources/linux/atom.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=<%= appName %> 3 | Comment=<%= description %> 4 | GenericName=Text Editor 5 | Exec=<%= installDir %>/share/<%= appFileName %>/atom %F 6 | Icon=<%= iconPath %> 7 | Type=Application 8 | StartupNotify=true 9 | Categories=GNOME;GTK;Utility;TextEditor;Development; 10 | MimeType=text/plain; 11 | StartupWMClass=Atom 12 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | submodules 2 | # Please enter the commit message for your changes. Lines starting 3 | # with '#' will be ignored, and an empty message aborts the commit. 4 | # On branch master 5 | # Changes to be committed: 6 | # new file: .gitmodules 7 | # new file: You-Dont-Need-jQuery 8 | # new file: jstips 9 | # 10 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-view-providers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-view-providers", 3 | "main": "./index", 4 | "version": "1.0.0", 5 | "deserializers": { 6 | "DeserializerFromPackageWithViewProviders": "theDeserializerMethod" 7 | }, 8 | "viewProviders": [ 9 | "viewProviderMethod1", 10 | "viewProviderMethod2" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-cached-incompatible-native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-cached-incompatible-native-module", 3 | "version": "1.0.0", 4 | "main": "./main.js", 5 | "_atomModuleCache": { 6 | "extensions": { 7 | ".node": [ 8 | "node_modules/native-module/build/Release/native.node" 9 | ] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-provided-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | provideFirstServiceV2: -> 7 | 'first-service-v2' 8 | 9 | provideFirstServiceV3: -> 10 | 'first-service-v3' 11 | 12 | provideFirstServiceV4: -> 13 | 'first-service-v4' 14 | 15 | provideSecondService: -> 16 | 'second-service' 17 | -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/logs/refs/heads/test: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9f0218b7652b622afea799a4723490c43e1af1fe joshaber 1452201852 -0500 branch: Created from HEAD 2 | 9f0218b7652b622afea799a4723490c43e1af1fe 0525ef667328cb1f86b1ddf523db4a064e1590fa joshaber 1452201881 -0500 commit: whitespace is nicespace 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-ignored-incompatible-native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-ignored-incompatible-native-module", 3 | "version": "1.0.0", 4 | "main": "./main.js", 5 | "_atomModuleCache": { 6 | "extensions": { 7 | ".node": [ 8 | "node_modules/compatible-native-module/build/Release/native.node" 9 | ] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-prefixed-and-suffixed-repo-url/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-a-git-prefixed-git-repo-url", 3 | "repository": { 4 | "type": "git", 5 | "url": "git+https://github.com/example/repo.git" 6 | }, 7 | "_id": "this is here to simulate the URL being already normalized by npm. we still need to stript git+ from the beginning and .git from the end." 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | atom-text-editor { 4 | padding-top: @component-padding; 5 | padding-right: @component-padding; 6 | padding-bottom: @component-padding; 7 | 8 | color: @input-background-color; 9 | background-color: @background-color-info; // From the fallback variables, not overridden 10 | } 11 | -------------------------------------------------------------------------------- /resources/win/atom.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var spawn = require('child_process').spawn; 3 | 4 | var atomCommandPath = path.resolve(__dirname, '..', '..', 'atom.exe'); 5 | var arguments = process.argv.slice(2); 6 | arguments.unshift('--executed-from', process.cwd()); 7 | var options = {detached: true, stdio: 'ignore'}; 8 | spawn(atomCommandPath, arguments, options); 9 | process.exit(0); 10 | -------------------------------------------------------------------------------- /script/lib/install-apm.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const childProcess = require('child_process') 4 | 5 | const CONFIG = require('../config') 6 | 7 | module.exports = function () { 8 | console.log('Installing apm') 9 | childProcess.execFileSync( 10 | CONFIG.getNpmBinPath(), 11 | ['--global-style', '--loglevel=error', 'install'], 12 | {env: process.env, cwd: CONFIG.apmRootPath} 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /spec/atom-protocol-handler-spec.coffee: -------------------------------------------------------------------------------- 1 | describe '"atom" protocol URL', -> 2 | it 'sends the file relative in the package as response', -> 3 | called = false 4 | request = new XMLHttpRequest() 5 | request.addEventListener('load', -> called = true) 6 | request.open('GET', 'atom://async/package.json', true) 7 | request.send() 8 | 9 | waitsFor 'request to be done', -> called is true 10 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | whitespace is nicespace 2 | # Please enter the commit message for your changes. Lines starting 3 | # with '#' will be ignored, and an empty message aborts the commit. 4 | # On branch master 5 | # Your branch is up-to-date with 'origin/master'. 6 | # 7 | # Changes to be committed: 8 | # modified: README.md 9 | # 10 | -------------------------------------------------------------------------------- /script/lib/install-script-dependencies.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const childProcess = require('child_process') 4 | 5 | const CONFIG = require('../config') 6 | 7 | module.exports = function () { 8 | console.log('Installing script dependencies') 9 | childProcess.execFileSync( 10 | CONFIG.getNpmBinPath(), 11 | ['--loglevel=error', 'install'], 12 | {env: process.env, cwd: CONFIG.scriptRootPath} 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/logs/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a joshaber 1452186236 -0500 clone: from https://github.com/oneuijs/You-Dont-Need-jQuery 2 | 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a a78b35a896b890f0a2a4f1f924c5739776415250 joshaber 1452202510 -0500 commit: whitespace is nicespace 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deserializers/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | initialize() {}, 3 | activate () {}, 4 | 5 | deserializeMethod1 (state) { 6 | return { 7 | wasDeserializedBy: 'deserializeMethod1', 8 | state: state 9 | } 10 | }, 11 | 12 | deserializeMethod2 (state) { 13 | return { 14 | wasDeserializedBy: 'deserializeMethod2', 15 | state: state 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spec/typescript-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "TypeScript transpiler support", -> 2 | describe "when there is a .ts file", -> 3 | it "transpiles it using typescript", -> 4 | transpiled = require('./fixtures/typescript/valid.ts') 5 | expect(transpiled(3)).toBe 4 6 | 7 | describe "when the .ts file is invalid", -> 8 | it "does not transpile", -> 9 | expect(-> require('./fixtures/typescript/invalid.ts')).toThrow() 10 | -------------------------------------------------------------------------------- /script/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict' 4 | 5 | const cleanCaches = require('./lib/clean-caches') 6 | const cleanDependencies = require('./lib/clean-dependencies') 7 | const cleanOutputDirectory = require('./lib/clean-output-directory') 8 | const killRunningAtomInstances = require('./lib/kill-running-atom-instances') 9 | 10 | killRunningAtomInstances() 11 | cleanDependencies() 12 | cleanCaches() 13 | cleanOutputDirectory() 14 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a joshaber 1452186236 -0500 clone: from https://github.com/oneuijs/You-Dont-Need-jQuery 2 | 2e9bbc77d60f20eb462ead5b2ac7405b62b9b90a a78b35a896b890f0a2a4f1f924c5739776415250 joshaber 1452202510 -0500 commit: whitespace is nicespace 3 | -------------------------------------------------------------------------------- /dot-atom/init.coffee: -------------------------------------------------------------------------------- 1 | # Your init script 2 | # 3 | # Atom will evaluate this file each time a new window is opened. It is run 4 | # after packages are loaded/activated and after the previous editor state 5 | # has been restored. 6 | # 7 | # An example hack to log to the console when each text editor is saved. 8 | # 9 | # atom.workspace.observeTextEditors (editor) -> 10 | # editor.onDidSave -> 11 | # console.log "Saved! #{editor.getPath()}" 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # VERSION: 0.1 2 | # DESCRIPTION: Image to build Atom and create a .rpm file 3 | 4 | # Base docker image 5 | FROM nodesource/fedora21:4.2.6 6 | 7 | # Install dependencies 8 | RUN yum install -y \ 9 | make \ 10 | gcc \ 11 | gcc-c++ \ 12 | glibc-devel \ 13 | git-core \ 14 | libsecret-devel \ 15 | rpmdevtools 16 | 17 | RUN npm install -g npm --loglevel error 18 | 19 | ADD . /atom 20 | WORKDIR /atom 21 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | worktree = ../../../jstips 7 | ignorecase = true 8 | precomposeunicode = true 9 | [remote "origin"] 10 | url = https://github.com/loverajoel/jstips 11 | fetch = +refs/heads/*:refs/remotes/origin/* 12 | [branch "master"] 13 | remote = origin 14 | merge = refs/heads/master 15 | -------------------------------------------------------------------------------- /script/lib/read-files.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | 5 | module.exports = function (paths) { 6 | return Promise.all(paths.map(readFile)) 7 | } 8 | 9 | function readFile (path) { 10 | return new Promise((resolve, reject) => { 11 | fs.readFile(path, 'utf8', (error, content) => { 12 | if (error) { 13 | reject(error) 14 | } else { 15 | resolve({path, content}) 16 | } 17 | }) 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-airbnb", 3 | "env": { 4 | "browser": true, 5 | "mocha": true, 6 | "node": true 7 | }, 8 | "rules": { 9 | "valid-jsdoc": 2, 10 | "no-param-reassign": 0, 11 | "comma-dangle": 0, 12 | "one-var": 0, 13 | "no-else-return": 1, 14 | "no-unused-expressions": 0, 15 | "indent": 1, 16 | "eol-last": 0 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-consumed-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-consumed-services", 3 | 4 | "consumedServices": { 5 | "service-1": { 6 | "versions": { 7 | ">=0.2 <=0.3.6": "consumeFirstServiceV3", 8 | "^0.4.1": "consumeFirstServiceV4" 9 | } 10 | }, 11 | "service-2": { 12 | "versions": { 13 | "0.2.1 || 0.2.2": "consumeSecondService" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spec/fixtures/sample.js: -------------------------------------------------------------------------------- 1 | var quicksort = function () { 2 | var sort = function(items) { 3 | if (items.length <= 1) return items; 4 | var pivot = items.shift(), current, left = [], right = []; 5 | while(items.length > 0) { 6 | current = items.shift(); 7 | current < pivot ? left.push(current) : right.push(current); 8 | } 9 | return sort(left).concat(pivot).concat(sort(right)); 10 | }; 11 | 12 | return sort(Array.apply(this, arguments)); 13 | }; -------------------------------------------------------------------------------- /script/lib/kill-running-atom-instances.js: -------------------------------------------------------------------------------- 1 | const childProcess = require('child_process') 2 | 3 | const CONFIG = require('../config.js') 4 | 5 | module.exports = function () { 6 | if (process.platform === 'win32') { 7 | // Use START as a way to ignore error if Atom.exe isnt running 8 | childProcess.execSync(`START taskkill /F /IM ${CONFIG.appMetadata.productName}.exe`) 9 | } else { 10 | childProcess.execSync(`pkill -9 ${CONFIG.appMetadata.productName} || true`) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | worktree = ../../../You-Dont-Need-jQuery 7 | ignorecase = true 8 | precomposeunicode = true 9 | [remote "origin"] 10 | url = https://github.com/oneuijs/You-Dont-Need-jQuery 11 | fetch = +refs/heads/*:refs/remotes/origin/* 12 | [branch "master"] 13 | remote = origin 14 | merge = refs/heads/master 15 | -------------------------------------------------------------------------------- /src/item-registry.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | class ItemRegistry { 3 | constructor () { 4 | this.items = new WeakSet() 5 | } 6 | 7 | addItem (item) { 8 | if (this.hasItem(item)) { 9 | throw new Error(`The workspace can only contain one instance of item ${item}`) 10 | } 11 | return this.items.add(item) 12 | } 13 | 14 | removeItem (item) { 15 | return this.items.delete(item) 16 | } 17 | 18 | hasItem (item) { 19 | return this.items.has(item) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/model.coffee: -------------------------------------------------------------------------------- 1 | nextInstanceId = 1 2 | 3 | module.exports = 4 | class Model 5 | @resetNextInstanceId: -> nextInstanceId = 1 6 | 7 | alive: true 8 | 9 | constructor: (params) -> 10 | @assignId(params?.id) 11 | 12 | assignId: (id) -> 13 | @id ?= id ? nextInstanceId++ 14 | nextInstanceId = id + 1 if id >= nextInstanceId 15 | 16 | destroy: -> 17 | return unless @isAlive() 18 | @alive = false 19 | @destroyed?() 20 | 21 | isAlive: -> @alive 22 | 23 | isDestroyed: -> not @isAlive() 24 | -------------------------------------------------------------------------------- /script/lib/expand-glob-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const glob = require('glob') 4 | 5 | module.exports = function (globPaths) { 6 | return Promise.all(globPaths.map(g => expandGlobPath(g))).then(paths => paths.reduce((a, b) => a.concat(b), [])) 7 | } 8 | 9 | function expandGlobPath (globPath) { 10 | return new Promise((resolve, reject) => { 11 | glob(globPath, (error, paths) => { 12 | if (error) { 13 | reject(error) 14 | } else { 15 | resolve(paths) 16 | } 17 | }) 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /spec/fixtures/coffee.coffee: -------------------------------------------------------------------------------- 1 | class quicksort 2 | sort: (items) -> 3 | return items if items.length <= 1 4 | 5 | pivot = items.shift() 6 | left = [] 7 | right = [] 8 | 9 | # Comment in the middle 10 | 11 | while items.length > 0 12 | current = items.shift() 13 | if current < pivot 14 | left.push(current) 15 | else 16 | right.push(current); 17 | 18 | sort(left).concat(pivot).concat(sort(right)) 19 | 20 | noop: -> 21 | # just a noop 22 | 23 | exports.modules = quicksort 24 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | precommit="$(git rev-parse --git-path hooks/pre-commit)" 13 | test -x "$precommit" && exec "$precommit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | precommit="$(git rev-parse --git-path hooks/pre-commit)" 13 | test -x "$precommit" && exec "$precommit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/logs/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 9f0218b7652b622afea799a4723490c43e1af1fe joshaber 1452186187 -0500 clone: from https://github.com/loverajoel/jstips 2 | 9f0218b7652b622afea799a4723490c43e1af1fe 9f0218b7652b622afea799a4723490c43e1af1fe joshaber 1452201852 -0500 checkout: moving from master to test 3 | 9f0218b7652b622afea799a4723490c43e1af1fe 0525ef667328cb1f86b1ddf523db4a064e1590fa joshaber 1452201881 -0500 commit: whitespace is nicespace 4 | -------------------------------------------------------------------------------- /src/replace-handler.coffee: -------------------------------------------------------------------------------- 1 | {PathReplacer} = require 'scandal' 2 | 3 | module.exports = (filePaths, regexSource, regexFlags, replacementText) -> 4 | callback = @async() 5 | 6 | replacer = new PathReplacer() 7 | regex = new RegExp(regexSource, regexFlags) 8 | 9 | replacer.on 'file-error', ({code, path, message}) -> 10 | emit('replace:file-error', {code, path, message}) 11 | 12 | replacer.on 'path-replaced', (result) -> 13 | emit('replace:path-replaced', result) 14 | 15 | replacer.replacePaths(regex, replacementText, filePaths, -> callback()) 16 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | precommit="$(git rev-parse --git-path hooks/pre-commit)" 13 | test -x "$precommit" && exec "$precommit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-provided-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-provided-services", 3 | 4 | "providedServices": { 5 | "service-1": { 6 | "description": "The first service", 7 | "versions": { 8 | "0.2.9": "provideFirstServiceV2", 9 | "0.3.1": "provideFirstServiceV3", 10 | "0.4.1": "provideFirstServiceV4" 11 | } 12 | }, 13 | "service-2": { 14 | "description": "The second service", 15 | "versions": { 16 | "0.2.1": "provideSecondService" 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | precomposeunicode = true 8 | [branch "master"] 9 | remote = origin 10 | merge = refs/heads/master 11 | [remote "origin"] 12 | url = git@github.com:atom/some-repo-i-guess.git 13 | fetch = +refs/heads/*:refs/remotes/origin/* 14 | [submodule "jstips"] 15 | url = https://github.com/loverajoel/jstips 16 | [submodule "You-Dont-Need-jQuery"] 17 | url = https://github.com/oneuijs/You-Dont-Need-jQuery 18 | -------------------------------------------------------------------------------- /script/lib/delete-msbuild-from-path.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | 6 | module.exports = function () { 7 | process.env['PATH'] = 8 | process.env['PATH'] 9 | .split(';') 10 | .filter(function (p) { 11 | if (fs.existsSync(path.join(p, 'msbuild.exe'))) { 12 | console.log('Excluding "' + p + '" from PATH to avoid msbuild.exe mismatch that causes errors during module installation') 13 | return false 14 | } else { 15 | return true 16 | } 17 | }) 18 | .join(';') 19 | } 20 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | commitmsg="$(git rev-parse --git-path hooks/commit-msg)" 14 | test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | commitmsg="$(git rev-parse --git-path hooks/commit-msg)" 14 | test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /src/custom-event-mixin.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | CustomEventMixin = 3 | componentWillMount: -> 4 | @customEventListeners = {} 5 | 6 | componentWillUnmount: -> 7 | for name, listeners in @customEventListeners 8 | for listener in listeners 9 | @getDOMNode().removeEventListener(name, listener) 10 | return 11 | 12 | addCustomEventListeners: (customEventListeners) -> 13 | for name, listener of customEventListeners 14 | @customEventListeners[name] ?= [] 15 | @customEventListeners[name].push(listener) 16 | @getDOMNode().addEventListener(name, listener) 17 | return 18 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | commitmsg="$(git rev-parse --git-path hooks/commit-msg)" 14 | test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Specs depend on character counts, if we don't specify the line endings the 2 | # fixtures will vary depending on platform 3 | spec/fixtures/**/*.js text eol=lf 4 | spec/fixtures/**/*.coffee text eol=lf 5 | spec/fixtures/**/*.less text eol=lf 6 | spec/fixtures/**/*.css text eol=lf 7 | spec/fixtures/**/*.txt text eol=lf 8 | spec/fixtures/dir/**/* text eol=lf 9 | 10 | # Git 1.7 does not support **/* patterns 11 | spec/fixtures/css.css text eol=lf 12 | spec/fixtures/sample.js text eol=lf 13 | spec/fixtures/sample.less text eol=lf 14 | spec/fixtures/sample.txt text eol=lf 15 | 16 | # Windows bash scripts are also Unix LF endings 17 | *.sh eol=lf 18 | -------------------------------------------------------------------------------- /script/lib/clean-package-lock.js: -------------------------------------------------------------------------------- 1 | // This module exports a function that deletes all `package-lock.json` files that do 2 | // not exist under a `node_modules` directory. 3 | 4 | 'use strict' 5 | 6 | const CONFIG = require('../config') 7 | const fs = require('fs-extra') 8 | const glob = require('glob') 9 | const path = require('path') 10 | 11 | module.exports = function () { 12 | console.log('Deleting problematic package-lock.json files') 13 | let paths = glob.sync(path.join(CONFIG.repositoryRootPath, '**', 'package-lock.json'), {ignore: path.join('**', 'node_modules', '**')}) 14 | 15 | for (let path of paths) { 16 | fs.unlinkSync(path) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /static/workspace-view.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | atom-workspace { 4 | display: flex; 5 | flex-direction: column; 6 | height: 100%; 7 | overflow: hidden; 8 | position: relative; 9 | color: @text-color; 10 | background-color: @app-background-color; 11 | font-family: @font-family; 12 | 13 | atom-workspace-axis { 14 | position: relative; 15 | } 16 | 17 | atom-workspace-axis.horizontal { 18 | display: flex; 19 | flex: 1; 20 | min-width: 0; 21 | min-height: 0; 22 | } 23 | 24 | atom-workspace-axis.vertical { 25 | display: flex; 26 | flex: 1; 27 | flex-direction: column; 28 | min-width: 0; 29 | min-height: 0; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /resources/linux/debian/control.in: -------------------------------------------------------------------------------- 1 | Package: <%= appFileName %> 2 | Version: <%= version %> 3 | Depends: git, gconf2, gconf-service, libgtk2.0-0, libudev0 | libudev1, libgcrypt11 | libgcrypt20, libnotify4, libxtst6, libnss3 (>= 2:3.22), python, gvfs-bin, xdg-utils, libcap2, libx11-xcb1, libxss1, libasound2 (>= 1.0.16), libxkbfile1 4 | Recommends: lsb-release 5 | Suggests: libsecret-1-0, gir1.2-gnomekeyring-1.0 6 | Section: devel 7 | Priority: optional 8 | Architecture: <%= arch %> 9 | Installed-Size: <%= installedSize %> 10 | Maintainer: GitHub 11 | Description: <%= description %> 12 | Atom is a free and open source text editor that is modern, approachable, and hackable to the core. 13 | -------------------------------------------------------------------------------- /spec/clipboard-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "Clipboard", -> 2 | describe "write(text, metadata) and read()", -> 3 | it "writes and reads text to/from the native clipboard", -> 4 | expect(atom.clipboard.read()).toBe 'initial clipboard content' 5 | atom.clipboard.write('next') 6 | expect(atom.clipboard.read()).toBe 'next' 7 | 8 | it "returns metadata if the item on the native clipboard matches the last written item", -> 9 | atom.clipboard.write('next', {meta: 'data'}) 10 | expect(atom.clipboard.read()).toBe 'next' 11 | expect(atom.clipboard.readWithMetadata().text).toBe 'next' 12 | expect(atom.clipboard.readWithMetadata().metadata).toEqual {meta: 'data'} 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-view-providers/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | activate () {}, 5 | 6 | theDeserializerMethod (state) { 7 | return {state: state} 8 | }, 9 | 10 | viewProviderMethod1 (model) { 11 | if (model.worksWithViewProvider1) { 12 | let element = document.createElement('div') 13 | element.dataset['createdBy'] = 'view-provider-1' 14 | return element 15 | } 16 | }, 17 | 18 | viewProviderMethod2 (model) { 19 | if (model.worksWithViewProvider2) { 20 | let element = document.createElement('div') 21 | element.dataset['createdBy'] = 'view-provider-2' 22 | return element 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Atom Support 2 | 3 | If you're looking for support for Atom there are a lot of options, check out: 4 | 5 | * User Documentation — [The Atom Flight Manual](https://flight-manual.atom.io) 6 | * Developer Documentation — [Atom API Documentation](https://atom.io/docs/api/latest) 7 | * FAQ — [The Atom FAQ on Discuss](https://discuss.atom.io/c/faq) 8 | * Message Board — [Discuss, the official Atom and Electron message board](https://discuss.atom.io) 9 | * Chat — [Join the Atom Slack team](https://atom-slack.herokuapp.com/) 10 | 11 | On Discuss and in the Atom Slack team, there are a bunch of helpful community members that should be willing to point you in the right direction. 12 | -------------------------------------------------------------------------------- /script/lib/run-apm-install.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const childProcess = require('child_process') 4 | 5 | const CONFIG = require('../config') 6 | 7 | module.exports = function (packagePath) { 8 | const installEnv = Object.assign({}, process.env) 9 | // Set resource path so that apm can load metadata related to Atom. 10 | installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath 11 | // Set our target (Electron) version so that node-pre-gyp can download the 12 | // proper binaries. 13 | installEnv.npm_config_target = CONFIG.appMetadata.electronVersion 14 | childProcess.execFileSync( 15 | CONFIG.getApmBinPath(), 16 | ['--loglevel=error', 'install'], 17 | {env: installEnv, cwd: packagePath, stdio: 'inherit'} 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /script/lib/download-file-from-github.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs-extra') 4 | const path = require('path') 5 | const syncRequest = require('sync-request') 6 | 7 | module.exports = function (downloadURL, destinationPath) { 8 | console.log(`Downloading file from GitHub Repository to ${destinationPath}`) 9 | const response = syncRequest('GET', downloadURL, { 10 | 'headers': {'Accept': 'application/vnd.github.v3.raw', 'User-Agent': 'Atom Build'} 11 | }) 12 | 13 | if (response.statusCode === 200) { 14 | fs.mkdirpSync(path.dirname(destinationPath)) 15 | fs.writeFileSync(destinationPath, response.body) 16 | } else { 17 | throw new Error('Error downloading file. HTTP Status ' + response.statusCode + '.') 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "max_line_length": { 3 | "level": "ignore" 4 | }, 5 | "no_empty_param_list": { 6 | "level": "error" 7 | }, 8 | "arrow_spacing": { 9 | "level": "error" 10 | }, 11 | "no_interpolation_in_single_quotes": { 12 | "level": "error" 13 | }, 14 | "no_debugger": { 15 | "level": "error" 16 | }, 17 | "prefer_english_operator": { 18 | "level": "error" 19 | }, 20 | "colon_assignment_spacing": { 21 | "spacing": { 22 | "left": 0, 23 | "right": 1 24 | }, 25 | "level": "error" 26 | }, 27 | "braces_spacing": { 28 | "spaces": 0, 29 | "level": "error" 30 | }, 31 | "spacing_after_comma": { 32 | "level": "error" 33 | }, 34 | "no_stand_alone_at": { 35 | "level": "error" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Atom Docs 2 | 3 | ![Atom](https://cloud.githubusercontent.com/assets/72919/2874231/3af1db48-d3dd-11e3-98dc-6066f8bc766f.png) 4 | 5 | Most of the Atom user and developer documentation is contained in the [Atom Flight Manual](https://github.com/atom/flight-manual.atom.io). 6 | 7 | ## Build documentation 8 | 9 | Instructions for building Atom on various platforms from source. 10 | 11 | * Moved to [the Flight Manual](https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/) 12 | * Linux 13 | * macOS 14 | * Windows 15 | 16 | ## Other documentation 17 | 18 | [Native Profiling on macOS](./native-profiling.md) 19 | 20 | The other documentation that was listed here previously has been moved to [the Flight Manual](https://flight-manual.atom.io). 21 | -------------------------------------------------------------------------------- /spec/keymap-extensions-spec.coffee: -------------------------------------------------------------------------------- 1 | path = require 'path' 2 | temp = require('temp').track() 3 | CSON = require 'season' 4 | fs = require 'fs-plus' 5 | 6 | describe "keymap-extensions", -> 7 | 8 | beforeEach -> 9 | atom.keymaps.configDirPath = temp.path('atom-spec-keymap-ext') 10 | fs.writeFileSync(atom.keymaps.getUserKeymapPath(), '#') 11 | @userKeymapLoaded = -> 12 | atom.keymaps.onDidLoadUserKeymap => @userKeymapLoaded() 13 | 14 | afterEach -> 15 | fs.removeSync(atom.keymaps.configDirPath) 16 | atom.keymaps.destroy() 17 | 18 | describe "did-load-user-keymap", -> 19 | 20 | it "fires when user keymap is loaded", -> 21 | spyOn(this, 'userKeymapLoaded') 22 | atom.keymaps.loadUserKeymap() 23 | expect(@userKeymapLoaded).toHaveBeenCalled() 24 | -------------------------------------------------------------------------------- /src/scoped-properties.coffee: -------------------------------------------------------------------------------- 1 | CSON = require 'season' 2 | 3 | module.exports = 4 | class ScopedProperties 5 | @load: (scopedPropertiesPath, config, callback) -> 6 | CSON.readFile scopedPropertiesPath, (error, scopedProperties={}) -> 7 | if error? 8 | callback(error) 9 | else 10 | callback(null, new ScopedProperties(scopedPropertiesPath, scopedProperties, config)) 11 | 12 | constructor: (@path, @scopedProperties, @config) -> 13 | 14 | activate: -> 15 | for selector, properties of @scopedProperties 16 | @config.set(null, properties, scopeSelector: selector, source: @path) 17 | return 18 | 19 | deactivate: -> 20 | for selector of @scopedProperties 21 | @config.unset(null, scopeSelector: selector, source: @path) 22 | return 23 | -------------------------------------------------------------------------------- /script/lib/handle-tilde.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const os = require('os') 4 | const passwdUser = require('passwd-user') 5 | const path = require('path') 6 | 7 | module.exports = function (aPath) { 8 | if (!aPath.startsWith('~')) { 9 | return aPath 10 | } 11 | 12 | const sepIndex = aPath.indexOf(path.sep) 13 | const user = (sepIndex < 0) ? aPath.substring(1) : aPath.substring(1, sepIndex) 14 | const rest = (sepIndex < 0) ? '' : aPath.substring(sepIndex) 15 | const home = (user === '') ? os.homedir() : (() => { 16 | const passwd = passwdUser.sync(user) 17 | if (passwd === undefined) { 18 | throw new Error(`Failed to expand the tilde in ${aPath} - user "${user}" does not exist`) 19 | } 20 | return passwd.homedir 21 | })() 22 | 23 | return `${home}${rest}` 24 | } 25 | -------------------------------------------------------------------------------- /src/token.coffee: -------------------------------------------------------------------------------- 1 | _ = require 'underscore-plus' 2 | 3 | StartDotRegex = /^\.?/ 4 | 5 | # Represents a single unit of text as selected by a grammar. 6 | module.exports = 7 | class Token 8 | value: null 9 | scopes: null 10 | 11 | constructor: (properties) -> 12 | {@value, @scopes} = properties 13 | 14 | isEqual: (other) -> 15 | # TODO: scopes is deprecated. This is here for the sake of lang package tests 16 | @value is other.value and _.isEqual(@scopes, other.scopes) 17 | 18 | isBracket: -> 19 | /^meta\.brace\b/.test(_.last(@scopes)) 20 | 21 | matchesScopeSelector: (selector) -> 22 | targetClasses = selector.replace(StartDotRegex, '').split('.') 23 | _.any @scopes, (scope) -> 24 | scopeClasses = scope.split('.') 25 | _.isSubset(targetClasses, scopeClasses) 26 | -------------------------------------------------------------------------------- /dot-atom/snippets.cson: -------------------------------------------------------------------------------- 1 | # Your snippets 2 | # 3 | # Atom snippets allow you to enter a simple prefix in the editor and hit tab to 4 | # expand the prefix into a larger code block with templated values. 5 | # 6 | # You can create a new snippet in this file by typing "snip" and then hitting 7 | # tab. 8 | # 9 | # An example CoffeeScript snippet to expand log to console.log: 10 | # 11 | # '.source.coffee': 12 | # 'Console log': 13 | # 'prefix': 'log' 14 | # 'body': 'console.log $1' 15 | # 16 | # Each scope (e.g. '.source.coffee' above) can only be declared once. 17 | # 18 | # This file uses CoffeeScript Object Notation (CSON). 19 | # If you are unfamiliar with CSON, you can read more about it in the 20 | # Atom Flight Manual: 21 | # http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson 22 | -------------------------------------------------------------------------------- /resources/win/atom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Get current path in Windows format 3 | if command -v "cygpath" > /dev/null; then 4 | # We have cygpath to do the conversion 5 | ATOMCMD=$(cygpath "$(dirname "$0")/atom.cmd" -a -w) 6 | else 7 | pushd "$(dirname "$0")" > /dev/null 8 | if [[ $(uname -r) == *-Microsoft ]]; then 9 | # We are in Windows Subsystem for Linux, map /mnt/drive 10 | ATOMCMD="$(echo $PWD | sed 's/\/mnt\/\([a-z]*\)\(.*\)/\1:\2/')/atom.cmd" 11 | ATOMCMD="${ATOMCMD////\\}" 12 | else 13 | # We don't have cygpath or WSL so try pwd -W 14 | ATOMCMD="$(pwd -W)/atom.cmd" 15 | fi 16 | popd > /dev/null 17 | fi 18 | if [ "$(uname -o)" == "Msys" ]; then 19 | cmd.exe //C "$ATOMCMD" "$@" # Msys thinks /C is a Windows path... 20 | else 21 | cmd.exe /C "$ATOMCMD" "$@" # Cygwin does not 22 | fi 23 | -------------------------------------------------------------------------------- /spec/application-delegate-spec.js: -------------------------------------------------------------------------------- 1 | /** @babel */ 2 | 3 | import {it, fit, ffit, fffit, beforeEach, afterEach} from './async-spec-helpers' 4 | import ApplicationDelegate from '../src/application-delegate' 5 | 6 | describe('ApplicationDelegate', function () { 7 | describe('set/getTemporaryWindowState', function () { 8 | it('can serialize object trees containing redundant child object references', async function () { 9 | const applicationDelegate = new ApplicationDelegate() 10 | const childObject = {c: 1} 11 | const sentObject = {a: childObject, b: childObject} 12 | 13 | await applicationDelegate.setTemporaryWindowState(sentObject) 14 | const receivedObject = await applicationDelegate.getTemporaryWindowState() 15 | 16 | expect(receivedObject).toEqual(sentObject) 17 | }) 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /static/scaffolding.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | @import "octicon-mixins"; 3 | 4 | // 5 | // Icon fonts 6 | // -------------------------------------------------- 7 | 8 | @font-face { .octicon-font-legacy(); } // keep for backwards compatibility 9 | @font-face { .octicon-font(); } 10 | @font-face { .atomicon-font(); } // Private 11 | 12 | 13 | // 14 | // Scaffolding 15 | // -------------------------------------------------- 16 | 17 | *, 18 | *:before, 19 | *:after { 20 | box-sizing: border-box; // Reset the box-sizing 21 | } 22 | 23 | html, 24 | body { 25 | width: 100%; 26 | height: 100%; 27 | overflow: hidden; 28 | } 29 | 30 | html { 31 | font-family: @font-family; 32 | font-size: @font-size; 33 | line-height: 1.428571429; // 20/14 34 | color: @text-color; 35 | background-color: @app-background-color; 36 | } 37 | -------------------------------------------------------------------------------- /static/atom.less: -------------------------------------------------------------------------------- 1 | // Import from the syntax theme's variables with a fallback to ./variables/syntax-variables.less 2 | @import "./variables/syntax-variables"; 3 | @import "syntax-variables"; 4 | 5 | // Import from the ui theme's variables with a fallback to ./variables/ui-variables.less 6 | @import "./variables/ui-variables"; 7 | @import "ui-variables"; 8 | 9 | // Octicons 10 | @import "octicon-utf-codes"; 11 | @import "octicon-mixins"; 12 | @import "octicons"; 13 | 14 | // Normalize + scaffolding 15 | @import "normalize"; 16 | @import "scaffolding"; 17 | 18 | // Core components 19 | @import "cursors"; 20 | @import "panels"; 21 | @import "docks"; 22 | @import "panes"; 23 | @import "syntax"; 24 | @import "text-editor"; 25 | @import "title-bar"; 26 | @import "workspace-view"; 27 | 28 | // Atom UI library 29 | @import "../node_modules/atom-ui/atom-ui.less"; 30 | -------------------------------------------------------------------------------- /dot-atom/styles.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Your Stylesheet 3 | * 4 | * This stylesheet is loaded when Atom starts up and is reloaded automatically 5 | * when it is changed and saved. 6 | * 7 | * Add your own CSS or Less to fully customize Atom. 8 | * If you are unfamiliar with Less, you can read more about it here: 9 | * http://lesscss.org 10 | */ 11 | 12 | 13 | /* 14 | * Examples 15 | * (To see them, uncomment and save) 16 | */ 17 | 18 | // style the background color of the tree view 19 | .tree-view { 20 | // background-color: whitesmoke; 21 | } 22 | 23 | // style the background and foreground colors on the atom-text-editor-element itself 24 | atom-text-editor { 25 | // color: white; 26 | // background-color: hsl(180, 24%, 12%); 27 | } 28 | 29 | // style UI elements inside atom-text-editor 30 | atom-text-editor .cursor { 31 | // border-color: red; 32 | } 33 | -------------------------------------------------------------------------------- /static/syntax.less: -------------------------------------------------------------------------------- 1 | @import "syntax-variables"; 2 | 3 | atom-text-editor { 4 | .lines { 5 | .markup { 6 | &.git-commit { 7 | &.changed { 8 | color: @syntax-color-modified; 9 | } 10 | 11 | &.deleted { 12 | color: @syntax-color-removed; 13 | } 14 | 15 | &.inserted { 16 | color: @syntax-color-added; 17 | } 18 | } 19 | } 20 | } 21 | } 22 | 23 | .define-selection-flash-color-if-not-defined() { @syntax-selection-flash-color: rgba(100, 255, 100, 0.7); } 24 | .define-selection-flash-color-if-not-defined(); 25 | 26 | @keyframes flash { 27 | from { background-color: @syntax-selection-flash-color; } 28 | to { background-color: null; } 29 | } 30 | 31 | atom-text-editor .flash.selection .region { 32 | animation-name: flash; 33 | animation-duration: .5s; 34 | animation-iteration-count: 1; 35 | } 36 | -------------------------------------------------------------------------------- /script/lib/spawn-sync.js: -------------------------------------------------------------------------------- 1 | // This file exports a function that has the same interface as 2 | // `spawnSync`, but it throws if there's an error while executing 3 | // the supplied command or if the exit code is not 0. This is similar to what 4 | // `execSync` does, but we want to use `spawnSync` because it provides automatic 5 | // escaping for the supplied arguments. 6 | 7 | const childProcess = require('child_process') 8 | 9 | module.exports = function () { 10 | const result = childProcess.spawnSync.apply(childProcess, arguments) 11 | if (result.error) { 12 | throw result.error 13 | } else if (result.status !== 0) { 14 | if (result.stdout) console.error(result.stdout.toString()) 15 | if (result.stderr) console.error(result.stderr.toString()) 16 | throw new Error(`Command ${result.args.join(' ')} exited with code "${result.status}"`) 17 | } else { 18 | return result 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.github/lock.yml: -------------------------------------------------------------------------------- 1 | # Configuration for lock-threads - https://github.com/dessant/lock-threads 2 | 3 | # Number of days of inactivity before a closed issue or pull request is locked 4 | daysUntilLock: 180 5 | # Comment to post before locking. Set to `false` to disable 6 | lockComment: > 7 | This issue has been automatically locked since there has not been 8 | any recent activity after it was closed. If you can still reproduce this issue in 9 | [Safe Mode](https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode) 10 | then please open a new issue and fill out 11 | [the entire issue template](https://github.com/atom/atom/blob/master/ISSUE_TEMPLATE.md) 12 | to ensure that we have enough information to address your issue. Thanks! 13 | # Issues or pull requests with these labels will not be locked 14 | exemptLabels: 15 | - help-wanted 16 | # Limit to only `issues` or `pulls` 17 | only: issues 18 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-directory-provider/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | class FakeRemoteDirectory { 4 | constructor (uri) { 5 | this.uri = uri 6 | } 7 | 8 | relativize (uri) { 9 | return uri 10 | } 11 | 12 | getPath () { 13 | return this.uri 14 | } 15 | 16 | isRoot () { 17 | return true 18 | } 19 | 20 | getSubdirectory () { 21 | return { 22 | existsSync () { 23 | return false 24 | } 25 | } 26 | } 27 | 28 | existsSync () { 29 | return true 30 | } 31 | 32 | contains () { 33 | return false 34 | } 35 | } 36 | 37 | exports.provideDirectoryProvider = function () { 38 | return { 39 | name: 'directory provider from package-with-directory-provider', 40 | 41 | directoryForURISync (uri) { 42 | if (uri.startsWith('remote://')) { 43 | return new FakeRemoteDirectory(uri) 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /script/lib/clean-caches.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs-extra') 4 | const os = require('os') 5 | const path = require('path') 6 | 7 | const CONFIG = require('../config') 8 | 9 | module.exports = function () { 10 | const cachePaths = [ 11 | path.join(CONFIG.repositoryRootPath, 'electron'), 12 | path.join(CONFIG.atomHomeDirPath, '.node-gyp'), 13 | path.join(CONFIG.atomHomeDirPath, 'storage'), 14 | path.join(CONFIG.atomHomeDirPath, '.apm'), 15 | path.join(CONFIG.atomHomeDirPath, '.npm'), 16 | path.join(CONFIG.atomHomeDirPath, 'compile-cache'), 17 | path.join(CONFIG.atomHomeDirPath, 'atom-shell'), 18 | path.join(CONFIG.atomHomeDirPath, 'electron'), 19 | path.join(os.tmpdir(), 'atom-build'), 20 | path.join(os.tmpdir(), 'atom-cached-atom-shells') 21 | ] 22 | 23 | for (let path of cachePaths) { 24 | console.log(`Cleaning ${path}`) 25 | fs.removeSync(path) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /static/panels.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | // Atom panels 4 | 5 | atom-panel-container.left, 6 | atom-panel-container.right { 7 | display: flex; 8 | } 9 | 10 | atom-panel-container.left { 11 | // Align panels to the right of the panel container. The effect of this is 12 | // that the left dock's toggle button will appear on the right side of the 13 | // empty space when the panel container has a min width in the theme. 14 | justify-content: flex-end; 15 | } 16 | 17 | .tool-panel, // deprecated: .tool-panel 18 | atom-panel { 19 | display: block; 20 | position: relative; 21 | } 22 | 23 | atom-panel-container > atom-panel.left, 24 | atom-panel-container > atom-panel.right { 25 | display: flex; 26 | } 27 | 28 | // Some packages use `height: 100%` which doesn't play nice with flexbox 29 | atom-panel-container > atom-panel.left > *, 30 | atom-panel-container > atom-panel.right > * { 31 | height: initial; 32 | } 33 | -------------------------------------------------------------------------------- /src/null-grammar.js: -------------------------------------------------------------------------------- 1 | const {Disposable} = require('event-kit') 2 | 3 | module.exports = { 4 | name: 'Null Grammar', 5 | scopeName: 'text.plain.null-grammar', 6 | scopeForId (id) { 7 | if (id === -1 || id === -2) { 8 | return this.scopeName 9 | } else { 10 | return null 11 | } 12 | }, 13 | startIdForScope (scopeName) { 14 | if (scopeName === this.scopeName) { 15 | return -1 16 | } else { 17 | return null 18 | } 19 | }, 20 | endIdForScope (scopeName) { 21 | if (scopeName === this.scopeName) { 22 | return -2 23 | } else { 24 | return null 25 | } 26 | }, 27 | tokenizeLine (text) { 28 | return { 29 | tags: [this.startIdForScope(this.scopeName), text.length, this.endIdForScope(this.scopeName)], 30 | ruleStack: null 31 | } 32 | }, 33 | onDidUpdate (callback) { 34 | return new Disposable(noop) 35 | } 36 | } 37 | 38 | function noop () {} 39 | -------------------------------------------------------------------------------- /spec/default-directory-searcher-spec.coffee: -------------------------------------------------------------------------------- 1 | DefaultDirectorySearcher = require '../src/default-directory-searcher' 2 | Task = require '../src/task' 3 | path = require 'path' 4 | 5 | describe "DefaultDirectorySearcher", -> 6 | [searcher, dirPath] = [] 7 | 8 | beforeEach -> 9 | dirPath = path.resolve(__dirname, 'fixtures', 'dir') 10 | searcher = new DefaultDirectorySearcher 11 | 12 | it "terminates the task after running a search", -> 13 | options = 14 | ignoreCase: false 15 | includeHidden: false 16 | excludeVcsIgnores: true 17 | inclusions: [] 18 | globalExclusions: ['a-dir'] 19 | didMatch: -> 20 | didError: -> 21 | didSearchPaths: -> 22 | searchPromise = searcher.search([{getPath: -> dirPath}], /abcdefg/, options) 23 | spyOn(Task::, 'terminate').andCallThrough() 24 | 25 | waitsForPromise -> searchPromise 26 | 27 | runs -> 28 | expect(Task::terminate).toHaveBeenCalled() 29 | -------------------------------------------------------------------------------- /script/lib/clean-dependencies.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | const CONFIG = require('../config') 4 | 5 | module.exports = function () { 6 | // We can't require fs-extra if `script/bootstrap` has never been run, because 7 | // it's a third party module. This is okay because cleaning dependencies only 8 | // makes sense if dependencies have been installed at least once. 9 | const fs = require('fs-extra') 10 | 11 | const apmDependenciesPath = path.join(CONFIG.apmRootPath, 'node_modules') 12 | console.log(`Cleaning ${apmDependenciesPath}`) 13 | fs.removeSync(apmDependenciesPath) 14 | 15 | const atomDependenciesPath = path.join(CONFIG.repositoryRootPath, 'node_modules') 16 | console.log(`Cleaning ${atomDependenciesPath}`) 17 | fs.removeSync(atomDependenciesPath) 18 | 19 | const scriptDependenciesPath = path.join(CONFIG.scriptRootPath, 'node_modules') 20 | console.log(`Cleaning ${scriptDependenciesPath}`) 21 | fs.removeSync(scriptDependenciesPath) 22 | } 23 | -------------------------------------------------------------------------------- /src/main-process/context-menu.coffee: -------------------------------------------------------------------------------- 1 | {Menu} = require 'electron' 2 | 3 | module.exports = 4 | class ContextMenu 5 | constructor: (template, @atomWindow) -> 6 | template = @createClickHandlers(template) 7 | menu = Menu.buildFromTemplate(template) 8 | menu.popup(@atomWindow.browserWindow, {async: true}) 9 | 10 | # It's necessary to build the event handlers in this process, otherwise 11 | # closures are dragged across processes and failed to be garbage collected 12 | # appropriately. 13 | createClickHandlers: (template) -> 14 | for item in template 15 | if item.command 16 | item.commandDetail ?= {} 17 | item.commandDetail.contextCommand = true 18 | item.commandDetail.atomWindow = @atomWindow 19 | do (item) => 20 | item.click = => 21 | global.atomApplication.sendCommandToWindow(item.command, @atomWindow, item.commandDetail) 22 | else if item.submenu 23 | @createClickHandlers(item.submenu) 24 | item 25 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-comments.js: -------------------------------------------------------------------------------- 1 | var quicksort = function () { 2 | /* 3 | this is a multiline comment 4 | it is, I promise 5 | */ 6 | var sort = function(items) { // comment at the end of a foldable line 7 | // This is a collection of 8 | // single line comments. 9 | // Wowza 10 | if (items.length <= 1) return items; 11 | var pivot = items.shift(), current, left = [], right = []; 12 | /* 13 | This is a multiline comment block with 14 | an empty line inside of it. 15 | 16 | Awesome. 17 | */ 18 | while(items.length > 0) { 19 | current = items.shift(); 20 | current < pivot ? left.push(current) : right.push(current); 21 | } 22 | // This is a collection of 23 | // single line comments 24 | 25 | // ...with an empty line 26 | // among it, geez! 27 | return sort(left).concat(pivot).concat(sort(right)); 28 | }; 29 | // this is a single-line comment 30 | return sort(Array.apply(this, arguments)); 31 | }; 32 | -------------------------------------------------------------------------------- /script/lib/transpile-babel-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const CompileCache = require('../../src/compile-cache') 4 | const fs = require('fs') 5 | const glob = require('glob') 6 | const path = require('path') 7 | 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | console.log(`Transpiling Babel paths in ${CONFIG.intermediateAppPath}`) 12 | for (let path of getPathsToTranspile()) { 13 | transpileBabelPath(path) 14 | } 15 | } 16 | 17 | function getPathsToTranspile () { 18 | let paths = [] 19 | for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) { 20 | paths = paths.concat(glob.sync( 21 | path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, '**', '*.js'), 22 | {ignore: path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, 'spec', '**', '*.js'), nodir: true} 23 | )) 24 | } 25 | return paths 26 | } 27 | 28 | function transpileBabelPath (path) { 29 | fs.writeFileSync(path, CompileCache.addPathToCache(path, CONFIG.atomHomeDirPath)) 30 | } 31 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/hooks/commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by "git commit" with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, rename this file to "commit-msg". 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /src/window.js: -------------------------------------------------------------------------------- 1 | // Public: Measure how long a function takes to run. 2 | // 3 | // description - A {String} description that will be logged to the console when 4 | // the function completes. 5 | // fn - A {Function} to measure the duration of. 6 | // 7 | // Returns the value returned by the given function. 8 | window.measure = function (description, fn) { 9 | let start = Date.now() 10 | let value = fn() 11 | let result = Date.now() - start 12 | console.log(description, result) 13 | return value 14 | } 15 | 16 | // Public: Create a dev tools profile for a function. 17 | // 18 | // description - A {String} description that will be available in the Profiles 19 | // tab of the dev tools. 20 | // fn - A {Function} to profile. 21 | // 22 | // Returns the value returned by the given function. 23 | window.profile = function (description, fn) { 24 | window.measure(description, function () { 25 | console.profile(description) 26 | let value = fn() 27 | console.profileEnd(description) 28 | return value 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/hooks/commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by "git commit" with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, rename this file to "commit-msg". 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/hooks/commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message. 4 | # Called by "git commit" with one argument, the name of the file 5 | # that has the commit message. The hook should exit with non-zero 6 | # status after issuing an appropriate message if it wants to stop the 7 | # commit. The hook is allowed to edit the commit message file. 8 | # 9 | # To enable this hook, rename this file to "commit-msg". 10 | 11 | # Uncomment the below to add a Signed-off-by line to the message. 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg 13 | # hook is more suited to it. 14 | # 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 17 | 18 | # This example catches duplicate Signed-off-by lines. 19 | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { 22 | echo >&2 Duplicate Signed-off-by lines. 23 | exit 1 24 | } 25 | -------------------------------------------------------------------------------- /script/lib/lint-coffee-script-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const coffeelint = require('coffeelint') 4 | const expandGlobPaths = require('./expand-glob-paths') 5 | const path = require('path') 6 | const readFiles = require('./read-files') 7 | 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | const globPathsToLint = [ 12 | path.join(CONFIG.repositoryRootPath, 'dot-atom/**/*.coffee'), 13 | path.join(CONFIG.repositoryRootPath, 'src/**/*.coffee'), 14 | path.join(CONFIG.repositoryRootPath, 'spec/*.coffee') 15 | ] 16 | return expandGlobPaths(globPathsToLint).then(readFiles).then((files) => { 17 | const errors = [] 18 | const lintConfiguration = require(path.join(CONFIG.repositoryRootPath, 'coffeelint.json')) 19 | for (let file of files) { 20 | const lintErrors = coffeelint.lint(file.content, lintConfiguration, false) 21 | for (let error of lintErrors) { 22 | errors.push({path: file.path, lineNumber: error.lineNumber, message: error.message, rule: error.rule}) 23 | } 24 | } 25 | return errors 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /script/lib/transpile-peg-js-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const peg = require('pegjs') 4 | const fs = require('fs') 5 | const glob = require('glob') 6 | const path = require('path') 7 | 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | console.log(`Transpiling PEG.js paths in ${CONFIG.intermediateAppPath}`) 12 | for (let path of getPathsToTranspile()) { 13 | transpilePegJsPath(path) 14 | } 15 | } 16 | 17 | function getPathsToTranspile () { 18 | let paths = [] 19 | for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) { 20 | paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, '**', '*.pegjs'), {nodir: true})) 21 | } 22 | return paths 23 | } 24 | 25 | function transpilePegJsPath (pegJsPath) { 26 | const inputCode = fs.readFileSync(pegJsPath, 'utf8') 27 | const jsPath = pegJsPath.replace(/pegjs$/g, 'js') 28 | const outputCode = 'module.exports = ' + peg.buildParser(inputCode, {output: 'source'}) 29 | fs.writeFileSync(jsPath, outputCode) 30 | fs.unlinkSync(pegJsPath) 31 | } 32 | -------------------------------------------------------------------------------- /resources/mac/helper-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Atom Helper 9 | CFBundleExecutable 10 | Atom Helper 11 | CFBundleIdentifier 12 | com.github.atom.helper 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Atom Helper 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | ${VERSION} 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | ${VERSION} 25 | LSMinimumSystemVersion 26 | 10.7.0 27 | LSUIElement 28 | 1 29 | NSSupportsAutomaticGraphicsSwitching 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | "extends": "stylelint-config-standard", 5 | "ignoreFiles": [path.resolve(__dirname, "static", "atom.less")], 6 | "rules": { 7 | "color-hex-case": null, // TODO: enable? 8 | "max-empty-lines": null, // TODO: enable? 9 | "selector-type-no-unknown": null, 10 | "function-comma-space-after": null, // TODO: enable? 11 | "font-family-no-missing-generic-family-keyword": null, // needed for octicons (no sensible fallback) 12 | "declaration-empty-line-before": null, // TODO: enable? 13 | "declaration-block-trailing-semicolon": null, // TODO: enable 14 | "no-descending-specificity": null, 15 | "number-leading-zero": null, // TODO: enable? 16 | "no-duplicate-selectors": null, 17 | "selector-pseudo-element-colon-notation": null, // TODO: enable? 18 | "selector-list-comma-newline-after": null, // TODO: enable? 19 | "rule-empty-line-before": null, // TODO: enable? 20 | "at-rule-empty-line-before": null, // TODO: enable? 21 | "font-family-no-duplicate-names": null, // TODO: enable? 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /spec/spec-helper-platform.coffee: -------------------------------------------------------------------------------- 1 | path = require 'path' 2 | fs = require 'fs-plus' 3 | 4 | ## Platform specific helpers 5 | module.exports = 6 | # Public: Returns true if being run from within Windows 7 | isWindows: -> 8 | !!process.platform.match /^win/ 9 | 10 | # Public: Some files can not exist on Windows filesystems, so we have to 11 | # selectively generate our fixtures. 12 | # 13 | # Returns nothing. 14 | generateEvilFiles: -> 15 | evilFilesPath = path.join(__dirname, 'fixtures', 'evil-files') 16 | fs.removeSync(evilFilesPath) if fs.existsSync(evilFilesPath) 17 | fs.mkdirSync(evilFilesPath) 18 | 19 | if @isWindows() 20 | filenames = [ 21 | "a_file_with_utf8.txt" 22 | "file with spaces.txt" 23 | "utfa\u0306.md" 24 | ] 25 | else 26 | filenames = [ 27 | "a_file_with_utf8.txt" 28 | "file with spaces.txt" 29 | "goddam\nnewlines" 30 | "quote\".txt" 31 | "utfa\u0306.md" 32 | ] 33 | 34 | for filename in filenames 35 | fs.writeFileSync(path.join(evilFilesPath, filename), 'evil file!', flag: 'w') 36 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/jstips/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to submit your tip 2 | To submit a tip to the list, fork the repository and add your tip to the top of the list of tips in the `README.md` file. You may want to use a [topic branch](https://github.com/dchelimsky/rspec/wiki/Topic-Branches) for each tip. 3 | 4 | Use the format below when writing your tip. Your tip should be readable in less than two minutes. You may add links to other sites or videos that give more insight if you wish. 5 | 6 | Once your tip is ready, [issue a pull request](https://help.github.com/articles/using-pull-requests/) and your tip will be reviewed. Every day one tip will be merged from the available pull requests. 7 | 8 | # Tip format 9 | 10 | ## #01(number) - Title 11 | 12 | > yyyy-mm-dd(date) by @username 13 | 14 | This is my awesome tip! 15 | 16 | # Notes 17 | 18 | Leave the date and the tip number empty. When we decide merge the pull request you will add them and squash your commits. 19 | 20 | Remember: New tips must be added to the *top* of the list of [tips](https://github.com/loverajoel/jstips#tips-list) in the `README.md` file. 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2018 GitHub Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /script/lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict' 4 | 5 | require('colors') 6 | 7 | const lintCoffeeScriptPaths = require('./lib/lint-coffee-script-paths') 8 | const lintJavaScriptPaths = require('./lib/lint-java-script-paths') 9 | const lintLessPaths = require('./lib/lint-less-paths') 10 | const path = require('path') 11 | 12 | const CONFIG = require('./config') 13 | 14 | process.on('unhandledRejection', function (e) { 15 | console.error(e.stack || e) 16 | process.exit(1) 17 | }) 18 | 19 | Promise.all([lintCoffeeScriptPaths(), lintJavaScriptPaths(), lintLessPaths()]) 20 | .then((lintResults) => { 21 | let hasLintErrors = false 22 | for (let errors of lintResults) { 23 | for (let error of errors) { 24 | hasLintErrors = true 25 | const relativePath = path.relative(CONFIG.repositoryRootPath, error.path) 26 | console.log(`${relativePath}:${error.lineNumber}`.yellow + ` ${error.message} (${error.rule})`.red) 27 | } 28 | } 29 | if (hasLintErrors) { 30 | process.exit(1) 31 | } else { 32 | console.log('No lint errors!'.green) 33 | process.exit(0) 34 | } 35 | }) 36 | -------------------------------------------------------------------------------- /docs/native-profiling.md: -------------------------------------------------------------------------------- 1 | # Profiling the Atom Render Process on macOS with Instruments 2 | 3 | ![Instruments](https://cloud.githubusercontent.com/assets/1789/14193295/d503db7a-f760-11e5-88bf-fe417c0cd913.png) 4 | 5 | * Determine the version of Electron for your version of Atom. 6 | * Open the dev tools with `alt-cmd-i` 7 | * Evaluate `process.versions.electron` in the console. 8 | * Based on this version, download the appropriate Electron symbols from the [releases](https://github.com/atom/electron/releases) page. 9 | * The file name should look like `electron-v1.X.Y-darwin-x64-dsym.zip`. 10 | * Decompress these symbols in your `~/Downloads` directory. 11 | * Now create a time profile in Instruments. 12 | * Open `Instruments.app`. 13 | * Select `Time Profiler` 14 | * In Atom, determine the pid to attach to by evaluating `process.pid` in the dev tools console. 15 | * Attach to this pid via the menu at the upper left corner of the Instruments profiler. 16 | * Click record, do your thing. 17 | * Click stop. 18 | * The symbols should have been automatically located by Instruments (via Spotlight or something?), giving you a readable profile. 19 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | environment: 3 | XCODE_SCHEME: test 4 | XCODE_WORKSPACE: test 5 | XCODE_PROJECT: test 6 | TEST_JUNIT_XML_ROOT: ${CIRCLE_TEST_REPORTS} 7 | 8 | xcode: 9 | version: 7.3 10 | 11 | general: 12 | artifacts: 13 | - out/atom-mac.zip 14 | - out/atom-mac-symbols.zip 15 | - docs/output/atom-api.json 16 | 17 | dependencies: 18 | pre: 19 | - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash 20 | - nvm install 6.9.4 21 | - nvm use 6.9.4 22 | - npm install -g npm@5.3.0 23 | 24 | override: 25 | - script/build --code-sign --compress-artifacts 26 | 27 | cache_directories: 28 | - electron 29 | - apm/node_modules 30 | - script/node_modules 31 | - node_modules 32 | - ~/.atom/compile-cache 33 | - ~/.atom/snapshot-cache 34 | 35 | test: 36 | override: 37 | - script/lint 38 | - osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver 39 | - caffeinate -s script/test # Run with caffeinate to prevent screen saver 40 | 41 | experimental: 42 | notify: 43 | branches: 44 | only: 45 | - master 46 | -------------------------------------------------------------------------------- /script/lib/generate-module-cache.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | const ModuleCache = require('../../src/module-cache') 6 | 7 | const CONFIG = require('../config') 8 | 9 | module.exports = function () { 10 | console.log(`Generating module cache for ${CONFIG.intermediateAppPath}`) 11 | for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) { 12 | ModuleCache.create(path.join(CONFIG.intermediateAppPath, 'node_modules', packageName)) 13 | } 14 | ModuleCache.create(CONFIG.intermediateAppPath) 15 | const newMetadata = JSON.parse(fs.readFileSync(path.join(CONFIG.intermediateAppPath, 'package.json'))) 16 | for (let folder of newMetadata._atomModuleCache.folders) { 17 | if (folder.paths.indexOf('') !== -1) { 18 | folder.paths = [ 19 | '', 20 | 'exports', 21 | 'spec', 22 | 'src', 23 | 'src/main-process', 24 | 'static', 25 | 'vendor' 26 | ] 27 | } 28 | } 29 | CONFIG.appMetadata = newMetadata 30 | fs.writeFileSync(path.join(CONFIG.intermediateAppPath, 'package.json'), JSON.stringify(CONFIG.appMetadata)) 31 | } 32 | -------------------------------------------------------------------------------- /script/lib/transpile-cson-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const CompileCache = require('../../src/compile-cache') 4 | const fs = require('fs') 5 | const glob = require('glob') 6 | const path = require('path') 7 | 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | console.log(`Transpiling CSON paths in ${CONFIG.intermediateAppPath}`) 12 | for (let path of getPathsToTranspile()) { 13 | transpileCsonPath(path) 14 | } 15 | } 16 | 17 | function getPathsToTranspile () { 18 | let paths = [] 19 | for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) { 20 | paths = paths.concat(glob.sync( 21 | path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, '**', '*.cson'), 22 | {ignore: path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, 'spec', '**', '*.cson'), nodir: true} 23 | )) 24 | } 25 | return paths 26 | } 27 | 28 | function transpileCsonPath (csonPath) { 29 | const jsonPath = csonPath.replace(/cson$/g, 'json') 30 | fs.writeFileSync(jsonPath, JSON.stringify(CompileCache.addPathToCache(csonPath, CONFIG.atomHomeDirPath))) 31 | fs.unlinkSync(csonPath) 32 | } 33 | -------------------------------------------------------------------------------- /static/cursors.less: -------------------------------------------------------------------------------- 1 | @import "./variables/syntax-variables"; 2 | @import "syntax-variables"; 3 | 4 | @import "./variables/ui-variables"; 5 | @import "ui-variables"; 6 | 7 | @ibeam-1x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII='); 8 | @ibeam-2x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC'); 9 | 10 | .cursor-white() { 11 | cursor: -webkit-image-set(@ibeam-1x 1dppx, @ibeam-2x 2dppx) 5 8, text; 12 | } 13 | 14 | // Editors 15 | & when ( lightness(@syntax-background-color) < 50% ) { 16 | .platform-darwin atom-text-editor:not([mini]) { 17 | .cursor-white(); 18 | } 19 | } 20 | 21 | // Mini Editors 22 | & when ( lightness(@input-background-color) < 50% ) { 23 | .platform-darwin atom-text-editor[mini] { 24 | .cursor-white(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spec/main-process/mocha-test-runner.js: -------------------------------------------------------------------------------- 1 | "use babel" 2 | 3 | import Mocha from 'mocha' 4 | import fs from 'fs-plus' 5 | import {assert} from 'chai' 6 | 7 | export default function (testPaths) { 8 | global.assert = assert 9 | 10 | let reporterOptions = { 11 | reporterEnabled: 'list' 12 | } 13 | 14 | if (process.env.TEST_JUNIT_XML_PATH) { 15 | reporterOptions = { 16 | reporterEnabled: 'list, mocha-junit-reporter', 17 | mochaJunitReporterReporterOptions: { 18 | mochaFile: process.env.TEST_JUNIT_XML_PATH 19 | } 20 | } 21 | } 22 | 23 | const mocha = new Mocha({ 24 | reporter: 'mocha-multi-reporters', 25 | reporterOptions 26 | }) 27 | for (let testPath of testPaths) { 28 | if (fs.isDirectorySync(testPath)) { 29 | for (let testFilePath of fs.listTreeSync(testPath)) { 30 | if (/\.test\.(coffee|js)$/.test(testFilePath)) { 31 | mocha.addFile(testFilePath) 32 | } 33 | } 34 | } else { 35 | mocha.addFile(testPath) 36 | } 37 | } 38 | 39 | mocha.run(function (failures) { 40 | if (failures === 0) { 41 | process.exit(0) 42 | } else { 43 | process.exit(1) 44 | } 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict' 4 | 5 | const childProcess = require('child_process') 6 | const CONFIG = require('./config') 7 | const cleanDependencies = require('./lib/clean-dependencies') 8 | const deleteMsbuildFromPath = require('./lib/delete-msbuild-from-path') 9 | const dependenciesFingerprint = require('./lib/dependencies-fingerprint') 10 | const installApm = require('./lib/install-apm') 11 | const runApmInstall = require('./lib/run-apm-install') 12 | const installScriptDependencies = require('./lib/install-script-dependencies') 13 | const verifyMachineRequirements = require('./lib/verify-machine-requirements') 14 | 15 | process.on('unhandledRejection', function (e) { 16 | console.error(e.stack || e) 17 | process.exit(1) 18 | }) 19 | 20 | verifyMachineRequirements() 21 | 22 | if (dependenciesFingerprint.isOutdated()) { 23 | cleanDependencies() 24 | } 25 | 26 | if (process.platform === 'win32') deleteMsbuildFromPath() 27 | 28 | installScriptDependencies() 29 | installApm() 30 | childProcess.execFileSync( 31 | CONFIG.getApmBinPath(), 32 | ['--version'], 33 | {stdio: 'inherit'} 34 | ) 35 | runApmInstall(CONFIG.repositoryRootPath) 36 | 37 | dependenciesFingerprint.write() 38 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 oneuijs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /script/lib/lint-java-script-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const expandGlobPaths = require('./expand-glob-paths') 4 | const standard = require('standard') 5 | const path = require('path') 6 | 7 | const CONFIG = require('../config') 8 | 9 | module.exports = function () { 10 | const globPathsToLint = [ 11 | path.join(CONFIG.repositoryRootPath, 'exports', '**', '*.js'), 12 | path.join(CONFIG.repositoryRootPath, 'script', '**', '*.js'), 13 | path.join(CONFIG.repositoryRootPath, 'src', '**', '*.js'), 14 | path.join(CONFIG.repositoryRootPath, 'static', '*.js') 15 | ] 16 | return expandGlobPaths(globPathsToLint).then((paths) => { 17 | return new Promise((resolve, reject) => { 18 | standard.lintFiles(paths, (error, lintOutput) => { 19 | if (error) { 20 | reject(error) 21 | } else { 22 | const errors = [] 23 | for (let result of lintOutput.results) { 24 | for (let message of result.messages) { 25 | errors.push({path: result.filePath, lineNumber: message.line, message: message.message, rule: message.ruleId}) 26 | } 27 | } 28 | resolve(errors) 29 | } 30 | }) 31 | }) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "atom-build-scripts", 3 | "description": "Atom build scripts", 4 | "dependencies": { 5 | "async": "2.0.1", 6 | "babel-core": "5.8.38", 7 | "coffeelint": "1.15.7", 8 | "colors": "1.1.2", 9 | "donna": "1.0.16", 10 | "electron-chromedriver": "~1.7", 11 | "electron-link": "0.2.0", 12 | "electron-mksnapshot": "~1.7", 13 | "electron-packager": "7.3.0", 14 | "electron-winstaller": "2.6.4", 15 | "fs-admin": "^0.1.5", 16 | "fs-extra": "0.30.0", 17 | "glob": "7.0.3", 18 | "joanna": "0.0.10", 19 | "klaw-sync": "^1.1.2", 20 | "legal-eagle": "0.14.0", 21 | "lodash.startcase": "4.4.0", 22 | "lodash.template": "4.4.0", 23 | "minidump": "0.9.0", 24 | "mkdirp": "0.5.1", 25 | "normalize-package-data": "2.3.5", 26 | "npm": "5.3.0", 27 | "passwd-user": "2.1.0", 28 | "pegjs": "0.9.0", 29 | "random-seed": "^0.3.0", 30 | "season": "5.3.0", 31 | "semver": "5.3.0", 32 | "standard": "8.4.0", 33 | "stylelint": "^9.0.0", 34 | "stylelint-config-standard": "^18.1.0", 35 | "sync-request": "3.0.1", 36 | "tello": "1.0.7", 37 | "webdriverio": "2.4.5", 38 | "yargs": "4.8.1" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /spec/main-process/parse-command-line.test.js: -------------------------------------------------------------------------------- 1 | /** @babel */ 2 | 3 | import parseCommandLine from '../../src/main-process/parse-command-line' 4 | 5 | describe('parseCommandLine', function () { 6 | describe('when --uri-handler is not passed', function () { 7 | it('parses arguments as normal', function () { 8 | const args = parseCommandLine(['-d', '--safe', '--test', '/some/path', 'atom://test/url', 'atom://other/url']) 9 | assert.isTrue(args.devMode) 10 | assert.isTrue(args.safeMode) 11 | assert.isTrue(args.test) 12 | assert.deepEqual(args.urlsToOpen, ['atom://test/url', 'atom://other/url']) 13 | assert.deepEqual(args.pathsToOpen, ['/some/path']) 14 | }) 15 | }) 16 | 17 | describe('when --uri-handler is passed', function () { 18 | it('ignores other arguments and limits to one URL', function () { 19 | const args = parseCommandLine(['-d', '--uri-handler', '--safe', '--test', '/some/path', 'atom://test/url', 'atom://other/url']) 20 | assert.isUndefined(args.devMode) 21 | assert.isUndefined(args.safeMode) 22 | assert.isUndefined(args.test) 23 | assert.deepEqual(args.urlsToOpen, ['atom://test/url']) 24 | assert.deepEqual(args.pathsToOpen, []) 25 | }) 26 | }) 27 | }) 28 | -------------------------------------------------------------------------------- /spec/helpers/random.js: -------------------------------------------------------------------------------- 1 | const WORDS = require('./words') 2 | const {Point, Range} = require('text-buffer') 3 | 4 | exports.getRandomBufferRange = function getRandomBufferRange (random, buffer) { 5 | const endRow = random(buffer.getLineCount()) 6 | const startRow = random.intBetween(0, endRow) 7 | const startColumn = random(buffer.lineForRow(startRow).length + 1) 8 | const endColumn = random(buffer.lineForRow(endRow).length + 1) 9 | return Range(Point(startRow, startColumn), Point(endRow, endColumn)) 10 | } 11 | 12 | exports.buildRandomLines = function buildRandomLines (random, maxLines) { 13 | const lines = [] 14 | 15 | for (let i = 0; i < random(maxLines); i++) { 16 | lines.push(buildRandomLine(random)) 17 | } 18 | 19 | return lines.join('\n') 20 | } 21 | 22 | function buildRandomLine (random) { 23 | const line = [] 24 | 25 | for (let i = 0; i < random(5); i++) { 26 | const n = random(10) 27 | 28 | if (n < 2) { 29 | line.push('\t') 30 | } else if (n < 4) { 31 | line.push(' ') 32 | } else { 33 | if (line.length > 0 && !/\s/.test(line[line.length - 1])) { 34 | line.push(' ') 35 | } 36 | 37 | line.push(WORDS[random(WORDS.length)]) 38 | } 39 | } 40 | 41 | return line.join('') 42 | } 43 | -------------------------------------------------------------------------------- /spec/buffered-node-process-spec.coffee: -------------------------------------------------------------------------------- 1 | path = require 'path' 2 | BufferedNodeProcess = require '../src/buffered-node-process' 3 | 4 | describe "BufferedNodeProcess", -> 5 | it "executes the script in a new process", -> 6 | exit = jasmine.createSpy('exitCallback') 7 | output = '' 8 | stdout = (lines) -> output += lines 9 | error = '' 10 | stderr = (lines) -> error += lines 11 | args = ['hi'] 12 | command = path.join(__dirname, 'fixtures', 'script.js') 13 | 14 | new BufferedNodeProcess({command, args, stdout, stderr, exit}) 15 | 16 | waitsFor -> 17 | exit.callCount is 1 18 | 19 | runs -> 20 | expect(output).toBe 'hi' 21 | expect(error).toBe '' 22 | expect(args).toEqual ['hi'] 23 | 24 | it "suppresses deprecations in the new process", -> 25 | exit = jasmine.createSpy('exitCallback') 26 | output = '' 27 | stdout = (lines) -> output += lines 28 | error = '' 29 | stderr = (lines) -> error += lines 30 | command = path.join(__dirname, 'fixtures', 'script-with-deprecations.js') 31 | 32 | new BufferedNodeProcess({command, stdout, stderr, exit}) 33 | 34 | waitsFor -> 35 | exit.callCount is 1 36 | 37 | runs -> 38 | expect(output).toBe 'hi' 39 | expect(error).toBe '' 40 | -------------------------------------------------------------------------------- /src/pane-container-element.js: -------------------------------------------------------------------------------- 1 | const {CompositeDisposable} = require('event-kit') 2 | 3 | class PaneContainerElement extends HTMLElement { 4 | createdCallback () { 5 | this.subscriptions = new CompositeDisposable() 6 | this.classList.add('panes') 7 | } 8 | 9 | initialize (model, {views}) { 10 | this.model = model 11 | this.views = views 12 | if (this.views == null) { 13 | throw new Error('Must pass a views parameter when initializing PaneContainerElements') 14 | } 15 | this.subscriptions.add(this.model.observeRoot(this.rootChanged.bind(this))) 16 | return this 17 | } 18 | 19 | rootChanged (root) { 20 | const focusedElement = this.hasFocus() ? document.activeElement : null 21 | if (this.firstChild != null) { 22 | this.firstChild.remove() 23 | } 24 | if (root != null) { 25 | const view = this.views.getView(root) 26 | this.appendChild(view) 27 | if (focusedElement != null) { 28 | focusedElement.focus() 29 | } 30 | } 31 | } 32 | 33 | hasFocus () { 34 | return this === document.activeElement || this.contains(document.activeElement) 35 | } 36 | } 37 | 38 | module.exports = document.registerElement('atom-pane-container', { 39 | prototype: PaneContainerElement.prototype 40 | }) 41 | -------------------------------------------------------------------------------- /src/less-compile-cache.coffee: -------------------------------------------------------------------------------- 1 | path = require 'path' 2 | LessCache = require 'less-cache' 3 | 4 | # {LessCache} wrapper used by {ThemeManager} to read stylesheets. 5 | module.exports = 6 | class LessCompileCache 7 | constructor: ({resourcePath, importPaths, lessSourcesByRelativeFilePath, importedFilePathsByRelativeImportPath}) -> 8 | cacheDir = path.join(process.env.ATOM_HOME, 'compile-cache', 'less') 9 | 10 | @lessSearchPaths = [ 11 | path.join(resourcePath, 'static', 'variables') 12 | path.join(resourcePath, 'static') 13 | ] 14 | 15 | if importPaths? 16 | importPaths = importPaths.concat(@lessSearchPaths) 17 | else 18 | importPaths = @lessSearchPaths 19 | 20 | @cache = new LessCache({ 21 | importPaths, 22 | resourcePath, 23 | lessSourcesByRelativeFilePath, 24 | importedFilePathsByRelativeImportPath, 25 | cacheDir, 26 | fallbackDir: path.join(resourcePath, 'less-compile-cache') 27 | }) 28 | 29 | setImportPaths: (importPaths=[]) -> 30 | @cache.setImportPaths(importPaths.concat(@lessSearchPaths)) 31 | 32 | read: (stylesheetPath) -> 33 | @cache.readFileSync(stylesheetPath) 34 | 35 | cssForFile: (stylesheetPath, lessContent, digest) -> 36 | @cache.cssForFile(stylesheetPath, lessContent, digest) 37 | -------------------------------------------------------------------------------- /static/variables/octicon-mixins.less: -------------------------------------------------------------------------------- 1 | @import "octicon-utf-codes.less"; 2 | 3 | .icon-size(@size) { 4 | font-size: @size; 5 | width: @size; 6 | height: @size; 7 | } 8 | 9 | .icon(@size, @display: inline-block) { 10 | font-family: 'Octicons Regular'; 11 | font-weight: normal; 12 | font-style: normal; 13 | display: @display; 14 | line-height: 1; 15 | -webkit-font-smoothing: antialiased; 16 | text-decoration: none; 17 | 18 | .icon-size(@size); 19 | } 20 | 21 | .octicon(@name, @size: 16px) { 22 | &::before { 23 | .icon(@size); 24 | content: @@name 25 | } 26 | } 27 | 28 | .mega-octicon(@name, @size: 32px) { 29 | &::before { 30 | .icon(@size); 31 | content: @@name 32 | } 33 | } 34 | 35 | // keep for backwards compatibility 36 | .octicon-font-legacy() { 37 | font-family: 'Octicons Regular'; 38 | src: url("octicons-2.1.2.woff") format("woff"); 39 | font-weight: normal; 40 | font-style: normal; 41 | } 42 | 43 | .octicon-font() { 44 | font-family: 'Octicons Regular'; 45 | src: url("octicons.woff") format("woff"); 46 | font-weight: normal; 47 | font-style: normal; 48 | } 49 | 50 | .atomicon-font() { 51 | font-family: 'Octicons Regular'; 52 | src: url('atomicons.woff') format('woff'); 53 | font-weight: normal; 54 | font-style: normal; 55 | } 56 | -------------------------------------------------------------------------------- /script/lib/dependencies-fingerprint.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | const fs = require('fs') 3 | const path = require('path') 4 | 5 | const CONFIG = require('../config') 6 | const FINGERPRINT_PATH = path.join(CONFIG.repositoryRootPath, 'node_modules', '.dependencies-fingerprint') 7 | 8 | module.exports = { 9 | write: function () { 10 | const fingerprint = this.compute() 11 | fs.writeFileSync(FINGERPRINT_PATH, fingerprint) 12 | console.log('Wrote Dependencies Fingerprint:', FINGERPRINT_PATH, fingerprint) 13 | }, 14 | read: function () { 15 | return fs.existsSync(FINGERPRINT_PATH) ? fs.readFileSync(FINGERPRINT_PATH, 'utf8') : null 16 | }, 17 | isOutdated: function () { 18 | const fingerprint = this.read() 19 | return fingerprint ? fingerprint !== this.compute() : false 20 | }, 21 | compute: function () { 22 | // Include the electron minor version in the fingerprint since that changing requires a re-install 23 | const electronVersion = CONFIG.appMetadata.electronVersion.replace(/\.\d+$/, '') 24 | const apmVersion = CONFIG.apmMetadata.dependencies['atom-package-manager'] 25 | const body = electronVersion + apmVersion + process.platform + process.version + process.arch 26 | return crypto.createHash('sha1').update(body).digest('hex') 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/delegated-listener.js: -------------------------------------------------------------------------------- 1 | const EventKit = require('event-kit') 2 | 3 | module.exports = 4 | function listen (element, eventName, selector, handler) { 5 | var innerHandler = function (event) { 6 | if (selector) { 7 | var currentTarget = event.target 8 | while (currentTarget) { 9 | if (currentTarget.matches && currentTarget.matches(selector)) { 10 | handler({ 11 | type: event.type, 12 | currentTarget: currentTarget, 13 | target: event.target, 14 | preventDefault: function () { 15 | event.preventDefault() 16 | }, 17 | originalEvent: event 18 | }) 19 | } 20 | if (currentTarget === element) break 21 | currentTarget = currentTarget.parentNode 22 | } 23 | } else { 24 | handler({ 25 | type: event.type, 26 | currentTarget: event.currentTarget, 27 | target: event.target, 28 | preventDefault: function () { 29 | event.preventDefault() 30 | }, 31 | originalEvent: event 32 | }) 33 | } 34 | } 35 | 36 | element.addEventListener(eventName, innerHandler) 37 | 38 | return new EventKit.Disposable(function () { 39 | element.removeEventListener(eventName, innerHandler) 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /src/main-process/main.js: -------------------------------------------------------------------------------- 1 | if (typeof snapshotResult !== 'undefined') { 2 | snapshotResult.setGlobals(global, process, global, {}, console, require) 3 | } 4 | 5 | const startTime = Date.now() 6 | 7 | const electron = require('electron') 8 | const fs = require('fs') 9 | const path = require('path') 10 | const yargs = require('yargs') 11 | 12 | const args = 13 | yargs(process.argv) 14 | .alias('d', 'dev') 15 | .alias('t', 'test') 16 | .argv 17 | 18 | let resourcePath 19 | 20 | if (args.resourcePath) { 21 | resourcePath = args.resourcePath 22 | } else { 23 | const stableResourcePath = path.dirname(path.dirname(__dirname)) 24 | const defaultRepositoryPath = path.join(electron.app.getPath('home'), 'github', 'atom') 25 | 26 | if (args.dev || args.test || args.benchmark || args.benchmarkTest) { 27 | if (process.env.ATOM_DEV_RESOURCE_PATH) { 28 | resourcePath = process.env.ATOM_DEV_RESOURCE_PATH 29 | } else if (fs.statSyncNoException(defaultRepositoryPath)) { 30 | resourcePath = defaultRepositoryPath 31 | } else { 32 | resourcePath = stableResourcePath 33 | } 34 | } else { 35 | resourcePath = stableResourcePath 36 | } 37 | } 38 | 39 | const start = require(path.join(resourcePath, 'src', 'main-process', 'start')) 40 | start(resourcePath, startTime) 41 | -------------------------------------------------------------------------------- /src/core-uri-handlers.js: -------------------------------------------------------------------------------- 1 | // Converts a query string parameter for a line or column number 2 | // to a zero-based line or column number for the Atom API. 3 | function getLineColNumber (numStr) { 4 | const num = parseInt(numStr || 0, 10) 5 | return Math.max(num - 1, 0) 6 | } 7 | 8 | function openFile (atom, {query}) { 9 | const {filename, line, column} = query 10 | 11 | atom.workspace.open(filename, { 12 | initialLine: getLineColNumber(line), 13 | initialColumn: getLineColNumber(column), 14 | searchAllPanes: true 15 | }) 16 | } 17 | 18 | function windowShouldOpenFile ({query}) { 19 | const {filename} = query 20 | return (win) => win.containsPath(filename) 21 | } 22 | 23 | const ROUTER = { 24 | '/open/file': { handler: openFile, getWindowPredicate: windowShouldOpenFile } 25 | } 26 | 27 | module.exports = { 28 | create (atomEnv) { 29 | return function coreURIHandler (parsed) { 30 | const config = ROUTER[parsed.pathname] 31 | if (config) { 32 | config.handler(atomEnv, parsed) 33 | } 34 | } 35 | }, 36 | 37 | windowPredicate (parsed) { 38 | const config = ROUTER[parsed.pathname] 39 | if (config && config.getWindowPredicate) { 40 | return config.getWindowPredicate(parsed) 41 | } else { 42 | return (win) => true 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/coffee-script.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var crypto = require('crypto') 4 | var path = require('path') 5 | var CoffeeScript = null 6 | 7 | exports.shouldCompile = function () { 8 | return true 9 | } 10 | 11 | exports.getCachePath = function (sourceCode) { 12 | return path.join( 13 | 'coffee', 14 | crypto 15 | .createHash('sha1') 16 | .update(sourceCode, 'utf8') 17 | .digest('hex') + '.js' 18 | ) 19 | } 20 | 21 | exports.compile = function (sourceCode, filePath) { 22 | if (!CoffeeScript) { 23 | var previousPrepareStackTrace = Error.prepareStackTrace 24 | CoffeeScript = require('coffee-script') 25 | 26 | // When it loads, coffee-script reassigns Error.prepareStackTrace. We have 27 | // already reassigned it via the 'source-map-support' module, so we need 28 | // to set it back. 29 | Error.prepareStackTrace = previousPrepareStackTrace 30 | } 31 | 32 | if (process.platform === 'win32') { 33 | filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/') 34 | } 35 | 36 | var output = CoffeeScript.compile(sourceCode, { 37 | filename: filePath, 38 | sourceFiles: [filePath], 39 | inlineMap: true 40 | }) 41 | 42 | // Strip sourceURL from output so there wouldn't be duplicate entries 43 | // in devtools. 44 | return output.replace(/\/\/# sourceURL=[^'"\n]+\s*$/, '') 45 | } 46 | -------------------------------------------------------------------------------- /spec/pane-axis-element-spec.coffee: -------------------------------------------------------------------------------- 1 | PaneAxis = require '../src/pane-axis' 2 | PaneContainer = require '../src/pane-container' 3 | Pane = require '../src/pane' 4 | 5 | buildPane = -> 6 | new Pane({ 7 | applicationDelegate: atom.applicationDelegate, 8 | config: atom.config, 9 | deserializerManager: atom.deserializers, 10 | notificationManager: atom.notifications, 11 | viewRegistry: atom.views 12 | }) 13 | 14 | describe "PaneAxisElement", -> 15 | it "correctly subscribes and unsubscribes to the underlying model events on attach/detach", -> 16 | container = new PaneContainer(config: atom.config, applicationDelegate: atom.applicationDelegate, viewRegistry: atom.views) 17 | axis = new PaneAxis({}, atom.views) 18 | axis.setContainer(container) 19 | axisElement = axis.getElement() 20 | 21 | panes = [buildPane(), buildPane(), buildPane()] 22 | 23 | jasmine.attachToDOM(axisElement) 24 | axis.addChild(panes[0]) 25 | expect(axisElement.children[0]).toBe(panes[0].getElement()) 26 | 27 | axisElement.remove() 28 | axis.addChild(panes[1]) 29 | expect(axisElement.children[2]).toBeUndefined() 30 | 31 | jasmine.attachToDOM(axisElement) 32 | expect(axisElement.children[2]).toBe(panes[1].getElement()) 33 | 34 | axis.addChild(panes[2]) 35 | expect(axisElement.children[4]).toBe(panes[2].getElement()) 36 | -------------------------------------------------------------------------------- /spec/workspace-center-spec.js: -------------------------------------------------------------------------------- 1 | /** @babel */ 2 | 3 | const TextEditor = require('../src/text-editor') 4 | 5 | import {it, fit, ffit, fffit, beforeEach, afterEach} from './async-spec-helpers' 6 | 7 | describe('WorkspaceCenter', () => { 8 | describe('.observeTextEditors()', () => { 9 | it('invokes the observer with current and future text editors', () => { 10 | const workspaceCenter = atom.workspace.getCenter() 11 | const pane = workspaceCenter.getActivePane() 12 | const observed = [] 13 | 14 | const editorAddedBeforeRegisteringObserver = new TextEditor() 15 | const nonEditorItemAddedBeforeRegisteringObserver = document.createElement('div') 16 | pane.activateItem(editorAddedBeforeRegisteringObserver) 17 | pane.activateItem(nonEditorItemAddedBeforeRegisteringObserver) 18 | 19 | workspaceCenter.observeTextEditors(editor => observed.push(editor)) 20 | 21 | const editorAddedAfterRegisteringObserver = new TextEditor() 22 | const nonEditorItemAddedAfterRegisteringObserver = document.createElement('div') 23 | pane.activateItem(editorAddedAfterRegisteringObserver) 24 | pane.activateItem(nonEditorItemAddedAfterRegisteringObserver) 25 | 26 | expect(observed).toEqual( 27 | [editorAddedBeforeRegisteringObserver, editorAddedAfterRegisteringObserver] 28 | ) 29 | }) 30 | }) 31 | }) 32 | -------------------------------------------------------------------------------- /script/lib/transpile-coffee-script-paths.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const CompileCache = require('../../src/compile-cache') 4 | const fs = require('fs') 5 | const glob = require('glob') 6 | const path = require('path') 7 | 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | console.log(`Transpiling CoffeeScript paths in ${CONFIG.intermediateAppPath}`) 12 | for (let path of getPathsToTranspile()) { 13 | transpileCoffeeScriptPath(path) 14 | } 15 | } 16 | 17 | function getPathsToTranspile () { 18 | let paths = [] 19 | paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'src', '**', '*.coffee'), {nodir: true})) 20 | paths = paths.concat(glob.sync(path.join(CONFIG.intermediateAppPath, 'spec', '*.coffee'), {nodir: true})) 21 | for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) { 22 | paths = paths.concat(glob.sync( 23 | path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, '**', '*.coffee'), 24 | {ignore: path.join(CONFIG.intermediateAppPath, 'node_modules', packageName, 'spec', '**', '*.coffee'), nodir: true} 25 | )) 26 | } 27 | return paths 28 | } 29 | 30 | function transpileCoffeeScriptPath (coffeePath) { 31 | const jsPath = coffeePath.replace(/coffee$/g, 'js') 32 | fs.writeFileSync(jsPath, CompileCache.addPathToCache(coffeePath, CONFIG.atomHomeDirPath)) 33 | fs.unlinkSync(coffeePath) 34 | } 35 | -------------------------------------------------------------------------------- /src/deprecated-packages.coffee: -------------------------------------------------------------------------------- 1 | semver = require 'semver' 2 | 3 | deprecatedPackages = require('../package.json')?._deprecatedPackages ? {} 4 | ranges = {} 5 | 6 | exports.getDeprecatedPackageMetadata = (name) -> 7 | metadata = null 8 | if deprecatedPackages.hasOwnProperty(name) 9 | metadata = deprecatedPackages[name] 10 | Object.freeze(metadata) if metadata 11 | metadata 12 | 13 | exports.isDeprecatedPackage = (name, version) -> 14 | return false unless deprecatedPackages.hasOwnProperty(name) 15 | 16 | deprecatedVersionRange = deprecatedPackages[name].version 17 | return true unless deprecatedVersionRange 18 | 19 | semver.valid(version) and satisfies(version, deprecatedVersionRange) 20 | 21 | satisfies = (version, rawRange) -> 22 | unless parsedRange = ranges[rawRange] 23 | parsedRange = new Range(rawRange) 24 | ranges[rawRange] = parsedRange 25 | parsedRange.test(version) 26 | 27 | # Extend semver.Range to memoize matched versions for speed 28 | class Range extends semver.Range 29 | constructor: -> 30 | super 31 | @matchedVersions = new Set() 32 | @unmatchedVersions = new Set() 33 | 34 | test: (version) -> 35 | return true if @matchedVersions.has(version) 36 | return false if @unmatchedVersions.has(version) 37 | 38 | matches = super 39 | if matches 40 | @matchedVersions.add(version) 41 | else 42 | @unmatchedVersions.add(version) 43 | matches 44 | -------------------------------------------------------------------------------- /src/storage-folder.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs-plus') 3 | 4 | module.exports = 5 | class StorageFolder { 6 | constructor (containingPath) { 7 | if (containingPath) { 8 | this.path = path.join(containingPath, 'storage') 9 | } 10 | } 11 | 12 | store (name, object) { 13 | return new Promise((resolve, reject) => { 14 | if (!this.path) return resolve() 15 | fs.writeFile(this.pathForKey(name), JSON.stringify(object), 'utf8', error => 16 | error ? reject(error) : resolve() 17 | ) 18 | }) 19 | } 20 | 21 | load (name) { 22 | return new Promise(resolve => { 23 | if (!this.path) return resolve(null) 24 | const statePath = this.pathForKey(name) 25 | fs.readFile(statePath, 'utf8', (error, stateString) => { 26 | if (error && error.code !== 'ENOENT') { 27 | console.warn(`Error reading state file: ${statePath}`, error.stack, error) 28 | } 29 | 30 | if (!stateString) return resolve(null) 31 | 32 | try { 33 | resolve(JSON.parse(stateString)) 34 | } catch (error) { 35 | console.warn(`Error parsing state file: ${statePath}`, error.stack, error) 36 | resolve(null) 37 | } 38 | }) 39 | }) 40 | } 41 | 42 | pathForKey (name) { 43 | return path.join(this.getPath(), name) 44 | } 45 | 46 | getPath () { 47 | return this.path 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/ipc-helpers.js: -------------------------------------------------------------------------------- 1 | const Disposable = require('event-kit').Disposable 2 | let ipcRenderer = null 3 | let ipcMain = null 4 | let BrowserWindow = null 5 | 6 | let nextResponseChannelId = 0 7 | 8 | exports.on = function (emitter, eventName, callback) { 9 | emitter.on(eventName, callback) 10 | return new Disposable(() => emitter.removeListener(eventName, callback)) 11 | } 12 | 13 | exports.call = function (channel, ...args) { 14 | if (!ipcRenderer) { 15 | ipcRenderer = require('electron').ipcRenderer 16 | ipcRenderer.setMaxListeners(20) 17 | } 18 | 19 | const responseChannel = `ipc-helpers-response-${nextResponseChannelId++}` 20 | 21 | return new Promise(resolve => { 22 | ipcRenderer.on(responseChannel, (event, result) => { 23 | ipcRenderer.removeAllListeners(responseChannel) 24 | resolve(result) 25 | }) 26 | 27 | ipcRenderer.send(channel, responseChannel, ...args) 28 | }) 29 | } 30 | 31 | exports.respondTo = function (channel, callback) { 32 | if (!ipcMain) { 33 | const electron = require('electron') 34 | ipcMain = electron.ipcMain 35 | BrowserWindow = electron.BrowserWindow 36 | } 37 | 38 | return exports.on(ipcMain, channel, async (event, responseChannel, ...args) => { 39 | const browserWindow = BrowserWindow.fromWebContents(event.sender) 40 | const result = await callback(browserWindow, ...args) 41 | event.sender.send(responseChannel, result) 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /exports/atom.js: -------------------------------------------------------------------------------- 1 | const TextBuffer = require('text-buffer') 2 | const {Point, Range} = TextBuffer 3 | const {File, Directory} = require('pathwatcher') 4 | const {Emitter, Disposable, CompositeDisposable} = require('event-kit') 5 | const BufferedNodeProcess = require('../src/buffered-node-process') 6 | const BufferedProcess = require('../src/buffered-process') 7 | const GitRepository = require('../src/git-repository') 8 | const Notification = require('../src/notification') 9 | const {watchPath} = require('../src/path-watcher') 10 | 11 | const atomExport = { 12 | BufferedNodeProcess, 13 | BufferedProcess, 14 | GitRepository, 15 | Notification, 16 | TextBuffer, 17 | Point, 18 | Range, 19 | File, 20 | Directory, 21 | Emitter, 22 | Disposable, 23 | CompositeDisposable, 24 | watchPath 25 | } 26 | 27 | // Shell integration is required by both Squirrel and Settings-View 28 | if (process.platform === 'win32') { 29 | Object.defineProperty(atomExport, 'WinShell', { 30 | enumerable: true, 31 | get () { 32 | return require('../src/main-process/win-shell') 33 | } 34 | }) 35 | } 36 | 37 | // The following classes can't be used from a Task handler and should therefore 38 | // only be exported when not running as a child node process 39 | if (process.type === 'renderer') { 40 | atomExport.Task = require('../src/task') 41 | atomExport.TextEditor = require('../src/text-editor') 42 | } 43 | 44 | module.exports = atomExport 45 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/hooks/prepare-commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by "git commit" with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, rename this file to "prepare-commit-msg". 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2,$3" in 24 | merge,) 25 | /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; 26 | 27 | # ,|template,) 28 | # /usr/bin/perl -i.bak -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/jstips/hooks/prepare-commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by "git commit" with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, rename this file to "prepare-commit-msg". 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2,$3" in 24 | merge,) 25 | /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; 26 | 27 | # ,|template,) 28 | # /usr/bin/perl -i.bak -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /dot-atom/keymap.cson: -------------------------------------------------------------------------------- 1 | # Your keymap 2 | # 3 | # Atom keymaps work similarly to style sheets. Just as style sheets use 4 | # selectors to apply styles to elements, Atom keymaps use selectors to associate 5 | # keystrokes with events in specific contexts. Unlike style sheets however, 6 | # each selector can only be declared once. 7 | # 8 | # You can create a new keybinding in this file by typing "key" and then hitting 9 | # tab. 10 | # 11 | # Here's an example taken from Atom's built-in keymap: 12 | # 13 | # 'atom-text-editor': 14 | # 'enter': 'editor:newline' 15 | # 16 | # 'atom-workspace': 17 | # 'ctrl-shift-p': 'core:move-up' 18 | # 'ctrl-p': 'core:move-down' 19 | # 20 | # You can find more information about keymaps in these guides: 21 | # * http://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-keybindings 22 | # * http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/ 23 | # 24 | # If you're having trouble with your keybindings not working, try the 25 | # Keybinding Resolver: `Cmd+.` on macOS and `Ctrl+.` on other platforms. See the 26 | # Debugging Guide for more information: 27 | # * http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-the-keybindings 28 | # 29 | # This file uses CoffeeScript Object Notation (CSON). 30 | # If you are unfamiliar with CSON, you can read more about it in the 31 | # Atom Flight Manual: 32 | # http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson 33 | -------------------------------------------------------------------------------- /resources/win/atom.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET EXPECT_OUTPUT= 4 | SET WAIT= 5 | SET PSARGS=%* 6 | SET ELECTRON_ENABLE_LOGGING= 7 | 8 | FOR %%a IN (%*) DO ( 9 | IF /I "%%a"=="-f" SET EXPECT_OUTPUT=YES 10 | IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES 11 | IF /I "%%a"=="-h" SET EXPECT_OUTPUT=YES 12 | IF /I "%%a"=="--help" SET EXPECT_OUTPUT=YES 13 | IF /I "%%a"=="-t" SET EXPECT_OUTPUT=YES 14 | IF /I "%%a"=="--test" SET EXPECT_OUTPUT=YES 15 | IF /I "%%a"=="--benchmark" SET EXPECT_OUTPUT=YES 16 | IF /I "%%a"=="--benchmark-test" SET EXPECT_OUTPUT=YES 17 | IF /I "%%a"=="-v" SET EXPECT_OUTPUT=YES 18 | IF /I "%%a"=="--version" SET EXPECT_OUTPUT=YES 19 | IF /I "%%a"=="--enable-electron-logging" SET ELECTRON_ENABLE_LOGGING=YES 20 | IF /I "%%a"=="-w" ( 21 | SET EXPECT_OUTPUT=YES 22 | SET WAIT=YES 23 | ) 24 | IF /I "%%a"=="--wait" ( 25 | SET EXPECT_OUTPUT=YES 26 | SET WAIT=YES 27 | ) 28 | ) 29 | 30 | IF "%EXPECT_OUTPUT%"=="YES" ( 31 | IF "%WAIT%"=="YES" ( 32 | powershell -noexit "Start-Process -FilePath \"%~dp0\..\..\atom.exe\" -ArgumentList \"--pid=$pid $env:PSARGS\" ; wait-event" 33 | exit 0 34 | ) ELSE ( 35 | "%~dp0\..\..\atom.exe" %* 36 | ) 37 | ) ELSE ( 38 | "%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %* 39 | ) 40 | -------------------------------------------------------------------------------- /spec/fixtures/git/repo-with-submodules/git.git/modules/You-Dont-Need-jQuery/hooks/prepare-commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare the commit log message. 4 | # Called by "git commit" with the name of the file that has the 5 | # commit message, followed by the description of the commit 6 | # message's source. The hook's purpose is to edit the commit 7 | # message file. If the hook fails with a non-zero status, 8 | # the commit is aborted. 9 | # 10 | # To enable this hook, rename this file to "prepare-commit-msg". 11 | 12 | # This hook includes three examples. The first comments out the 13 | # "Conflicts:" part of a merge commit. 14 | # 15 | # The second includes the output of "git diff --name-status -r" 16 | # into the message, just before the "git status" output. It is 17 | # commented because it doesn't cope with --amend or with squashed 18 | # commits. 19 | # 20 | # The third example adds a Signed-off-by line to the message, that can 21 | # still be edited. This is rarely a good idea. 22 | 23 | case "$2,$3" in 24 | merge,) 25 | /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; 26 | 27 | # ,|template,) 28 | # /usr/bin/perl -i.bak -pe ' 29 | # print "\n" . `git diff --cached --name-status -r` 30 | # if /^#/ && $first++ == 0' "$1" ;; 31 | 32 | *) ;; 33 | esac 34 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" 37 | -------------------------------------------------------------------------------- /spec/integration/helpers/atom-launcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script wraps the `Atom` binary, allowing the `chromedriver` server to 4 | # execute it with positional arguments and environment variables. `chromedriver` 5 | # only allows 'switches' to be specified when starting a browser, not positional 6 | # arguments, so this script accepts the following special switches: 7 | # 8 | # * `atom-path`: The path to the `Atom` binary. 9 | # * `atom-args`: A space-separated list of positional arguments to pass to Atom. 10 | # * `atom-env`: A space-separated list of key=value pairs representing environment 11 | # variables to set for Atom. 12 | # 13 | # Any other switches will be passed through to `Atom`. 14 | 15 | atom_path="" 16 | atom_switches=() 17 | atom_args=() 18 | 19 | for arg in "$@"; do 20 | case $arg in 21 | --atom-path=*) 22 | atom_path="${arg#*=}" 23 | ;; 24 | 25 | --atom-args=*) 26 | atom_arg_string="${arg#*=}" 27 | for atom_arg in $atom_arg_string; do 28 | atom_args+=($atom_arg) 29 | done 30 | ;; 31 | 32 | --atom-env=*) 33 | atom_env_string="${arg#*=}" 34 | for atom_env_pair in $atom_env_string; do 35 | export $atom_env_pair 36 | done 37 | ;; 38 | 39 | *) 40 | atom_switches+=($arg) 41 | ;; 42 | esac 43 | done 44 | 45 | echo "Launching Atom" >&2 46 | echo "${atom_path}" ${atom_args[@]} ${atom_switches[@]} >&2 47 | exec "${atom_path}" ${atom_args[@]} ${atom_switches[@]} 48 | -------------------------------------------------------------------------------- /src/theme-package.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const Package = require('./package') 3 | 4 | module.exports = 5 | class ThemePackage extends Package { 6 | getType () { 7 | return 'theme' 8 | } 9 | 10 | getStyleSheetPriority () { 11 | return 1 12 | } 13 | 14 | enable () { 15 | this.config.unshiftAtKeyPath('core.themes', this.name) 16 | } 17 | 18 | disable () { 19 | this.config.removeAtKeyPath('core.themes', this.name) 20 | } 21 | 22 | preload () { 23 | this.loadTime = 0 24 | this.configSchemaRegisteredOnLoad = this.registerConfigSchemaFromMetadata() 25 | } 26 | 27 | finishLoading () { 28 | this.path = path.join(this.packageManager.resourcePath, this.path) 29 | } 30 | 31 | load () { 32 | this.loadTime = 0 33 | this.configSchemaRegisteredOnLoad = this.registerConfigSchemaFromMetadata() 34 | return this 35 | } 36 | 37 | activate () { 38 | if (this.activationPromise == null) { 39 | this.activationPromise = new Promise((resolve, reject) => { 40 | this.resolveActivationPromise = resolve 41 | this.rejectActivationPromise = reject 42 | this.measure('activateTime', () => { 43 | try { 44 | this.loadStylesheets() 45 | this.activateNow() 46 | } catch (error) { 47 | this.handleError(`Failed to activate the ${this.name} theme`, error) 48 | } 49 | }) 50 | }) 51 | } 52 | 53 | return this.activationPromise 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /spec/integration/smoke-spec.coffee: -------------------------------------------------------------------------------- 1 | fs = require 'fs-plus' 2 | path = require 'path' 3 | season = require 'season' 4 | temp = require('temp').track() 5 | runAtom = require './helpers/start-atom' 6 | 7 | describe "Smoke Test", -> 8 | return unless process.platform is 'darwin' # Fails on win32 9 | 10 | atomHome = temp.mkdirSync('atom-home') 11 | 12 | beforeEach -> 13 | jasmine.useRealClock() 14 | season.writeFileSync(path.join(atomHome, 'config.cson'), { 15 | '*': { 16 | welcome: {showOnStartup: false}, 17 | core: { 18 | telemetryConsent: 'no', 19 | disabledPackages: ['github'] 20 | } 21 | } 22 | }) 23 | 24 | it "can open a file in Atom and perform basic operations on it", -> 25 | tempDirPath = temp.mkdirSync("empty-dir") 26 | runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: atomHome}, (client) -> 27 | client 28 | .treeViewRootDirectories() 29 | .then ({value}) -> expect(value).toEqual([tempDirPath]) 30 | .waitForExist("atom-text-editor", 5000) 31 | .then (exists) -> expect(exists).toBe true 32 | .waitForPaneItemCount(1, 1000) 33 | .click("atom-text-editor") 34 | .waitUntil((-> @execute(-> document.activeElement.closest('atom-text-editor'))), 5000) 35 | .keys("Hello!") 36 | .execute -> atom.workspace.getActiveTextEditor().getText() 37 | .then ({value}) -> expect(value).toBe "Hello!" 38 | .dispatchCommand("editor:delete-line") 39 | -------------------------------------------------------------------------------- /script/lib/get-license-text.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | const legalEagle = require('legal-eagle') 6 | 7 | const licenseOverrides = require('../license-overrides') 8 | const CONFIG = require('../config') 9 | 10 | module.exports = function () { 11 | return new Promise((resolve, reject) => { 12 | legalEagle({path: CONFIG.repositoryRootPath, overrides: licenseOverrides}, (err, packagesLicenses) => { 13 | if (err) { 14 | reject(err) 15 | throw new Error(err) 16 | } else { 17 | let text = 18 | fs.readFileSync(path.join(CONFIG.repositoryRootPath, 'LICENSE.md'), 'utf8') + '\n\n' + 19 | 'This application bundles the following third-party packages in accordance\n' + 20 | 'with the following licenses:\n\n' 21 | for (let packageName of Object.keys(packagesLicenses).sort()) { 22 | const packageLicense = packagesLicenses[packageName] 23 | text += '-------------------------------------------------------------------------\n\n' 24 | text += `Package: ${packageName}\n` 25 | text += `License: ${packageLicense.license}\n` 26 | if (packageLicense.source) { 27 | text += `License Source: ${packageLicense.source}\n` 28 | } 29 | if (packageLicense.sourceText) { 30 | text += `Source Text:\n\n${packageLicense.sourceText}` 31 | } 32 | text += '\n' 33 | } 34 | resolve(text) 35 | } 36 | }) 37 | }) 38 | } 39 | --------------------------------------------------------------------------------