This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
Let packages define deserializers & view providers as main module methods - #10764
Merged
Merged
Conversation
This was referenced Feb 10, 2016
This was referenced Feb 11, 2016
maxbrunsfeld
pushed a commit
that referenced
this pull request
Feb 11, 2016
Let packages define deserializers & view providers as main module methods
Contributor
|
@maxbrunsfeld Wondering if you can help me figure out something. I'm on
Same thing happens for Archive View as well. Any chance this PR caused this behavior to change/break? |
Contributor
Author
|
Thanks for the heads up @izuzak! Looking into this now. |
Contributor
Author
Contributor
|
Ugh, yeah, good catch. Could we make loading |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes some further changes to the new
package.json-based deserializer and view-provider APIs introduced in #9687. After updating some packages (see #9974) to use these new fields, I realized that it was somewhat awkward to specify deserializers and view providers in separate files from the packages's main module. I think it is better if these fields work similarly toconsumedServicesandprovidedServices, by specifying names of methods on the package's main module.Example
package.json{ "name": "my-package", "main": "index", "deserializers": { "MyObject": "deserializeMyObject" }, "viewProviders": [ "buildMyObjectView" ] }index.jsAdvantages
consumedServicesandprovidedServices, which seem to be working well for a variety of use cases.Drawbacks
/cc @atom/core