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

Document what should appear in migration guide #2079

Closed
matthewmayer opened this issue Apr 22, 2023 · 3 comments · Fixed by #2130 or #2138
Closed

Document what should appear in migration guide #2079

matthewmayer opened this issue Apr 22, 2023 · 3 comments · Fixed by #2130 or #2138
Assignees
Labels
c: docs Improvements or additions to documentation p: 1-normal Nothing urgent
Milestone

Comments

@matthewmayer
Copy link
Contributor

matthewmayer commented Apr 22, 2023

Suggestion for new section to be added to CONTRIBUTING.


Documenting changes for new major versions

Each major version has an upgrading guide eg https://next.fakerjs.dev/guide/upgrading.html

While developing new features and bugfixes for the new release, changes are added to the migration guide to aid developers when the version is released.

The general principle is to document anything which requires a normal user of the library to change their code which uses Faker when upgrading to the new major version.

There are two sections

  • Breaking changes (user MUST change their code)
  • Deprecations and other changes (user SHOULD change their code but it will still work for this major version if they don't)

Not every change needs to be in the migration guide. If it is too long, it becomes hard for users to spot the important changes.

Should be in the guide

  • Breaking changes, eg removal of methods
  • Behavior changes, eg a different default for a parameter, or a parameter becoming required
  • Whole modules renaming (eg faker.name to faker.person)
  • Locale renames
  • Changes to minimum versions eg requiring a new version of Node
  • Changes to how Faker is imported

Doesn't need to be in the guide

  • New locales
  • Changes to locale data in existing locales
  • Bugfixes where it's unlikely anyone was relying on the old behavior (eg broken values in locale files)
  • New methods and parameters
  • Straightforward method aliases, eg where a method or parameter is renamed but the old name still works identically. (Runtime warnings will already guide the user in this case)
  • Changes to locale definition files which only affect usage via faker.fake e.g. if a definition file is renamed, but the public API for the method stays the same
@matthewmayer matthewmayer added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent labels Apr 22, 2023
@matthewmayer matthewmayer moved this to Todo in Faker Roadmap Apr 22, 2023
@matthewmayer
Copy link
Contributor Author

@faker-js/maintainers let me know if you like this in principle, if so i will add a PR which adds this to CONTRIBUTING and you can provide line-by-line feedback

@matthewmayer
Copy link
Contributor Author

@faker-js/maintainers this might be nice to squeeze into 8.0.0. I feel the migration guide could be streamlined a little with some guidelines so we don't have to mention every deprecation.

@Shinigami92
Copy link
Member

@matthewmayer you missed my Discord post:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Improvements or additions to documentation p: 1-normal Nothing urgent
Projects
No open projects
Status: Done
2 participants