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

@antora/asciidoc-loader

Package Overview
Dependencies
Maintainers
2
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/asciidoc-loader - npm Package Compare versions

Comparing version 3.0.0-alpha.7 to 3.0.0-alpha.8

16

lib/load-asciidoc.js

@@ -9,9 +9,8 @@ 'use strict'

const LoggerAdapter = require('./logger/adapter')
const ospath = require('path')
const { posix: path } = ospath
const { posix: path } = require('path')
const resolveIncludeFile = require('./include/resolve-include-file')
const userRequire = require('@antora/user-require-helper')
const BLANK_LINE_BUF = Buffer.from('\n\n')
const DOCTITLE_MARKER_BUF = Buffer.from('= ')
const DOT_RELATIVE_RX = new RegExp(`^\\.{1,2}[/${ospath.sep.replace('/', '').replace('\\', '\\\\')}]`)
const { EXAMPLES_DIR_TOKEN, PARTIALS_DIR_TOKEN } = require('./constants')

@@ -174,12 +173,5 @@ const EXTENSION_DSL_TYPES = Extensions.$constants(false).filter((name) => name.endsWith('Dsl'))

if (extensions && extensions.length) {
const userRequireContext = { dot: playbook.dir, paths: [playbook.dir || '', __dirname] }
const scopedExtensions = extensions.reduce((accum, extensionPath) => {
if (extensionPath.charAt() === '.' && DOT_RELATIVE_RX.test(extensionPath)) {
// NOTE require resolves a dot-relative path relative to current file; resolve relative to playbook dir instead
extensionPath = ospath.resolve(playbook.dir || '.', extensionPath)
} else if (!ospath.isAbsolute(extensionPath)) {
// NOTE appending node_modules prevents require from looking elsewhere before looking in these paths
const paths = [playbook.dir || '.', ospath.dirname(__dirname)].map((root) => ospath.join(root, 'node_modules'))
extensionPath = require.resolve(extensionPath, { paths })
}
const extension = require(extensionPath)
const extension = userRequire(extensionPath, userRequireContext)
if ('register' in extension) {

@@ -186,0 +178,0 @@ accum.push(extension)

{
"name": "@antora/asciidoc-loader",
"version": "3.0.0-alpha.7",
"version": "3.0.0-alpha.8",
"description": "Loads AsciiDoc content into an Asciidoctor Document object (AST) for use in an Antora documentation pipeline.",

@@ -20,3 +20,4 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/logger": "3.0.0-alpha.7",
"@antora/logger": "3.0.0-alpha.8",
"@antora/user-require-helper": "~2.0",
"@asciidoctor/core": "~2.2"

@@ -39,3 +40,3 @@ },

],
"gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0"
"gitHead": "2e5695bea11fb5719989c329c97e66d36e29659f"
}
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