Blitzapps / blitz-orm

GNU Affero General Public License v3.0
23 stars 9 forks source link

Fix esm enrichschema #72

Closed lveillard closed 3 months ago

lveillard commented 3 months ago
:rocket: This description was created by Ellipsis for commit bf334a58aa752af84aa78a5508b56d844d098257

Summary:

This PR fixes issues with EnrichSchema and ESM configuration, enhances schema validation, and refines the build process.

Key points:


Generated with :heart: by ellipsis.dev

sweep-ai[bot] commented 3 months ago

Sweep: PR Review

Author: lveillard The Pull Request looks good! Sweep did not find any issues.

Summary

This pull request improves schema validation, updates TypeScript configuration, and enhances the build process.

In src/helpers.ts, the enrichSchema function was updated to provide more detailed error messages and stricter validation. New checks were added to ensure that non-virtual linkField objects have valid relations and roles, and that virtual linkField objects do not target relations. Additionally, a check was added to ensure that linkField objects have at least one opposite linkField.

The tsconfig.json file was updated to use the ESNext module system, enable isolated modules, allow JSON imports, and generate source maps. These changes improve compatibility with modern JavaScript features and enhance debugging capabilities.

The tsup.config.ts file was modified to prioritize ES module output, clean the output directory before each build, enable tree-shaking, minify the output, and generate source maps. These changes optimize the build process and reduce the final bundle size.

A new version entry, 0.10.16, was added to changelog.md, documenting fixes for EnrichSchema and Esm config issues.

The .vscode/settings.json file was updated to recognize "treeshake" as a valid word, preventing it from being marked as a spelling mistake in the editor.


package.json was not reviewed because our filter identified it as typically a non-human-readable (auto-generated) or less important file (e.g., dist files, package.json, images). If this is an error, please let us know.