Skip to content

Commit

Permalink
fix: do not export the private values and functions
Browse files Browse the repository at this point in the history
in Main and PluginManagement which were edited in this PR
  • Loading branch information
aminya committed Dec 28, 2020
1 parent 392f6d9 commit 067a6d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,36 @@ export { default as Minimap } from './minimap'
* @type {boolean}
* @access private
*/
export let active = false
let active = false
/**
* The toggle state of the package.
*
* @type {boolean}
* @access private
*/
export let toggled = false
let toggled = false
/**
* The `Map` where Minimap instances are stored with the text editor they
* target as key.
*
* @type {Map}
* @access private
*/
export let editorsMinimaps = null
let editorsMinimaps = null
/**
* The composite disposable that stores the package's subscriptions.
*
* @type {CompositeDisposable}
* @access private
*/
export let subscriptions = null
let subscriptions = null
/**
* The disposable that stores the package's commands subscription.
*
* @type {Disposable}
* @access private
*/
export let subscriptionsOfCommands = null
let subscriptionsOfCommands = null

/**
* The package's events emitter.
Expand Down Expand Up @@ -348,7 +348,7 @@ export function observeMinimaps (iterator) {
*
* @access private
*/
export function initSubscriptions () {
function initSubscriptions () {
subscriptions.add(atom.workspace.observeTextEditors((textEditor) => {
const minimap = minimapForEditor(textEditor)
const minimapElement = atom.views.getView(minimap)
Expand Down
16 changes: 8 additions & 8 deletions lib/plugin-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ import { emitter, getConfigSchema } from './main'
* @type {Object}
* @access private
*/
export const plugins = {}
const plugins = {}
/**
* The plugins' subscriptions stored using the plugin names as keys.
*
* @type {Object}
* @access private
*/
export const pluginsSubscriptions = {}
const pluginsSubscriptions = {}

/**
* A map that stores the display order for each plugin
*
* @type {Object}
* @access private
*/
export const pluginsOrderMap = {}
const pluginsOrderMap = {}

/**
* Registers a minimap `plugin` with the given `name`.
Expand Down Expand Up @@ -130,7 +130,7 @@ export function deactivateAllPlugins () {
* @return An iterable that yield the name and reference to every plugin
* as an array in each iteration.
*/
export function * eachPlugin () {
function * eachPlugin () {
for (const name in plugins) {
yield [name, plugins[name]]
}
Expand All @@ -144,7 +144,7 @@ export function * eachPlugin () {
* @emits {did-deactivate-plugin} if the plugin was deactivated by the call.
* @access private
*/
export function updatesPluginActivationState (name) {
function updatesPluginActivationState (name) {
const plugin = plugins[name]
const pluginActive = plugin.isActive()
const settingActive = atom.config.get(`minimap.plugins.${name}`)
Expand Down Expand Up @@ -192,7 +192,7 @@ export function deactivatePlugin (name, plugin) {
* to toggle the plugin state.
* @access private
*/
export function registerPluginControls (name, plugin) {
function registerPluginControls (name, plugin) {
const settingsKey = `minimap.plugins.${name}`
const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`

Expand Down Expand Up @@ -245,7 +245,7 @@ export function registerPluginControls (name, plugin) {
* @param {string} name the name of the plugin to update
* @access private
*/
export function updatePluginsOrderMap (name) {
function updatePluginsOrderMap (name) {
const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`

pluginsOrderMap[name] = atom.config.get(orderSettingsKey)
Expand All @@ -266,7 +266,7 @@ export function getPluginsOrder () { return pluginsOrderMap }
* @param {string} name The identifying name of the plugin.
* @access private
*/
export function unregisterPluginControls (name) {
function unregisterPluginControls (name) {
pluginsSubscriptions[name].dispose()
delete pluginsSubscriptions[name]
delete getConfigSchema().plugins.properties[name]
Expand Down

0 comments on commit 067a6d6

Please sign in to comment.