remove remnants of the disk-based redirects cache file (#31445)

This commit is contained in:
Peter Bengtsson 2022-10-05 18:51:14 +02:00 коммит произвёл GitHub
Родитель 596a79bafb
Коммит 8b1fb6ec2a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 4 добавлений и 27 удалений

5
.gitignore поставляемый
Просмотреть файл

@ -19,10 +19,9 @@ coverage/
blc_output.log blc_output.log
blc_output_internal.log blc_output_internal.log
broken_links.md broken_links.md
lib/redirects/.redirects-cache.json
# This one is purely for historical reasons because so many people might # This one is purely for historical reasons because so many people might
# still have thes files on their disk. # still have these files on their disk.
lib/redirects/.redirects-cache_*.json lib/redirects/.redirects-cache*.json
# During the preview deploy untrusted user code may be cloned into this directory # During the preview deploy untrusted user code may be cloned into this directory
# We ignore it from git to keep things deterministic # We ignore it from git to keep things deterministic

Просмотреть файл

@ -1,8 +1,3 @@
# Redirects are cached in 'lib/redirects/.redirects-cache.json'. If changes made here are not being reflected
# on your local server, delete the cache file by running the following command, then restart your server.
#
# rm lib/redirects/.redirects-cache.json
# These urls are exceptions to the versionless redirect fallbacks (described in lib/all-versions.js). # These urls are exceptions to the versionless redirect fallbacks (described in lib/all-versions.js).
# See the comment in lib/redirects/precompile.js for an explanation of these exceptions. # See the comment in lib/redirects/precompile.js for an explanation of these exceptions.
# Originally shipped in pull #20947 on 10/15/21 # Originally shipped in pull #20947 on 10/15/21

Просмотреть файл

@ -155,18 +155,6 @@ async function main(opts, nameTuple) {
) )
} }
} }
const redirectsCachingFile = 'lib/redirects/.redirects-cache.json'
if (fs.existsSync(redirectsCachingFile)) {
fs.unlinkSync(redirectsCachingFile)
if (verbose) {
console.log(
chalk.yellow(
`Deleted the redirects caching file ${redirectsCachingFile} to stale cache in local server testing.`
)
)
}
}
} }
function validateFileInputs(oldPath, newPath, isFolder) { function validateFileInputs(oldPath, newPath, isFolder) {

5
tests/fixtures/versionless-redirects.txt поставляемый
Просмотреть файл

@ -1,8 +1,3 @@
# Redirects are cached in 'lib/redirects/.redirects-cache.json'. If changes made here are not being reflected
# on your local server, delete the cache file by running the following command, then restart your server.
#
# rm lib/redirects/.redirects-cache.json
# These urls went from being free-pro-team, but are now versioned for more than one enterprise version and enterprise-cloud # These urls went from being free-pro-team, but are now versioned for more than one enterprise version and enterprise-cloud
# Shipped in pull #20947 on 10/15/21 # Shipped in pull #20947 on 10/15/21