Update dbml parser (#542)

This commit is contained in:
Karen Mkrtumyan
2025-07-29 22:10:24 +04:00
committed by GitHub
parent 5fdaa189dc
commit 92d4adb142
3 changed files with 21 additions and 18 deletions

35
package-lock.json generated
View File

@@ -8,7 +8,7 @@
"name": "client-vite",
"version": "0.0.0",
"dependencies": {
"@dbml/core": "^3.9.7-alpha.0",
"@dbml/core": "^3.13.9",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
@@ -378,12 +378,11 @@
}
},
"node_modules/@dbml/core": {
"version": "3.9.7-alpha.0",
"resolved": "https://registry.npmjs.org/@dbml/core/-/core-3.9.7-alpha.0.tgz",
"integrity": "sha512-KGXr7p80XuoqQJumOs2+RHRBBH703gNxM0uiEvT1FF945+H4LriNK4ZgbXqe2ObmRNbwF2/TYFou+lqkh+tbUw==",
"license": "Apache-2.0",
"version": "3.13.9",
"resolved": "https://registry.npmjs.org/@dbml/core/-/core-3.13.9.tgz",
"integrity": "sha512-JgJ470yuTZU7tP64ZL5FpEh7zSXjSoKzkARmin8iVVhdsNM8Nq4e+FFhG6J6acPtGHtoLahOs9LqrC17B9MqYg==",
"dependencies": {
"@dbml/parse": "^3.9.7-alpha.0",
"@dbml/parse": "^3.13.9",
"antlr4": "^4.13.1",
"lodash": "^4.17.15",
"parsimmon": "^1.13.0",
@@ -394,15 +393,14 @@
}
},
"node_modules/@dbml/parse": {
"version": "3.9.7-alpha.0",
"resolved": "https://registry.npmjs.org/@dbml/parse/-/parse-3.9.7-alpha.0.tgz",
"integrity": "sha512-QT0rmbbnjn6hKbGXMhvdw62Gn8YgXjvG5a+0+9EoZFpFdl/Y8VSPlHqpHbdMas2kOpusMgpa1YRFaTMApZM7Mw==",
"license": "Apache-2.0",
"version": "3.13.9",
"resolved": "https://registry.npmjs.org/@dbml/parse/-/parse-3.13.9.tgz",
"integrity": "sha512-JMfOxWquXMZpF/MTLy2xWLImx3z9D0t67T7x/BT892WvmhM+9cnJHFA2URT1NXu9jdajbTTFuoWSyzdsfNpaRw==",
"dependencies": {
"lodash": "^4.17.21"
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"lodash": "^4.17.21"
"engines": {
"node": ">=18"
}
},
"node_modules/@dnd-kit/accessibility": {
@@ -2556,9 +2554,9 @@
}
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
@@ -5201,6 +5199,11 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"node_modules/lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",

View File

@@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@dbml/core": "^3.9.7-alpha.0",
"@dbml/core": "^3.13.9",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",

View File

@@ -6,7 +6,7 @@ import { nanoid } from "nanoid";
const parser = new Parser();
export function fromDBML(src) {
const ast = parser.parse(src, "dbml");
const ast = parser.parse(src, "dbmlv2");
const tables = [];
const enums = [];