🐛 Fixed gscan path issues on windows

issue https://github.com/TryGhost/Team/issues/901

- The main issue was in the AST linter, where partials could have either forward- or backward-slash separators depending on the operating system. We have normalized all partial names to only have forward-slashes, which matches the handlebars syntax, like `{{> icons/avatar}}`.
- The second issue was in the 005-template-compile, where we wouldn't check partials even though they were used. This also comes from the path separator difference.
- We have also updated all regular expressions to account for paths with backward-slashes
This commit is contained in:
Thibaut Patel 2021-07-19 18:17:17 +02:00
parent ab4694db47
commit 8425fb480d
2 changed files with 6 additions and 74 deletions

View File

@ -115,7 +115,7 @@
"ghost-storage-base": "0.0.4",
"glob": "7.1.7",
"got": "9.6.0",
"gscan": "4.1.2",
"gscan": "4.1.3",
"html-to-text": "5.1.1",
"image-size": "1.0.0",
"intl": "1.2.5",

View File

@ -367,17 +367,6 @@
component-type "^1.2.1"
join-component "^1.1.0"
"@sentry/core@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.8.0.tgz#bfac76844deee9126460c18dc6166015992efdc3"
integrity sha512-vJzWt/znEB+JqVwtwfjkRrAYRN+ep+l070Ti8GhJnvwU4IDtVlV3T/jVNrj6rl6UChcczaJQMxVxtG5x0crlAA==
dependencies:
"@sentry/hub" "6.8.0"
"@sentry/minimal" "6.8.0"
"@sentry/types" "6.8.0"
"@sentry/utils" "6.8.0"
tslib "^1.9.3"
"@sentry/core@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.9.0.tgz#43b25290f3b1eb2c23f665e1c0fcbadd06d06012"
@ -389,15 +378,6 @@
"@sentry/utils" "6.9.0"
tslib "^1.9.3"
"@sentry/hub@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.8.0.tgz#cb0f8509093919ed3c1ef98ef8cf63dc102a6524"
integrity sha512-hFrI2Ss1fTov7CH64FJpigqRxH7YvSnGeqxT9Jc1BL7nzW/vgCK+Oh2mOZbosTcrzoDv+lE8ViOnSN3w/fo+rg==
dependencies:
"@sentry/types" "6.8.0"
"@sentry/utils" "6.8.0"
tslib "^1.9.3"
"@sentry/hub@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.9.0.tgz#21068e12769cc745825e8d122c7e81858f609708"
@ -407,15 +387,6 @@
"@sentry/utils" "6.9.0"
tslib "^1.9.3"
"@sentry/minimal@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.8.0.tgz#d6c3e4c96f231367aeb2b8a87a83b53d28e7c6db"
integrity sha512-MRxUKXiiYwKjp8mOQMpTpEuIby1Jh3zRTU0cmGZtfsZ38BC1JOle8xlwC4FdtOH+VvjSYnPBMya5lgNHNPUJDQ==
dependencies:
"@sentry/hub" "6.8.0"
"@sentry/types" "6.8.0"
tslib "^1.9.3"
"@sentry/minimal@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.9.0.tgz#e6201eb237753994be83ec33866e3fdae9a79bf3"
@ -425,21 +396,6 @@
"@sentry/types" "6.9.0"
tslib "^1.9.3"
"@sentry/node@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.8.0.tgz#d39b45c2b9d33c0cf8859da70d08e25ae58c7dbc"
integrity sha512-DPUtDd1rRbDJys+aZdQTScKy2Xxo4m8iSQPxzfwFROsLmzE7XhDoriDwM+l1BpiZYIhxUU2TLxDyVzmdc/TMAw==
dependencies:
"@sentry/core" "6.8.0"
"@sentry/hub" "6.8.0"
"@sentry/tracing" "6.8.0"
"@sentry/types" "6.8.0"
"@sentry/utils" "6.8.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/node@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.9.0.tgz#653c4386a1984b208eb0ff41379b33d178cbe731"
@ -455,17 +411,6 @@
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/tracing@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.8.0.tgz#5baa4f2e66cd2e6851c213213017850f67e65f4b"
integrity sha512-3gDkQnmOuOjHz5rY7BOatLEUksANU3efR8wuBa2ujsPQvoLSLFuyZpRjPPsxuUHQOqAYIbSNAoDloXECvQeHjw==
dependencies:
"@sentry/hub" "6.8.0"
"@sentry/minimal" "6.8.0"
"@sentry/types" "6.8.0"
"@sentry/utils" "6.8.0"
tslib "^1.9.3"
"@sentry/tracing@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.9.0.tgz#5dff993af253ee31e62c5f84ab21b008df7d0841"
@ -477,24 +422,11 @@
"@sentry/utils" "6.9.0"
tslib "^1.9.3"
"@sentry/types@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.8.0.tgz#97fd531a0ed1e75e65b4a24b26509fb7c15eb7b8"
integrity sha512-PbSxqlh6Fd5thNU5f8EVYBVvX+G7XdPA+ThNb2QvSK8yv3rIf0McHTyF6sIebgJ38OYN7ZFK7vvhC/RgSAfYTA==
"@sentry/types@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.9.0.tgz#ef1a541c4240df6a7c6f5f31d7cdddd7d92c15f1"
integrity sha512-v52HJqLoLapEnqS2NdVtUXPvT+aezQgNXQkp8hiQ3RUdTm5cffwBVG7wlbpE6OsOOIZxd6p1zKylFkwCypiIIA==
"@sentry/utils@6.8.0":
version "6.8.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.8.0.tgz#0ffafa5b69fe0cdeabad5c4a6cc68a426eaa6b37"
integrity sha512-OYlI2JNrcWKMdvYbWNdQwR4QBVv2V0y5wK0U6f53nArv6RsyO5TzwRu5rMVSIZofUUqjoE5hl27jqnR+vpUrsA==
dependencies:
"@sentry/types" "6.8.0"
tslib "^1.9.3"
"@sentry/utils@6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.9.0.tgz#6bf0bf290a6d37a27078b7c1331a06d8a7e313c5"
@ -4755,12 +4687,12 @@ grunt@1.4.1:
nopt "~3.0.6"
rimraf "~3.0.2"
gscan@4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/gscan/-/gscan-4.1.2.tgz#3eea1871bf8508fde6cac61943246a5161730a46"
integrity sha512-h5wLwblg9e0lfCRjIhUhMjHQrj9B3FRNLcHyrrq+taxfF/+xaTXwfn3JWBRPO39DuosFY4nmcNEpj30RV/OH7A==
gscan@4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/gscan/-/gscan-4.1.3.tgz#7b345b25205c5c6ff72579e9447a362cc8b525fe"
integrity sha512-eMRSWws8cyD4V1ZgOYI0sbsF1F3LxIig32XcknBkyCvQw+S+dkkgBJDEfOZ5+4JMqzDX2+R0/AsFDymzKRBDeg==
dependencies:
"@sentry/node" "6.8.0"
"@sentry/node" "6.9.0"
"@tryghost/pretty-cli" "1.2.18"
"@tryghost/zip" "1.1.12"
bluebird "3.7.2"