Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antora/redirect-producer

Package Overview
Dependencies
Maintainers
0
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/redirect-producer - npm Package Compare versions

Comparing version 3.2.0-alpha.4 to 3.2.0-alpha.5

15

lib/produce-redirects.js
'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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc