repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/package-transpilation-registry.js
src/package-transpilation-registry.js
'use strict'; // This file is required by compile-cache, which is required directly from // apm, so it can only use the subset of newer JavaScript features that apm's // version of Node supports. Strict mode is required for block scoped declarations. const crypto = require('crypto'); const fs = require('fs'); const pa...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/menu-helpers.js
src/menu-helpers.js
const _ = require('underscore-plus'); const ItemSpecificities = new WeakMap(); // Add an item to a menu, ensuring separators are not duplicated. function addItemToMenu(item, menu) { const lastMenuItem = _.last(menu); const lastMenuItemIsSpearator = lastMenuItem && lastMenuItem.type === 'separator'; if (!(it...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/delegated-listener.js
src/delegated-listener.js
const EventKit = require('event-kit'); module.exports = function listen(element, eventName, selector, handler) { const innerHandler = function(event) { if (selector) { var currentTarget = event.target; while (currentTarget) { if (currentTarget.matches && currentTarget.matches(selector)) { ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/token-iterator.js
src/token-iterator.js
module.exports = class TokenIterator { constructor(languageMode) { this.languageMode = languageMode; } reset(line) { this.line = line; this.index = null; this.startColumn = 0; this.endColumn = 0; this.scopes = this.line.openScopes.map(id => this.languageMode.grammar.scopeForId(id) ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/tree-sitter-language-mode.js
src/tree-sitter-language-mode.js
const Parser = require('tree-sitter'); const { Point, Range, spliceArray } = require('text-buffer'); const { Patch } = require('superstring'); const { Emitter } = require('event-kit'); const ScopeDescriptor = require('./scope-descriptor'); const Token = require('./token'); const TokenizedLine = require('./tokenized-lin...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/atom-environment.js
src/atom-environment.js
const crypto = require('crypto'); const path = require('path'); const util = require('util'); const { ipcRenderer } = require('electron'); const _ = require('underscore-plus'); const { deprecate } = require('grim'); const { CompositeDisposable, Disposable, Emitter } = require('event-kit'); const fs = require('fs-plus'...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/window.js
src/window.js
// Public: Measure how long a function takes to run. // // description - A {String} description that will be logged to the console when // the function completes. // fn - A {Function} to measure the duration of. // // Returns the value returned by the given function. window.measure = function(description,...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/command-registry.js
src/command-registry.js
'use strict'; const { Emitter, Disposable, CompositeDisposable } = require('event-kit'); const { calculateSpecificity, validateSelector } = require('clear-cut'); const _ = require('underscore-plus'); let SequenceCount = 0; // Public: Associates listener functions with commands in a // context-sensitive way using CSS...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/panel-container.js
src/panel-container.js
'use strict'; const { Emitter, CompositeDisposable } = require('event-kit'); const { createPanelContainerElement } = require('./panel-container-element'); module.exports = class PanelContainer { constructor({ location, dock, viewRegistry } = {}) { this.location = location; this.emitter = new Emitter(); ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/item-registry.js
src/item-registry.js
module.exports = class ItemRegistry { constructor() { this.items = new WeakSet(); } addItem(item) { if (this.hasItem(item)) { throw new Error( `The workspace can only contain one instance of item ${item}` ); } return this.items.add(item); } removeItem(item) { return t...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/initialize-application-window.js
src/initialize-application-window.js
const AtomEnvironment = require('./atom-environment'); const ApplicationDelegate = require('./application-delegate'); const Clipboard = require('./clipboard'); const TextEditor = require('./text-editor'); require('./text-editor-component'); require('./file-system-blob-store'); require('./native-compile-cache'); requir...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/deserializer-manager.js
src/deserializer-manager.js
const { Disposable } = require('event-kit'); // Extended: Manages the deserializers used for serialized state // // An instance of this class is always available as the `atom.deserializers` // global. // // ## Examples // // ```coffee // class MyPackageView extends View // atom.deserializers.add(this) // // @deser...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-axis.js
src/pane-axis.js
const { Emitter, CompositeDisposable } = require('event-kit'); const { flatten } = require('underscore-plus'); const Model = require('./model'); const { createPaneAxisElement } = require('./pane-axis-element'); class PaneAxis extends Model { static deserialize(state, { deserializers, views }) { state.children = ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/clipboard.js
src/clipboard.js
const crypto = require('crypto'); const { clipboard } = require('electron'); // Extended: Represents the clipboard used for copying and pasting in Atom. // // An instance of this class is always available as the `atom.clipboard` global. // // ## Examples // // ```js // atom.clipboard.write('hello') // // console.log(a...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/package.js
src/package.js
const path = require('path'); const asyncEach = require('async/each'); const CSON = require('season'); const fs = require('fs-plus'); const { Emitter, CompositeDisposable } = require('event-kit'); const dedent = require('dedent'); const CompileCache = require('./compile-cache'); const ModuleCache = require('./module-c...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/core-uri-handlers.js
src/core-uri-handlers.js
const fs = require('fs-plus'); // Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber(numStr) { const num = parseInt(numStr || 0, 10); return Math.max(num - 1, 0); } function openFile(atom, { query }) { const { filena...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/buffered-node-process.js
src/buffered-node-process.js
const BufferedProcess = require('./buffered-process'); // Extended: Like {BufferedProcess}, but accepts a Node script as the command // to run. // // This is necessary on Windows since it doesn't support shebang `#!` lines. // // ## Examples // // ```js // const {BufferedNodeProcess} = require('atom') // ``` module....
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/tooltip.js
src/tooltip.js
'use strict'; const EventKit = require('event-kit'); const tooltipComponentsByElement = new WeakMap(); const listen = require('./delegated-listener'); // This tooltip class is derived from Bootstrap 3, but modified to not require // jQuery, which is an expensive dependency we want to eliminate. let followThroughTime...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/config.js
src/config.js
const _ = require('underscore-plus'); const { Emitter } = require('event-kit'); const { getValueAtKeyPath, setValueAtKeyPath, deleteValueAtKeyPath, pushKeyPath, splitKeyPath } = require('key-path-helpers'); const Color = require('./color'); const ScopedPropertyStore = require('scoped-property-store'); const S...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/view-registry.js
src/view-registry.js
const Grim = require('grim'); const { Disposable } = require('event-kit'); const AnyConstructor = Symbol('any-constructor'); // Essential: `ViewRegistry` handles the association between model and view // types in Atom. We call this association a View Provider. As in, for a given // model, this class can provide a vie...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/history-manager.js
src/history-manager.js
const { Emitter, CompositeDisposable } = require('event-kit'); // Extended: History manager for remembering which projects have been opened. // // An instance of this class is always available as the `atom.history` global. // // The project history is used to enable the 'Reopen Project' menu. class HistoryManager { ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-editor.js
src/text-editor.js
const _ = require('underscore-plus'); const path = require('path'); const fs = require('fs-plus'); const Grim = require('grim'); const dedent = require('dedent'); const { CompositeDisposable, Disposable, Emitter } = require('event-kit'); const TextBuffer = require('text-buffer'); const { Point, Range } = TextBuffer; co...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/cursor.js
src/cursor.js
const { Point, Range } = require('text-buffer'); const { Emitter } = require('event-kit'); const _ = require('underscore-plus'); const Model = require('./model'); const EmptyLineRegExp = /(\r\n[\t ]*\r\n)|(\n[\t ]*\n)/g; // Extended: The `Cursor` class represents the little blinking line identifying // where text can...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/coffee-script.js
src/coffee-script.js
'use strict'; const crypto = require('crypto'); const path = require('path'); let CoffeeScript = null; exports.shouldCompile = function() { return true; }; exports.getCachePath = function(sourceCode) { return path.join( 'coffee', crypto .createHash('sha1') .update(sourceCode, 'utf8') .d...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/uri-handler-registry.js
src/uri-handler-registry.js
const url = require('url'); const { Emitter, Disposable } = require('event-kit'); // Private: Associates listener functions with URIs from outside the application. // // The global URI handler registry maps URIs to listener functions. URIs are mapped // based on the hostname of the URI; the format is atom://package/co...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/get-window-load-settings.js
src/get-window-load-settings.js
const { remote } = require('electron'); let windowLoadSettings = null; module.exports = () => { if (!windowLoadSettings) { windowLoadSettings = JSON.parse(remote.getCurrentWindow().loadSettingsJSON); } return windowLoadSettings; };
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-axis-element.js
src/pane-axis-element.js
const { CompositeDisposable } = require('event-kit'); require('./pane-resize-handle-element'); class PaneAxisElement extends HTMLElement { connectedCallback() { if (this.subscriptions == null) { this.subscriptions = this.subscribeToModel(); } this.model .getChildren() .map((child, index...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/storage-folder.js
src/storage-folder.js
const path = require('path'); const fs = require('fs-plus'); module.exports = class StorageFolder { constructor(containingPath) { if (containingPath) { this.path = path.join(containingPath, 'storage'); } } store(name, object) { return new Promise((resolve, reject) => { if (!this.path) re...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/notification-manager.js
src/notification-manager.js
const { Emitter } = require('event-kit'); const Notification = require('../src/notification'); // Public: A notification manager used to create {Notification}s to be shown // to the user. // // An instance of this class is always available as the `atom.notifications` // global. module.exports = class NotificationManag...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/reopen-project-list-view.js
src/reopen-project-list-view.js
const SelectListView = require('atom-select-list'); module.exports = class ReopenProjectListView { constructor(callback) { this.callback = callback; this.selectListView = new SelectListView({ emptyMessage: 'No projects in history.', itemsClassList: ['mark-active'], items: [], filterKe...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-editor-element.js
src/text-editor-element.js
const { Emitter, Range } = require('atom'); const Grim = require('grim'); const TextEditorComponent = require('./text-editor-component'); const dedent = require('dedent'); class TextEditorElement extends HTMLElement { initialize(component) { this.component = component; return this; } get shadowRoot() { ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/file-system-blob-store.js
src/file-system-blob-store.js
'use strict'; const fs = require('fs-plus'); const path = require('path'); module.exports = class FileSystemBlobStore { static load(directory) { let instance = new FileSystemBlobStore(directory); instance.load(); return instance; } constructor(directory) { this.blobFilename = path.join(director...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-container-element.js
src/pane-container-element.js
const { CompositeDisposable } = require('event-kit'); class PaneContainerElement extends HTMLElement { constructor() { super(); this.subscriptions = new CompositeDisposable(); } initialize(model, { views }) { this.model = model; this.views = views; if (this.views == null) { throw new E...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-element.js
src/pane-element.js
const path = require('path'); const { CompositeDisposable } = require('event-kit'); class PaneElement extends HTMLElement { constructor() { super(); this.attached = false; this.subscriptions = new CompositeDisposable(); this.inlineDisplayStyles = new WeakMap(); this.subscribeToDOMEvents(); th...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/tree-indenter.js
src/tree-indenter.js
// const log = console.debug // in dev const log = () => {}; // in production module.exports = class TreeIndenter { constructor(languageMode, scopes = undefined) { this.languageMode = languageMode; this.scopes = scopes || languageMode.config.get('editor.scopes', { scope: this.languageMode...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/module-cache.js
src/module-cache.js
const Module = require('module'); const path = require('path'); const semver = require('semver'); // Extend semver.Range to memoize matched versions for speed class Range extends semver.Range { constructor() { super(...arguments); this.matchedVersions = new Set(); this.unmatchedVersions = new Set(); } ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/get-release-channel.js
src/get-release-channel.js
module.exports = function(version) { // This matches stable, dev (with or without commit hash) and any other // release channel following the pattern '1.00.0-channel0' const match = version.match(/\d+\.\d+\.\d+(-([a-z]+)(\d+|-\w{4,})?)?$/); if (!match) { return 'unrecognized'; } else if (match[2]) { r...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/color.js
src/color.js
let ParsedColor = null; // Essential: A simple color class returned from {Config::get} when the value // at the key path is of type 'color'. module.exports = class Color { // Essential: Parse a {String} or {Object} into a {Color}. // // * `value` A {String} such as `'white'`, `#ff00ff`, or // `'rgba(255, 15,...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/scope-descriptor.js
src/scope-descriptor.js
// Extended: Wraps an {Array} of `String`s. The Array describes a path from the // root of the syntax tree to a token including _all_ scope names for the entire // path. // // Methods that take a `ScopeDescriptor` will also accept an {Array} of {String} // scope names e.g. `['.source.js']`. // // You can use `ScopeDesc...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/notification.js
src/notification.js
const { Emitter } = require('event-kit'); const _ = require('underscore-plus'); // Public: A notification to the user containing a message and type. module.exports = class Notification { constructor(type, message, options = {}) { this.type = type; this.message = message; this.options = options; this....
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/project.js
src/project.js
const path = require('path'); const _ = require('underscore-plus'); const fs = require('fs-plus'); const { Emitter, Disposable, CompositeDisposable } = require('event-kit'); const TextBuffer = require('text-buffer'); const { watchPath } = require('./path-watcher'); const DefaultDirectoryProvider = require('./default-...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/command-installer.js
src/command-installer.js
const path = require('path'); const fs = require('fs-plus'); module.exports = class CommandInstaller { constructor(applicationDelegate) { this.applicationDelegate = applicationDelegate; } initialize(appVersion) { this.appVersion = appVersion; } getInstallDirectory() { return '/usr/local/bin'; ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/protocol-handler-installer.js
src/protocol-handler-installer.js
const { ipcRenderer } = require('electron'); const SETTING = 'core.uriHandlerRegistration'; const PROMPT = 'prompt'; const ALWAYS = 'always'; const NEVER = 'never'; module.exports = class ProtocolHandlerInstaller { isSupported() { return ['win32', 'darwin'].includes(process.platform); } async isDefaultProt...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/module-utils.js
src/module-utils.js
// a require function with both ES5 and ES6 default export support function requireModule(path) { const modul = require(path); if (modul === null || modul === undefined) { // if null do not bother return modul; } else { if ( modul.__esModule === true && (modul.default !== undefined && modu...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/native-watcher-registry.js
src/native-watcher-registry.js
const path = require('path'); // Private: re-join the segments split from an absolute path to form another absolute path. function absolute(...parts) { const candidate = path.join(...parts); return path.isAbsolute(candidate) ? candidate : path.join(path.sep, candidate); } // Private: Map userland filesyst...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane.js
src/pane.js
const Grim = require('grim'); const { CompositeDisposable, Emitter } = require('event-kit'); const PaneAxis = require('./pane-axis'); const TextEditor = require('./text-editor'); const { createPaneElement } = require('./pane-element'); let nextInstanceId = 1; class SaveCancelledError extends Error {} // Extended: A ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/menu-sort-helpers.js
src/menu-sort-helpers.js
// UTILS function splitArray(arr, predicate) { let lastArr = []; const multiArr = [lastArr]; arr.forEach(item => { if (predicate(item)) { if (lastArr.length > 0) { lastArr = []; multiArr.push(lastArr); } } else { lastArr.push(item); } }); return multiArr; } func...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-resize-handle-element.js
src/pane-resize-handle-element.js
class PaneResizeHandleElement extends HTMLElement { constructor() { super(); this.resizePane = this.resizePane.bind(this); this.resizeStopped = this.resizeStopped.bind(this); this.subscribeToDOMEvents(); } subscribeToDOMEvents() { this.addEventListener('dblclick', this.resizeToFitContent.bind...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/atom-paths.js
src/atom-paths.js
const fs = require('fs-plus'); const path = require('path'); const hasWriteAccess = dir => { const testFilePath = path.join(dir, 'write.test'); try { fs.writeFileSync(testFilePath, new Date().toISOString(), { flag: 'w+' }); fs.unlinkSync(testFilePath); return true; } catch (err) { return false; ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/window-event-handler.js
src/window-event-handler.js
const { Disposable, CompositeDisposable } = require('event-kit'); const listen = require('./delegated-listener'); const { debounce } = require('underscore-plus'); // Handles low-level events related to the `window`. module.exports = class WindowEventHandler { constructor({ atomEnvironment, applicationDelegate }) { ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/config-schema.js
src/config-schema.js
// This is loaded by atom-environment.coffee. See // https://atom.io/docs/api/latest/Config for more information about config // schemas. const configSchema = { core: { type: 'object', properties: { ignoredNames: { type: 'array', default: [ '.git', '.hg', '....
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/git-repository.js
src/git-repository.js
const path = require('path'); const fs = require('fs-plus'); const _ = require('underscore-plus'); const { Emitter, Disposable, CompositeDisposable } = require('event-kit'); const GitUtils = require('git-utils'); let nextId = 0; // Extended: Represents the underlying git operations performed by Atom. // // This class...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/update-process-env.js
src/update-process-env.js
const fs = require('fs'); const childProcess = require('child_process'); const ENVIRONMENT_VARIABLES_TO_PRESERVE = new Set([ 'NODE_ENV', 'NODE_PATH', 'ATOM_HOME', 'ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT' ]); const PLATFORMS_KNOWN_TO_WORK = new Set(['darwin', 'linux']); // Shell command that returns env va...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/babel.js
src/babel.js
'use strict'; const crypto = require('crypto'); const path = require('path'); const defaultOptions = require('../static/babelrc.json'); let babel = null; let babelVersionDirectory = null; const PREFIXES = [ '/** @babel */', '"use babel"', "'use babel'", '/* @flow */', '// @flow' ]; const PREFIX_LENGTH = M...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/ipc-helpers.js
src/ipc-helpers.js
const Disposable = require('event-kit').Disposable; let ipcRenderer = null; let ipcMain = null; let BrowserWindow = null; let nextResponseChannelId = 0; exports.on = function(emitter, eventName, callback) { emitter.on(eventName, callback); return new Disposable(() => emitter.removeListener(eventName, callback)); ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/workspace.js
src/workspace.js
const _ = require('underscore-plus'); const url = require('url'); const path = require('path'); const { Emitter, Disposable, CompositeDisposable } = require('event-kit'); const fs = require('fs-plus'); const { Directory } = require('pathwatcher'); const Grim = require('grim'); const DefaultDirectorySearcher = require('...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/workspace-center.js
src/workspace-center.js
'use strict'; const TextEditor = require('./text-editor'); const PaneContainer = require('./pane-container'); // Essential: Represents the workspace at the center of the entire window. module.exports = class WorkspaceCenter { constructor(params) { params.location = 'center'; this.paneContainer = new PaneCon...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/native-compile-cache.js
src/native-compile-cache.js
const Module = require('module'); const path = require('path'); const crypto = require('crypto'); const vm = require('vm'); function computeHash(contents) { return crypto .createHash('sha1') .update(contents, 'utf8') .digest('hex'); } class NativeCompileCache { constructor() { this.cacheStore = nu...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/auto-update-manager.js
src/main-process/auto-update-manager.js
const { EventEmitter } = require('events'); const os = require('os'); const path = require('path'); const IdleState = 'idle'; const CheckingState = 'checking'; const DownloadingState = 'downloading'; const UpdateAvailableState = 'update-available'; const NoUpdateAvailableState = 'no-update-available'; const Unsupporte...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/start.js
src/main-process/start.js
const { app } = require('electron'); const nslog = require('nslog'); const path = require('path'); const temp = require('temp'); const parseCommandLine = require('./parse-command-line'); const startCrashReporter = require('../crash-reporter-start'); const getReleaseChannel = require('../get-release-channel'); const ato...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/atom-application.js
src/main-process/atom-application.js
const AtomWindow = require('./atom-window'); const ApplicationMenu = require('./application-menu'); const AtomProtocolHandler = require('./atom-protocol-handler'); const AutoUpdateManager = require('./auto-update-manager'); const StorageFolder = require('../storage-folder'); const Config = require('../config'); const C...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/spawner.js
src/main-process/spawner.js
const ChildProcess = require('child_process'); // Spawn a command and invoke the callback when it completes with an error // and the output from standard out. // // * `command` The underlying OS command {String} to execute. // * `args` (optional) The {Array} with arguments to be passed to command. // * `callback` (...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/auto-updater-win32.js
src/main-process/auto-updater-win32.js
const { EventEmitter } = require('events'); const SquirrelUpdate = require('./squirrel-update'); class AutoUpdater extends EventEmitter { setFeedURL(updateUrl) { this.updateUrl = updateUrl; } quitAndInstall() { if (SquirrelUpdate.existsSync()) { SquirrelUpdate.restartAtom(); } else { req...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/win-shell.js
src/main-process/win-shell.js
const Registry = require('winreg'); const Path = require('path'); const getAppName = require('../get-app-name'); const appName = getAppName(); const exeName = Path.basename(process.execPath); const appPath = `"${process.execPath}"`; const fileIconPath = `"${Path.join( process.execPath, '..', 'resources', 'cli'...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/context-menu.js
src/main-process/context-menu.js
const { Menu } = require('electron'); module.exports = class ContextMenu { constructor(template, atomWindow) { this.atomWindow = atomWindow; this.createClickHandlers(template); const menu = Menu.buildFromTemplate(template); menu.popup(this.atomWindow.browserWindow, { async: true }); } // It's ne...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/main.js
src/main-process/main.js
if (typeof snapshotResult !== 'undefined') { snapshotResult.setGlobals(global, process, global, {}, console, require); } const startTime = Date.now(); const StartupTime = require('../startup-time'); StartupTime.setStartTime(); const path = require('path'); const fs = require('fs-plus'); const CSON = require('season...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/atom-window.js
src/main-process/atom-window.js
const { BrowserWindow, app, dialog, ipcMain, nativeImage } = require('electron'); const getAppName = require('../get-app-name'); const path = require('path'); const url = require('url'); const { EventEmitter } = require('events'); const StartupTime = require('../startup-time'); const ICON_PATH = path.resolve...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/parse-command-line.js
src/main-process/parse-command-line.js
'use strict'; const dedent = require('dedent'); const yargs = require('yargs'); const { app } = require('electron'); module.exports = function parseCommandLine(processArgs) { // macOS Gatekeeper adds a flag ("-psn_0_[six or seven digits here]") when it intercepts Atom launches. // (This happens for fresh download...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/win-powershell.js
src/main-process/win-powershell.js
let powershellPath; const path = require('path'); const Spawner = require('./spawner'); if (process.env.SystemRoot) { const system32Path = path.join(process.env.SystemRoot, 'System32'); powershellPath = path.join( system32Path, 'WindowsPowerShell', 'v1.0', 'powershell.exe' ); } else { powershel...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/file-recovery-service.js
src/main-process/file-recovery-service.js
const { dialog } = require('electron'); const crypto = require('crypto'); const Path = require('path'); const fs = require('fs-plus'); const mkdirp = require('mkdirp'); module.exports = class FileRecoveryService { constructor(recoveryDirectory) { this.recoveryDirectory = recoveryDirectory; this.recoveryFiles...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/atom-protocol-handler.js
src/main-process/atom-protocol-handler.js
const { protocol } = require('electron'); const fs = require('fs-plus'); const path = require('path'); // Handles requests with 'atom' protocol. // // It's created by {AtomApplication} upon instantiation and is used to create a // custom resource loader for 'atom://' URLs. // // The following directories are searched ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/application-menu.js
src/main-process/application-menu.js
const { app, Menu } = require('electron'); const _ = require('underscore-plus'); const MenuHelpers = require('../menu-helpers'); // Used to manage the global application menu. // // It's created by {AtomApplication} upon instantiation and used to add, remove // and maintain the state of all menu items. module.exports ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/main-process/squirrel-update.js
src/main-process/squirrel-update.js
let setxPath; const { app } = require('electron'); const fs = require('fs-plus'); const getAppName = require('../get-app-name'); const path = require('path'); const Spawner = require('./spawner'); const WinShell = require('./win-shell'); const WinPowerShell = require('./win-powershell'); const appFolder = path.resolve...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/babel-spec.js
spec/babel-spec.js
// Users may have this environment variable set. Currently, it causes babel to // log to stderr, which causes errors on Windows. // See https://github.com/atom/electron/issues/2033 process.env.DEBUG = '*'; const path = require('path'); const temp = require('temp').track(); const CompileCache = require('../src/compile-...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/title-bar-spec.js
spec/title-bar-spec.js
const TitleBar = require('../src/title-bar'); const temp = require('temp').track(); describe('TitleBar', () => { it('updates its title when document.title changes', () => { const titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDeleg...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/default-directory-searcher-spec.js
spec/default-directory-searcher-spec.js
const DefaultDirectorySearcher = require('../src/default-directory-searcher'); const Task = require('../src/task'); const path = require('path'); describe('DefaultDirectorySearcher', function() { let searcher; let dirPath; beforeEach(function() { dirPath = path.resolve(__dirname, 'fixtures', 'dir'); sea...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/task-spec.js
spec/task-spec.js
const Task = require('../src/task'); const Grim = require('grim'); describe('Task', function() { describe('@once(taskPath, args..., callback)', () => it('terminates the process after it completes', function() { let handlerResult = null; const task = Task.once( require.resolve('./fixtures/task...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/deserializer-manager-spec.js
spec/deserializer-manager-spec.js
const DeserializerManager = require('../src/deserializer-manager'); describe('DeserializerManager', function() { let manager = null; class Foo { static deserialize({ name }) { return new Foo(name); } constructor(name) { this.name = name; } } beforeEach(() => (manager = new Deseria...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/pane-container-spec.js
spec/pane-container-spec.js
const PaneContainer = require('../src/pane-container'); describe('PaneContainer', () => { let confirm, params; beforeEach(() => { confirm = spyOn(atom.applicationDelegate, 'confirm').andCallFake( (options, callback) => callback(0) ); params = { location: 'center', config: atom.config...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-editor-element-spec.js
spec/text-editor-element-spec.js
const TextEditor = require('../src/text-editor'); const TextEditorElement = require('../src/text-editor-element'); describe('TextEditorElement', () => { let jasmineContent; beforeEach(() => { jasmineContent = document.body.querySelector('#jasmine-content'); // Force scrollbars to be visible regardless of ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/decoration-manager-spec.js
spec/decoration-manager-spec.js
const DecorationManager = require('../src/decoration-manager'); const TextEditor = require('../src/text-editor'); describe('DecorationManager', function() { let [decorationManager, buffer, editor, markerLayer1, markerLayer2] = []; beforeEach(function() { buffer = atom.project.bufferForPathSync('sample.js'); ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/styles-element-spec.js
spec/styles-element-spec.js
const { createStylesElement } = require('../src/styles-element'); describe('StylesElement', function() { let [ element, addedStyleElements, removedStyleElements, updatedStyleElements ] = []; beforeEach(function() { element = createStylesElement(); element.initialize(atom.styles); doc...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/syntax-scope-map-spec.js
spec/syntax-scope-map-spec.js
const SyntaxScopeMap = require('../src/syntax-scope-map'); describe('SyntaxScopeMap', () => { it('can match immediate child selectors', () => { const map = new SyntaxScopeMap({ 'a > b > c': 'x', 'b > c': 'y', c: 'z' }); expect(map.get(['a', 'b', 'c'], [0, 0, 0])).toBe('x'); expect(...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/style-manager-spec.js
spec/style-manager-spec.js
const temp = require('temp').track(); const StyleManager = require('../src/style-manager'); describe('StyleManager', () => { let [styleManager, addEvents, removeEvents, updateEvents] = []; beforeEach(() => { styleManager = new StyleManager({ configDirPath: temp.mkdirSync('atom-config') }); addEv...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/grammar-registry-spec.js
spec/grammar-registry-spec.js
const dedent = require('dedent'); const path = require('path'); const fs = require('fs-plus'); const temp = require('temp').track(); const TextBuffer = require('text-buffer'); const GrammarRegistry = require('../src/grammar-registry'); const TreeSitterGrammar = require('../src/tree-sitter-grammar'); const FirstMate = r...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/notification-manager-spec.js
spec/notification-manager-spec.js
const NotificationManager = require('../src/notification-manager'); describe('NotificationManager', () => { let manager; beforeEach(() => { manager = new NotificationManager(); }); describe('the atom global', () => it('has a notifications instance', () => { expect(atom.notifications instanceof ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/package-transpilation-registry-spec.js
spec/package-transpilation-registry-spec.js
/** @babel */ import path from 'path'; import PackageTranspilationRegistry from '../src/package-transpilation-registry'; const originalCompiler = { getCachePath: (sourceCode, filePath) => { return 'orig-cache-path'; }, compile: (sourceCode, filePath) => { return sourceCode + '-original-compiler'; }, ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/buffered-process-spec.js
spec/buffered-process-spec.js
/* eslint-disable no-new */ const ChildProcess = require('child_process'); const path = require('path'); const fs = require('fs-plus'); const BufferedProcess = require('../src/buffered-process'); describe('BufferedProcess', function() { describe('when a bad command is specified', function() { let [oldOnError] = ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/context-menu-manager-spec.js
spec/context-menu-manager-spec.js
const ContextMenuManager = require('../src/context-menu-manager'); describe('ContextMenuManager', function() { let [contextMenu, parent, child, grandchild] = []; beforeEach(function() { const { resourcePath } = atom.getLoadSettings(); contextMenu = new ContextMenuManager({ keymapManager: atom.keymaps }); ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/atom-paths-spec.js
spec/atom-paths-spec.js
/** @babel */ import { remote } from 'electron'; import atomPaths from '../src/atom-paths'; import fs from 'fs-plus'; import path from 'path'; const app = remote.app; const temp = require('temp').track(); describe('AtomPaths', () => { const portableAtomHomePath = path.join( atomPaths.getAppDirectory(), '..'...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-editor-registry-spec.js
spec/text-editor-registry-spec.js
const TextEditorRegistry = require('../src/text-editor-registry'); const TextEditor = require('../src/text-editor'); const TextBuffer = require('text-buffer'); const { Point, Range } = TextBuffer; const dedent = require('dedent'); const NullGrammar = require('../src/null-grammar'); describe('TextEditorRegistry', funct...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/squirrel-update-spec.js
spec/squirrel-update-spec.js
const electron = require('electron'); const fs = require('fs-plus'); const path = require('path'); const temp = require('temp').track(); electron.app = { getName() { return 'Atom'; }, getVersion() { return '1.0.0'; }, getPath() { return '/tmp/atom.exe'; } }; const SquirrelUpdate = require('../...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/update-process-env-spec.js
spec/update-process-env-spec.js
/** @babel */ import path from 'path'; import childProcess from 'child_process'; import { updateProcessEnv, shouldGetEnvFromShell } from '../src/update-process-env'; import mockSpawn from 'mock-spawn'; const temp = require('temp').track(); describe('updateProcessEnv(launchEnv)', function() { let originalProcess...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/menu-manager-spec.js
spec/menu-manager-spec.js
const path = require('path'); const MenuManager = require('../src/menu-manager'); describe('MenuManager', function() { let menu = null; beforeEach(function() { menu = new MenuManager({ keymapManager: atom.keymaps, packageManager: atom.packages }); spyOn(menu, 'sendToBrowserProcess'); // Do...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/tooltip-manager-spec.js
spec/tooltip-manager-spec.js
const { CompositeDisposable } = require('atom'); const TooltipManager = require('../src/tooltip-manager'); const Tooltip = require('../src/tooltip'); const _ = require('underscore-plus'); describe('TooltipManager', () => { let manager, element; const ctrlX = _.humanizeKeystroke('ctrl-x'); const ctrlY = _.humani...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/atom-environment-spec.js
spec/atom-environment-spec.js
const { conditionPromise } = require('./async-spec-helpers'); const fs = require('fs'); const path = require('path'); const temp = require('temp').track(); const AtomEnvironment = require('../src/atom-environment'); describe('AtomEnvironment', () => { afterEach(() => { try { temp.cleanupSync(); } catch...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-editor-component-spec.js
spec/text-editor-component-spec.js
const { conditionPromise } = require('./async-spec-helpers'); const Random = require('../script/node_modules/random-seed'); const { getRandomBufferRange, buildRandomLines } = require('./helpers/random'); const TextEditorComponent = require('../src/text-editor-component'); const TextEditorElement = require('../src/text...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
true
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/command-registry-spec.js
spec/command-registry-spec.js
const CommandRegistry = require('../src/command-registry'); const _ = require('underscore-plus'); describe('CommandRegistry', () => { let registry, parent, child, grandchild; beforeEach(() => { parent = document.createElement('div'); child = document.createElement('div'); grandchild = document.createE...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/jasmine-junit-reporter.js
spec/jasmine-junit-reporter.js
require('jasmine-reporters'); class JasmineJUnitReporter extends jasmine.JUnitXmlReporter { fullDescription(spec) { let fullDescription = spec.description; let currentSuite = spec.suite; while (currentSuite) { fullDescription = currentSuite.description + ' ' + fullDescription; currentSuite = ...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false
atom/atom
https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/view-registry-spec.js
spec/view-registry-spec.js
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const ViewRegistry = require('../src/view-registry'); describe('ViewR...
javascript
MIT
1c3bd35ce238dc0491def9e1780d04748d8e18af
2026-01-04T14:56:51.056594Z
false