2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Added detection of "ghost-api" use in theme config

refs https://github.com/TryGhost/Toolbox/issues/241

- The `engines.ghost-api` property has been deprecated and the support for it will be dropped in Ghost v5 due to versionless nature of the Content API.
- When uploading a new theme or activating existing one that uses ghost-api in it's config a warning will be shown to the user
This commit is contained in:
Naz 2022-03-22 11:15:58 +08:00 committed by naz
parent fb41cfa335
commit 7d03194e55
4 changed files with 34 additions and 169 deletions

View file

@ -138,7 +138,7 @@
"ghost-storage-base": "1.0.0",
"glob": "7.2.0",
"got": "9.6.0",
"gscan": "4.22.0",
"gscan": "4.24.0",
"html-to-text": "5.1.1",
"image-size": "1.0.1",
"intl": "1.2.5",

View file

@ -26,7 +26,8 @@ When a new rule is introduced in gscan one of these fixture files might break an
- Unzip the theme files, e.g.: `cd $CURRENT_DIR && unzip valid.zip -d valid`
- Make a change in the file which caused a warning/error/whatever
- Zip the files back: `zip -r valid.zip ./valid`
- Zip the files back: `cd valid; zip -r ../valid.zip * ; cd ..`
- Clean up `rm -rf ./valid`
- Commit changed zip file: `git add valid.zip ;... you know the drill :)`
Ideas for future improvements in theme tests:

Binary file not shown.

198
yarn.lock
View file

@ -1428,17 +1428,6 @@
component-type "^1.2.1"
join-component "^1.1.0"
"@sentry/core@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.16.1.tgz#d9f7a75f641acaddf21b6aafa7a32e142f68f17c"
integrity sha512-UFI0264CPUc5cR1zJH+S2UPOANpm6dLJOnsvnIGTjsrwzR0h8Hdl6rC2R/GPq+WNbnipo9hkiIwDlqbqvIU5vw==
dependencies:
"@sentry/hub" "6.16.1"
"@sentry/minimal" "6.16.1"
"@sentry/types" "6.16.1"
"@sentry/utils" "6.16.1"
tslib "^1.9.3"
"@sentry/core@6.19.2":
version "6.19.2"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.19.2.tgz#dd35ba6ca41a2dd011c43f732bcdadbb52c06376"
@ -1450,15 +1439,6 @@
"@sentry/utils" "6.19.2"
tslib "^1.9.3"
"@sentry/hub@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.16.1.tgz#526e19db51f4412da8634734044c605b936a7b80"
integrity sha512-4PGtg6AfpqMkreTpL7ymDeQ/U1uXv03bKUuFdtsSTn/FRf9TLS4JB0KuTZCxfp1IRgAA+iFg6B784dDkT8R9eg==
dependencies:
"@sentry/types" "6.16.1"
"@sentry/utils" "6.16.1"
tslib "^1.9.3"
"@sentry/hub@6.19.2":
version "6.19.2"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.19.2.tgz#0e9f9c507e55d8396002f644b43ef27cc9ff1289"
@ -1468,15 +1448,6 @@
"@sentry/utils" "6.19.2"
tslib "^1.9.3"
"@sentry/minimal@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.16.1.tgz#6a9506a92623d2ff1fc17d60989688323326772e"
integrity sha512-dq+mI1EQIvUM+zJtGCVgH3/B3Sbx4hKlGf2Usovm9KoqWYA+QpfVBholYDe/H2RXgO7LFEefDLvOdHDkqeJoyA==
dependencies:
"@sentry/hub" "6.16.1"
"@sentry/types" "6.16.1"
tslib "^1.9.3"
"@sentry/minimal@6.19.2":
version "6.19.2"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.19.2.tgz#e748541e4adbc7e80a3b6ccaf01b631c17fc44b4"
@ -1486,16 +1457,15 @@
"@sentry/types" "6.19.2"
tslib "^1.9.3"
"@sentry/node@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.16.1.tgz#d92916da3e95d23e1ada274e97d6bf369e74ac51"
integrity sha512-SeDDoug2kUxeF1D7JGPa3h5EXxKtmA01mITBPYx5xbJ0sMksnv5I5bC1SJ8arRRzq6+W1C4IEeDBQtrVCk6ixA==
"@sentry/node@6.19.1":
version "6.19.1"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.19.1.tgz#807f9011dbac37370b49759c6d803c6026b4adfb"
integrity sha512-ipPWFY+1gNZlt99QHInP+Z70W7nYeBEEiVDtpxSMid5zFzPJ/k9QOZtUzyelyiSCBvIIeTzVX9Fyri17fay1Pw==
dependencies:
"@sentry/core" "6.16.1"
"@sentry/hub" "6.16.1"
"@sentry/tracing" "6.16.1"
"@sentry/types" "6.16.1"
"@sentry/utils" "6.16.1"
"@sentry/core" "6.19.1"
"@sentry/hub" "6.19.1"
"@sentry/types" "6.19.1"
"@sentry/utils" "6.19.1"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
@ -1515,35 +1485,11 @@
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/tracing@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.16.1.tgz#32fba3e07748e9a955055afd559a65996acb7d71"
integrity sha512-MPSbqXX59P+OEeST+U2V/8Hu/8QjpTUxTNeNyTHWIbbchdcMMjDbXTS3etCgajZR6Ro+DHElOz5cdSxH6IBGlA==
dependencies:
"@sentry/hub" "6.16.1"
"@sentry/minimal" "6.16.1"
"@sentry/types" "6.16.1"
"@sentry/utils" "6.16.1"
tslib "^1.9.3"
"@sentry/types@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.16.1.tgz#4917607115b30315757c2cf84f80bac5100b8ac0"
integrity sha512-Wh354g30UsJ5kYJbercektGX4ZMc9MHU++1NjeN2bTMnbofEcpUDWIiKeulZEY65IC1iU+1zRQQgtYO+/hgCUQ==
"@sentry/types@6.19.2":
version "6.19.2"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.19.2.tgz#0219c9da21ed975951108b8541913b1966464435"
integrity sha512-XO5qmVBdTs+7PdCz7fAwn1afWxSnRE2KLBFg5/vOdKosPSSHsSHUURSkxiEZc2QsR+JpRB4AeQ26AkIRX38qTg==
"@sentry/utils@6.16.1":
version "6.16.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.16.1.tgz#1b9e14c2831b6e8b816f7021b9876133bf2be008"
integrity sha512-7ngq/i4R8JZitJo9Sl8PDnjSbDehOxgr1vsoMmerIsyRZ651C/8B+jVkMhaAPgSdyJ0AlE3O7DKKTP1FXFw9qw==
dependencies:
"@sentry/types" "6.16.1"
tslib "^1.9.3"
"@sentry/utils@6.19.2":
version "6.19.2"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.19.2.tgz#995efb896c5159369509f4896c27a2d2ea9191f2"
@ -1804,12 +1750,12 @@
resolved "https://registry.yarnpkg.com/@tryghost/database-info/-/database-info-0.2.4.tgz#83ca8976878f5a8eb8b1b3b229294252932bcbe0"
integrity sha512-zIV0IPpHXvH8ThuMpO9JhbUy8tntBnlF+UIon5KtryZq6F91n0lf/ZGpvvm+7X4kduTQQsIk26/S3UzrI88LeA==
"@tryghost/debug@0.1.10":
version "0.1.10"
resolved "https://registry.yarnpkg.com/@tryghost/debug/-/debug-0.1.10.tgz#26d67921c3edd562c7d2bee136d04faefa99bb3c"
integrity sha512-OihGnKm/lGVB5wNDyykev7IbufmtxTGmiDMAttaG4d5jz1eK9f/1VQ9Zq+lIs0sIG3EM6q9J1iQq0BCCGGRGfg==
"@tryghost/debug@0.1.11":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@tryghost/debug/-/debug-0.1.11.tgz#cc21e55ac610190426c366a7c69067c5d53117ad"
integrity sha512-42jLmgfswgcxcEwFz3Y7iwqUDCLjZ9CavWuF68PHmhnZvsGgSjJdQSUZH0/lDoz1qEkAE4+g94/mw+TzLgyVow==
dependencies:
"@tryghost/root-utils" "^0.3.8"
"@tryghost/root-utils" "^0.3.9"
debug "^4.3.1"
"@tryghost/debug@0.1.13", "@tryghost/debug@^0.1.10", "@tryghost/debug@^0.1.13", "@tryghost/debug@^0.1.2", "@tryghost/debug@^0.1.4", "@tryghost/debug@^0.1.5", "@tryghost/debug@^0.1.8", "@tryghost/debug@^0.1.9":
@ -2031,7 +1977,7 @@
lodash "^4.17.21"
luxon "^1.26.0"
"@tryghost/logging@2.0.1", "@tryghost/logging@2.0.4", "@tryghost/logging@^2.0.0", "@tryghost/logging@^2.0.1", "@tryghost/logging@^2.0.5":
"@tryghost/logging@2.0.4", "@tryghost/logging@^2.0.0", "@tryghost/logging@^2.0.1", "@tryghost/logging@^2.0.5":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-2.0.4.tgz#7fadc8557fb548729a9296eed2dbff41904c38c2"
integrity sha512-XYiWv4kAjdpW5wYWUsOvkov5pQa25OwPUUADE0s7G3pFHV+pQbLxbOaj0xQEPUTuMPOOCTG4ZBkZsjqs0OyKtA==
@ -2286,10 +2232,10 @@
fs-extra "^10.0.0"
lodash "^4.17.21"
"@tryghost/pretty-cli@1.2.22":
version "1.2.22"
resolved "https://registry.yarnpkg.com/@tryghost/pretty-cli/-/pretty-cli-1.2.22.tgz#dfc3356c842569003f5e0cd6114b3811c2a4911b"
integrity sha512-y5k/bT3zhuYGDbPUNcgAPt9OSk4rZjtEjIjrqbo1nES14kp66uq+aLldqPyMAR/1a17AFnwMEiEZwkRL3KSAhQ==
"@tryghost/pretty-cli@1.2.24":
version "1.2.24"
resolved "https://registry.yarnpkg.com/@tryghost/pretty-cli/-/pretty-cli-1.2.24.tgz#6e4087a579c1a0cb2a6f2709f8f6ee11704aeb55"
integrity sha512-WdR8f+BpT1AxvJm8Tcqj2DGF4amHukG/f4UZTuiYZxmrjfDE4jbXicFcVqTcUt6LAPebSkcifG945msGFfSORw==
dependencies:
chalk "^4.1.0"
sywac "^1.3.0"
@ -2321,7 +2267,7 @@
got "9.6.0"
lodash "^4.17.21"
"@tryghost/root-utils@0.3.11", "@tryghost/root-utils@^0.3.11", "@tryghost/root-utils@^0.3.8":
"@tryghost/root-utils@0.3.11", "@tryghost/root-utils@^0.3.11", "@tryghost/root-utils@^0.3.8", "@tryghost/root-utils@^0.3.9":
version "0.3.11"
resolved "https://registry.yarnpkg.com/@tryghost/root-utils/-/root-utils-0.3.11.tgz#4c3a045c89c75301435b1d1db1946072b3ee3adf"
integrity sha512-1q01HsaqQSpFPVcq7tqkIUXa/L1P7yXNGbGJCeZ/IyfrSd/OdgQTluwz0BYzJc1mBP+5lIumqARr+XdbE/ZbAQ==
@ -2446,16 +2392,6 @@
resolved "https://registry.yarnpkg.com/@tryghost/vhost-middleware/-/vhost-middleware-1.0.22.tgz#22b9de3f6854a5f0c7d14acbb20abae789300cd7"
integrity sha512-MBNe1i6wWGJamm/aaVAujJEQ04J/MKzxGC2hvnaWYkYTPA9PESecTsI2IEBN3RbInI1ozOSQxtjNcdHMIYkzUg==
"@tryghost/zip@1.1.18":
version "1.1.18"
resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.18.tgz#1afcf07d1c5404ab38bc42ef9b400eafc4052edc"
integrity sha512-NyVBOnB4PWqx29/8ZO94Sbgy21izJVnBPwH5PgoVG4B16IRXJ1Fa13WrUeUZuGXBqqiH5D5KorZhlYkfmsvHuw==
dependencies:
archiver "^4.0.2"
bluebird "^3.7.2"
extract-zip "2.0.1"
fs-extra "^9.1.0"
"@tryghost/zip@1.1.20":
version "1.1.20"
resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.20.tgz#58b214f3ddbef89f2ea966c6d9c8f02c083372ff"
@ -2676,7 +2612,7 @@ abbrev@1:
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
accepts@~1.3.5, accepts@~1.3.7, accepts@~1.3.8:
accepts@~1.3.5, accepts@~1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
@ -3214,22 +3150,6 @@ bluebird@3.7.2, bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.3, bluebird@^3.5
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
body-parser@1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4"
integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==
dependencies:
bytes "3.1.1"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.2"
http-errors "1.8.1"
iconv-lite "0.4.24"
on-finished "~2.3.0"
qs "6.9.6"
raw-body "2.4.2"
type-is "~1.6.18"
body-parser@1.19.2, body-parser@^1.19.0:
version "1.19.2"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e"
@ -3466,11 +3386,6 @@ bytes@3.0.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
bytes@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a"
integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==
bytes@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
@ -5425,42 +5340,6 @@ express-unless@^1.0.0:
resolved "https://registry.yarnpkg.com/express-unless/-/express-unless-1.0.0.tgz#ecd1c354c5ccf7709a8a17ece617934e037cccd8"
integrity sha512-zXSSClWBPfcSYjg0hcQNompkFN/MxQQ53eyrzm9BYgik2ut2I7PxAf2foVqBRMYCwWaZx/aWodi+uk76npdSAw==
express@4.17.2:
version "4.17.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.17.2.tgz#c18369f265297319beed4e5558753cc8c1364cb3"
integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==
dependencies:
accepts "~1.3.7"
array-flatten "1.1.1"
body-parser "1.19.1"
content-disposition "0.5.4"
content-type "~1.0.4"
cookie "0.4.1"
cookie-signature "1.0.6"
debug "2.6.9"
depd "~1.1.2"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
finalhandler "~1.1.2"
fresh "0.5.2"
merge-descriptors "1.0.1"
methods "~1.1.2"
on-finished "~2.3.0"
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.7"
qs "6.9.6"
range-parser "~1.2.1"
safe-buffer "5.2.1"
send "0.17.2"
serve-static "1.14.2"
setprototypeof "1.2.0"
statuses "~1.5.0"
type-is "~1.6.18"
utils-merge "1.0.1"
vary "~1.1.2"
express@4.17.3, express@^4.16.4, express@^4.17.2:
version "4.17.3"
resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1"
@ -6380,25 +6259,25 @@ grunt@1.4.1:
nopt "~3.0.6"
rimraf "~3.0.2"
gscan@4.22.0:
version "4.22.0"
resolved "https://registry.yarnpkg.com/gscan/-/gscan-4.22.0.tgz#9f7996ea0c18caa6ba234148145223a64b40cd46"
integrity sha512-IhAoNL8089XT5HY0synqeadpfdLpZnI062drPID+qfhE7GSSh/N5SNv3naB3iP5L2Gt77mIplf21BTylUvqSpw==
gscan@4.24.0:
version "4.24.0"
resolved "https://registry.yarnpkg.com/gscan/-/gscan-4.24.0.tgz#0fb550d5b94903640c0f8ef63ef1822a6efba5f9"
integrity sha512-fJ4LCj9C0kxSA6CTLv3qUSXHV8XXCtCFyhNTRuusJoZUmUrkyE+DRuJLAUb77fyjrT9vXN/lYWOgD6zEdxxQVw==
dependencies:
"@sentry/node" "6.16.1"
"@sentry/node" "6.19.1"
"@tryghost/config" "0.2.2"
"@tryghost/debug" "0.1.10"
"@tryghost/debug" "0.1.11"
"@tryghost/ignition-errors" "0.1.8"
"@tryghost/logging" "2.0.1"
"@tryghost/pretty-cli" "1.2.22"
"@tryghost/logging" "2.0.4"
"@tryghost/pretty-cli" "1.2.24"
"@tryghost/server" "0.1.4"
"@tryghost/zip" "1.1.18"
"@tryghost/zip" "1.1.20"
bluebird "3.7.2"
chalk "4.1.2"
common-tags "1.8.2"
express "4.17.2"
express "4.17.3"
express-hbs "2.4.0"
fs-extra "9.1.0"
fs-extra "10.0.1"
glob "7.2.0"
lodash "4.17.21"
multer "1.4.4"
@ -10390,11 +10269,6 @@ qs@6.9.3:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e"
integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw==
qs@6.9.6:
version "6.9.6"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"
integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==
qs@6.9.7:
version "6.9.7"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe"
@ -10453,16 +10327,6 @@ range-parser@~1.2.1:
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
raw-body@2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32"
integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==
dependencies:
bytes "3.1.1"
http-errors "1.8.1"
iconv-lite "0.4.24"
unpipe "1.0.0"
raw-body@2.4.3, raw-body@^2.2.0:
version "2.4.3"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c"