@antora/asciidoc-loader
Advanced tools
Comparing version 3.0.0-alpha.8 to 3.0.0-alpha.9
@@ -13,3 +13,3 @@ 'use strict' | ||
* | ||
* @param {Asciidoctor} asciidoctor - Asciidoctor API. | ||
* @param {Asciidoctor} Asciidoctor - Asciidoctor API. | ||
* @param {Object} callbacks - Callback functions. | ||
@@ -20,4 +20,4 @@ * @param {Function} callbacks.onInclude - A function that resolves the target of an include. | ||
*/ | ||
function createExtensionRegistry (asciidoctor, callbacks) { | ||
const registry = asciidoctor.Extensions.create() | ||
function createExtensionRegistry (Asciidoctor, callbacks) { | ||
const registry = Asciidoctor.Extensions.create() | ||
registry.includeProcessor(IncludeProcessor.$new(callbacks.onInclude)) | ||
@@ -24,0 +24,0 @@ return registry |
'use strict' | ||
const asciidoctor = require('@asciidoctor/core')() | ||
const Asciidoctor = require('@asciidoctor/core')() | ||
const { Extensions, LoggerManager, NullLogger } = Asciidoctor | ||
const Opal = global.Opal | ||
const Extensions = asciidoctor.Extensions | ||
const createConverter = require('./converter/create') | ||
@@ -57,3 +57,3 @@ const createExtensionRegistry = require('./create-extension-registry') | ||
) | ||
const extensionRegistry = createExtensionRegistry(asciidoctor, { | ||
const extensionRegistry = createExtensionRegistry(Asciidoctor, { | ||
onInclude: contentCatalog | ||
@@ -64,5 +64,5 @@ ? (doc, target, cursor) => resolveIncludeFile(target, file, cursor, contentCatalog) | ||
const extensions = config.extensions || [] | ||
LoggerManager.setLogger(LoggerAdapter.logger.noop ? NullLogger.$new() : LoggerAdapter.$new(file.src)) | ||
if (extensions.length) extensions.forEach((ext) => ext.register(extensionRegistry, { file, contentCatalog, config })) | ||
const loggerAdapter = LoggerAdapter.logger.noop ? false : LoggerAdapter.$new(file.src) | ||
const opts = { attributes, extension_registry: extensionRegistry, safe: 'safe', logger: loggerAdapter } | ||
const opts = { attributes, extension_registry: extensionRegistry, safe: 'safe' } | ||
if (config.doctype) opts.doctype = config.doctype | ||
@@ -83,3 +83,3 @@ if (config.sourcemap) opts.sourcemap = true | ||
} | ||
const doc = asciidoctor.load(contents.toString(), opts) | ||
const doc = Asciidoctor.load(contents.toString(), opts) | ||
if (extensions.length) freeExtensions() | ||
@@ -86,0 +86,0 @@ return doc |
@@ -33,4 +33,4 @@ 'use strict' | ||
const delegate = logger.unwrap() | ||
this.level = severityMap.get(delegate.level) || severityMap.get('info') | ||
this.failureLevel = severityMap.get(delegate.failureLevel) || Infinity | ||
if ((this.level = severityMap.get(delegate.level)) == null) this.level = severityMap.get('info') | ||
if ((this.failureLevel = severityMap.get(delegate.failureLevel)) == null) this.failureLevel = Infinity | ||
this.context = context | ||
@@ -37,0 +37,0 @@ this.delegate = delegate |
{ | ||
"name": "@antora/asciidoc-loader", | ||
"version": "3.0.0-alpha.8", | ||
"version": "3.0.0-alpha.9", | ||
"description": "Loads AsciiDoc content into an Asciidoctor Document object (AST) for use in an Antora documentation pipeline.", | ||
@@ -20,3 +20,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/logger": "3.0.0-alpha.8", | ||
"@antora/logger": "3.0.0-alpha.9", | ||
"@antora/user-require-helper": "~2.0", | ||
@@ -40,3 +40,3 @@ "@asciidoctor/core": "~2.2" | ||
], | ||
"gitHead": "2e5695bea11fb5719989c329c97e66d36e29659f" | ||
"gitHead": "a504d6889819b548e8a5416a7194cbb6f9a93e93" | ||
} |
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
54177
+ Added@antora/logger@3.0.0-alpha.9(transitive)
+ Addedcolorette@1.4.0(transitive)
+ Addedpino@6.13.4(transitive)
+ Addedpino-pretty@6.0.0(transitive)
+ Addedprocess-warning@1.0.0(transitive)
+ Addedsonic-boom@2.1.0(transitive)
- Removed@antora/logger@3.0.0-alpha.8(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedpino@6.11.3(transitive)
- Removedpino-pretty@5.1.3(transitive)
- Removedsupports-color@7.2.0(transitive)
Updated@antora/logger@3.0.0-alpha.9