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

Minimal Formatter Does not ouput Newline at EOF in catalog file. #1259

Closed
NyanHelsing opened this issue Jun 23, 2022 · 1 comment · Fixed by #1260
Closed

Minimal Formatter Does not ouput Newline at EOF in catalog file. #1259

NyanHelsing opened this issue Jun 23, 2022 · 1 comment · Fixed by #1260
Labels

Comments

@NyanHelsing
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

When using the extract cli command and the minimal format, I expect the output to be a correctly formatted JSON representation of the catalog.

I find that the file is not formatted correctly as the last line of the file fails to include a \n character as every line should according to POSIX standard.

To Reproduce

Extract some translations using the cli and specify the minimal format, notice there is no newline character at the end of the final line at the end of the file.

Expected behavior
A clear and concise description of what you expected to happen.

When using the extract cli command and the minimal format, I expect the output to be a correctly formatted JSON representation of the catalog.

I find that the file is not formatted correctly as the last line of the file fails to include a \n character as every line should according to posix standard.

Additional context
Add any other context about the problem here.

It may be useful to some people to retain the existing incorrect absence of a \n in some cases

Prior Art: https://github.com/sindresorhus/write-json-file/blob/main/index.js#L37-L44

  • jsLingui version lingui --version
  • Babel version npm list @babel/core
  • Your Babel config (e.g. .babelrc) or framework you use (Create React App, Meteor, etc.)
@stale
Copy link

stale bot commented Sep 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 8, 2022
@stale stale bot closed this as completed Sep 16, 2022
@andrii-bodnar andrii-bodnar linked a pull request Dec 29, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant