From c1678efe3f5f7ca034bbc1891aa2feb606918a93 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Wed, 23 Nov 2022 12:17:20 +0200 Subject: [PATCH 1/4] Upgrade sql-parser-cst to 0.8.1 This version brings BigQuery support, so also add the new language to the dropdown in settings. Notably the syntax tree produced by sql-parser-cst has also had some major changes between 0.5 and 0.8 versions. Normally I would avoid throwing PR-s to AstExplorer for every little upgrade, but this one completely changes how table and column names are represented, making the syntax tree in 0.5.x largely incompatible with the one in 0.8.x. --- website/package.json | 2 +- website/src/parsers/sql/sql-parser-cst.js | 2 +- website/yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/website/package.json b/website/package.json index 3372bce4..2c0e5fcf 100644 --- a/website/package.json +++ b/website/package.json @@ -153,7 +153,7 @@ "solidity-parser-antlr": "^0.4.0", "solidity-parser-diligence": "^0.4.18", "source-map": "^0.6.1", - "sql-parser-cst": "^0.5.1", + "sql-parser-cst": "^0.8.1", "sqlite-parser": "^1.0.0-rc3", "svelte": "^3.52.0", "tenko": "^1.0.6", diff --git a/website/src/parsers/sql/sql-parser-cst.js b/website/src/parsers/sql/sql-parser-cst.js index 907b4562..4af8155e 100644 --- a/website/src/parsers/sql/sql-parser-cst.js +++ b/website/src/parsers/sql/sql-parser-cst.js @@ -39,7 +39,7 @@ export default { _getSettingsConfiguration() { return { fields: [ - ['dialect', ['sqlite', 'mysql']], + ['dialect', ['sqlite', 'mysql', 'bigquery']], 'preserveComments', 'preserveNewlines', 'preserveSpaces', diff --git a/website/yarn.lock b/website/yarn.lock index 042df4f8..a1264453 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -10606,10 +10606,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-parser-cst@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.5.1.tgz#8091152c29f8d04567adf391100ce386509f9f20" - integrity sha512-JtLWpkwOG/ILxkbkkf3pA5pNXZd8gm7eyjnXFyNgEceiQV0ut5WXDXqZNnSChugnoqPHV2XrSPFG/uGFn2ywiA== +sql-parser-cst@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.8.1.tgz#4b416f3e3ebf5608affe0ae9b93e3d0f6bd7c935" + integrity sha512-FSQOHsA+l/Aq+ZwL1gsQNZ2gFar25hXwuWHw4XLTzc7Nh/rS/EloeN9j8k5sEwJAeRMhsL2DyYobUvD06FEtKg== sqlite-parser@^1.0.0-rc3: version "1.0.1" From 515064f25f5c489e79ced90788f0f03f329be36a Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Fri, 2 Dec 2022 14:37:41 +0200 Subject: [PATCH 2/4] Additionally upgrade to 0.8.2 This fixes a major performance problem. --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 2c0e5fcf..7b8c1bb3 100644 --- a/website/package.json +++ b/website/package.json @@ -153,7 +153,7 @@ "solidity-parser-antlr": "^0.4.0", "solidity-parser-diligence": "^0.4.18", "source-map": "^0.6.1", - "sql-parser-cst": "^0.8.1", + "sql-parser-cst": "^0.8.2", "sqlite-parser": "^1.0.0-rc3", "svelte": "^3.52.0", "tenko": "^1.0.6", diff --git a/website/yarn.lock b/website/yarn.lock index a1264453..d49fc090 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -10606,10 +10606,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-parser-cst@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.8.1.tgz#4b416f3e3ebf5608affe0ae9b93e3d0f6bd7c935" - integrity sha512-FSQOHsA+l/Aq+ZwL1gsQNZ2gFar25hXwuWHw4XLTzc7Nh/rS/EloeN9j8k5sEwJAeRMhsL2DyYobUvD06FEtKg== +sql-parser-cst@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.8.2.tgz#861be4bae25ff1f1c59e25591d6655b9b74db64a" + integrity sha512-g3NLb+8I9/MsZpNKYfilf2o3t2krWixj9yr5+tSlx6wMnM1bmuDNPP18R200SDDCO1JpnOKk3afduLSjScoJ5Q== sqlite-parser@^1.0.0-rc3: version "1.0.1" From 7898e99a4f6b409488c85fa719e7ac34748cb315 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Wed, 14 Dec 2022 16:42:32 +0200 Subject: [PATCH 3/4] Upgrade sql-parser-cst to 0.9.2 --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 7b8c1bb3..82b1a7a1 100644 --- a/website/package.json +++ b/website/package.json @@ -153,7 +153,7 @@ "solidity-parser-antlr": "^0.4.0", "solidity-parser-diligence": "^0.4.18", "source-map": "^0.6.1", - "sql-parser-cst": "^0.8.2", + "sql-parser-cst": "^0.9.2", "sqlite-parser": "^1.0.0-rc3", "svelte": "^3.52.0", "tenko": "^1.0.6", diff --git a/website/yarn.lock b/website/yarn.lock index d49fc090..58298172 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -10606,10 +10606,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-parser-cst@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.8.2.tgz#861be4bae25ff1f1c59e25591d6655b9b74db64a" - integrity sha512-g3NLb+8I9/MsZpNKYfilf2o3t2krWixj9yr5+tSlx6wMnM1bmuDNPP18R200SDDCO1JpnOKk3afduLSjScoJ5Q== +sql-parser-cst@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.9.2.tgz#e44527b36dc5ead49aaec2406f7359b9b2073e77" + integrity sha512-jKZri2JnVxc83KGalF6JzXBBIkPZJ0POXN3bOsDe9BG14pbq7Kj078HUhv4rC3sHwGDyt34l9xJhIZAdZgLTAg== sqlite-parser@^1.0.0-rc3: version "1.0.1" From f3a8bb0fb72d7b63399c77ab596b860d84c637f9 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Thu, 22 Dec 2022 13:21:34 +0200 Subject: [PATCH 4/4] Upgrade sql-parser-cst to 0.10.0 --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 82b1a7a1..711edbf1 100644 --- a/website/package.json +++ b/website/package.json @@ -153,7 +153,7 @@ "solidity-parser-antlr": "^0.4.0", "solidity-parser-diligence": "^0.4.18", "source-map": "^0.6.1", - "sql-parser-cst": "^0.9.2", + "sql-parser-cst": "^0.10.0", "sqlite-parser": "^1.0.0-rc3", "svelte": "^3.52.0", "tenko": "^1.0.6", diff --git a/website/yarn.lock b/website/yarn.lock index 58298172..d2338947 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -10606,10 +10606,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-parser-cst@^0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.9.2.tgz#e44527b36dc5ead49aaec2406f7359b9b2073e77" - integrity sha512-jKZri2JnVxc83KGalF6JzXBBIkPZJ0POXN3bOsDe9BG14pbq7Kj078HUhv4rC3sHwGDyt34l9xJhIZAdZgLTAg== +sql-parser-cst@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/sql-parser-cst/-/sql-parser-cst-0.10.0.tgz#e3660dd843a621ac6d8423ab84f594f09b28ce43" + integrity sha512-JShll3yMY19DXBpCdsPe9JbBGyYlJbo/+/KBNdfeX0YYbcLG4Dwdi9WJsd1gwQcPTjwDMHGwUmJouFYknwvWKw== sqlite-parser@^1.0.0-rc3: version "1.0.1"