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

Renamed the two types of options #9

Merged
merged 4 commits into from
Jan 23, 2023
Merged

Renamed the two types of options #9

merged 4 commits into from
Jan 23, 2023

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jan 23, 2023

Background

ember-codemod-v1-to-v2's code stemmed from ember-codemod-pod-to-octane, which had one (1) type of options. This project, on the other hand, has two:

The problem is, in almost all files (except src/migration/ember-addon/index.js), I used the name options to refer to either type of options. Without TypeScript in place, using the same name will lead to confusion and bugs.

Solution

I reserved the name options for the "actual" options. That is, options, from now on, means the options that the migration steps receive as input. This options has the "complete" set of options that is required for the codemod to work.

The other type of options—the one that an end-developer provides—is now called codemodOptions.

At a later point, I will update ember-codemod-pod-to-octane to follow the same naming convention.

@ijlee2 ijlee2 added the enhance: documentation Issue asks for better documentation (e.g. README, code, tests) label Jan 23, 2023
@ijlee2 ijlee2 force-pushed the refactor-code-part-6 branch from 30be3f5 to 4a31866 Compare January 23, 2023 06:59
@ijlee2 ijlee2 changed the title Renamed the two options objects Renamed the two types of options Jan 23, 2023
@ijlee2 ijlee2 marked this pull request as ready for review January 23, 2023 07:23
@ijlee2 ijlee2 merged commit d29895a into main Jan 23, 2023
@ijlee2 ijlee2 deleted the refactor-code-part-6 branch January 23, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance: documentation Issue asks for better documentation (e.g. README, code, tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant