Skip to content

Conversation

@hdnax
Copy link
Contributor

@hdnax hdnax commented Jan 9, 2026

Summary

  • Migrate babel & jest to vite to speed up build process of @dbml/core.
  • Remove unnecessary build steps in @dbml/core.
  • Migrate @dbml/core and @dbml/cli to ESM syntax.
  • Support CJS and ESM build targets for both @dbml/core and @dbml/cli.

Issue

(issue link here)

Lasting Changes (Technical)

(please list down: code changes/things that have wide-effect; new libraries/functions added that can be used by others; examples below)

  • (Added class EmailValidator to validate email address' validity)
  • (Added Tenant#is_trial? check)

Checklist

Please check directly on the box once each of these are done

  • Documentation (if necessary)
  • Lint checks
  • Tests (integration test/unit test)
  • Integration Tests Passed
  • Code Review

@hdnax hdnax changed the base branch from master to test/add-comprehensive-parser-tests January 9, 2026 16:19
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Coverage Report

Commit: 783dbe2

📊 View detailed HTML coverage reports

Overall Coverage

Metric Coverage
Lines ✅ 86.64% (7446/8594)
Statements ✅ 86.12% (7978/9264)
Functions ✅ 89.31% (1904/2132)
Branches ⚠️ 76.16% (3706/4866)

Package Coverage

Package Lines Statements Functions Branches
@dbml/dbml-cli ✅ 100.00% ✅ 100.00% ✅ 100.00% ✅ 100.00%
@dbml/dbml-connector ⚠️ 64.58% ⚠️ 64.29% ⚠️ 59.53% ⚠️ 59.13%
@dbml/dbml-core ✅ 90.90% ✅ 89.95% ✅ 91.12% ⚠️ 77.03%
@dbml/dbml-parse ✅ 88.08% ✅ 87.78% ✅ 92.77% ⚠️ 79.15%

⚠️ Coverage Warnings

The following packages have coverage below 80%:

  • @dbml/dbml-connector: 64.58% line coverage

Files with Coverage Below 80%

@dbml/dbml-connector

9 file(s) below 80% coverage
File Lines Statements Functions Branches
src/connectors/bigquery/index.ts 0.00% 0.00% 0.00% 0.00%
src/utils/credential-loader.ts 0.00% 0.00% 0.00% 0.00%
src/utils/helpers.ts 0.00% 0.00% 0.00% 0.00%
src/connectors/snowflake/index.ts 10.56% 10.31% 0.00% 0.00%
src/utils/parseSchema.ts 46.15% 42.85% 28.57% 27.27%
src/connectors/connector.ts 66.66% 66.66% 100.00% 57.14%
src/connectors/oracle/tables.ts 71.25% 66.30% 100.00% 56.96%
src/connectors/oracle/index.ts 80.00% 80.76% 100.00% 25.00%
src/connectors/oracle/utils.ts 85.71% 85.71% 100.00% 71.42%

@dbml/dbml-core

31 file(s) below 80% coverage
File Lines Statements Functions Branches
src/parse/error.js 0.00% 0.00% 0.00% 0.00%
src/parse/ANTLR/ASTGeneration/SyntaxError.js 0.00% 0.00% 0.00% 0.00%
src/transform/index.js 0.00% 0.00% 0.00% 100.00%
src/utils/version.js 0.00% 0.00% 100.00% 100.00%
src/model_structure/element.js 16.66% 16.66% 25.00% 0.00%
src/parse/databaseGenerator.js 18.42% 17.94% 0.00% 0.00%
src/import/index.js 50.00% 50.00% 50.00% 100.00%
src/model_structure/utils.js 50.00% 50.00% 50.00% 0.00%
src/export/JsonExporter.js 66.66% 66.66% 100.00% 33.33%
src/parse/ANTLR/ASTGeneration/ParserErrorListener.js 66.66% 66.66% 50.00% 100.00%
src/parse/Parser.js 67.30% 64.81% 62.50% 61.90%
src/export/utils.js 73.17% 73.80% 90.00% 54.54%
src/model_structure/schema.js 76.11% 78.94% 86.04% 32.35%
src/model_structure/tableGroup.js 80.64% 81.25% 80.00% 38.09%
src/export/ModelExporter.js 82.35% 82.35% 100.00% 58.33%
src/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js 85.02% 83.12% 90.81% 66.38%
src/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.js 85.88% 84.21% 92.94% 70.23%
src/model_structure/enum.js 90.90% 91.66% 100.00% 33.33%
src/parse/ANTLR/ASTGeneration/AST.js 91.11% 91.11% 76.47% 77.77%
src/model_structure/check.js 92.30% 92.30% 83.33% 66.66%
src/model_structure/endpoint.js 92.85% 94.00% 100.00% 65.38%
src/model_structure/enumValue.js 92.85% 92.85% 100.00% 75.00%
src/model_structure/tablePartial.js 92.85% 92.85% 80.00% 77.77%
src/model_structure/ref.js 93.33% 93.54% 100.00% 69.23%
src/model_structure/table.js 94.25% 91.91% 97.67% 61.01%
src/model_structure/indexes.js 96.55% 96.77% 100.00% 72.72%
src/parse/ANTLR/ASTGeneration/index.js 98.21% 90.16% 100.00% 62.50%
src/model_structure/stickyNote.js 100.00% 100.00% 100.00% 0.00%
src/parse/ANTLR/ASTGeneration/helpers.js 100.00% 83.33% 100.00% 75.00%
src/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js 100.00% 100.00% 40.00% 100.00%
src/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js 100.00% 100.00% 0.00% 100.00%

@dbml/dbml-parse

28 file(s) below 80% coverage
File Lines Statements Functions Branches
src/compiler/queries/container/scope.ts 0.00% 0.00% 0.00% 100.00%
src/core/serialization/serialize.ts 0.00% 0.00% 0.00% 0.00%
__tests__/utils/testHelpers.ts 11.76% 21.05% 50.00% 0.00%
src/core/interpreter/elementInterpreter/project.ts 51.42% 51.42% 100.00% 36.36%
src/compiler/queries/parse.ts 60.00% 60.00% 60.00% 100.00%
src/services/suggestions/utils.ts 65.21% 65.21% 100.00% 56.00%
src/compiler/queries/token.ts 66.66% 66.66% 66.66% 100.00%
src/core/analyzer/validator/elementValidators/note.ts 68.62% 67.27% 76.92% 59.37%
src/core/interpreter/elementInterpreter/tablePartial.ts 68.90% 68.54% 68.00% 54.54%
src/core/interpreter/elementInterpreter/tableGroup.ts 70.45% 71.11% 90.00% 50.00%
src/core/analyzer/validator/elementValidators/indexes.ts 72.00% 72.83% 90.90% 57.69%
src/core/utils.ts 72.41% 71.87% 72.72% 53.33%
src/core/analyzer/validator/elementValidators/checks.ts 74.07% 72.41% 81.25% 65.62%
src/core/analyzer/analyzer.ts 75.00% 66.66% 60.00% 100.00%
src/core/analyzer/symbol/utils.ts 75.00% 80.00% 100.00% 50.00%
src/core/analyzer/validator/elementValidators/tablePartial.ts 75.73% 73.43% 78.72% 57.79%
src/core/interpreter/elementInterpreter/ref.ts 76.31% 76.31% 100.00% 50.00%
src/core/analyzer/validator/elementValidators/ref.ts 76.82% 75.00% 80.95% 77.41%
src/core/analyzer/validator/elementValidators/enum.ts 77.90% 76.66% 84.21% 65.21%
src/core/analyzer/validator/elementValidators/project.ts 78.12% 78.78% 100.00% 56.25%
src/compiler/queries/container/token.ts 83.33% 85.71% 100.00% 75.00%
src/core/parser/parser.ts 85.74% 85.91% 100.00% 78.43%
src/core/analyzer/validator/elementValidators/tableGroup.ts 88.88% 85.55% 87.50% 71.11%
__tests__/utils/compiler.ts 89.79% 89.85% 100.00% 68.81%
src/compiler/queries/symbol.ts 91.30% 92.00% 100.00% 78.57%
src/core/analyzer/symbol/symbolIndex.ts 91.30% 87.75% 100.00% 65.21%
src/core/interpreter/elementInterpreter/sticky_note.ts 95.00% 95.23% 100.00% 66.66%
src/core/analyzer/symbol/symbolTable.ts 100.00% 100.00% 100.00% 75.00%

@hdnax hdnax added PR: Refactor 🧹 PR: Internal 🏡 A type of pull request used for changelog categories labels Jan 9, 2026
Base automatically changed from test/add-comprehensive-parser-tests to master January 12, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Internal 🏡 A type of pull request used for changelog categories PR: Refactor 🧹

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants