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

@antora/navigation-builder

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/navigation-builder - npm Package Compare versions

Comparing version 2.3.0-alpha.1 to 2.3.0-alpha.2

16

lib/navigation-catalog.js
'use strict'
const $sets = Symbol('sets')
const $generateId = Symbol('generateId')

@@ -12,4 +11,4 @@ class NavigationCatalog {

addTree (component, version, tree) {
const id = this[$generateId](component, version)
const navigation = this[$sets][id] || (this[$sets][id] = [])
const key = generateKey(component, version)
const navigation = this[$sets][key] || (this[$sets][key] = [])
// NOTE retain order on insert

@@ -22,15 +21,14 @@ const insertIdx = navigation.findIndex((candidate) => candidate.order >= tree.order)

addNavigation (component, version, trees) {
return (this[$sets][this[$generateId](component, version)] = trees.sort((a, b) => a.order - b.order))
return (this[$sets][generateKey(component, version)] = trees.sort((a, b) => a.order - b.order))
}
getNavigation (component, version) {
const id = this[$generateId](component, version)
return this[$sets][id]
return this[$sets][generateKey(component, version)]
}
}
[$generateId] (component, version) {
return version + '@' + component
}
function generateKey (component, version) {
return version + '@' + component
}
module.exports = NavigationCatalog
{
"name": "@antora/navigation-builder",
"version": "2.3.0-alpha.1",
"version": "2.3.0-alpha.2",
"description": "Builds a navigation catalog from navigation files for adding site navigation to pages in an Antora documentation pipeline.",

@@ -18,3 +18,3 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/asciidoc-loader": "2.3.0-alpha.1"
"@antora/asciidoc-loader": "2.3.0-alpha.2"
},

@@ -21,0 +21,0 @@ "engines": {

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