Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor package data accessing, set up for per-package options transformer functions #55

Closed
wants to merge 9 commits into from
Closed

Conversation

noahlemen
Copy link
Member

@noahlemen noahlemen commented Mar 18, 2018

branched from #50, with some additional refactors (diff)

new approach for #10 after closing #47

currently only includes options transformation for class properties -- will add others here if this approach seems good to move forward with

changes:

  • adds getNewPackageName and getNewPackageOptionsTransformer to be used instead of accessing packageData directly:
    • if package data is an array or a string, getNewPackageName returns that
    • however, package data entries can now be objects instead: { name: string, optionsTransformer: options -> options }
    • if package data entry has an optionsTransformer, getNewPackageOptionsTransformer -- defaults to returning an identity function
  • further abstracts parsing of config items from refactor upgradeConfig.js #50 with a ConfigItem class
  • updates snapshots for class properties

@noahlemen noahlemen changed the title Branch upgrade refactor package data accessing, set up for per-package options transformer functions Mar 18, 2018
@noahlemen noahlemen added the enhancement New feature or request label Mar 18, 2018
this.options = newOptions;
}

render() {
Copy link
Member Author

@noahlemen noahlemen Mar 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not tied to this method name -- maybe toRawConfigItem would be better? (based on the naming i've used elsewhere... that i'm also not totally satisfied with)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant