Nathan Sobo
304f63532e
Replace ‘global’ config key with ‘*’ selector
2014-12-30 13:38:12 -06:00
Max Brunsfeld
6e7364c7c6
Merge pull request #4802 from atom/mb-reduce-config-saves
...
Don't write the config to disk so darn often
2014-12-30 10:41:01 -08:00
Max Brunsfeld
339f331776
Debounce saving and loading of config
2014-12-30 10:14:57 -08:00
Max Brunsfeld
5c730415b7
Use fake config file for entire Config spec
2014-12-30 00:03:34 -08:00
Max Brunsfeld
637b2b0aba
Don't save config when setting w/ non-default source
2014-12-29 17:08:26 -08:00
Max Brunsfeld
c7771ffde9
Add Config::getAll, deprecate ::settingsForScopeDescriptor
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2014-12-29 11:01:46 -08:00
Max Brunsfeld
d508d1eedf
Handle a source but no selector in ::unset
2014-12-26 17:24:27 -08:00
Max Brunsfeld
2949ebfe86
Deprecate Config::addScopedProperties
2014-12-26 17:13:33 -08:00
Max Brunsfeld
dbaef8e593
Handle null key-path in Config::set
2014-12-26 14:58:17 -08:00
Max Brunsfeld
b4b492a321
💄 Organize config-spec
...
* Group tests by method rather than by scoped vs unscoped
* Group deprecated methods together
* Group internal methods together
* Make descriptions more consistent
2014-12-24 16:56:53 -08:00
Max Brunsfeld
883c48b490
Merge pull request #4753 from atom/mb-add-config-get-sources
...
Add Config::getSources
2014-12-23 20:35:42 -08:00
Max Brunsfeld
388428b074
Fix logic error when exception is thrown in config observer
2014-12-23 16:47:43 -08:00
Max Brunsfeld
60c5293b5e
Add Config::getSources
...
The settings-view needs this so that it can display snippets
associated with packages
2014-12-23 11:15:32 -08:00
Max Brunsfeld
a1b4820c04
Revert "Revert "Merge pull request #4631 ""
...
This reverts commit dc2a453986 .
Conflicts:
spec/config-spec.coffee
src/config.coffee
2014-12-23 09:26:40 -08:00
Max Brunsfeld
28ac51d140
Add Config::transact
...
Use this method to avoid emitting unecessary config events
when activating or deactivating multiple packages
2014-12-17 16:54:47 -08:00
Max Brunsfeld
b0731afd4c
Don't pass keyPath to Config::onDidChange callback
...
The keyPath field was never used by core or any package, and
for scoped settings, its value was always equal to the keyPath
specified by the caller.
2014-12-17 12:03:46 -08:00
Max Brunsfeld
dc2a453986
Revert "Merge pull request #4631 from atom/mb-new-config-api"
...
This reverts commit 5147fb6a8b , reversing
changes made to 9bbbb58084 .
2014-12-16 15:27:39 -08:00
Max Brunsfeld
965a6243e1
Remove toBe parens
2014-12-16 14:27:57 -08:00
Max Brunsfeld
b8f239cd39
Deprecate Config::isDefault and ::getDefault
2014-12-16 14:00:57 -08:00
Max Brunsfeld
9f851e55d1
Add Config::unset
...
Deprecate Config::restoreDefault
2014-12-16 14:00:57 -08:00
Max Brunsfeld
ab89776f01
Throw when Config::set is called w/ source and no scope
2014-12-16 14:00:57 -08:00
Max Brunsfeld
2cea51b50e
Take 'scope' option in Config::onDidChange
...
Deprecate passing the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Max Brunsfeld
4e4794f3fd
Take 'scope' option in Config::observe
...
Deprecate using the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Max Brunsfeld
8c8e866a97
Use a schema in all specs for Config::observeUserConfig
...
Before, values loaded from the config file were set in a
way that allowed any key to be set in the root object.
Now, these values are set in a way that's similar to how
::set works.
2014-12-16 14:00:56 -08:00
Max Brunsfeld
f859ad5fc5
Allow null keyPath with options argument in ::get
2014-12-16 14:00:56 -08:00
Nathan Sobo
d30cf35a16
Use ‘source’ option rather than internal state in Config spec
2014-12-16 14:00:56 -08:00
Nathan Sobo
c35fb90653
Don’t return schema defaults when sources are specified in Config::get
2014-12-16 14:00:56 -08:00
Nathan Sobo
73df017d83
Add a ‘sources’ and ‘excludeSources’ options to Config::get
...
If the option is supplied, we will only retrieve values from the
specified sources.
2014-12-16 14:00:56 -08:00
Nathan Sobo
c58606907a
Make scope a trailing option to Config::get
2014-12-16 14:00:56 -08:00
Nathan Sobo
c489a4662b
Make scopeSelector a trailing option to Config::set
2014-12-16 14:00:56 -08:00
Kevin Sawicki
202426a85b
Remove unneeded dotAtomPath assignment
2014-12-15 10:42:24 -08:00
Max Brunsfeld
e7b0c3e519
Deprecate Config::getSettings
...
Also, remove support for getting all settings for a scope selector
Signed-off-by: Nathan Sobo <nathan@github.com >
2014-12-11 15:04:55 -08:00
Ben Ogle
a45e9a1e8b
Remove deprecations in config
2014-11-26 14:55:39 -08:00
Ben Ogle
362bd2e61a
Use atom.notifications when there is a config file error
2014-11-25 15:44:13 -08:00
Ben Ogle
693fd43449
Fix resetting scoped config defaults
...
It would write an empty object for the parent key when there were no
other objects in the parent key.
Closes #4175
2014-11-14 15:11:43 -08:00
Ben Ogle
d0d6af7e55
Specs for priority
2014-10-24 13:07:14 -07:00
Ben Ogle
2b148b7720
Accept escaped dots in config settings keys
...
Fixes #3898
2014-10-20 16:58:57 -07:00
Ben Ogle
7ffe5d1385
Add support for scoped defaults in config schemas
2014-10-20 14:52:12 -07:00
Ben Ogle
055c632ee9
Call save() in restoreDefault() for scopedSettings
2014-10-20 12:29:46 -07:00
Ben Ogle
a42b3ff171
Support a scopeSelector in getSettings()
2014-10-15 16:26:03 -07:00
Ben Ogle
757abfe3db
Config::restoreDefaults handles scopes
2014-10-15 15:33:38 -07:00
Ben Ogle
ae857203fd
Support scoped settings in getDefault
2014-10-15 15:11:19 -07:00
Ben Ogle
62c1972c95
isDefault supports scoped settings
2014-10-15 14:44:16 -07:00
Ben Ogle
0588e14850
Only notify when changed key path is really sub path of observed path
...
Closes #3775
2014-10-13 14:25:55 -07:00
Ben Ogle
8910dd1a11
Update to not new format from propertiesForSource
2014-10-08 16:01:42 -07:00
Ben Ogle
a3bbbc19b5
Read and write scoped settings from the user’s config
2014-10-08 16:01:42 -07:00
Ben Ogle
a711e908d5
💄
2014-10-03 10:46:57 -07:00
Ben Ogle
f724c7fca8
Implement observing on scoped properties
2014-10-03 10:46:57 -07:00
Ben Ogle
899929a1ce
addScopedDefaults -> addScopedSettings
2014-10-03 10:46:57 -07:00
Ben Ogle
d47dbede29
Fix specs
2014-10-03 10:46:57 -07:00