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

Development #1

Merged
merged 16 commits into from
May 27, 2024
Merged

Development #1

merged 16 commits into from
May 27, 2024

Conversation

erikyo
Copy link

@erikyo erikyo commented May 25, 2024

let's restart here

erikyo and others added 15 commits May 4, 2024 23:54
* move lib to src

* path updates
- as suggested by @johnhooks to set as source for tests the "src" folder (and not the builded one)
- updated node internal modules paths prefix (ref. https://nodejs.org/api/module.html#modules-nodemodule-api)

* typescript file compilation config
* speed up lexer parsing
- scripts - make sure that all is ready before fire the script
* fix missing types and jsDocs

* removing definition file, the definitions were moved to the type.js file

* enhanced type for pocompiler and postream

* enhancing js docs types

* jsdocs types (still few error to solve)

* @johnhooks review suggestions

Co-authored-by: John Hooks <[email protected]>

* apply suggestion by johnhooks

Co-authored-by: John Hooks <[email protected]>

* apply @johnhooks suggestions 🙌

* wip types

* fixed types

* allows tsc to fail in ci tests

* fix: adjust typing of the parsers and compilers

This commit adds missing types and attempts fix type errors.

There are still a few type errors, though how to fix them is not clear.
Adds the `Translations` type for the `translations` property of the
`GetTextTranslations` type.

* add imports for types

* add encoding declaration

* add types directory to tsconfig include

* remove types directory from .gitignore

---------

Co-authored-by: John Hooks <[email protected]>
* track coverage using c8

* Fix: tests runs twice
The escape character logic was not working correctly.

The logic of how a line is folded with a final escape character was
flawed. Using a loop to consume forward slashes would not allow for an
escaped forward slash to be folded correctly, it would append an extra
character to the line.

- Use if statements to check for escape characters. Only one extra
  character should be appended to the line, and it should be considered
  escaped.
- Add new test cases to test the escape character logic.
fix: foldLine escape character logic
* feat: add support for compiling big-endian .mo files

This commit adds support for compiling big-endian .mo files. This facilitates
the use of .mo files in big-endian systems, the ability to parser big-endian
.mo files was already present.

This commit also does the following:

- Adds a new mo parser options type, used to indicate `endian = 'le' | 'be'`
- Adds tests and fixtures for big-endian .mo files.
- Renames the existing .mo fixtures to indicate that they are little-endian.
- Fixes direct usages of `writeUInt32LE`.

Fixes smhg#97
Copy link

@johnhooks johnhooks left a comment

Choose a reason for hiding this comment

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

🚀

@erikyo erikyo requested a review from johnhooks May 27, 2024 16:06
@erikyo erikyo merged commit 6032e2f into master May 27, 2024
10 checks passed
@erikyo erikyo deleted the development branch May 27, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants