-
Notifications
You must be signed in to change notification settings - Fork 0
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
Lots of uml2ts stuff #33
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The generator test has been simplified by removing the use of a Writable stream. The 'gen' function now directly returns the result, which is then tested for null and emptiness. This change makes the test more straightforward and easier to understand.
A new 'test' command has been added to the Makefile. This allows for running tests directly from the make utility, improving the testing workflow.
The 'test' type in the Generator now supports nested fields. A new field named 'test' of type string has been added under the existing 'test' type. This enhancement provides more flexibility and depth when defining types.
The Makefile has been restructured to improve readability and maintainability. Changes include: - Separated build and test targets into dotnet-specific and package-specific ones - Reordered clean targets for logical consistency - Moved proto-related operations into their own targets with dependencies - Added explicit touch commands to ensure correct timestamp updates on build artifacts
The UML generator's read function now supports a wider range of MIME types. A new 'SupportedMimeType' type has been introduced to handle this change. The function will now throw an error for unrecognized media types, improving the robustness of the code.
The package.json file in the UML package has been updated. The 'module' field was moved under the 'type' field for better organization. Additionally, two new fields were added: 'main', which points to the main JavaScript file, and 'types', which points to the TypeScript definition file.
The package.json file in the UML package has been updated. The main change is the addition of "fast-check" to the list of development dependencies, which will help with property-based testing.
A new testing step has been added to the GitHub Actions workflow for building. This step runs after the build process and before linting, ensuring that tests are executed as part of the continuous integration pipeline.
- Introduced new tests for the 'read' function in the UML package, checking its ability to handle different data types. - Refactored SupportedMimeType from a union type to an array constant and derived tuple type. This change enhances code maintainability by centralizing MIME type definitions.
The code has been refactored to improve the structure and readability. The main changes include: - Extracted the generation logic into a separate command file. - Introduced an Io interface for better handling of input/output operations. - Simplified index.ts by using a new app function that applies commands. - Created a new program.ts file to handle command-related operations, including options and actions.
Added 'fast-check' to the devDependencies in the package.json file. This new dependency will help improve testing capabilities. Also, there's a binary change in bun.lockb file.
The MIME type 'application/protobuf' was replaced with 'application/x-protobuf' in the unit tests. This change ensures that our tests are aligned with the correct and updated MIME types.
Significant changes include: - Replaced 'BunFile' with 'ArrayBufferSink' and 'Blob' in the Io interface - Removed check for stdin readability in the gen function - Simplified writing to stdout in the gen function
Implemented functionality to read protobuf and JSON data in the 'gen' function. This includes creating arbitrary fields and types, converting them into binary or JSON format, and then reading them back. Also added tests to verify this functionality for different mime types of protobuf as well as JSON data.
Added 'testcontainers' to the devDependencies in the package.json file. This new dependency will aid in managing test environments.
Introduced Docker support for the uml2ts project. This includes: - A new Makefile to build the Docker image - A .dockerignore file to exclude unnecessary files from the Docker context - A multi-stage Dockerfile that sets up the necessary environment, copies over required files, installs dependencies, and builds the application.
Removed 'src/*' from the workspaces array in package.json. Also, updated the binary file bun.lockb.
Significant changes include: - Removed the Io interface and its usage from command.ts and program.ts - Directly used Bun's stdin and stdout for buffer reading and writing in gen function - Simplified action call in gen command by removing io() argument
A new Makefile has been added to the uml2ts package, introducing build, test, clean, and docker commands. The package.json file in the same package has also been updated with a removal of the "prestart" script.
The Docker build process has been updated to include a new test target. This change introduces a new 'uml2ts_test' target in the Makefile, which builds a Docker image for testing purposes. Additionally, the Dockerfile now includes an extra stage that uses Ubuntu as its base image for this test build.
A new target, 'test_image', has been added to the Makefile. This allows for the creation of a test image using the existing docker setup.
The Dockerfile for uml2ts has been updated to include a build platform argument. The base image for the test stage has also been changed to a specific version of Ubuntu, and the final stage now includes an alias.
The testing setup has been updated to include a `beforeAll` block that builds the necessary binary file for tests. The way commands are executed in tests has also been changed, replacing the previous IO-based approach with spawning processes. This change simplifies the code and makes it easier to manage input/output streams. In addition, there's a minor refactor in how commands are applied in the main application logic, making it more functional by passing root as a function instead of an object.
The test setup has been refactored to ensure a clean environment before each run. The 'Field' and 'Type' imports have been removed, as well as the corresponding arbitrary generators. Tests have been simplified by removing the use of fast-check library and instead using static values for testing. An 'afterAll' cleanup function has also been added to remove any residual files after tests are completed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.