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

build: escape locale import names if they match the module name #1737

Merged
merged 4 commits into from Jan 17, 2023

Conversation

matthewpetro
Copy link
Contributor

@matthewpetro matthewpetro commented Jan 15, 2023

This PR is a result of a discussion located here on PR #1699 regarding locale definition imports in locale index files. Prior to this update, locale definition files could not have the same name as their module (e.g.: src/locales/en/airline/airline.ts could not be used) because the index.ts files that were generated for the locale would have a name conflict. This PR updates the generateLocales.ts script to append an underscore to the imported name of the locale definition and avoid the name conflict.

@matthewpetro matthewpetro requested a review from a team as a code owner January 15, 2023 02:18
scripts/generateLocales.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: locale Permutes locale definitions c: infra Changes to our infrastructure or project setup labels Jan 15, 2023
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Merging #1737 (0705dcd) into next (cc0b034) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1737   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files        2337     2337           
  Lines      241178   241178           
  Branches     1098     1098           
=======================================
  Hits       240294   240294           
  Misses        863      863           
  Partials       21       21           

@ST-DDT ST-DDT requested review from a team January 16, 2023 08:41
@ST-DDT ST-DDT requested a review from a team January 16, 2023 09:33
@ST-DDT ST-DDT changed the title build: escape locale definition imports if they match the module name build: escape locale import names if they match the module name Jan 17, 2023
@ST-DDT ST-DDT enabled auto-merge (squash) January 17, 2023 21:11
@ST-DDT ST-DDT merged commit 0ac9989 into faker-js:next Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup c: locale Permutes locale definitions p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants