@antora/redirect-producer
Advanced tools
Comparing version 3.2.0-alpha.4 to 3.2.0-alpha.5
'use strict' | ||
const File = require('vinyl') | ||
const { posix: path } = require('path') | ||
const { posix: path } = require('node:path') | ||
@@ -36,3 +36,7 @@ const ENCODED_SPACE_RX = /%20/g | ||
if ('findBy' in aliases) aliases = aliases.findBy({ family: 'alias' }) // @deprecated remove in Antora 4 | ||
if (!aliases.length) return [] | ||
aliases = aliases.filter((it) => { | ||
if (it.pub.url !== it.rel.pub.url) return true | ||
delete it.out | ||
}) | ||
if (!aliases.length) return aliases | ||
const siteUrl = playbook.site.url | ||
@@ -50,6 +54,3 @@ const directoryRedirects = (playbook.urls.htmlExtensionStyle || 'default') !== 'default' | ||
case 'static': | ||
return populateStaticRedirectFiles( | ||
aliases.filter((it) => it.out), | ||
siteUrl | ||
) | ||
return populateStaticRedirectFiles(aliases, siteUrl) | ||
default: | ||
@@ -131,3 +132,3 @@ return unpublish(aliases) | ||
function populateStaticRedirectFiles (files, siteUrl) { | ||
files.forEach((file) => (file.contents = Buffer.from(createStaticRedirectContents(file, siteUrl) + '\n'))) | ||
files.forEach((file) => file.out && (file.contents = Buffer.from(createStaticRedirectContents(file, siteUrl) + '\n'))) | ||
return [] | ||
@@ -134,0 +135,0 @@ } |
{ | ||
"name": "@antora/redirect-producer", | ||
"version": "3.2.0-alpha.4", | ||
"version": "3.2.0-alpha.5", | ||
"description": "Produces redirects (HTTP redirections) for pages in an Antora site.", | ||
@@ -22,6 +22,6 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"vinyl": "~2.2" | ||
"vinyl": "~3.0" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10204
174
+ Addedbare-events@2.5.0(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addedqueue-tick@1.0.1(transitive)
+ Addedreplace-ext@2.0.0(transitive)
+ Addedstreamx@2.20.2(transitive)
+ Addedteex@1.0.1(transitive)
+ Addedtext-decoder@1.2.1(transitive)
+ Addedvinyl@3.0.0(transitive)
- Removedclone-buffer@1.0.0(transitive)
- Removedcloneable-readable@1.1.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedreplace-ext@1.0.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvinyl@2.2.1(transitive)
Updatedvinyl@~3.0