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(locale)!: remove location data index-value-binding #2476

Conversation

xDivisionByZerox
Copy link
Member

Removes the requirement for direction locale data lists to be sorted in a specific order.

@xDivisionByZerox xDivisionByZerox added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels Oct 13, 2023
@xDivisionByZerox xDivisionByZerox requested a review from a team October 13, 2023 23:29
@xDivisionByZerox xDivisionByZerox self-assigned this Oct 13, 2023
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner October 13, 2023 23:29
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (734a7f3) to head (d4ed4f5).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2476      +/-   ##
==========================================
- Coverage   99.96%   99.95%   -0.01%     
==========================================
  Files        2971     2966       -5     
  Lines      212620   212579      -41     
  Branches      597      950     +353     
==========================================
- Hits       212546   212490      -56     
- Misses         74       89      +15     
Files Coverage Δ
src/locales/da/location/direction.ts 100.00% <100.00%> (ø)
src/locales/da/location/index.ts 100.00% <ø> (ø)
src/locales/en/location/direction.ts 100.00% <100.00%> (ø)
src/locales/en/location/index.ts 100.00% <ø> (ø)
src/locales/eo/location/direction.ts 100.00% <100.00%> (ø)
src/locales/eo/location/index.ts 100.00% <ø> (ø)
src/locales/fa/location/direction.ts 100.00% <100.00%> (ø)
src/locales/fr/location/direction.ts 100.00% <100.00%> (ø)
src/locales/fr_CH/location/direction.ts 100.00% <100.00%> (ø)
src/locales/he/location/direction.ts 100.00% <100.00%> (ø)
... and 9 more

... and 1 file with indirect coverage changes

@ST-DDT ST-DDT added the c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs label Oct 14, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Oct 14, 2023

Looks good to me.
Not sure whether we should push this in v8 or v9.

ST-DDT
ST-DDT previously approved these changes Oct 14, 2023
@matthewmayer matthewmayer added the breaking change Cannot be merged when next version is not a major release label Oct 21, 2023
@ST-DDT ST-DDT added the s: needs decision Needs team/maintainer decision label Oct 21, 2023
@matthewmayer matthewmayer removed the breaking change Cannot be merged when next version is not a major release label Nov 1, 2023
@ST-DDT ST-DDT added this to the v9.0 milestone Nov 1, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Nov 1, 2023

Since we change the layout of our locale data, I think we should merge this in v9.0.

@ST-DDT ST-DDT added the do NOT merge yet Do not merge this PR into the target branch yet label Nov 1, 2023
matthewmayer
matthewmayer previously approved these changes Nov 20, 2023
@xDivisionByZerox xDivisionByZerox added breaking change Cannot be merged when next version is not a major release and removed s: needs decision Needs team/maintainer decision labels Dec 4, 2023
@xDivisionByZerox xDivisionByZerox changed the title refactor(locale): remove location data index-value-binding refactor(locale)!: remove location data index-value-binding Dec 4, 2023
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

I checked that no new files have been added in the meantime.

src/definitions/location.ts Outdated Show resolved Hide resolved
Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

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

docs/guide/upgrading_v9/2476.md file required

@xDivisionByZerox
Copy link
Member Author

Looking at #2505, would it make sense to "flatten" this definitions as well? So instead of direction object with nested properties, we'd have 4 files/4properties on the location definition object.

@ST-DDT
Copy link
Member

ST-DDT commented Mar 10, 2024

Looking at #2505, would it make sense to "flatten" this definitions as well? So instead of direction object with nested properties, we'd have 4 files/4properties on the location definition object.

We could do that, but these files are so small, that it would be harder to review the files if split up.
IMO we keep them in a single file.

Copy link

netlify bot commented Apr 6, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit d4ed4f5
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/661c55b5d613c40008908b8f
😎 Deploy Preview https://deploy-preview-2476.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@xDivisionByZerox
Copy link
Member Author

xDivisionByZerox commented Apr 6, 2024

I put "needs decision" as I'd like to discuss my last comment in the next team meeting.

@xDivisionByZerox xDivisionByZerox added the do NOT merge yet Do not merge this PR into the target branch yet label Apr 8, 2024
@ST-DDT
Copy link
Member

ST-DDT commented Apr 11, 2024

Team Decision

We will not flatten the definitions in the same way as #2505 .

Reason:

  • Being a nested object ensures that all values are always present, as the type requires it. On the other hand entries in categories are optional by force and thus it might lead to cases where abbr is set but the full value is missing.

@ST-DDT ST-DDT removed the s: needs decision Needs team/maintainer decision label Apr 11, 2024
@ST-DDT ST-DDT requested review from a team April 11, 2024 17:41
@ST-DDT ST-DDT removed the do NOT merge yet Do not merge this PR into the target branch yet label Apr 11, 2024
@ST-DDT ST-DDT merged commit 453ea97 into next Apr 14, 2024
20 checks passed
@ST-DDT ST-DDT deleted the refactor/location/decouple-direction-data-index-from-representation-value branch April 14, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release c: locale Permutes locale definitions c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: location Something is referring to the location module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants