From 73d9987621a25d75076ae0bdc1b2117a63de1eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Zed=C3=A9n=20Yver=C3=A5s?= Date: Mon, 3 Jun 2024 14:33:12 +0000 Subject: [PATCH 01/14] Upgrade dependencies to v5 --- package.json | 6 +- yarn.lock | 736 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 447 insertions(+), 295 deletions(-) diff --git a/package.json b/package.json index ce51afa..e891766 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ }, "homepage": "https://github.com/graphile/postgis#readme", "peerDependencies": { - "graphile-build": "^4.4.0", - "graphile-build-pg": "^4.4.0", + "graphile-build": "^5.0.0-beta.1", + "graphile-build-pg": "^5.0.0-beta.1", "graphql": ">=0.6 <16", "pg-sql2": ">=2.2.1 <5" }, @@ -44,7 +44,7 @@ "graphql": "^15", "jest": "^26.6.3", "nodemon": "^1.19.1", - "postgraphile": "^4.9.0", + "postgraphile": "^5.0.0-beta.1", "postgraphile-core": "^4.9.0", "prettier": "1.18.2", "ts-jest": "^26.5.4", diff --git a/yarn.lock b/yarn.lock index ccd3866..7050fa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -368,6 +368,41 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@dataplan/json@0.0.1-beta.20": + version "0.0.1-beta.20" + resolved "https://registry.yarnpkg.com/@dataplan/json/-/json-0.0.1-beta.20.tgz#ee6c49d6d639c21897280fa9e4a169b92a504226" + integrity sha512-iz8MM0mOF2gBlLOY8ZUV16VRRdO7HNJdsLAAiz+YDGJFPCObV9uYWDSKJ+IOgkm9K4S8oQuTa1AU+exJ/BK4nQ== + dependencies: + chalk "^4.1.2" + tslib "^2.6.2" + +"@dataplan/pg@0.0.1-beta.22": + version "0.0.1-beta.22" + resolved "https://registry.yarnpkg.com/@dataplan/pg/-/pg-0.0.1-beta.22.tgz#8a998e708b8200f4c252c4b9ecc52dce614dd663" + integrity sha512-xEUnwXcIkwMF1Ck+bruNlnyTq141PwZSBvacCiXXa6g1GyUpSxIHnoclCwdVBFH8CN/pAkrJP+eOJJVb+TsubQ== + dependencies: + "@graphile/lru" "^5.0.0-beta.3" + "@types/node" "^20.5.7" + chalk "^4.1.2" + debug "^4.3.4" + eventemitter3 "^5.0.1" + pg-sql2 "^5.0.0-beta.6" + postgres-array "~3.0.2" + postgres-range "^1.1.3" + tslib "^2.6.2" + +"@emotion/is-prop-valid@^1.2.1": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz#d4175076679c6a26faa92b03bb786f9e52612337" + integrity sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw== + dependencies: + "@emotion/memoize" "^0.8.1" + +"@emotion/memoize@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" + integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== + "@graphile/lru@4.11.0": version "4.11.0" resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.11.0.tgz#dd805ee083063488796ec0eac5a8b50b21c076f9" @@ -375,6 +410,13 @@ dependencies: tslib "^2.0.1" +"@graphile/lru@^5.0.0-beta.3": + version "5.0.0-beta.3" + resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-5.0.0-beta.3.tgz#003ed59dc597af5f82747bb40486537f9624bd08" + integrity sha512-atoHRmLuYMCoMeCjS1pIA442eqAHwFZ3+bnjm3Mn+kAvujyXzGs8uup39gfmMgxOFjRAPNmPEiPw2oJUbOk65Q== + dependencies: + tslib "^2.6.2" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -653,6 +695,13 @@ dependencies: "@types/node" "*" +"@types/interpret@^1.1.1": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@types/interpret/-/interpret-1.1.3.tgz#fa7695584530077e0338948188bb59270077ab7a" + integrity sha512-uBaBhj/BhilG58r64mtDb/BEdH51HIQLgP5bmWzc5qCtFMja8dCk/IOJmk36j0lbi9QHwI6sbtUNGuqXdKCAtQ== + dependencies: + "@types/node" "*" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" @@ -680,29 +729,24 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json5@^0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" - integrity sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA== - -"@types/jsonwebtoken@^8.3.2": - version "8.5.1" - resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#56958cb2d80f6d74352bd2e501a018e2506a8a84" - integrity sha512-rNAPdomlIUX0i0cg2+I+Q1wOUr531zHBQ+cV/28PJ39bSPKjahatZZ2LMuhiguETkCgLVzfruw/ZvNMNkKoSzw== - dependencies: - "@types/node" "*" - "@types/node@*": version "14.14.41" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== +"@types/node@^20.5.7": + version "20.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.0.tgz#49ceec7b34f8621470cff44677fa9d461a477f17" + integrity sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/pg@>=6 <8", "@types/pg@^7.4.10": +"@types/pg@>=6 <8": version "7.14.11" resolved "https://registry.yarnpkg.com/@types/pg/-/pg-7.14.11.tgz#daf5555504a1f7af4263df265d91f140fece52e3" integrity sha512-EnZkZ1OMw9DvNfQkn2MTJrwKmhJYDEs5ujWrPfvseWNoI95N8B4HzU/Ltrq5ZfYxDX/Zg8mTzwr6UAyTjjFvXA== @@ -711,23 +755,35 @@ pg-protocol "^1.2.0" pg-types "^2.2.0" +"@types/pg@^8.10.2": + version "8.11.6" + resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" + integrity sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ== + dependencies: + "@types/node" "*" + pg-protocol "*" + pg-types "^4.0.1" + +"@types/pluralize@^0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/pluralize/-/pluralize-0.0.30.tgz#cddb9923240c20d15e6d5f98fd576ec856b9b3db" + integrity sha512-kVww6xZrW/db5BR9OqiT71J9huRdQ+z/r+LbDuT7/EK50mCmj5FoaIARnVv0rvjUS/YpDox0cDU9lpQT011VBA== + "@types/prettier@^2.0.0": version "2.2.3" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== +"@types/semver@^7.5.1": + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== + "@types/stack-utils@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/ws@^7.4.0": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.1.tgz#49eacb15a0534663d53a36fbf5b4d98f5ae9a73a" - integrity sha512-ISCK1iFnR+jYv7+jLNX0wDqesZ/5RAeY3wUx6QaphmocphU61h+b+PHjS18TF4WIPTu/MMzxIq2PHr32o2TS5Q== - dependencies: - "@types/node" "*" - "@types/yargs-parser@*": version "20.2.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" @@ -807,6 +863,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -886,11 +947,6 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -972,11 +1028,6 @@ babel-preset-jest@^26.6.2: babel-plugin-jest-hoist "^26.6.2" babel-preset-current-node-syntax "^1.0.0" -backo2@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1014,22 +1065,6 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -body-parser@^1.15.2: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" @@ -1114,21 +1149,11 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-writer@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" - integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== - builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1203,6 +1228,14 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -1275,6 +1308,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1329,7 +1371,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1, commander@^2.19.0: +commander@^2.12.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -1371,11 +1413,6 @@ configstore@^3.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" @@ -1472,13 +1509,6 @@ date-fns@^2.16.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.21.1.tgz#679a4ccaa584c0706ea70b3fa92262ac3009d2b0" integrity sha512-m1WR0xGiC6j6jNFAyW4Nvh4WxAi4JF4w9jRJwSI8nBmNcyZXPcP9VUQG+6gHQXAmqaGEKDKhOqAtENDC941UkA== -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - "debug@>=3 <5", debug@^4.1.0, debug@^4.1.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -1486,6 +1516,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.1.2" +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@^3.2.6: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -1493,6 +1530,13 @@ debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.3.4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1550,11 +1594,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -1604,11 +1643,6 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - electron-to-chromium@^1.3.719: version "1.3.720" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.720.tgz#f5d66df8754d993006b7b2ded15ff7738c58bd94" @@ -1624,11 +1658,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -1648,11 +1677,6 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1690,10 +1714,15 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== exec-sh@^0.3.2: version "0.3.6" @@ -1859,19 +1888,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@^1.0.6: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -1880,6 +1896,11 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +follow-redirects@^1.0.0: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -2029,6 +2050,33 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== +grafast@^0.1.1-beta.11: + version "0.1.1-beta.11" + resolved "https://registry.yarnpkg.com/grafast/-/grafast-0.1.1-beta.11.tgz#eecadbff8864817d411f36a8323b0170b50906d0" + integrity sha512-u0kC6q6qlUPWD8FR3wDar3819noJXudi0nY5mN/D8xc5U6KgXUsAyFfgHggXuc/yf4QW4Yc7XAWlo93b4auZ2g== + dependencies: + "@graphile/lru" "^5.0.0-beta.3" + chalk "^4.1.2" + debug "^4.3.4" + eventemitter3 "^5.0.1" + graphql "^16.1.0-experimental-stream-defer.6" + iterall "^1.3.0" + tamedevil "^0.0.0-beta.7" + tslib "^2.6.2" + +grafserv@^0.1.1-beta.13: + version "0.1.1-beta.13" + resolved "https://registry.yarnpkg.com/grafserv/-/grafserv-0.1.1-beta.13.tgz#03109e682ace17db1086cb0edeb0e37e11097e7e" + integrity sha512-ub9VJ+6Xh0Ibkmg/Mhr2MIRq9EJ3nj057GIHRDGESyJkprJR7J+evQoAyJkuMIN/I078adCSxECUsyfwCYZE3Q== + dependencies: + "@graphile/lru" "^5.0.0-beta.3" + debug "^4.3.4" + eventemitter3 "^5.0.1" + graphile-config "^0.0.1-beta.9" + graphql-ws "^5.14.0" + ruru "^2.0.0-beta.13" + tslib "^2.6.2" + graphile-build-pg@4.11.2: version "4.11.2" resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.11.2.tgz#a0ed079d48efc16cba157d89c2a3e5c3162fbf2b" @@ -2044,6 +2092,18 @@ graphile-build-pg@4.11.2: lru-cache ">=4 <5" pg-sql2 "4.11.0" +graphile-build-pg@5.0.0-beta.25: + version "5.0.0-beta.25" + resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-5.0.0-beta.25.tgz#c662e5e00512ff0583be2ec2c95dbefefb4285b9" + integrity sha512-YF0zx0QC30/m6Ey4x9PVHn/kvBLZ9/y3rAIevPmMx9WzOkCy1u8Xn0j75RokmlCeq+jgMw/QCGjjbSOLyAVnjQ== + dependencies: + "@types/node" "^20.5.7" + debug "^4.3.4" + graphile-config "^0.0.1-beta.9" + jsonwebtoken "^9.0.2" + pg-introspection "^0.0.1-beta.8" + tslib "^2.6.2" + graphile-build@4.11.0: version "4.11.0" resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.11.0.tgz#e8e131f4beca16a4fc491abeb97ce968288e2359" @@ -2059,14 +2119,47 @@ graphile-build@4.11.0: pluralize "^7.0.0" semver "^6.0.0" -graphile-utils@^4.11.2: - version "4.11.2" - resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-4.11.2.tgz#264ede219a9c735cab3861fcd6b31da66495de1b" - integrity sha512-XEDtU+R3dWPMeQ+R8BpbkFbf/U8xyVXJEF91jcdGXY0REPMr4sPypbtKJVGF73VqA1pPCEkfthbVd/6DiueUwQ== - dependencies: - debug "^4.1.1" - graphql ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" - tslib "^2.0.1" +graphile-build@5.0.0-beta.21: + version "5.0.0-beta.21" + resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-5.0.0-beta.21.tgz#b3e81c750018b1d647a7e697682d567e0f0198f8" + integrity sha512-Lqze4uTH1/ArCfTBx7viFHa+QiIv3JqKXNwUmXt07jK+C2fehBuZR9yCnwTpFwklpZYdP1WZFHJ/NeIOVgUuPA== + dependencies: + "@types/node" "^20.5.7" + "@types/pluralize" "^0.0.30" + "@types/semver" "^7.5.1" + chalk "^4.1.2" + debug "^4.3.4" + graphile-config "^0.0.1-beta.9" + graphql "^16.1.0-experimental-stream-defer.6" + lodash "^4.17.21" + pluralize "^7.0.0" + semver "^7.5.4" + tamedevil "^0.0.0-beta.7" + tslib "^2.6.2" + +graphile-config@^0.0.1-beta.9: + version "0.0.1-beta.9" + resolved "https://registry.yarnpkg.com/graphile-config/-/graphile-config-0.0.1-beta.9.tgz#a9da192f06b7d46fa66259ef381f21415544ffa1" + integrity sha512-7vNxXZ24OAgXxDKXYi9JtgWPMuNbBL3057Yf32Ux+/rVP4+EePgySCc+NNnn0tORi8qwqVreN8bdWqGIcSwNXg== + dependencies: + "@types/interpret" "^1.1.1" + "@types/node" "^20.5.7" + "@types/semver" "^7.5.1" + chalk "^4.1.2" + debug "^4.3.4" + interpret "^3.1.1" + semver "^7.5.4" + tslib "^2.6.2" + yargs "^17.7.2" + +graphile-utils@^5.0.0-beta.25: + version "5.0.0-beta.25" + resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-5.0.0-beta.25.tgz#2b03aacb2dd9a803106ec3045d5806d3f5dc848c" + integrity sha512-7EXIC0nsx+iHwEjE2nH3hHer1wua7YDN42ao4BpgOYaH0edBJCysGfe5aGTbDIoKe4WWTgc4VsxE1Tr8EJmw7A== + dependencies: + debug "^4.3.4" + json5 "^2.2.3" + tslib "^2.6.2" graphql-iso-date@^3.6.0: version "3.6.1" @@ -2081,12 +2174,12 @@ graphql-parse-resolve-info@4.11.0: debug "^4.1.1" tslib "^2.0.1" -graphql-ws@^4.1.1: - version "4.4.2" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-4.4.2.tgz#f2d83f1863ba3069117199311d664fd28f4aaa8e" - integrity sha512-Cz+t1w+8+tiHIKzcz45tMwrxJpPSQ7KNjQrfN8ADAELECkkBB7aSvAgpShWz0Tne8teH/UxzJsULObLVq5eMvQ== +graphql-ws@^5.14.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" + integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== -"graphql@>=0.9 <0.14 || ^14.0.2 || ^15.4.0", "graphql@^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0", graphql@^15: +graphql@^15, graphql@^16.1.0-experimental-stream-defer.6: version "15.8.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38" integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw== @@ -2174,27 +2267,14 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@^1.5.1: - version "1.8.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz#75d1bbe497e1044f51e4ee9e704a62f28d336507" - integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" http-signature@~1.2.0: version "1.2.0" @@ -2248,21 +2328,21 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - ini@^1.3.4, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -2552,7 +2632,7 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterall@^1.0.2, iterall@^1.2.1, iterall@^1.2.2: +iterall@^1.2.2, iterall@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== @@ -3010,12 +3090,12 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.1, json5@^2.1.2: +json5@2.x, json5@^2.1.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonwebtoken@^8.0.0, jsonwebtoken@^8.5.1: +jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== @@ -3031,6 +3111,22 @@ jsonwebtoken@^8.0.0, jsonwebtoken@^8.5.1: ms "^2.1.1" semver "^5.6.0" +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3224,11 +3320,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -3266,7 +3357,7 @@ mime-db@1.47.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== -mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.30" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== @@ -3476,12 +3567,10 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" +obuf@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" @@ -3548,11 +3637,6 @@ package-json@^4.0.0: registry-url "^3.0.3" semver "^5.1.0" -packet-reader@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" - integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== - parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -3568,11 +3652,6 @@ parse5@6.0.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parseurl@^1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -3618,22 +3697,44 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pg-connection-string@^2.0.0, pg-connection-string@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.5.0.tgz#538cadd0f7e603fc09a12590f3b8a452c2c0cf34" - integrity sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ== +pg-cloudflare@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz#e6d5833015b170e23ae819e8c5d7eaedb472ca98" + integrity sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q== + +pg-connection-string@^2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.6.4.tgz#f543862adfa49fa4e14bc8a8892d2a84d754246d" + integrity sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA== pg-int8@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-pool@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.3.0.tgz#12d5c7f65ea18a6e99ca9811bd18129071e562fc" - integrity sha512-0O5huCql8/D6PIRFAlmccjphLYWC+JIzvUhSzXSpGaf+tjTZc4nn+Lr7mLXBbFJfvwbP0ywDv73EiaBsxn7zdg== +pg-introspection@^0.0.1-beta.8: + version "0.0.1-beta.8" + resolved "https://registry.yarnpkg.com/pg-introspection/-/pg-introspection-0.0.1-beta.8.tgz#e4704f357ed29d11a63222272781b148f0162107" + integrity sha512-QdUMILnmatkBsyfESVc+H1guCjBcH8ckaOR3sgxgGs7Hick5QlERCvlvqX96W32parxofsbDqoMFMCejMJLnDQ== + dependencies: + tslib "^2.6.2" + +pg-numeric@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" + integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== -pg-protocol@^1.2.0, pg-protocol@^1.5.0: +pg-pool@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.6.2.tgz#3a592370b8ae3f02a7c8130d245bc02fa2c5f3f2" + integrity sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg== + +pg-protocol@*, pg-protocol@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" + integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== + +pg-protocol@^1.2.0: version "1.5.0" resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.5.0.tgz#b5dd452257314565e2d54ab3c132adc46565a6a0" integrity sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ== @@ -3648,6 +3749,14 @@ pg-sql2@4.11.0: debug ">=3 <5" tslib "^2.0.1" +pg-sql2@^5.0.0-beta.6: + version "5.0.0-beta.6" + resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-5.0.0-beta.6.tgz#63e591dfc091c658734060270da9780b46af558c" + integrity sha512-h9NZ0BhXB5Nc+tbHUIg/9rhG93JACS34ITduKK/yEVamPCDiPEBxBWEEaqRPd+Fq4ZkPN+ll0BmDA24SU6aF+Q== + dependencies: + "@graphile/lru" "^5.0.0-beta.3" + tslib "^2.6.2" + pg-types@^2.1.0, pg-types@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" @@ -3659,18 +3768,31 @@ pg-types@^2.1.0, pg-types@^2.2.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -"pg@>=6.1.0 <9": - version "8.6.0" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.6.0.tgz#e222296b0b079b280cce106ea991703335487db2" - integrity sha512-qNS9u61lqljTDFvmk/N66EeGq3n6Ujzj0FFyNMGQr6XuEv4tgNTXvJQTfJdcvGit5p5/DWPu+wj920hAJFI+QQ== +pg-types@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" + integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== dependencies: - buffer-writer "2.0.0" - packet-reader "1.0.0" - pg-connection-string "^2.5.0" - pg-pool "^3.3.0" - pg-protocol "^1.5.0" + pg-int8 "1.0.1" + pg-numeric "1.0.2" + postgres-array "~3.0.1" + postgres-bytea "~3.0.0" + postgres-date "~2.1.0" + postgres-interval "^3.0.0" + postgres-range "^1.1.1" + +pg@^8.11.3: + version "8.11.5" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.11.5.tgz#e722b0a5f1ed92931c31758ebec3ddf878dd4128" + integrity sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw== + dependencies: + pg-connection-string "^2.6.4" + pg-pool "^3.6.2" + pg-protocol "^1.6.1" pg-types "^2.1.0" pgpass "1.x" + optionalDependencies: + pg-cloudflare "^1.1.1" pgpass@1.x: version "1.0.4" @@ -3713,7 +3835,7 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postgraphile-core@4.11.2, postgraphile-core@^4.9.0: +postgraphile-core@^4.9.0: version "4.11.2" resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.11.2.tgz#1ebe41b4219a10f4ff0a87b8f1d125cd604a07df" integrity sha512-vedIJ3pHxS9z/drO/Vo95fFUmki4xKg8z4qC9/aV/f8fyye0wqpS8VoF98Ab0Dw743+bfDXC+aUeu+Dk8oQhiw== @@ -3722,52 +3844,64 @@ postgraphile-core@4.11.2, postgraphile-core@^4.9.0: graphile-build-pg "4.11.2" tslib "^2.0.1" -postgraphile@^4.9.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-4.11.0.tgz#5ddcad1e0fe0f8b2c7e03e29542c1b7a0ab54515" - integrity sha512-PyOzULrRjb4TMaw+odIeA/dqxW+Rr9tXFIuf6tj9Cy6Nq9Y474ZV/sHap5lH8eRLJx0BqxS73v/+8+ITFUDB1A== - dependencies: - "@graphile/lru" "4.11.0" - "@types/json5" "^0.0.30" - "@types/jsonwebtoken" "^8.3.2" - "@types/pg" "^7.4.10" - "@types/ws" "^7.4.0" - body-parser "^1.15.2" - chalk "^2.4.2" - commander "^2.19.0" - debug "^4.1.1" - finalhandler "^1.0.6" - graphile-utils "^4.11.2" - graphql "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0" - graphql-ws "^4.1.1" - http-errors "^1.5.1" - iterall "^1.0.2" - json5 "^2.1.1" - jsonwebtoken "^8.0.0" - parseurl "^1.3.2" - pg ">=6.1.0 <9" - pg-connection-string "^2.0.0" - pg-sql2 "4.11.0" - postgraphile-core "4.11.2" - subscriptions-transport-ws "^0.9.18" - tslib "^2.1.0" - ws "^7.4.2" +postgraphile@^5.0.0-beta.1: + version "5.0.0-beta.26" + resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-5.0.0-beta.26.tgz#4745f51da6d73fb5546846bbee32b3a6736fdcd6" + integrity sha512-rCLLyHFCHIZENbwyXbK7lew2WbQaXTGcyY1JNiZoAzYK4Eb1KuDw2h3mcpFMGjZtrspvGwnAtSv5crV+50QSsg== + dependencies: + "@dataplan/json" "0.0.1-beta.20" + "@dataplan/pg" "0.0.1-beta.22" + "@graphile/lru" "^5.0.0-beta.3" + "@types/node" "^20.5.7" + "@types/pg" "^8.10.2" + debug "^4.3.4" + grafast "^0.1.1-beta.11" + grafserv "^0.1.1-beta.13" + graphile-build "5.0.0-beta.21" + graphile-build-pg "5.0.0-beta.25" + graphile-config "^0.0.1-beta.9" + graphile-utils "^5.0.0-beta.25" + graphql "^16.1.0-experimental-stream-defer.6" + iterall "^1.3.0" + jsonwebtoken "^9.0.2" + pg "^8.11.3" + pg-sql2 "^5.0.0-beta.6" + tamedevil "^0.0.0-beta.7" + tslib "^2.6.2" + ws "^8.13.0" postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== +postgres-array@~3.0.1, postgres-array@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" + integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== + postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" integrity sha1-AntTPAqokOJtFy1Hz5zOzFIazTU= +postgres-bytea@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" + integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== + dependencies: + obuf "~1.1.2" + postgres-date@~1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== +postgres-date@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" + integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== + postgres-interval@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" @@ -3775,6 +3909,16 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" +postgres-interval@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" + integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== + +postgres-range@^1.1.1, postgres-range@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" + integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -3841,26 +3985,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - rc@^1.0.1, rc@^1.1.6: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -4016,6 +4145,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -4058,6 +4192,18 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +ruru@^2.0.0-beta.13: + version "2.0.0-beta.13" + resolved "https://registry.yarnpkg.com/ruru/-/ruru-2.0.0-beta.13.tgz#8e653143a8996d8d6369f0c71c2068a00217fd87" + integrity sha512-TFloGwn4YGsBFuFgafYaDfW3oTtT9kdc4DrbE4p1GTimlFvhmyptTHbsqSBAJhAzZKLp+eBtmfb32rjoBoj19Q== + dependencies: + "@emotion/is-prop-valid" "^1.2.1" + graphile-config "^0.0.1-beta.9" + graphql "^16.1.0-experimental-stream-defer.6" + http-proxy "^1.18.1" + tslib "^2.6.2" + yargs "^17.7.2" + rxjs@^6.6.3: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" @@ -4133,6 +4279,11 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.5.4: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -4148,16 +4299,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -4351,11 +4492,6 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -4386,6 +4522,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4414,6 +4559,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" @@ -4434,17 +4586,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -subscriptions-transport-ws@^0.9.18: - version "0.9.18" - resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz#bcf02320c911fbadb054f7f928e51c6041a37b97" - integrity sha512-tztzcBTNoEbuErsVQpTN2xUNN/efAZXyCyL5m3x4t6SKrEiTL2N8SaKWBFWM4u56pL79ULif3zjyeq+oV+nOaA== - dependencies: - backo2 "^1.0.2" - eventemitter3 "^3.1.0" - iterall "^1.2.1" - symbol-observable "^1.0.4" - ws "^5.2.0" - supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -4474,16 +4615,19 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" -symbol-observable@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tamedevil@^0.0.0-beta.7: + version "0.0.0-beta.7" + resolved "https://registry.yarnpkg.com/tamedevil/-/tamedevil-0.0.0-beta.7.tgz#a7405b4a674fdc1abf6033860eed9f225dd05079" + integrity sha512-58Y97vtQuCC5U35aQMcTgaBMaJiSrGftkQmVsbJDgoZ2oUVMrOonom6sIpxiBH+fmpNd85MuxxRnFNyT387QRA== + dependencies: + "@graphile/lru" "^5.0.0-beta.3" + tslib "^2.6.2" + term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" @@ -4560,11 +4704,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -4622,11 +4761,16 @@ tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.1.0: +tslib@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== +tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tslint-config-prettier@^1.18.0: version "1.18.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" @@ -4697,14 +4841,6 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@~1.6.17: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -4724,6 +4860,11 @@ undefsafe@^2.0.2: dependencies: debug "^2.2.0" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -4746,11 +4887,6 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -4975,18 +5111,16 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@^5.2.0: - version "5.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" - integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA== - dependencies: - async-limiter "~1.0.0" - -ws@^7.4.2, ws@^7.4.4: +ws@^7.4.4: version "7.4.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== +ws@^8.13.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" @@ -5045,6 +5179,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -5074,3 +5213,16 @@ yargs@^16.2.0: string-width "^4.2.0" y18n "^5.0.5" yargs-parser "^20.2.2" + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" From b150a868b2324f02bf6a796802825b8c3d152ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Zed=C3=A9n=20Yver=C3=A5s?= Date: Mon, 3 Jun 2024 14:33:12 +0000 Subject: [PATCH 02/14] Specify `testEnvironment: jest-environment-node` in jest.config.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After bumping to the v5 package versions, tests would fail with the following error: ``` ● Test suite failed to run ReferenceError: TextEncoder is not defined > 1 | import * as pg from "pg"; | ^ 2 | 3 | export async function withPgPool( 4 | cb: (pool: pg.Pool) => Promise at Object. (node_modules/pg/lib/crypto/utils-webcrypto.js:22:21) at Object. (node_modules/pg/lib/crypto/utils.js:8:20) at Object. (node_modules/pg/lib/crypto/sasl.js:2:16) at Object. (node_modules/pg/lib/client.js:5:12) at Object. (node_modules/pg/lib/index.js:3:14) at Object. (__tests__/helpers.ts:1:1) at Object. (__tests__/schema.minimal_type.test.ts:2:1) ``` Based on [information from @SimenB]( https://github.com/jsdom/jsdom/issues/2524#issuecomment-902027138 ), it seems like you probably should not be using `jest-environment-jsdom` to start with if you need access to `TextEncoder` or `TextDecoder`. Based on [this]( https://stackoverflow.com/a/72369912/1137077 ) answer on SO, I was able to verify that `@jest-environment node` at the top of test files fixed the issue. However, it would seem more logical to apply this as a global setting, given that postgraphile is meant to run in a node context. After setting `testEnvironment: jest-environment-node` in the global config, I found that tests again started failing. However, the new failures seem related to the v5 changes to plugins which is expected at this stage. --- jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.config.js b/jest.config.js index a0a6e5f..451a607 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,4 +6,5 @@ module.exports = { testRegex: "(/__tests__/.*\\.(test|spec))\\.[tj]sx?$", moduleFileExtensions: ["ts", "js", "json"], snapshotSerializers: ["jest-serializer-graphql-schema"], + testEnvironment: 'jest-environment-node' }; From e90b32b332c2808a78b40e19631172f818e58f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Zed=C3=A9n=20Yver=C3=A5s?= Date: Mon, 3 Jun 2024 14:33:13 +0000 Subject: [PATCH 03/14] Set `moduleResolution: NodeNext` The previous `moduleResolution: node` setting prevent importing types from `graphile-build-pg/pg-introspection`. `NodeNext` was chosen based on https://github.com/graphile/crystal/blob/91e87ab6516490a4cc7b7fc6400efb7623fbd331/graphile-build/graphile-build/tsconfig.json#L9 --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 2023aee..f593b18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "allowJs": false, "target": "es2017", "module": "commonjs", - "moduleResolution": "node", + "moduleResolution": "NodeNext", "sourceMap": true, "pretty": true, "importHelpers": true, From 0ccde26943354e4a86c870bd5263faa7c6503814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Zed=C3=A9n=20Yver=C3=A5s?= Date: Tue, 4 Jun 2024 16:39:00 +0000 Subject: [PATCH 04/14] Remove dependency on `postgraphile-core` `postgraphile-core` is no more according to documentation: https://postgraphile.org/postgraphile/next/migrating-from-v4/#postgraphile-core --- __tests__/integration/queries.test.ts | 20 ++- __tests__/schema.minimal_dimensional.test.ts | 20 ++- __tests__/schema.minimal_type.test.ts | 20 ++- .../schema.minimal_type_and_srid.test.ts | 20 ++- .../schema.minimal_unconstrained.test.ts | 20 ++- __tests__/schema.test.ts | 20 ++- package.json | 1 - yarn.lock | 140 ++---------------- 8 files changed, 90 insertions(+), 171 deletions(-) diff --git a/__tests__/integration/queries.test.ts b/__tests__/integration/queries.test.ts index ffbbb1c..bac64f8 100644 --- a/__tests__/integration/queries.test.ts +++ b/__tests__/integration/queries.test.ts @@ -3,9 +3,10 @@ import * as path from "path"; import * as pg from "pg"; import { promisify } from "util"; import { GraphQLSchema, graphql } from "graphql"; -import { withPgClient } from "../helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgClient, withPgPool } from "../helpers"; import PostgisPlugin from "../../src/index"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; const readFile = promisify(fs.readFile); @@ -13,15 +14,20 @@ const queriesDir = `${__dirname}/../fixtures/queries`; const queryFileNames = fs.readdirSync(queriesDir); const schemas = ["graphile_postgis"]; -const options = { - appendPlugins: [PostgisPlugin], -}; let gqlSchema: GraphQLSchema; beforeAll(async () => { - await withPgClient(async (client: pg.PoolClient) => { - gqlSchema = await createPostGraphileSchema(client, schemas, options); + await withPgPool(async (pool: pg.Pool) => { + gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); }); }); diff --git a/__tests__/schema.minimal_dimensional.test.ts b/__tests__/schema.minimal_dimensional.test.ts index afb9971..d2cdc87 100644 --- a/__tests__/schema.minimal_dimensional.test.ts +++ b/__tests__/schema.minimal_dimensional.test.ts @@ -1,16 +1,22 @@ import * as pg from "pg"; -import { withPgClient } from "./helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgPool } from "./helpers"; import PostgisPlugin from "../src/index"; import { lexicographicSortSchema } from "graphql"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; const schemas = ["graphile_postgis_minimal_dimensional"]; -const options = { - appendPlugins: [PostgisPlugin], -}; test("prints a schema with this plugin", () => - withPgClient(async (client: pg.PoolClient) => { - const gqlSchema = await createPostGraphileSchema(client, schemas, options); + withPgPool(async (pool: pg.Pool) => { + const gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); })); diff --git a/__tests__/schema.minimal_type.test.ts b/__tests__/schema.minimal_type.test.ts index 664c9e9..3cc7a3f 100644 --- a/__tests__/schema.minimal_type.test.ts +++ b/__tests__/schema.minimal_type.test.ts @@ -1,16 +1,22 @@ import * as pg from "pg"; -import { withPgClient } from "./helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgPool } from "./helpers"; import PostgisPlugin from "../src/index"; import { lexicographicSortSchema } from "graphql"; +import { makePgService } from "postgraphile/adaptors/pg"; +import { makeSchema } from "graphile-build"; const schemas = ["graphile_postgis_minimal_type"]; -const options = { - appendPlugins: [PostgisPlugin], -}; test("prints a schema with this plugin", () => - withPgClient(async (client: pg.PoolClient) => { - const gqlSchema = await createPostGraphileSchema(client, schemas, options); + withPgPool(async (pool: pg.Pool) => { + const gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); })); diff --git a/__tests__/schema.minimal_type_and_srid.test.ts b/__tests__/schema.minimal_type_and_srid.test.ts index b8fff50..64d5be8 100644 --- a/__tests__/schema.minimal_type_and_srid.test.ts +++ b/__tests__/schema.minimal_type_and_srid.test.ts @@ -1,16 +1,22 @@ import * as pg from "pg"; -import { withPgClient } from "./helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgPool } from "./helpers"; import PostgisPlugin from "../src/index"; import { lexicographicSortSchema } from "graphql"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; const schemas = ["graphile_postgis_minimal_type_and_srid"]; -const options = { - appendPlugins: [PostgisPlugin], -}; test("prints a schema with this plugin", () => - withPgClient(async (client: pg.PoolClient) => { - const gqlSchema = await createPostGraphileSchema(client, schemas, options); + withPgPool(async (pool: pg.Pool) => { + const gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); })); diff --git a/__tests__/schema.minimal_unconstrained.test.ts b/__tests__/schema.minimal_unconstrained.test.ts index bd2e6a7..f5d320f 100644 --- a/__tests__/schema.minimal_unconstrained.test.ts +++ b/__tests__/schema.minimal_unconstrained.test.ts @@ -1,16 +1,22 @@ import * as pg from "pg"; -import { withPgClient } from "./helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgPool } from "./helpers"; import PostgisPlugin from "../src/index"; import { lexicographicSortSchema } from "graphql"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; const schemas = ["graphile_postgis_minimal_unconstrained"]; -const options = { - appendPlugins: [PostgisPlugin], -}; test("prints a schema with this plugin", () => - withPgClient(async (client: pg.PoolClient) => { - const gqlSchema = await createPostGraphileSchema(client, schemas, options); + withPgPool(async (pool: pg.Pool) => { + const gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); })); diff --git a/__tests__/schema.test.ts b/__tests__/schema.test.ts index 692ac21..9c7b60a 100644 --- a/__tests__/schema.test.ts +++ b/__tests__/schema.test.ts @@ -1,16 +1,22 @@ import * as pg from "pg"; -import { withPgClient } from "./helpers"; -import { createPostGraphileSchema } from "postgraphile-core"; +import { withPgPool } from "./helpers"; import PostgisPlugin from "../src/index"; import { lexicographicSortSchema } from "graphql"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; const schemas = ["graphile_postgis"]; -const options = { - appendPlugins: [PostgisPlugin], -}; test("prints a schema with this plugin", () => - withPgClient(async (client: pg.PoolClient) => { - const gqlSchema = await createPostGraphileSchema(client, schemas, options); + withPgPool(async (pool: pg.Pool) => { + const gqlSchema = await makeSchema({ + extends: [PostgisPlugin], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }).then(it => it.schema); expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); })); diff --git a/package.json b/package.json index e891766..9c316ce 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "jest": "^26.6.3", "nodemon": "^1.19.1", "postgraphile": "^5.0.0-beta.1", - "postgraphile-core": "^4.9.0", "prettier": "1.18.2", "ts-jest": "^26.5.4", "tslint": "^5.19.0", diff --git a/yarn.lock b/yarn.lock index 7050fa7..a988fb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -403,13 +403,6 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== -"@graphile/lru@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.11.0.tgz#dd805ee083063488796ec0eac5a8b50b21c076f9" - integrity sha512-Fakuk190EAKxWSa9YQyr/87g8mvAv8HBvk6yPCPuIoA3bYXF7n6kl0XSqKjSd5VfjEqhtnzQ6zJGzDf1Gv/tJg== - dependencies: - tslib "^2.0.1" - "@graphile/lru@^5.0.0-beta.3": version "5.0.0-beta.3" resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-5.0.0-beta.3.tgz#003ed59dc597af5f82747bb40486537f9624bd08" @@ -746,15 +739,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/pg@>=6 <8": - version "7.14.11" - resolved "https://registry.yarnpkg.com/@types/pg/-/pg-7.14.11.tgz#daf5555504a1f7af4263df265d91f140fece52e3" - integrity sha512-EnZkZ1OMw9DvNfQkn2MTJrwKmhJYDEs5ujWrPfvseWNoI95N8B4HzU/Ltrq5ZfYxDX/Zg8mTzwr6UAyTjjFvXA== - dependencies: - "@types/node" "*" - pg-protocol "^1.2.0" - pg-types "^2.2.0" - "@types/pg@^8.10.2": version "8.11.6" resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" @@ -1509,13 +1493,6 @@ date-fns@^2.16.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.21.1.tgz#679a4ccaa584c0706ea70b3fa92262ac3009d2b0" integrity sha512-m1WR0xGiC6j6jNFAyW4Nvh4WxAi4JF4w9jRJwSI8nBmNcyZXPcP9VUQG+6gHQXAmqaGEKDKhOqAtENDC941UkA== -"debug@>=3 <5", debug@^4.1.0, debug@^4.1.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1530,6 +1507,13 @@ debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^4.3.4: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" @@ -2077,21 +2061,6 @@ grafserv@^0.1.1-beta.13: ruru "^2.0.0-beta.13" tslib "^2.6.2" -graphile-build-pg@4.11.2: - version "4.11.2" - resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.11.2.tgz#a0ed079d48efc16cba157d89c2a3e5c3162fbf2b" - integrity sha512-kAI4urfd8h3ok4tXHIfKVghABMHfuHXnFUVuLb7qV7GJTLS4/vrkgYJVWmRF5z8RLo5TmFE4My07cEA8G1DxVQ== - dependencies: - "@graphile/lru" "4.11.0" - chalk "^2.4.2" - debug "^4.1.1" - graphile-build "4.11.0" - graphql-iso-date "^3.6.0" - jsonwebtoken "^8.5.1" - lodash ">=4 <5" - lru-cache ">=4 <5" - pg-sql2 "4.11.0" - graphile-build-pg@5.0.0-beta.25: version "5.0.0-beta.25" resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-5.0.0-beta.25.tgz#c662e5e00512ff0583be2ec2c95dbefefb4285b9" @@ -2104,21 +2073,6 @@ graphile-build-pg@5.0.0-beta.25: pg-introspection "^0.0.1-beta.8" tslib "^2.6.2" -graphile-build@4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.11.0.tgz#e8e131f4beca16a4fc491abeb97ce968288e2359" - integrity sha512-cp+IU1Kt9YRFG3n6LUU7/0djYsG0zzyAEh6C1EU21/UbCYtUKDsl8HKy5fV3eqHKrxPzvUB40q8wdt96lPff3g== - dependencies: - "@graphile/lru" "4.11.0" - chalk "^2.4.2" - debug "^4.1.1" - graphql-parse-resolve-info "4.11.0" - iterall "^1.2.2" - lodash ">=4 <5" - lru-cache "^5.0.0" - pluralize "^7.0.0" - semver "^6.0.0" - graphile-build@5.0.0-beta.21: version "5.0.0-beta.21" resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-5.0.0-beta.21.tgz#b3e81c750018b1d647a7e697682d567e0f0198f8" @@ -2161,19 +2115,6 @@ graphile-utils@^5.0.0-beta.25: json5 "^2.2.3" tslib "^2.6.2" -graphql-iso-date@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/graphql-iso-date/-/graphql-iso-date-3.6.1.tgz#bd2d0dc886e0f954cbbbc496bbf1d480b57ffa96" - integrity sha512-AwFGIuYMJQXOEAgRlJlFL4H1ncFM8n8XmoVDTNypNOZyQ8LFDG2ppMFlsS862BSTCDcSUfHp8PD3/uJhv7t59Q== - -graphql-parse-resolve-info@4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.11.0.tgz#e2c67080ab01876faec8a1067c6df3db6526e67b" - integrity sha512-vIylHwlhtUz7y4UkXlwGRNIf1O2GhONRsZPYcz8SP+zI5Klp0aiulM4sQ7aEVJNbrqvzGj6cxthJLm+sys0dog== - dependencies: - debug "^4.1.1" - tslib "^2.0.1" - graphql-ws@^5.14.0: version "5.16.0" resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" @@ -2632,7 +2573,7 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterall@^1.2.2, iterall@^1.3.0: +iterall@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== @@ -3095,22 +3036,6 @@ json5@2.x, json5@^2.1.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - jsonwebtoken@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" @@ -3250,7 +3175,7 @@ lodash.once@^4.0.0: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@4.x, "lodash@>=4 <5", lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: +lodash@4.x, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -3260,7 +3185,7 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -"lru-cache@>=4 <5", lru-cache@^4.0.1: +lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -3268,13 +3193,6 @@ lowercase-keys@^1.0.0: pseudomap "^1.0.2" yallist "^2.1.2" -lru-cache@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -3734,21 +3652,6 @@ pg-protocol@*, pg-protocol@^1.6.1: resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== -pg-protocol@^1.2.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.5.0.tgz#b5dd452257314565e2d54ab3c132adc46565a6a0" - integrity sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ== - -pg-sql2@4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-4.11.0.tgz#93c03df9e560ac142f8e15760deb8c5390fc2555" - integrity sha512-KUYJ3fNJaN10oSFT6B6MfqN29rZheW33sJ50Gq7wphWhiCUHCxPGxg262TF7ERLYTKkmNXIO0hU7D0ZYhmy7yw== - dependencies: - "@graphile/lru" "4.11.0" - "@types/pg" ">=6 <8" - debug ">=3 <5" - tslib "^2.0.1" - pg-sql2@^5.0.0-beta.6: version "5.0.0-beta.6" resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-5.0.0-beta.6.tgz#63e591dfc091c658734060270da9780b46af558c" @@ -3757,7 +3660,7 @@ pg-sql2@^5.0.0-beta.6: "@graphile/lru" "^5.0.0-beta.3" tslib "^2.6.2" -pg-types@^2.1.0, pg-types@^2.2.0: +pg-types@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== @@ -3835,15 +3738,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postgraphile-core@^4.9.0: - version "4.11.2" - resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.11.2.tgz#1ebe41b4219a10f4ff0a87b8f1d125cd604a07df" - integrity sha512-vedIJ3pHxS9z/drO/Vo95fFUmki4xKg8z4qC9/aV/f8fyye0wqpS8VoF98Ab0Dw743+bfDXC+aUeu+Dk8oQhiw== - dependencies: - graphile-build "4.11.0" - graphile-build-pg "4.11.2" - tslib "^2.0.1" - postgraphile@^5.0.0-beta.1: version "5.0.0-beta.26" resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-5.0.0-beta.26.tgz#4745f51da6d73fb5546846bbee32b3a6736fdcd6" @@ -4262,7 +4156,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.7.1: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -4761,11 +4655,6 @@ tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" - integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== - tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" @@ -5156,11 +5045,6 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" From 9caf0460d5dd4607f960ab12cec174775ff09583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Zed=C3=A9n=20Yver=C3=A5s?= Date: Tue, 4 Jun 2024 16:45:10 +0000 Subject: [PATCH 05/14] Rename `PostgisPlugin` -> `PostgisPreset` This seems to be better in line with other v5 plugins and the new `GraphileConfig.Preset` type. --- __tests__/integration/queries.test.ts | 4 ++-- __tests__/schema.minimal_dimensional.test.ts | 4 ++-- __tests__/schema.minimal_type.test.ts | 4 ++-- __tests__/schema.minimal_type_and_srid.test.ts | 4 ++-- __tests__/schema.minimal_unconstrained.test.ts | 4 ++-- __tests__/schema.test.ts | 4 ++-- src/index.ts | 5 ++--- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/__tests__/integration/queries.test.ts b/__tests__/integration/queries.test.ts index bac64f8..9e8f57f 100644 --- a/__tests__/integration/queries.test.ts +++ b/__tests__/integration/queries.test.ts @@ -4,7 +4,7 @@ import * as pg from "pg"; import { promisify } from "util"; import { GraphQLSchema, graphql } from "graphql"; import { withPgClient, withPgPool } from "../helpers"; -import PostgisPlugin from "../../src/index"; +import PostgisPreset from "../../src/index"; import { makeSchema } from "graphile-build"; import { makePgService } from "postgraphile/adaptors/pg"; @@ -20,7 +20,7 @@ let gqlSchema: GraphQLSchema; beforeAll(async () => { await withPgPool(async (pool: pg.Pool) => { gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/__tests__/schema.minimal_dimensional.test.ts b/__tests__/schema.minimal_dimensional.test.ts index d2cdc87..6950ee3 100644 --- a/__tests__/schema.minimal_dimensional.test.ts +++ b/__tests__/schema.minimal_dimensional.test.ts @@ -1,6 +1,6 @@ import * as pg from "pg"; import { withPgPool } from "./helpers"; -import PostgisPlugin from "../src/index"; +import PostgisPreset from "../src/index"; import { lexicographicSortSchema } from "graphql"; import { makeSchema } from "graphile-build"; import { makePgService } from "postgraphile/adaptors/pg"; @@ -10,7 +10,7 @@ const schemas = ["graphile_postgis_minimal_dimensional"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { const gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/__tests__/schema.minimal_type.test.ts b/__tests__/schema.minimal_type.test.ts index 3cc7a3f..28a6374 100644 --- a/__tests__/schema.minimal_type.test.ts +++ b/__tests__/schema.minimal_type.test.ts @@ -1,6 +1,6 @@ import * as pg from "pg"; import { withPgPool } from "./helpers"; -import PostgisPlugin from "../src/index"; +import PostgisPreset from "../src/index"; import { lexicographicSortSchema } from "graphql"; import { makePgService } from "postgraphile/adaptors/pg"; import { makeSchema } from "graphile-build"; @@ -10,7 +10,7 @@ const schemas = ["graphile_postgis_minimal_type"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { const gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/__tests__/schema.minimal_type_and_srid.test.ts b/__tests__/schema.minimal_type_and_srid.test.ts index 64d5be8..3492990 100644 --- a/__tests__/schema.minimal_type_and_srid.test.ts +++ b/__tests__/schema.minimal_type_and_srid.test.ts @@ -1,6 +1,6 @@ import * as pg from "pg"; import { withPgPool } from "./helpers"; -import PostgisPlugin from "../src/index"; +import PostgisPreset from "../src/index"; import { lexicographicSortSchema } from "graphql"; import { makeSchema } from "graphile-build"; import { makePgService } from "postgraphile/adaptors/pg"; @@ -10,7 +10,7 @@ const schemas = ["graphile_postgis_minimal_type_and_srid"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { const gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/__tests__/schema.minimal_unconstrained.test.ts b/__tests__/schema.minimal_unconstrained.test.ts index f5d320f..139b620 100644 --- a/__tests__/schema.minimal_unconstrained.test.ts +++ b/__tests__/schema.minimal_unconstrained.test.ts @@ -1,6 +1,6 @@ import * as pg from "pg"; import { withPgPool } from "./helpers"; -import PostgisPlugin from "../src/index"; +import PostgisPreset from "../src/index"; import { lexicographicSortSchema } from "graphql"; import { makeSchema } from "graphile-build"; import { makePgService } from "postgraphile/adaptors/pg"; @@ -10,7 +10,7 @@ const schemas = ["graphile_postgis_minimal_unconstrained"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { const gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/__tests__/schema.test.ts b/__tests__/schema.test.ts index 9c7b60a..a1f1282 100644 --- a/__tests__/schema.test.ts +++ b/__tests__/schema.test.ts @@ -1,6 +1,6 @@ import * as pg from "pg"; import { withPgPool } from "./helpers"; -import PostgisPlugin from "../src/index"; +import PostgisPreset from "../src/index"; import { lexicographicSortSchema } from "graphql"; import { makeSchema } from "graphile-build"; import { makePgService } from "postgraphile/adaptors/pg"; @@ -10,7 +10,7 @@ const schemas = ["graphile_postgis"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { const gqlSchema = await makeSchema({ - extends: [PostgisPlugin], + extends: [PostgisPreset], pgServices: [ makePgService({ pool, diff --git a/src/index.ts b/src/index.ts index 7b3cfe9..3143851 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -import { Plugin } from "graphile-build"; import PostgisVersionPlugin from "./PostgisVersionPlugin"; import PostgisInflectionPlugin from "./PostgisInflectionPlugin"; import PostgisExtensionDetectionPlugin from "./PostgisExtensionDetectionPlugin"; @@ -11,7 +10,7 @@ import Postgis_MultiPoint_PointsPlugin from "./Postgis_MultiPoint_PointsPlugin"; import Postgis_MultiLineString_LineStringsPlugin from "./Postgis_MultiLineString_LineStringsPlugin"; import Postgis_MultiPolygon_PolygonsPlugin from "./Postgis_MultiPolygon_PolygonsPlugin"; -const PostgisPlugin: Plugin = async (builder, options) => { +const PostgisPreset: GraphileConfig.Preset = async (builder, options) => { await PostgisVersionPlugin(builder, options); await PostgisInflectionPlugin(builder, options); await PostgisExtensionDetectionPlugin(builder, options); @@ -38,4 +37,4 @@ const PostgisPlugin: Plugin = async (builder, options) => { // Enhancing the `GeometryCollection` type: await Postgis_GeometryCollection_GeometriesPlugin(builder, options); }; -export default PostgisPlugin; +export default PostgisPreset; From 6133b89ef9ce276fdab17ae7087d3476f3a0ebc4 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 10:43:58 +0100 Subject: [PATCH 06/14] Switch to using @tsconfig/node20 --- package.json | 1 + tsconfig.json | 8 ++------ yarn.lock | 23 ++++++++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 9c316ce..d2c1848 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "pg-sql2": ">=2.2.1 <5" }, "devDependencies": { + "@tsconfig/node20": "^20.1.4", "@types/debug": "^4.1.5", "@types/jest": "^26.0.22", "concurrently": "^6.0.2", diff --git a/tsconfig.json b/tsconfig.json index f593b18..4cf71f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,21 @@ { + "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { "rootDir": "src", "declarationDir": "./dist", "outDir": "./dist", "declaration": true, "allowJs": false, - "target": "es2017", - "module": "commonjs", - "moduleResolution": "NodeNext", "sourceMap": true, "pretty": true, "importHelpers": true, "experimentalDecorators": true, "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, - "strictNullChecks": true, "noFallthroughCasesInSwitch": true, "noUnusedParameters": true, "noUnusedLocals": true, - "preserveWatchOutput": true, - "lib": ["es2018", "esnext.asynciterable"] + "preserveWatchOutput": true }, "include": ["src/**/*"] } diff --git a/yarn.lock b/yarn.lock index a988fb5..185b54e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -643,6 +643,11 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@tsconfig/node20@^20.1.4": + version "20.1.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node20/-/node20-20.1.4.tgz#3457d42eddf12d3bde3976186ab0cd22b85df928" + integrity sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg== + "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.14" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" @@ -728,9 +733,9 @@ integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== "@types/node@^20.5.7": - version "20.14.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.0.tgz#49ceec7b34f8621470cff44677fa9d461a477f17" - integrity sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA== + version "20.14.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" + integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== dependencies: undici-types "~5.26.4" @@ -3685,9 +3690,9 @@ pg-types@^4.0.1: postgres-range "^1.1.1" pg@^8.11.3: - version "8.11.5" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.11.5.tgz#e722b0a5f1ed92931c31758ebec3ddf878dd4128" - integrity sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw== + version "8.12.0" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.12.0.tgz#9341724db571022490b657908f65aee8db91df79" + integrity sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ== dependencies: pg-connection-string "^2.6.4" pg-pool "^3.6.2" @@ -4656,9 +4661,9 @@ tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== tslint-config-prettier@^1.18.0: version "1.18.0" From 91d8b15adec9c64a549811fc1e1315dbaca1dc10 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 10:48:43 +0100 Subject: [PATCH 07/14] More dependency updates and fixes --- package.json | 18 +++++------- yarn.lock | 83 ++++++++++------------------------------------------ 2 files changed, 23 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index d2c1848..7cfe039 100644 --- a/package.json +++ b/package.json @@ -32,33 +32,31 @@ }, "homepage": "https://github.com/graphile/postgis#readme", "peerDependencies": { - "graphile-build": "^5.0.0-beta.1", - "graphile-build-pg": "^5.0.0-beta.1", + "graphile-build": "^5.0.0-beta.21", + "graphile-build-pg": "^5.0.0-beta.25", "graphql": ">=0.6 <16", - "pg-sql2": ">=2.2.1 <5" + "pg-sql2": "^5.0.0-beta.6" }, "devDependencies": { "@tsconfig/node20": "^20.1.4", "@types/debug": "^4.1.5", "@types/jest": "^26.0.22", "concurrently": "^6.0.2", - "graphql": "^15", + "graphql": "16.1.0-experimental-stream-defer.6", "jest": "^26.6.3", "nodemon": "^1.19.1", - "postgraphile": "^5.0.0-beta.1", + "postgraphile": "^5.0.0-beta.26", "prettier": "1.18.2", "ts-jest": "^26.5.4", - "tslint": "^5.19.0", - "tslint-config-prettier": "^1.18.0", - "typescript": "^3.5.3" + "typescript": "^5.4.5" }, "dependencies": { "debug": "^4.1.1", "jest-serializer-graphql-schema": "^5.0.0-1.1", - "tslib": "^1.10.0" + "tslib": "^2.6.3" }, "resolutions": { - "graphql": "^15" + "graphql": "16.1.0-experimental-stream-defer.6" }, "files": [ "dist" diff --git a/yarn.lock b/yarn.lock index 185b54e..9a9c0ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1138,11 +1138,6 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1200,7 +1195,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1360,11 +1355,6 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -1593,11 +1583,6 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -2125,10 +2110,10 @@ graphql-ws@^5.14.0: resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== -graphql@^15, graphql@^16.1.0-experimental-stream-defer.6: - version "15.8.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38" - integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw== +graphql@16.1.0-experimental-stream-defer.6, graphql@^16.1.0-experimental-stream-defer.6: + version "16.1.0-experimental-stream-defer.6" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.1.0-experimental-stream-defer.6.tgz#8f00e27b11cf2c71ddec0350c663270cd3230659" + integrity sha512-qNedUtVDai94Ptxz7IXHoQR/GU27cuC/SfAU2CogIEfOflr7tW52GTnAF9SDa2i8gneowK0Ye5vyeQUJpGRvAQ== growly@^1.3.0: version "1.3.0" @@ -3299,7 +3284,7 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.1.1, minimist@^1.2.0: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -3317,13 +3302,6 @@ mkdirp@1.x: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -3743,7 +3721,7 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postgraphile@^5.0.0-beta.1: +postgraphile@^5.0.0-beta.26: version "5.0.0-beta.26" resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-5.0.0-beta.26.tgz#4745f51da6d73fb5546846bbee32b3a6736fdcd6" integrity sha512-rCLLyHFCHIZENbwyXbK7lew2WbQaXTGcyY1JNiZoAzYK4Eb1KuDw2h3mcpFMGjZtrspvGwnAtSv5crV+50QSsg== @@ -4066,7 +4044,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.18.1, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.18.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -4161,7 +4139,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.5.0, semver@^5.7.1: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -4655,47 +4633,16 @@ ts-jest@^26.5.4: semver "7.x" yargs-parser "20.x" -tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.6.2: +tslib@^2.6.2, tslib@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== -tslint-config-prettier@^1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" - integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - -tslint@^5.19.0: - version "5.20.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" - integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.1" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.29.0" - -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -4742,10 +4689,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^3.5.3: - version "3.9.9" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" - integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== undefsafe@^2.0.2: version "2.0.3" From 2f0e155619cae8be36949a09e3bf2006d8a99ca1 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:00:02 +0100 Subject: [PATCH 08/14] Separate build file --- tsconfig.build.json | 4 ++++ tsconfig.json | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 tsconfig.build.json diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..bdc6320 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src/**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index 4cf71f3..531eaa8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,5 @@ "noUnusedParameters": true, "noUnusedLocals": true, "preserveWatchOutput": true - }, - "include": ["src/**/*"] + } } From 55302eba13d8aeb75a758181535c2e66184bd807 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:01:34 +0100 Subject: [PATCH 09/14] Reconfigure tsc --- package.json | 6 +++--- tsconfig.json | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7cfe039..9cea251 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "description": "PostGIS support for PostGraphile", "main": "dist/index.js", "scripts": { - "build": "tsc", - "watch": "tsc --watch", + "build": "tsc -p tsconfig.build.json", + "watch": "tsc -p tsconfig.build.json --watch", "test": "scripts/test", - "lint": "prettier --list-different 'src/**/*' && tslint --config tslint.json --project tsconfig.json", + "lint": "prettier --list-different 'src/**/*'", "postgraphile": "nodemon --watch dist -x 'postgraphile --append-plugins `pwd`/dist/index.js -c graphile_test -s graphile_postgis -p 5123 --enhance-graphiql --watch --dynamic-json --show-error-stack --extended-errors severity,code,detail,hint,position,internalPosition,internalQuery,where,schema,table,column,dataType,constraint,file,line,routine'", "dev": "psql -f __tests__/schema.sql graphile_test && concurrently --kill-others 'npm run watch' 'npm run postgraphile'", "prepack": "rm -Rf dist && npm run build" diff --git a/tsconfig.json b/tsconfig.json index 531eaa8..de2b121 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,6 @@ "importHelpers": true, "experimentalDecorators": true, "noImplicitAny": true, - "suppressImplicitAnyIndexErrors": true, "noFallthroughCasesInSwitch": true, "noUnusedParameters": true, "noUnusedLocals": true, From 2284efe5ee8622c6acd7afc57382fa0f9b95cc6e Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:18:38 +0100 Subject: [PATCH 10/14] Change how a schema is loaded in the tests --- __tests__/helpers.ts | 17 +++++++++++++++++ __tests__/schema.minimal_dimensional.test.ts | 17 +++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/__tests__/helpers.ts b/__tests__/helpers.ts index 58e2a27..2ce3459 100644 --- a/__tests__/helpers.ts +++ b/__tests__/helpers.ts @@ -1,4 +1,9 @@ import * as pg from "pg"; +import PostgisPreset from "../src"; +import { makeSchema } from "graphile-build"; +import { makePgService } from "postgraphile/adaptors/pg"; +import { PostGraphileAmberPreset } from "postgraphile/presets/amber"; +import { makeV4Preset } from "postgraphile/presets/v4"; export async function withPgPool( cb: (pool: pg.Pool) => Promise @@ -39,3 +44,15 @@ export async function withTransaction( } }); } + +export async function makePostGraphileSchema(pool: pg.Pool, schemas: string[]) { + return await makeSchema({ + extends: [PostGraphileAmberPreset, makeV4Preset({}), PostgisPreset], + pgServices: [ + makePgService({ + pool, + schemas, + }), + ], + }); +} diff --git a/__tests__/schema.minimal_dimensional.test.ts b/__tests__/schema.minimal_dimensional.test.ts index 6950ee3..c90e8f9 100644 --- a/__tests__/schema.minimal_dimensional.test.ts +++ b/__tests__/schema.minimal_dimensional.test.ts @@ -1,22 +1,11 @@ import * as pg from "pg"; -import { withPgPool } from "./helpers"; -import PostgisPreset from "../src/index"; +import { makePostGraphileSchema, withPgPool } from "./helpers"; import { lexicographicSortSchema } from "graphql"; -import { makeSchema } from "graphile-build"; -import { makePgService } from "postgraphile/adaptors/pg"; const schemas = ["graphile_postgis_minimal_dimensional"]; test("prints a schema with this plugin", () => withPgPool(async (pool: pg.Pool) => { - const gqlSchema = await makeSchema({ - extends: [PostgisPreset], - pgServices: [ - makePgService({ - pool, - schemas, - }), - ], - }).then(it => it.schema); - expect(lexicographicSortSchema(gqlSchema)).toMatchSnapshot(); + const { schema } = await makePostGraphileSchema(pool, schemas); + expect(lexicographicSortSchema(schema)).toMatchSnapshot(); })); From 6dd834cda9160c463fce2c18672b8e09059630b1 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:39:26 +0100 Subject: [PATCH 11/14] Upgrade prettier --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9cea251..09725ff 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "jest": "^26.6.3", "nodemon": "^1.19.1", "postgraphile": "^5.0.0-beta.26", - "prettier": "1.18.2", + "prettier": "^3.3.2", "ts-jest": "^26.5.4", "typescript": "^5.4.5" }, diff --git a/yarn.lock b/yarn.lock index 9a9c0ba..38c87f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3806,10 +3806,10 @@ prepend-http@^1.0.1: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= -prettier@1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" - integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== +prettier@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" + integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" From 8c1d4d46e18cf1419b6be2ae99d99e696833f3f5 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:40:06 +0100 Subject: [PATCH 12/14] Tweak tsconfigs --- tsconfig.build.json | 6 ++++++ tsconfig.json | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index bdc6320..1c28386 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,4 +1,10 @@ { "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "declarationDir": "./dist", + "outDir": "./dist", + "declaration": true + }, "include": ["src/**/*"] } diff --git a/tsconfig.json b/tsconfig.json index de2b121..4460422 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,6 @@ { "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { - "rootDir": "src", - "declarationDir": "./dist", - "outDir": "./dist", - "declaration": true, "allowJs": false, "sourceMap": true, "pretty": true, From 733da2975fdca12184846c1c74a09c2de5c9850b Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:45:05 +0100 Subject: [PATCH 13/14] Lint --- __tests__/schema.minimal_dimensional.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/schema.minimal_dimensional.test.ts b/__tests__/schema.minimal_dimensional.test.ts index c90e8f9..d9c3c1b 100644 --- a/__tests__/schema.minimal_dimensional.test.ts +++ b/__tests__/schema.minimal_dimensional.test.ts @@ -1,5 +1,5 @@ import * as pg from "pg"; -import { makePostGraphileSchema, withPgPool } from "./helpers"; +import { makePostGraphileSchema, withPgPool } from "./helpers.js"; import { lexicographicSortSchema } from "graphql"; const schemas = ["graphile_postgis_minimal_dimensional"]; From d6dc500250cf63070b041995f4eb081acb5c808d Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Wed, 12 Jun 2024 11:45:25 +0100 Subject: [PATCH 14/14] Start looking at porting a plugin --- src/PostgisRegisterTypesPlugin.ts | 58 +++++++++++++++++++++++++------ src/makeGeoJSONType.ts | 11 +++--- src/version.ts | 1 + 3 files changed, 52 insertions(+), 18 deletions(-) create mode 100644 src/version.ts diff --git a/src/PostgisRegisterTypesPlugin.ts b/src/PostgisRegisterTypesPlugin.ts index 5dcd250..5d122f9 100644 --- a/src/PostgisRegisterTypesPlugin.ts +++ b/src/PostgisRegisterTypesPlugin.ts @@ -1,23 +1,58 @@ import { Plugin } from "graphile-build"; import debug from "./debug"; -import { PgType } from "graphile-build-pg"; import { GraphQLResolveInfo, GraphQLType, GraphQLNamedType } from "graphql"; -import { Subtype } from "./interfaces"; -import { getGISTypeDetails, getGISTypeModifier, getGISTypeName } from "./utils"; +import { Subtype } from "./interfaces.js"; +import { + getGISTypeDetails, + getGISTypeModifier, + getGISTypeName, +} from "./utils.js"; import { SQL } from "pg-sql2"; -import makeGeoJSONType from "./makeGeoJSONType"; +import makeGeoJSONType from "./makeGeoJSONType.js"; +import { version } from "./version.js"; function identity(input: T): T { return input; } -const plugin: Plugin = builder => { - builder.hook("build", build => { - const GeoJSON = makeGeoJSONType( - build.graphql, - build.inflection.builtin("GeoJSON") - ); - build.addType(GeoJSON); +declare global { + namespace GraphileBuild { + interface ScopeScalar { + /** + * Set to true for the GeoJSON type. + */ + isGeoJSONType?: boolean; + } + } +} + +export const PostgisRegisterTypesPlugin: GraphileConfig.Plugin = { + name: "PostgisRegisterTypesPlugin", + version, + + schema: { + hooks: { + init(_, build, _context) { + const { graphql } = build; + const name = build.inflection.builtin("GeoJSON"); + build.registerScalarType( + name, + { + isGeoJSONType: true, + }, + () => { + return makeGeoJSONType(graphql, name); + }, + "Adding GeoJSON type" + ); + return _; + }, + }, + }, +}; + +/* + return build.extend(build, { getPostgisTypeByGeometryType( @@ -339,3 +374,4 @@ const plugin: Plugin = builder => { }; export default plugin; +*/ diff --git a/src/makeGeoJSONType.ts b/src/makeGeoJSONType.ts index 8a6d09b..314aa4e 100644 --- a/src/makeGeoJSONType.ts +++ b/src/makeGeoJSONType.ts @@ -29,8 +29,6 @@ SOFTWARE. */ export default function makeGeoJSONType(graphql: any, name = "GeoJSON") { const Kind: typeof GraphQL.Kind = graphql.Kind; - const GraphQLScalarType: typeof GraphQL.GraphQLScalarType = - graphql.GraphQLScalarType; function identity(value: T): T { return value; @@ -50,14 +48,14 @@ export default function makeGeoJSONType(graphql: any, name = "GeoJSON") { return parseFloat(ast.value); case Kind.OBJECT: { const value = Object.create(null); - ast.fields.forEach(field => { + ast.fields.forEach((field) => { value[field.name.value] = parseLiteral(field.value, variables); }); return value; } case Kind.LIST: - return ast.values.map(n => parseLiteral(n, variables)); + return ast.values.map((n) => parseLiteral(n, variables)); case Kind.NULL: return null; case Kind.VARIABLE: { @@ -69,13 +67,12 @@ export default function makeGeoJSONType(graphql: any, name = "GeoJSON") { } } - return new GraphQLScalarType({ - name, + return { description: `The \`${name}\` scalar type represents GeoJSON values as specified by` + "[RFC 7946](https://tools.ietf.org/html/rfc7946).", serialize: identity, parseValue: identity, parseLiteral, - }); + } as Omit, "name">; } diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 0000000..daeac63 --- /dev/null +++ b/src/version.ts @@ -0,0 +1 @@ +export const version = "";