From 1eb152f2871ead25800d265a6aed05fbfc97ca75 Mon Sep 17 00:00:00 2001 From: Andreas Martin <6525873+about-code@users.noreply.github.com> Date: Sun, 6 Dec 2020 22:33:00 +0100 Subject: [PATCH] Conf schema upgrade and upgrade assistant (#128) BREAKING CHANGE: Option `linking` has become `linking.paths`. Option `baseUrl` has become `linking.baseUrl`. An upgrade assistant will help with the migration. From this version on configuration files must refer to a schema by means of a versioned path. This helps the upgrade assistant in future releases to find out what changes need to be applied to upgrade from an old schema. * test: Upgrade test configurations to v5 schema. * test: New baseline. --- bin/index.js | 108 ++++--- conf.schema.json | 37 ++- conf/v5/schema.json | 269 ++++++++++++++++++ doc/templates/README.md | 34 ++- lib/cli/upgrade.js | 74 +++++ lib/path/tools.js | 7 +- lib/writer.js | 12 +- package-lock.json | 188 +++++++++++- package.json | 1 + .../glossarify-md.conf.json | 42 +-- .../config-baseUrl/glossarify-md.conf.json | 47 +-- .../arg-deep/glossarify-md.conf.json | 27 +- .../arg-shallow/glossarify-md.conf.json | 27 +- .../deep-defaults/glossarify-md.conf.json | 29 +- .../glossarify-md.conf.json | 46 +-- .../default/glossarify-md.conf.json | 89 ++++-- .../sort-default/glossarify-md.conf.json | 43 +-- .../glossarify-md.conf.json | 47 +-- .../sort-i18n-de/glossarify-md.conf.json | 44 +-- .../glossarify-md.conf.json | 39 +-- .../glossarify-md.conf.json | 39 +-- .../config-title/glossarify-md.conf.json | 46 +-- .../glossarify-md.conf.json | 47 +-- .../index-in-subdir/glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 49 ++-- .../glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../absolute-baseUrl/glossarify-md.conf.json | 45 +-- .../relative/glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 2 +- .../config-listOf/glossarify-md.conf.json | 81 ++++-- .../image-reference/glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 53 ++-- .../glossarify-md.conf.json | 52 ++-- .../false/glossarify-md.conf.json | 41 +-- .../true/glossarify-md.conf.json | 41 +-- test/input/copy-files/glossarify-md.conf.json | 40 +-- .../glossarify-md.conf.json | 42 +-- .../glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 40 +-- test/input/markdown/glossarify-md.conf.json | 42 +-- .../glossarify-md.conf.json | 42 +-- .../term-descriptions/glossarify-md.conf.json | 42 +-- .../glossarify-md.conf.json | 42 +-- .../config-baseUrl/glossarify-md.conf.json | 47 +-- .../arg-deep/glossarify-md.conf.json | 27 +- .../config-cli/arg-shallow/document.md | 2 +- .../arg-shallow/glossarify-md.conf.json | 27 +- .../glossarify-md-effective.conf.json | 9 +- .../deep-defaults/glossarify-md.conf.json | 29 +- .../glossarify-md.conf.json | 46 +-- .../default/glossarify-md.conf.json | 89 ++++-- .../sort-default/glossarify-md.conf.json | 43 +-- .../glossarify-md.conf.json | 47 +-- .../sort-i18n-de/glossarify-md.conf.json | 44 +-- .../glossarify-md.conf.json | 39 +-- .../glossarify-md.conf.json | 39 +-- .../config-title/glossarify-md.conf.json | 46 +-- .../glossarify-md.conf.json | 47 +-- .../index-in-subdir/glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 49 ++-- .../glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../glossarify-md.conf.json | 54 ++-- .../absolute-baseUrl/glossarify-md.conf.json | 45 +-- .../relative/glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 2 +- .../config-listOf/glossarify-md.conf.json | 81 ++++-- .../image-reference/glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 45 +-- .../glossarify-md.conf.json | 53 ++-- .../glossarify-md.conf.json | 52 ++-- .../false/glossarify-md.conf.json | 41 +-- .../true/glossarify-md.conf.json | 41 +-- .../copy-files/glossarify-md.conf.json | 40 +-- .../glossarify-md.conf.json | 42 +-- .../glossarify-md.conf.json | 47 +-- .../glossarify-md.conf.json | 40 +-- .../markdown/glossarify-md.conf.json | 42 +-- .../glossarify-md.conf.json | 42 +-- .../term-descriptions/glossarify-md.conf.json | 42 +-- 89 files changed, 2789 insertions(+), 1474 deletions(-) create mode 100644 conf/v5/schema.json create mode 100644 lib/cli/upgrade.js diff --git a/bin/index.js b/bin/index.js index c6dcb392..235d4d8e 100755 --- a/bin/index.js +++ b/bin/index.js @@ -5,10 +5,10 @@ const fs = require("fs-extra"); const path = require("path"); const proc = require("process"); const program = require("../lib/main"); -const confSchema = require("../conf.schema.json").properties; -const {NO_BASEDIR, NO_OUTDIR, OUTDIR_IS_BASEDIR, OUTDIR_NOT_DELETED, OUTDIR_IS_BASEDIR_WITH_DROP} = require("../lib/cli/messages"); +const upgrade = require("../lib/cli/upgrade"); +const confSchema = require("../conf/v5/schema.json").properties; +const {NO_BASEDIR, NO_OUTDIR, OUTDIR_IS_BASEDIR, OUTDIR_IS_BASEDIR_WITH_DROP} = require("../lib/cli/messages"); const {version} = require("../package.json"); - const CWD = proc.cwd(); const banner = `┌──────────────────────────┐ @@ -64,12 +64,16 @@ if (argv.help || proc.argv.length === 2) { // --config let confDir = ""; let confPath = argv.config || ""; -let optsFile = {}; +let confData = {}; +let optsPromise = Promise.resolve({}); if (confPath) { try { confPath = path.resolve(CWD, confPath); confDir = path.dirname(confPath); - optsFile = JSON.parse(fs.readFileSync(confPath)); + confData = JSON.parse(fs.readFileSync(confPath)); + if (!argv.noupgrade) { + optsPromise = upgrade(confData, confPath); + } } catch (e) { console.error(`Failed to read config '${confPath}'.\nReason:\n ${e.message}\n`); proc.exit(1); @@ -78,65 +82,55 @@ if (confPath) { confDir = CWD; } -const optsDefault = Object - .keys(confSchema) - .reduce((obj, key) => { - obj[key] = confSchema[key].default; - return obj; - }, {}); - -let opts = optsFile; +optsPromise.then((opts) => { -// --deep -if (argv.deep) { - try { - opts = merge(opts, JSON.parse(argv.deep.replace(/'/g, "\""))); - } catch (e) { - console.error(`Failed to parse value for --deep.\nReason:\n ${e.message}\n`); - proc.exit(1); - } -} -// --shallow -if (argv.shallow) { - try { - opts = Object.assign(opts, JSON.parse(argv.shallow.replace(/'/g, "\""))); - } catch (e) { - console.error(`Failed to parse value for --shallow.\nReason:\n ${e.message}\n`); - proc.exit(1); + // --deep custum opts + if (argv.deep) { + try { + opts = merge(opts, JSON.parse(argv.deep.replace(/'/g, "\""))); + } catch (e) { + console.error(`Failed to parse value for --deep.\nReason:\n ${e.message}\n`); + proc.exit(1); + } } -} -opts = merge(optsDefault, opts, { - clone: false - , arrayMerge: (_default, curOpts) => { - return curOpts && curOpts.length > 0 ? curOpts : _default; + // --shallow custom opts + if (argv.shallow) { + try { + opts = Object.assign(opts, JSON.parse(argv.shallow.replace(/'/g, "\""))); + } catch (e) { + console.error(`Failed to parse value for --shallow.\nReason:\n ${e.message}\n`); + proc.exit(1); + } } -}); - -// --init -if (argv.init) { - console.log(JSON.stringify(opts, null, 2)); - proc.exit(0); -} - -// Resolve 2nd arg paths relative to 1st arg paths... -opts.baseDir = path.resolve(confDir, opts.baseDir); -opts.outDir = path.resolve(opts.baseDir, opts.outDir); - -validateOpts(opts); + // Merge custom opts with default opts + const optsDefault = Object.keys(confSchema).reduce((obj, key) => { + obj[key] = confSchema[key].default; + return obj; + }, {}); + opts = merge(optsDefault, opts, { + clone: false + , arrayMerge: (_default, curOpts) => { + return curOpts && curOpts.length > 0 ? curOpts : _default; + } + }); -// _/ Drop old stuff \__________________________________________________________ -if (opts.outDirDropOld) { - try { - fs.removeSync(opts.outDir); - } catch (err) { - console.log(OUTDIR_NOT_DELETED,` Reason: ${err.code} - `); + // --init + if (argv.init) { + console.log(JSON.stringify(opts, null, 2)); + proc.exit(0); } -} + // Resolve baseDir relative to confDir and outDir relative to baseDir + opts.baseDir = path.resolve(confDir, opts.baseDir); + opts.outDir = path.resolve(opts.baseDir, opts.outDir); + validateOpts(opts); -// _/ Run \_____________________________________________________________________ -program.run(opts); + // _/ Run \_____________________________________________________________________ + program.run(opts); +}).catch(error => { + console.error(error); + proc.exit(1); +}); // _/ Helpers \_________________________________________________________________ function validateOpts(conf) { diff --git a/conf.schema.json b/conf.schema.json index 9e242725..b07064e0 100644 --- a/conf.schema.json +++ b/conf.schema.json @@ -1,23 +1,17 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/about-code/glossarify-md/v5.0.0/conf.schema.json", + "$id": "https://raw.githubusercontent.com/about-code/glossarify-md/v5.0.0/conf/v5/schema.json", "type": "object", "properties": { "$schema": { "type": "string", - "default": "./node_modules/glossarify-md/conf.schema.json" + "default": "./node_modules/glossarify-md/conf/v5/schema.json" }, "baseDir": { "description": "Path to directory where to search for the glossary file and markdown files. All paths in a config file will be relative to *baseDir*. *baseDir* itself is relative to the location of the config file or the current working directory when provided via command line.", "type": "string", "default": "./docs" }, - "baseUrl": { - "description": "The base url to use when creating absolute links to glossary.", - "type": "string", - "format": "url", - "default": "" - }, "excludeFiles": { "description": "An array of files or file name patterns that should not be included in any processing.", "type": "array", @@ -85,13 +79,12 @@ }, "linking": { "description": "Whether to use relative or absolute links. Choosing 'absolute' requires a 'baseUrl'.", - "oneOf": [{ - "$ref": "#/$defs/LinkingOpts" - },{ - "description": "Deprecated. Use linking: { \"paths\": \"...\" } with values \"relative\" or \"absolute\" instead.", - "$ref": "#/$defs/LinkPaths" - }], - "default": "relative" + "$ref": "#/$defs/LinkingOpts", + "default": { + "baseUrl": "", + "paths": "relative", + "terms": "all" + } }, "outDir": { "description": "Path to directory where to write processed files to.", @@ -228,17 +221,21 @@ "LinkingOpts": { "type": "object", "properties": { - "paths": { "$ref": "#/$defs/LinkPaths" }, + "baseUrl": { + "description": "The base url to use when creating absolute links to glossary.", + "type": "string", + "format": "url" + }, + "paths": { + "type": "string", + "enum": ["relative", "absolute"] + }, "terms": { "type": "string", "enum": ["all", "first-in-paragraph"] } } }, - "LinkPaths": { - "type": "string", - "enum": ["relative", "absolute"] - }, "DevOpts": { "type": "object", "properties": { diff --git a/conf/v5/schema.json b/conf/v5/schema.json new file mode 100644 index 00000000..b07064e0 --- /dev/null +++ b/conf/v5/schema.json @@ -0,0 +1,269 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://raw.githubusercontent.com/about-code/glossarify-md/v5.0.0/conf/v5/schema.json", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "default": "./node_modules/glossarify-md/conf/v5/schema.json" + }, + "baseDir": { + "description": "Path to directory where to search for the glossary file and markdown files. All paths in a config file will be relative to *baseDir*. *baseDir* itself is relative to the location of the config file or the current working directory when provided via command line.", + "type": "string", + "default": "./docs" + }, + "excludeFiles": { + "description": "An array of files or file name patterns that should not be included in any processing.", + "type": "array", + "items": { + "type": "string" + }, + "default": ["node_modules", ".git"] + }, + "force": { + "description": "Choose true, only if you know the consequences.", + "type": "boolean", + "default": false + }, + "generateFiles": { + "description": "File generation options.", + "$ref": "#/$defs/GenerateFilesOpts", + "default": { + "listOf": [] + } + }, + "glossaries": { + "description": "An array of glossaries. Allows for different kinds of glossaries and definitions.", + "type": "array", + "items": { + "$ref": "#/$defs/GlossariesOpts" + }, + "default": [ + { "file": "./glossary.md", "termHint": ""} + ] + }, + "ignoreCase": { + "description": "Find and link every occurrence of a term no matter how it is spelled.", + "type": "boolean", + "default": false + }, + "includeFiles": { + "description": "Path or glob patterns of files to include for linking to glossaries.", + "type": "array", + "items": { + "type": "string" + }, + "default": ["."] + }, + "indexing": { + "description": "Path or glob patterns of files to include for linking to glossaries.", + "$ref": "#/$defs/IndexingOpts", + "default": { + "groupByHeadingDepth": 6 + } + }, + "i18n": { + "description": "Internationalization and collation options. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator.", + "$ref": "#/$defs/IntlOpts", + "default": { + "locale": "en" + } + }, + "keepRawFiles": { + "description": "Glob patterns for (markdown) files to copy from 'baseDir' to 'outDir' but to ignore by the linker. Non-markdown files will be ignored anyways.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "linking": { + "description": "Whether to use relative or absolute links. Choosing 'absolute' requires a 'baseUrl'.", + "$ref": "#/$defs/LinkingOpts", + "default": { + "baseUrl": "", + "paths": "relative", + "terms": "all" + } + }, + "outDir": { + "description": "Path to directory where to write processed files to.", + "type": "string", + "default": "./docs-glossarified" + }, + "outDirDropOld": { + "description": "If true, remove old 'outDir' before creating a new one. Otherwise just overwrite old files. Default: true", + "type": "boolean", + "default": true + }, + "reportNotMentioned": { + "description": "Report on terms which exist in a glossary but have neither been mentioned directly nor with any of its aliases.", + "type": "boolean", + "default": false + }, + "dev": { + "descriptions": "Options for testing and debugging", + "$ref": "#/$defs/DevOpts", + "default": {} + } + }, + "$defs": { + "GenerateFilesOpts": { + "type": "object", + "properties": { + "indexFile": { + "description": "Generate a file with a list of glossary terms and where they have been used.", + "type": "object", + "$ref": "#/$defs/IndexFileOpts" + }, + "listOf": { + "description": "Generate an arbitrary list of links into your documents. For example, to generate a List of code samples configure a class 'listing' and add anchors before your sample code blocks.", + "type": "array", + "items": { + "$ref": "#/$defs/IndexFileOpts" + } + }, + "listOfFigures": { + "description": "Generate a file with a list of figures and where they can be found.", + "type": "object", + "$ref": "#/$defs/IndexFileOpts" + }, + "listOfTables": { + "description": "Generate a file with a list of tables and where they can be found.", + "type": "object", + "$ref": "#/$defs/IndexFileOpts" + } + } + }, + "GlossariesOpts": { + "type": "object", + "properties": { + "file": { + "description": "Name of the glossary file. Conventional default is 'glossary.md'", + "type": "string" + }, + "termHint": { + "description": "A symbol to append to a link to denote that the term refers to a glossary term.", + "type": "string" + }, + "sort": { + "description": "If present, sort terms in output glossary. Default: None. See also i18n options.", + "type": "string", + "enum": ["asc", "desc"] + } + } + }, + "IndexFileOpts": { + "type": "object", + "properties": { + "file": { + "description": "Path relative to 'outDir' where to create the index markdown file.", + "type": "string" + }, + "class": { + "description": "The class is used to compile lists of content elements. Elements with a common class will be compiled into the same list.", + "type": "string" + }, + "title": { + "description": "The page title for the index file. If missing the application uses a default value.", + "type": "string" + } + } + }, + "IndexingOpts": { + "type": "object", + "properties": { + "groupByHeadingDepth": { + "description": "Level of detail by which to group occurrences of terms or syntactic elements in generated files (Range [min, max]: [0, 6]). For example, use 0 to not group at all; 1 to group things at the level of document titles, etc. Configures the indexer. The option affects any files generated from the internal AST node index.", + "type": "number", + "minimum": 0, + "maximum": 6 + } + } + }, + "IntlOpts": { + "type": "object", + "properties": { + "caseFirst": { + "description": "Whether upper case or lower case should sort first. Default: 'false' (Use locale's default). See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "string", + "enum": ["upper", "lower", "false"] + }, + "ignorePunctuation": { + "description": "Whether punctuation should be ignored. Default: false. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "boolean" + }, + "locale": { + "description": "The locale to use for operations such as sorting. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "string" + }, + "localeMatcher": { + "description": "The locale matching algorithm to use. Default: 'best fit'. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "string", + "enum": ["best fit", "lookup"] + }, + "numeric": { + "description": "Whether to use numeric collation. Default: false. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "boolean" + }, + "sensitivity": { + "description": "Which differences in the strings should lead to non-zero result values. Default: 'variant' for sorts, locale dependent for searches. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "string", + "enum": ["base", "accent", "case", "variant"] + }, + "usage": { + "description": "Whether the comparison is for sorting or for searching for matching strings. Default: 'sort'. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator", + "type": "string", + "enum": ["sort", "search"] + } + } + }, + "LinkingOpts": { + "type": "object", + "properties": { + "baseUrl": { + "description": "The base url to use when creating absolute links to glossary.", + "type": "string", + "format": "url" + }, + "paths": { + "type": "string", + "enum": ["relative", "absolute"] + }, + "terms": { + "type": "string", + "enum": ["all", "first-in-paragraph"] + } + } + }, + "DevOpts": { + "type": "object", + "properties": { + "printInputAst": { + "description": "Print the AST of scanned markdown documents prior to linkification. May be a Regex to only print AST for particular document.", + "type": ["boolean", "string"] + }, + "printOutputAst": { + "description": "Print the AST of scanned markdown documents after linkification. May be a Regex to only print AST for particular document.", + "type": ["boolean", "string"] + }, + "reportsFile": { + "description": "File where to write console report output. Enables testing the report output generated by the 'writer' component.", + "type": "string" + }, + "reproducablePaths": { + "description": "Write system-independent paths into 'termsFile' to produce reproducable output accross environments.", + "type": "boolean" + }, + "termsFile": { + "description": "File where to write term book to. Enables testing the term extraction results of the 'terminator' component.", + "type": "string" + }, + "effectiveConfFile": { + "description": "File where to write the configuration that is applied effectively after merging config file, cli opts and schema defaults.", + "type": "string" + } + } + } + } +} diff --git a/doc/templates/README.md b/doc/templates/README.md index 0e33a6d9..99daba84 100644 --- a/doc/templates/README.md +++ b/doc/templates/README.md @@ -524,15 +524,6 @@ The term *support* refers to *runs on the given platform*. Compatibility is main Show all options and default values. -#### `baseUrl` - -- **Range:** `string` - -URL to prepend to links. Only effective with `linking: "absolute"`. -In most situations, e.g. when hosting markdown files in a repository or -processing markdown files with an MD to HTML converter omitting a pre-defined -`baseUrl` and using `linking: "relative"` is likely to work better. - #### `baseDir`` - **Range:** `string` @@ -637,14 +628,33 @@ Paths or Glob-Patterns for (markdown) files to copy to `outDir` but ignore in glossarification and linking. Non-markdown files will always be kept as is so no need to add those. -#### `linking` +#### `linking.paths` - **Range:** `"relative" | "absolute"` Whether to create absolute or relative link-urls to the glossary. -The use of `"absolute"` may require a `baseUrl`. +The use of `"absolute"` may require a `linking.baseUrl`. + +> **Important:** Using `"absolute"` without a `baseUrl` will produce an absolute file system path which you might not want to publish. + +#### `linking.baseUrl` + +- **Range:** `string` + +URL to prepend to links. Only effective with `linking.paths: "absolute"`. +In most situations, e.g. when hosting markdown files in a repository or +processing markdown files with an MD to HTML converter omitting a pre-defined +`baseUrl` and using `linking.paths: "relative"` is likely to work better. + +#### `linking.terms` + +> **Since v5.0.0** + +- **Range:** `"all" | "first-in-paragraph"` -> **Important:** Using `"absolute"` without a `"baseUrl"` will produce an absolute file system path which you might not want to publish. +By default every occurrence of a term will be linkified. Sometimes this can +result in too much links affecting readability. This option provides finer +control of linkify behavior. #### `outDir` diff --git a/lib/cli/upgrade.js b/lib/cli/upgrade.js new file mode 100644 index 00000000..80a4a454 --- /dev/null +++ b/lib/cli/upgrade.js @@ -0,0 +1,74 @@ +const {copy, writeFile} = require("fs-extra"); +const inquirer = require("inquirer"); +const LATEST_SCHEMA_VERSION = 5; + +function upgradeV4toV5(confData) { + if (typeof confData.linking === "string") { + confData.linking = { paths: confData.linking, terms: "all" }; + } + if (typeof confData.baseUrl === "string") { + confData.linking = Object.assign({}, confData.linking, { baseUrl: confData.baseUrl }); + delete confData.baseUrl; + } + if (confData.$schema) { + confData.$schema = confData.$schema.replace("conf.schema.json", "conf/v5/schema.json"); + } else { + confData.$schema = "https://raw.githubusercontent.com/about-code/glossarify-md/v5.0.0/conf/v5/schema.json"; + } + return confData; +} + +function performUpgrades(confData) { + const upgrades = [upgradeV4toV5]; + let upgradeFn; + for (upgradeFn of upgrades) { + confData = upgradeFn(confData); + } + return confData; +} + +function upgrade(confData, confFile) { + const confVersion = getConfVersion(confData); + if (confVersion >= LATEST_SCHEMA_VERSION) { + // config is up to date. + return Promise.resolve(confData); + } + return inquirer.prompt([{ + message: "Your configuration needs an upgrade. Keep a copy of the old version?" + ,type: "confirm" + ,name: "keepBackup" + ,required: true + ,default: "y" + }]).then((answers) => { + return new Promise((resolve, reject) => { + if (answers.keepBackup) { + const backupFile = confFile + ".old"; + copy(confFile, backupFile, (err) => { + if (err) { reject(err); } + console.info(`Backup of previous configuration in '${backupFile}'`); + }); + } + const newConf = performUpgrades(confData, confFile); + writeFile(confFile, JSON.stringify(newConf, null, 2), "utf-8", (err) => { + if (err) { reject(err); } + resolve(newConf); + }); + }); + }); +} + +function getConfVersion(confData) { + const schemaPath = confData.$schema; + if (schemaPath) { + const match = /^.*\/conf\/v(\d)\/schema.json/.exec(schemaPath); + if (match) { + return match[1]; + } + } + // no schema version given. Assume <= v4. This should likely trigger + // an error in the next major version. + return 4; +} + + +module.exports = upgrade; diff --git a/lib/path/tools.js b/lib/path/tools.js index f102b898..e1ec7ef7 100644 --- a/lib/path/tools.js +++ b/lib/path/tools.js @@ -114,7 +114,8 @@ api.toReproducablePath = function toReproducablePath(fullPath, redactString) { */ api.getFileLinkUrl = function getFileLinkUrl(context, pathFrom, pathTo, anchor) { const { relativeFromTo, toForwardSlash } = api; - const { outDir, baseUrl, linking } = context.opts; + const { outDir, linking } = context.opts; + const { baseUrl, paths } = linking; let targetUrl = ""; if (! anchor) { anchor = ""; @@ -122,7 +123,7 @@ api.getFileLinkUrl = function getFileLinkUrl(context, pathFrom, pathTo, anchor) if (anchor && anchor[0] !== "#") { anchor = `#${anchor}`; } - if (linking === "relative" || linking.paths === "relative") { + if (paths === "relative") { targetUrl = toForwardSlash( relativeFromTo( path.resolve(outDir, pathFrom || "."), @@ -135,7 +136,7 @@ api.getFileLinkUrl = function getFileLinkUrl(context, pathFrom, pathTo, anchor) } else { targetUrl += anchor; } - } else if (linking === "absolute") { + } else if (paths === "absolute") { if (baseUrl) { targetUrl = toForwardSlash(path.resolve(outDir, pathTo)) .replace(outDir, baseUrl) diff --git a/lib/writer.js b/lib/writer.js index ea4c7b84..3cb084e8 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -10,6 +10,7 @@ const remark_footnotes = require("remark-footnotes"); const remark_stringify = require("remark-stringify"); const {TermDefinition} = require("./ast/with/term-definition"); const {toSystemSlash, toReproducablePath} = require("./path/tools"); +const {OUTDIR_NOT_DELETED} = require("./cli/messages"); const {getIndex} = require("./indexer"); const {getAST: getIndexerAST} = require("./index/terms"); const {getAST: getListOfAnchorsAST} = require("./index/anchors"); @@ -24,10 +25,17 @@ const api = {}; * @returns {Promise} context */ api.copyBaseDirToOutDir = function(context) { - const {baseDir, outDir, excludeFiles} = context.opts; + const {baseDir, outDir, outDirDropOld, excludeFiles} = context.opts; if (baseDir === outDir) { return Promise.resolve(context); } + if (outDirDropOld) { + try { + fs.removeSync(outDir); + } catch (err) { + console.log(OUTDIR_NOT_DELETED,` Reason: ${err.code}\n`); + } + } const globOpts = { cwd: baseDir ,ignore: excludeFiles @@ -213,5 +221,5 @@ function writeTextFile(context, filename, strData) { // // [2]: Add newline at EOF. } - +api.writeTextFile = writeTextFile; module.exports = api; diff --git a/package-lock.json b/package-lock.json index 24323e57..f076580a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -131,6 +131,21 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" + } + } + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -304,6 +319,11 @@ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "chokidar": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", @@ -320,6 +340,19 @@ "readdirp": "~3.4.0" } }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -963,6 +996,16 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1521,6 +1564,14 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, "ignore": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.6.tgz", @@ -1575,6 +1626,71 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -1890,8 +2006,7 @@ "lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash._reinterpolate": { "version": "3.0.0", @@ -2089,6 +2204,11 @@ } } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -2139,6 +2259,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2203,6 +2328,14 @@ "wrappy": "1" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -2217,6 +2350,11 @@ "word-wrap": "^1.2.3" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -2755,6 +2893,15 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -2764,11 +2911,29 @@ "glob": "^7.1.3" } }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" + }, + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -2810,8 +2975,7 @@ "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, "slice-ansi": { "version": "2.1.0", @@ -3119,8 +3283,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { "version": "3.0.2", @@ -3132,6 +3295,14 @@ "readable-stream": "2 || 3" } }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3177,6 +3348,11 @@ "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==" }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 74ba5297..1959242b 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "fs-extra": "^9.0.1", "github-slugger": "^1.0.0", "glob": "^7.0.3", + "inquirer": "^7.3.3", "mdast-builder": "^1.1.1", "mdast-util-to-string": "^1.1.0", "minimist": "^1.2.5", diff --git a/test/input/aliases-and-synonyms/glossarify-md.conf.json b/test/input/aliases-and-synonyms/glossarify-md.conf.json index f2d2f8d1..a322fe7e 100644 --- a/test/input/aliases-and-synonyms/glossarify-md.conf.json +++ b/test/input/aliases-and-synonyms/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/aliases-and-synonyms", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/aliases-and-synonyms/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/aliases-and-synonyms", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/aliases-and-synonyms/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-baseUrl/glossarify-md.conf.json b/test/input/config-baseUrl/glossarify-md.conf.json index b40d8702..f3bf6068 100644 --- a/test/input/config-baseUrl/glossarify-md.conf.json +++ b/test/input/config-baseUrl/glossarify-md.conf.json @@ -1,20 +1,31 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "baseUrl": "http://example.org", - "linking": "absolute", - "outDir": "../../output-actual/config-baseUrl/", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": ""}, - { "file": "./sub-1/glossary.md", "termHint": ""} - ], - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/config-baseUrl/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "absolute", + "terms": "all", + "baseUrl": "http://example.org" + }, + "outDir": "../../output-actual/config-baseUrl/", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" + }, + { + "file": "./sub-1/glossary.md", + "termHint": "" } -} + ], + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/config-baseUrl/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-cli/arg-deep/glossarify-md.conf.json b/test/input/config-cli/arg-deep/glossarify-md.conf.json index 10b77fac..f8d6be82 100644 --- a/test/input/config-cli/arg-deep/glossarify-md.conf.json +++ b/test/input/config-cli/arg-deep/glossarify-md.conf.json @@ -1,11 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/arg-deep", - "includeFiles": ["."], - "glossaries": [ - { "file": "./glossary.md"} - ], - "linking": "relative" -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/arg-deep", + "includeFiles": [ + "." + ], + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + } +} \ No newline at end of file diff --git a/test/input/config-cli/arg-shallow/glossarify-md.conf.json b/test/input/config-cli/arg-shallow/glossarify-md.conf.json index 0e09fb7c..8536ca08 100644 --- a/test/input/config-cli/arg-shallow/glossarify-md.conf.json +++ b/test/input/config-cli/arg-shallow/glossarify-md.conf.json @@ -1,11 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/arg-shallow", - "includeFiles": ["."], - "glossaries": [ - { "file": "./glossary.md"} - ], - "linking": "relative" -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/arg-shallow", + "includeFiles": [ + "." + ], + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + } +} \ No newline at end of file diff --git a/test/input/config-cli/deep-defaults/glossarify-md.conf.json b/test/input/config-cli/deep-defaults/glossarify-md.conf.json index 740a5b0e..4d2a1f88 100644 --- a/test/input/config-cli/deep-defaults/glossarify-md.conf.json +++ b/test/input/config-cli/deep-defaults/glossarify-md.conf.json @@ -1,13 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/deep-defaults", - "includeFiles": ["."], - "indexing": {}, - "glossaries": [], - "linking": "relative", - "dev": { - "effectiveConfFile": "./glossarify-md-effective.conf.json" - } -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/deep-defaults", + "includeFiles": [ + "." + ], + "indexing": {}, + "glossaries": [], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + }, + "dev": { + "effectiveConfFile": "./glossarify-md-effective.conf.json" + } +} \ No newline at end of file diff --git a/test/input/config-excludeFiles/glossarify-md.conf.json b/test/input/config-excludeFiles/glossarify-md.conf.json index 8c33924d..9e66dee8 100644 --- a/test/input/config-excludeFiles/glossarify-md.conf.json +++ b/test/input/config-excludeFiles/glossarify-md.conf.json @@ -1,21 +1,29 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/config-excludeFiles/", - "includeFiles": ["."], - "excludeFiles": [ - "excludeFile*", - "**/exclude*/**" - ], - "glossaries": [ - { "file": "glossary.md", "termHint": ""} - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/config-excludeFiles/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/config-excludeFiles/", + "includeFiles": [ + "." + ], + "excludeFiles": [ + "excludeFile*", + "**/exclude*/**" + ], + "glossaries": [ + { + "file": "glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/config-excludeFiles/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-glossaries/default/glossarify-md.conf.json b/test/input/config-glossaries/default/glossarify-md.conf.json index eb23f9af..ef2c6ff3 100644 --- a/test/input/config-glossaries/default/glossarify-md.conf.json +++ b/test/input/config-glossaries/default/glossarify-md.conf.json @@ -1,28 +1,65 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/default/", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./term-hint-prefix-glossary.md", "termHint": "☛ ${term}"}, - { "file": "./term-hint-suffix-glossary.md", "termHint": "${term} ☚"}, - { "file": "./term-hint-suffix-default-glossary.md", "termHint": "↴"}, - { "file": "./term-hint-wrapped-glossary.md", "termHint": "☛ ${term} ☚"}, - { "file": "./disjunct-terms-glossary-a.md", "termHint": " (a/b)"}, - { "file": "./disjunct-terms-glossary-b.md", "termHint": " (a/b)"}, - { "file": "./shared-terms-glossary-a.md", "termHint": " (a&b)"}, - { "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"}, - { "file": "./Uppercase-glossary.md", "termHint": ""}, - { "file": "./unicode-glossary.md", "termHint": ""}, - { "file": "./formatted-terms-glossary.md" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../../output-actual/config-glossaries/default/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/default/", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./term-hint-prefix-glossary.md", + "termHint": "☛ ${term}" + }, + { + "file": "./term-hint-suffix-glossary.md", + "termHint": "${term} ☚" + }, + { + "file": "./term-hint-suffix-default-glossary.md", + "termHint": "↴" + }, + { + "file": "./term-hint-wrapped-glossary.md", + "termHint": "☛ ${term} ☚" + }, + { + "file": "./disjunct-terms-glossary-a.md", + "termHint": " (a/b)" + }, + { + "file": "./disjunct-terms-glossary-b.md", + "termHint": " (a/b)" + }, + { + "file": "./shared-terms-glossary-a.md", + "termHint": " (a&b)" + }, + { + "file": "./shared-terms-glossary-b.md", + "termHint": " (a&b)" + }, + { + "file": "./Uppercase-glossary.md", + "termHint": "" + }, + { + "file": "./unicode-glossary.md", + "termHint": "" + }, + { + "file": "./formatted-terms-glossary.md" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../../output-actual/config-glossaries/default/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-glossaries/sort-default/glossarify-md.conf.json b/test/input/config-glossaries/sort-default/glossarify-md.conf.json index 625532b6..a83b1157 100644 --- a/test/input/config-glossaries/sort-default/glossarify-md.conf.json +++ b/test/input/config-glossaries/sort-default/glossarify-md.conf.json @@ -1,18 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-default", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary-numbers-default-asc.md" , "sort": "asc" }, - { "file": "./glossary-numbers-default-desc.md" , "sort": "desc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-default", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary-numbers-default-asc.md", + "sort": "asc" + }, + { + "file": "./glossary-numbers-default-desc.md", + "sort": "desc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json b/test/input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json index eadc71f3..cd02fc1a 100644 --- a/test/input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json +++ b/test/input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json @@ -1,21 +1,32 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-i18n-compare-numeric", - "includeFiles": ["."], - "excludeFiles": [], - "i18n": { - "numeric": true + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-i18n-compare-numeric", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "i18n": { + "numeric": true + }, + "glossaries": [ + { + "file": "./glossary-i18n-compare-numeric-asc.md", + "sort": "asc" }, - "glossaries": [ - { "file": "./glossary-i18n-compare-numeric-asc.md" , "sort": "asc" }, - { "file": "./glossary-i18n-compare-numeric-desc.md" , "sort": "desc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + { + "file": "./glossary-i18n-compare-numeric-desc.md", + "sort": "desc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-glossaries/sort-i18n-de/glossarify-md.conf.json b/test/input/config-glossaries/sort-i18n-de/glossarify-md.conf.json index 07c0c5f2..80820d34 100644 --- a/test/input/config-glossaries/sort-i18n-de/glossarify-md.conf.json +++ b/test/input/config-glossaries/sort-i18n-de/glossarify-md.conf.json @@ -1,20 +1,28 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-i18n-de", - "includeFiles": ["."], - "excludeFiles": [], - "i18n": { - "locale": "de" - }, - "glossaries": [ - { "file": "./glossary-i18n-de-asc.md", "sort": "asc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-i18n-de", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "i18n": { + "locale": "de" + }, + "glossaries": [ + { + "file": "./glossary-i18n-de-asc.md", + "sort": "asc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-ignoreCase-false/glossarify-md.conf.json b/test/input/config-ignoreCase-false/glossarify-md.conf.json index a325e38b..8e2f5736 100644 --- a/test/input/config-ignoreCase-false/glossarify-md.conf.json +++ b/test/input/config-ignoreCase-false/glossarify-md.conf.json @@ -1,18 +1,25 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-ignoreCase-false", - "dev": { - "termsFile": "../../output-actual/config-ignoreCase-false/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-ignoreCase-false", + "dev": { + "termsFile": "../../output-actual/config-ignoreCase-false/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-ignoreCase-true/glossarify-md.conf.json b/test/input/config-ignoreCase-true/glossarify-md.conf.json index b7f6df44..4c43ee68 100644 --- a/test/input/config-ignoreCase-true/glossarify-md.conf.json +++ b/test/input/config-ignoreCase-true/glossarify-md.conf.json @@ -1,18 +1,25 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": true, - "outDir": "../../output-actual/config-ignoreCase-true", - "dev": { - "termsFile": "../../output-actual/config-ignoreCase-true/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": true, + "outDir": "../../output-actual/config-ignoreCase-true", + "dev": { + "termsFile": "../../output-actual/config-ignoreCase-true/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/config-title/glossarify-md.conf.json b/test/input/config-indexFile/config-title/glossarify-md.conf.json index 6a2f8653..1f431e42 100644 --- a/test/input/config-indexFile/config-title/glossarify-md.conf.json +++ b/test/input/config-indexFile/config-title/glossarify-md.conf.json @@ -1,20 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md", "title": "Custom Title" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/config-title", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md", + "title": "Custom Title" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/config-title", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json b/test/input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json index 569dc44e..dc66389e 100644 --- a/test/input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json +++ b/test/input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./sub/glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/glossary-in-subdir", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/glossary-in-subdir/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./sub/glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/glossary-in-subdir", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/glossary-in-subdir/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/index-in-subdir/glossarify-md.conf.json b/test/input/config-indexFile/index-in-subdir/glossarify-md.conf.json index bf51774d..91622dc2 100644 --- a/test/input/config-indexFile/index-in-subdir/glossarify-md.conf.json +++ b/test/input/config-indexFile/index-in-subdir/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./sub/index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/index-in-subdir", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/index-in-subdir/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./sub/index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/index-in-subdir", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/index-in-subdir/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json b/test/input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json index 9ae8347e..284b6695 100644 --- a/test/input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json +++ b/test/input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/issue-75-formatted-headings", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/issue-75-formatted-headings", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/multiple-glossaries/glossarify-md.conf.json b/test/input/config-indexFile/multiple-glossaries/glossarify-md.conf.json index 32389035..b63f3053 100644 --- a/test/input/config-indexFile/multiple-glossaries/glossarify-md.conf.json +++ b/test/input/config-indexFile/multiple-glossaries/glossarify-md.conf.json @@ -1,22 +1,33 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" + } + }, + "glossaries": [ + { + "file": "./glossary-a.md" }, - "glossaries": [ - { "file": "./glossary-a.md"}, - { "file": "./glossary-b.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/multiple-glossaries", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/multiple-glossaries/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + { + "file": "./glossary-b.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/multiple-glossaries", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/multiple-glossaries/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexFile/term-link-to-section/glossarify-md.conf.json b/test/input/config-indexFile/term-link-to-section/glossarify-md.conf.json index f00ff570..185262c5 100644 --- a/test/input/config-indexFile/term-link-to-section/glossarify-md.conf.json +++ b/test/input/config-indexFile/term-link-to-section/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/term-link-to-section", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/term-link-to-section/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/term-link-to-section", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/term-link-to-section/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json b/test/input/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json index ce16f8ea..d8324ee5 100644 --- a/test/input/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json +++ b/test/input/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 0 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 0 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-0", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-0", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json b/test/input/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json index 77c1b714..a40221c9 100644 --- a/test/input/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json +++ b/test/input/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 1 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 1 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-1", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-1", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json b/test/input/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json index 9d062bae..071a237e 100644 --- a/test/input/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json +++ b/test/input/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 2 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 2 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-2", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-2", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json b/test/input/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json index f921fb60..ea64ef40 100644 --- a/test/input/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json +++ b/test/input/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth___is_missing": 1 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth___is_missing": 1 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-missing", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-missing", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-linking/absolute-baseUrl/glossarify-md.conf.json b/test/input/config-linking/absolute-baseUrl/glossarify-md.conf.json index d87a3d2c..8756f63e 100644 --- a/test/input/config-linking/absolute-baseUrl/glossarify-md.conf.json +++ b/test/input/config-linking/absolute-baseUrl/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "absolute", - "baseUrl": "http://localhost", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md" }, - { "file": "./sub-1/glossary.md" } - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-linking/absolute-baseUrl", - "dev": { - "termsFile": "../../../output-actual/config-linking/absolute-baseUrl/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "absolute", + "terms": "all", + "baseUrl": "http://localhost" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" + }, + { + "file": "./sub-1/glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-linking/absolute-baseUrl", + "dev": { + "termsFile": "../../../output-actual/config-linking/absolute-baseUrl/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-linking/relative/glossarify-md.conf.json b/test/input/config-linking/relative/glossarify-md.conf.json index d60843c0..99dd0b0b 100644 --- a/test/input/config-linking/relative/glossarify-md.conf.json +++ b/test/input/config-linking/relative/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "baseUrl": "http://localhost", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md" }, - { "file": "./sub-1/glossary.md" } - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-linking/relative", - "dev": { - "termsFile": "../../../output-actual/config-linking/relative/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "http://localhost" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" + }, + { + "file": "./sub-1/glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-linking/relative", + "dev": { + "termsFile": "../../../output-actual/config-linking/relative/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-linking/terms-first-in-paragraph/glossarify-md.conf.json b/test/input/config-linking/terms-first-in-paragraph/glossarify-md.conf.json index 21e1ff1c..6146c9b1 100644 --- a/test/input/config-linking/terms-first-in-paragraph/glossarify-md.conf.json +++ b/test/input/config-linking/terms-first-in-paragraph/glossarify-md.conf.json @@ -1,5 +1,5 @@ { - "$schema": "../../../../conf.schema.json", + "$schema": "../../../../conf/v5/schema.json", "baseDir": ".", "linking": { "paths": "relative", diff --git a/test/input/config-listOf/glossarify-md.conf.json b/test/input/config-listOf/glossarify-md.conf.json index c749a69e..ee2ec69c 100644 --- a/test/input/config-listOf/glossarify-md.conf.json +++ b/test/input/config-listOf/glossarify-md.conf.json @@ -1,29 +1,56 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 0 - }, - "generateFiles": { - "listOf": [ - { "class": "class-attr", "file": "./list-of-class-attr.md", "title": "Test Case: List of 'class-attr'" }, - { "class": "prefix", "file": "./list-of-prefix.md", "title": "Test Case: List of 'prefix'" }, - { "class": "label", "file": "./list-of-label.md", "title": "Test Suite: List of 'label'" }, - { "class": "table", "file": "./list-of-tabels.md", "title": "Test Suite: List of 'table'" }, - { "class": "figure", "file": "./list-of-figures.md", "title": "Test Suite: List of 'figure'" } - ] - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-listOf", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 0 + }, + "generateFiles": { + "listOf": [ + { + "class": "class-attr", + "file": "./list-of-class-attr.md", + "title": "Test Case: List of 'class-attr'" + }, + { + "class": "prefix", + "file": "./list-of-prefix.md", + "title": "Test Case: List of 'prefix'" + }, + { + "class": "label", + "file": "./list-of-label.md", + "title": "Test Suite: List of 'label'" + }, + { + "class": "table", + "file": "./list-of-tabels.md", + "title": "Test Suite: List of 'table'" + }, + { + "class": "figure", + "file": "./list-of-figures.md", + "title": "Test Suite: List of 'figure'" + } + ] + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-listOf", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-listOfFigures/image-reference/glossarify-md.conf.json b/test/input/config-listOfFigures/image-reference/glossarify-md.conf.json index 37cb1e36..7aabc7c4 100644 --- a/test/input/config-listOfFigures/image-reference/glossarify-md.conf.json +++ b/test/input/config-listOfFigures/image-reference/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "file": "./figures.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/image-reference", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "file": "./figures.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/image-reference", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-listOfFigures/option-title-missing/glossarify-md.conf.json b/test/input/config-listOfFigures/option-title-missing/glossarify-md.conf.json index cf95117d..add08067 100644 --- a/test/input/config-listOfFigures/option-title-missing/glossarify-md.conf.json +++ b/test/input/config-listOfFigures/option-title-missing/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "file": "./figures.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/option-title-missing", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "file": "./figures.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/option-title-missing", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json b/test/input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json index 03474cab..c0becbb5 100644 --- a/test/input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json +++ b/test/input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json @@ -1,23 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "class": "my-figures" }, - "listOf":[ - { "class": "my-figures", "file": "./figures-combined.md", "title": "Combined List of Figures" } - ] + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "class": "my-figures" }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/with-listof-combined", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOf": [ + { + "class": "my-figures", + "file": "./figures-combined.md", + "title": "Combined List of Figures" + } + ] + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/with-listof-combined", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-listOfTables/glossarify-md.conf.json b/test/input/config-listOfTables/glossarify-md.conf.json index 29e0c6a0..337d022b 100644 --- a/test/input/config-listOfTables/glossarify-md.conf.json +++ b/test/input/config-listOfTables/glossarify-md.conf.json @@ -1,23 +1,33 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 1 - }, - "generateFiles": { - "listOfTables": { "file": "./tables.md", "title": "List of Tables" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-listOfTables", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 1 + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md", + "title": "List of Tables" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-listOfTables", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-reportNotMentioned/false/glossarify-md.conf.json b/test/input/config-reportNotMentioned/false/glossarify-md.conf.json index d187059e..ff0d3152 100644 --- a/test/input/config-reportNotMentioned/false/glossarify-md.conf.json +++ b/test/input/config-reportNotMentioned/false/glossarify-md.conf.json @@ -1,19 +1,26 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "reportNotMentioned": false, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-reportNotMentioned/false", - "dev": { - "reportsFile": "../../../output-actual/config-reportNotMentioned/false/report.txt", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "reportNotMentioned": false, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-reportNotMentioned/false", + "dev": { + "reportsFile": "../../../output-actual/config-reportNotMentioned/false/report.txt", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/config-reportNotMentioned/true/glossarify-md.conf.json b/test/input/config-reportNotMentioned/true/glossarify-md.conf.json index b5f8500d..4f0f0d77 100644 --- a/test/input/config-reportNotMentioned/true/glossarify-md.conf.json +++ b/test/input/config-reportNotMentioned/true/glossarify-md.conf.json @@ -1,19 +1,26 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "reportNotMentioned": true, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-reportNotMentioned/true", - "dev": { - "reportsFile": "../../../output-actual/config-reportNotMentioned/true/report.txt", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "reportNotMentioned": true, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-reportNotMentioned/true", + "dev": { + "reportsFile": "../../../output-actual/config-reportNotMentioned/true/report.txt", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/copy-files/glossarify-md.conf.json b/test/input/copy-files/glossarify-md.conf.json index a1bf1a1f..13e8cc9a 100644 --- a/test/input/copy-files/glossarify-md.conf.json +++ b/test/input/copy-files/glossarify-md.conf.json @@ -1,18 +1,26 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/copy-files", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - {"file": "./glossary.md", "termHint": ""} - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/copy-files", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/count-term-occurrences/glossarify-md.conf.json b/test/input/count-term-occurrences/glossarify-md.conf.json index e7aad683..d420557f 100644 --- a/test/input/count-term-occurrences/glossarify-md.conf.json +++ b/test/input/count-term-occurrences/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/count-term-occurrences", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/count-term-occurrences/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/count-term-occurrences", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/count-term-occurrences/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/glossary-crosslinks/glossarify-md.conf.json b/test/input/glossary-crosslinks/glossarify-md.conf.json index 4add9fdf..35107d72 100644 --- a/test/input/glossary-crosslinks/glossarify-md.conf.json +++ b/test/input/glossary-crosslinks/glossarify-md.conf.json @@ -1,20 +1,31 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/glossary-crosslinks", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary-g1.md", "termHint": "" } - ,{ "file": "./glossary-g2.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/glossary-crosslinks/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/glossary-crosslinks", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary-g1.md", + "termHint": "" + }, + { + "file": "./glossary-g2.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/glossary-crosslinks/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/markdown-extensions/glossarify-md.conf.json b/test/input/markdown-extensions/glossarify-md.conf.json index 6e364bf6..11d21bf3 100644 --- a/test/input/markdown-extensions/glossarify-md.conf.json +++ b/test/input/markdown-extensions/glossarify-md.conf.json @@ -1,18 +1,26 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/markdown-extensions", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "↴" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/markdown-extensions", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "↴" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/markdown/glossarify-md.conf.json b/test/input/markdown/glossarify-md.conf.json index 362cc3fb..b5ca8e93 100644 --- a/test/input/markdown/glossarify-md.conf.json +++ b/test/input/markdown/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/markdown", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "↴" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/markdown/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/markdown", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "↴" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/markdown/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/substring_behavior/glossarify-md.conf.json b/test/input/substring_behavior/glossarify-md.conf.json index 13321345..0c9cd421 100644 --- a/test/input/substring_behavior/glossarify-md.conf.json +++ b/test/input/substring_behavior/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/substring_behavior", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/substring_behavior/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/substring_behavior", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/substring_behavior/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/input/term-descriptions/glossarify-md.conf.json b/test/input/term-descriptions/glossarify-md.conf.json index 9cc0a929..2a1e38e5 100644 --- a/test/input/term-descriptions/glossarify-md.conf.json +++ b/test/input/term-descriptions/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/term-descriptions", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "ⓕ" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/term-descriptions/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/term-descriptions", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "ⓕ" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/term-descriptions/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/aliases-and-synonyms/glossarify-md.conf.json b/test/output-expected/aliases-and-synonyms/glossarify-md.conf.json index f2d2f8d1..a322fe7e 100644 --- a/test/output-expected/aliases-and-synonyms/glossarify-md.conf.json +++ b/test/output-expected/aliases-and-synonyms/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/aliases-and-synonyms", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/aliases-and-synonyms/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/aliases-and-synonyms", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/aliases-and-synonyms/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-baseUrl/glossarify-md.conf.json b/test/output-expected/config-baseUrl/glossarify-md.conf.json index b40d8702..f3bf6068 100644 --- a/test/output-expected/config-baseUrl/glossarify-md.conf.json +++ b/test/output-expected/config-baseUrl/glossarify-md.conf.json @@ -1,20 +1,31 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "baseUrl": "http://example.org", - "linking": "absolute", - "outDir": "../../output-actual/config-baseUrl/", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": ""}, - { "file": "./sub-1/glossary.md", "termHint": ""} - ], - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/config-baseUrl/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "absolute", + "terms": "all", + "baseUrl": "http://example.org" + }, + "outDir": "../../output-actual/config-baseUrl/", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" + }, + { + "file": "./sub-1/glossary.md", + "termHint": "" } -} + ], + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/config-baseUrl/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-cli/arg-deep/glossarify-md.conf.json b/test/output-expected/config-cli/arg-deep/glossarify-md.conf.json index 10b77fac..f8d6be82 100644 --- a/test/output-expected/config-cli/arg-deep/glossarify-md.conf.json +++ b/test/output-expected/config-cli/arg-deep/glossarify-md.conf.json @@ -1,11 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/arg-deep", - "includeFiles": ["."], - "glossaries": [ - { "file": "./glossary.md"} - ], - "linking": "relative" -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/arg-deep", + "includeFiles": [ + "." + ], + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + } +} \ No newline at end of file diff --git a/test/output-expected/config-cli/arg-shallow/document.md b/test/output-expected/config-cli/arg-shallow/document.md index e01b6826..fa138898 100644 --- a/test/output-expected/config-cli/arg-shallow/document.md +++ b/test/output-expected/config-cli/arg-shallow/document.md @@ -41,4 +41,4 @@ AND - as a result the term '[Term][1]' MUST be linked absolutely to `cli://localhost/glossary2.md#term`. -[1]: cli://localhost/glossary2.md#term +[1]: #term diff --git a/test/output-expected/config-cli/arg-shallow/glossarify-md.conf.json b/test/output-expected/config-cli/arg-shallow/glossarify-md.conf.json index 0e09fb7c..8536ca08 100644 --- a/test/output-expected/config-cli/arg-shallow/glossarify-md.conf.json +++ b/test/output-expected/config-cli/arg-shallow/glossarify-md.conf.json @@ -1,11 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/arg-shallow", - "includeFiles": ["."], - "glossaries": [ - { "file": "./glossary.md"} - ], - "linking": "relative" -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/arg-shallow", + "includeFiles": [ + "." + ], + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + } +} \ No newline at end of file diff --git a/test/output-expected/config-cli/deep-defaults/glossarify-md-effective.conf.json b/test/output-expected/config-cli/deep-defaults/glossarify-md-effective.conf.json index 6a8462d2..50abc8e7 100644 --- a/test/output-expected/config-cli/deep-defaults/glossarify-md-effective.conf.json +++ b/test/output-expected/config-cli/deep-defaults/glossarify-md-effective.conf.json @@ -1,7 +1,6 @@ { - "$schema": "../../../../conf.schema.json", + "$schema": "../../../../conf/v5/schema.json", "baseDir": "{CWD}/output-actual/config-cli/deep-defaults", - "baseUrl": "file://localhost", "excludeFiles": [ "node_modules", ".git" @@ -29,7 +28,11 @@ "locale": "en" }, "keepRawFiles": [], - "linking": "relative", + "linking": { + "baseUrl": "file://localhost", + "paths": "relative", + "terms": "all" + }, "outDir": "{CWD}/output-actual/config-cli/deep-defaults", "outDirDropOld": true, "reportNotMentioned": false, diff --git a/test/output-expected/config-cli/deep-defaults/glossarify-md.conf.json b/test/output-expected/config-cli/deep-defaults/glossarify-md.conf.json index 740a5b0e..4d2a1f88 100644 --- a/test/output-expected/config-cli/deep-defaults/glossarify-md.conf.json +++ b/test/output-expected/config-cli/deep-defaults/glossarify-md.conf.json @@ -1,13 +1,18 @@ { - "$schema": "../../../../conf.schema.json", - "baseUrl": "file://localhost", - "baseDir": ".", - "outDir": "../../../output-actual/config-cli/deep-defaults", - "includeFiles": ["."], - "indexing": {}, - "glossaries": [], - "linking": "relative", - "dev": { - "effectiveConfFile": "./glossarify-md-effective.conf.json" - } -} + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-cli/deep-defaults", + "includeFiles": [ + "." + ], + "indexing": {}, + "glossaries": [], + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "file://localhost" + }, + "dev": { + "effectiveConfFile": "./glossarify-md-effective.conf.json" + } +} \ No newline at end of file diff --git a/test/output-expected/config-excludeFiles/glossarify-md.conf.json b/test/output-expected/config-excludeFiles/glossarify-md.conf.json index 8c33924d..9e66dee8 100644 --- a/test/output-expected/config-excludeFiles/glossarify-md.conf.json +++ b/test/output-expected/config-excludeFiles/glossarify-md.conf.json @@ -1,21 +1,29 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/config-excludeFiles/", - "includeFiles": ["."], - "excludeFiles": [ - "excludeFile*", - "**/exclude*/**" - ], - "glossaries": [ - { "file": "glossary.md", "termHint": ""} - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/config-excludeFiles/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/config-excludeFiles/", + "includeFiles": [ + "." + ], + "excludeFiles": [ + "excludeFile*", + "**/exclude*/**" + ], + "glossaries": [ + { + "file": "glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/config-excludeFiles/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-glossaries/default/glossarify-md.conf.json b/test/output-expected/config-glossaries/default/glossarify-md.conf.json index eb23f9af..ef2c6ff3 100644 --- a/test/output-expected/config-glossaries/default/glossarify-md.conf.json +++ b/test/output-expected/config-glossaries/default/glossarify-md.conf.json @@ -1,28 +1,65 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/default/", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./term-hint-prefix-glossary.md", "termHint": "☛ ${term}"}, - { "file": "./term-hint-suffix-glossary.md", "termHint": "${term} ☚"}, - { "file": "./term-hint-suffix-default-glossary.md", "termHint": "↴"}, - { "file": "./term-hint-wrapped-glossary.md", "termHint": "☛ ${term} ☚"}, - { "file": "./disjunct-terms-glossary-a.md", "termHint": " (a/b)"}, - { "file": "./disjunct-terms-glossary-b.md", "termHint": " (a/b)"}, - { "file": "./shared-terms-glossary-a.md", "termHint": " (a&b)"}, - { "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"}, - { "file": "./Uppercase-glossary.md", "termHint": ""}, - { "file": "./unicode-glossary.md", "termHint": ""}, - { "file": "./formatted-terms-glossary.md" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../../output-actual/config-glossaries/default/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/default/", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./term-hint-prefix-glossary.md", + "termHint": "☛ ${term}" + }, + { + "file": "./term-hint-suffix-glossary.md", + "termHint": "${term} ☚" + }, + { + "file": "./term-hint-suffix-default-glossary.md", + "termHint": "↴" + }, + { + "file": "./term-hint-wrapped-glossary.md", + "termHint": "☛ ${term} ☚" + }, + { + "file": "./disjunct-terms-glossary-a.md", + "termHint": " (a/b)" + }, + { + "file": "./disjunct-terms-glossary-b.md", + "termHint": " (a/b)" + }, + { + "file": "./shared-terms-glossary-a.md", + "termHint": " (a&b)" + }, + { + "file": "./shared-terms-glossary-b.md", + "termHint": " (a&b)" + }, + { + "file": "./Uppercase-glossary.md", + "termHint": "" + }, + { + "file": "./unicode-glossary.md", + "termHint": "" + }, + { + "file": "./formatted-terms-glossary.md" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../../output-actual/config-glossaries/default/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-glossaries/sort-default/glossarify-md.conf.json b/test/output-expected/config-glossaries/sort-default/glossarify-md.conf.json index 625532b6..a83b1157 100644 --- a/test/output-expected/config-glossaries/sort-default/glossarify-md.conf.json +++ b/test/output-expected/config-glossaries/sort-default/glossarify-md.conf.json @@ -1,18 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-default", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary-numbers-default-asc.md" , "sort": "asc" }, - { "file": "./glossary-numbers-default-desc.md" , "sort": "desc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-default", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary-numbers-default-asc.md", + "sort": "asc" + }, + { + "file": "./glossary-numbers-default-desc.md", + "sort": "desc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json b/test/output-expected/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json index eadc71f3..cd02fc1a 100644 --- a/test/output-expected/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json +++ b/test/output-expected/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json @@ -1,21 +1,32 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-i18n-compare-numeric", - "includeFiles": ["."], - "excludeFiles": [], - "i18n": { - "numeric": true + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-i18n-compare-numeric", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "i18n": { + "numeric": true + }, + "glossaries": [ + { + "file": "./glossary-i18n-compare-numeric-asc.md", + "sort": "asc" }, - "glossaries": [ - { "file": "./glossary-i18n-compare-numeric-asc.md" , "sort": "asc" }, - { "file": "./glossary-i18n-compare-numeric-desc.md" , "sort": "desc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + { + "file": "./glossary-i18n-compare-numeric-desc.md", + "sort": "desc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-glossaries/sort-i18n-de/glossarify-md.conf.json b/test/output-expected/config-glossaries/sort-i18n-de/glossarify-md.conf.json index 07c0c5f2..80820d34 100644 --- a/test/output-expected/config-glossaries/sort-i18n-de/glossarify-md.conf.json +++ b/test/output-expected/config-glossaries/sort-i18n-de/glossarify-md.conf.json @@ -1,20 +1,28 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../../output-actual/config-glossaries/sort-i18n-de", - "includeFiles": ["."], - "excludeFiles": [], - "i18n": { - "locale": "de" - }, - "glossaries": [ - { "file": "./glossary-i18n-de-asc.md", "sort": "asc" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/sort-i18n-de", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "i18n": { + "locale": "de" + }, + "glossaries": [ + { + "file": "./glossary-i18n-de-asc.md", + "sort": "asc" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-ignoreCase-false/glossarify-md.conf.json b/test/output-expected/config-ignoreCase-false/glossarify-md.conf.json index a325e38b..8e2f5736 100644 --- a/test/output-expected/config-ignoreCase-false/glossarify-md.conf.json +++ b/test/output-expected/config-ignoreCase-false/glossarify-md.conf.json @@ -1,18 +1,25 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-ignoreCase-false", - "dev": { - "termsFile": "../../output-actual/config-ignoreCase-false/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-ignoreCase-false", + "dev": { + "termsFile": "../../output-actual/config-ignoreCase-false/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-ignoreCase-true/glossarify-md.conf.json b/test/output-expected/config-ignoreCase-true/glossarify-md.conf.json index b7f6df44..4c43ee68 100644 --- a/test/output-expected/config-ignoreCase-true/glossarify-md.conf.json +++ b/test/output-expected/config-ignoreCase-true/glossarify-md.conf.json @@ -1,18 +1,25 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": true, - "outDir": "../../output-actual/config-ignoreCase-true", - "dev": { - "termsFile": "../../output-actual/config-ignoreCase-true/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": true, + "outDir": "../../output-actual/config-ignoreCase-true", + "dev": { + "termsFile": "../../output-actual/config-ignoreCase-true/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/config-title/glossarify-md.conf.json b/test/output-expected/config-indexFile/config-title/glossarify-md.conf.json index 6a2f8653..1f431e42 100644 --- a/test/output-expected/config-indexFile/config-title/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/config-title/glossarify-md.conf.json @@ -1,20 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md", "title": "Custom Title" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/config-title", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md", + "title": "Custom Title" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/config-title", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/glossary-in-subdir/glossarify-md.conf.json b/test/output-expected/config-indexFile/glossary-in-subdir/glossarify-md.conf.json index 569dc44e..dc66389e 100644 --- a/test/output-expected/config-indexFile/glossary-in-subdir/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/glossary-in-subdir/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./sub/glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/glossary-in-subdir", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/glossary-in-subdir/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./sub/glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/glossary-in-subdir", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/glossary-in-subdir/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/index-in-subdir/glossarify-md.conf.json b/test/output-expected/config-indexFile/index-in-subdir/glossarify-md.conf.json index bf51774d..91622dc2 100644 --- a/test/output-expected/config-indexFile/index-in-subdir/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/index-in-subdir/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./sub/index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/index-in-subdir", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/index-in-subdir/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./sub/index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/index-in-subdir", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/index-in-subdir/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json b/test/output-expected/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json index 9ae8347e..284b6695 100644 --- a/test/output-expected/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/issue-75-formatted-headings", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/issue-75-formatted-headings", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/multiple-glossaries/glossarify-md.conf.json b/test/output-expected/config-indexFile/multiple-glossaries/glossarify-md.conf.json index 32389035..b63f3053 100644 --- a/test/output-expected/config-indexFile/multiple-glossaries/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/multiple-glossaries/glossarify-md.conf.json @@ -1,22 +1,33 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" + } + }, + "glossaries": [ + { + "file": "./glossary-a.md" }, - "glossaries": [ - { "file": "./glossary-a.md"}, - { "file": "./glossary-b.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/multiple-glossaries", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/multiple-glossaries/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + { + "file": "./glossary-b.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/multiple-glossaries", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/multiple-glossaries/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexFile/term-link-to-section/glossarify-md.conf.json b/test/output-expected/config-indexFile/term-link-to-section/glossarify-md.conf.json index f00ff570..185262c5 100644 --- a/test/output-expected/config-indexFile/term-link-to-section/glossarify-md.conf.json +++ b/test/output-expected/config-indexFile/term-link-to-section/glossarify-md.conf.json @@ -1,21 +1,30 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "indexFile": { "file": "./index.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexFile/term-link-to-section", - "dev": { - "termsFile": "../../../output-actual/config-indexFile/term-link-to-section/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "indexFile": { + "file": "./index.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexFile/term-link-to-section", + "dev": { + "termsFile": "../../../output-actual/config-indexFile/term-link-to-section/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json b/test/output-expected/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json index ce16f8ea..d8324ee5 100644 --- a/test/output-expected/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json +++ b/test/output-expected/config-indexing/groupByHeadingDepth-0/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 0 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 0 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-0", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-0", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json b/test/output-expected/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json index 77c1b714..a40221c9 100644 --- a/test/output-expected/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json +++ b/test/output-expected/config-indexing/groupByHeadingDepth-1/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 1 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 1 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-1", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-1", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json b/test/output-expected/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json index 9d062bae..071a237e 100644 --- a/test/output-expected/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json +++ b/test/output-expected/config-indexing/groupByHeadingDepth-2/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 2 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 2 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-2", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-2", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json b/test/output-expected/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json index f921fb60..ea64ef40 100644 --- a/test/output-expected/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json +++ b/test/output-expected/config-indexing/groupByHeadingDepth-missing/glossarify-md.conf.json @@ -1,24 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth___is_missing": 1 + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth___is_missing": 1 + }, + "generateFiles": { + "indexFile": { + "file": "./index.md" }, - "generateFiles": { - "indexFile": { "file": "./index.md" }, - "listOfFigures": { "file": "./figures.md", "title": "Figures" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-missing", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOfFigures": { + "file": "./figures.md", + "title": "Figures" + } + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-indexing/groupByHeadingDepth-missing", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-linking/absolute-baseUrl/glossarify-md.conf.json b/test/output-expected/config-linking/absolute-baseUrl/glossarify-md.conf.json index d87a3d2c..8756f63e 100644 --- a/test/output-expected/config-linking/absolute-baseUrl/glossarify-md.conf.json +++ b/test/output-expected/config-linking/absolute-baseUrl/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "absolute", - "baseUrl": "http://localhost", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md" }, - { "file": "./sub-1/glossary.md" } - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-linking/absolute-baseUrl", - "dev": { - "termsFile": "../../../output-actual/config-linking/absolute-baseUrl/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "absolute", + "terms": "all", + "baseUrl": "http://localhost" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" + }, + { + "file": "./sub-1/glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-linking/absolute-baseUrl", + "dev": { + "termsFile": "../../../output-actual/config-linking/absolute-baseUrl/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-linking/relative/glossarify-md.conf.json b/test/output-expected/config-linking/relative/glossarify-md.conf.json index d60843c0..99dd0b0b 100644 --- a/test/output-expected/config-linking/relative/glossarify-md.conf.json +++ b/test/output-expected/config-linking/relative/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "baseUrl": "http://localhost", - "includeFiles": ["."], - "excludeFiles": [], - "glossaries": [ - { "file": "./glossary.md" }, - { "file": "./sub-1/glossary.md" } - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-linking/relative", - "dev": { - "termsFile": "../../../output-actual/config-linking/relative/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all", + "baseUrl": "http://localhost" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "glossaries": [ + { + "file": "./glossary.md" + }, + { + "file": "./sub-1/glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-linking/relative", + "dev": { + "termsFile": "../../../output-actual/config-linking/relative/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-linking/terms-first-in-paragraph/glossarify-md.conf.json b/test/output-expected/config-linking/terms-first-in-paragraph/glossarify-md.conf.json index 21e1ff1c..6146c9b1 100644 --- a/test/output-expected/config-linking/terms-first-in-paragraph/glossarify-md.conf.json +++ b/test/output-expected/config-linking/terms-first-in-paragraph/glossarify-md.conf.json @@ -1,5 +1,5 @@ { - "$schema": "../../../../conf.schema.json", + "$schema": "../../../../conf/v5/schema.json", "baseDir": ".", "linking": { "paths": "relative", diff --git a/test/output-expected/config-listOf/glossarify-md.conf.json b/test/output-expected/config-listOf/glossarify-md.conf.json index c749a69e..ee2ec69c 100644 --- a/test/output-expected/config-listOf/glossarify-md.conf.json +++ b/test/output-expected/config-listOf/glossarify-md.conf.json @@ -1,29 +1,56 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 0 - }, - "generateFiles": { - "listOf": [ - { "class": "class-attr", "file": "./list-of-class-attr.md", "title": "Test Case: List of 'class-attr'" }, - { "class": "prefix", "file": "./list-of-prefix.md", "title": "Test Case: List of 'prefix'" }, - { "class": "label", "file": "./list-of-label.md", "title": "Test Suite: List of 'label'" }, - { "class": "table", "file": "./list-of-tabels.md", "title": "Test Suite: List of 'table'" }, - { "class": "figure", "file": "./list-of-figures.md", "title": "Test Suite: List of 'figure'" } - ] - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-listOf", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 0 + }, + "generateFiles": { + "listOf": [ + { + "class": "class-attr", + "file": "./list-of-class-attr.md", + "title": "Test Case: List of 'class-attr'" + }, + { + "class": "prefix", + "file": "./list-of-prefix.md", + "title": "Test Case: List of 'prefix'" + }, + { + "class": "label", + "file": "./list-of-label.md", + "title": "Test Suite: List of 'label'" + }, + { + "class": "table", + "file": "./list-of-tabels.md", + "title": "Test Suite: List of 'table'" + }, + { + "class": "figure", + "file": "./list-of-figures.md", + "title": "Test Suite: List of 'figure'" + } + ] + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-listOf", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-listOfFigures/image-reference/glossarify-md.conf.json b/test/output-expected/config-listOfFigures/image-reference/glossarify-md.conf.json index 37cb1e36..7aabc7c4 100644 --- a/test/output-expected/config-listOfFigures/image-reference/glossarify-md.conf.json +++ b/test/output-expected/config-listOfFigures/image-reference/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "file": "./figures.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/image-reference", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "file": "./figures.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/image-reference", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-listOfFigures/option-title-missing/glossarify-md.conf.json b/test/output-expected/config-listOfFigures/option-title-missing/glossarify-md.conf.json index cf95117d..add08067 100644 --- a/test/output-expected/config-listOfFigures/option-title-missing/glossarify-md.conf.json +++ b/test/output-expected/config-listOfFigures/option-title-missing/glossarify-md.conf.json @@ -1,20 +1,29 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "file": "./figures.md" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/option-title-missing", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "file": "./figures.md" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/option-title-missing", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-listOfFigures/with-listof-combined/glossarify-md.conf.json b/test/output-expected/config-listOfFigures/with-listof-combined/glossarify-md.conf.json index 03474cab..c0becbb5 100644 --- a/test/output-expected/config-listOfFigures/with-listof-combined/glossarify-md.conf.json +++ b/test/output-expected/config-listOfFigures/with-listof-combined/glossarify-md.conf.json @@ -1,23 +1,36 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "generateFiles": { - "listOfFigures": { "class": "my-figures" }, - "listOf":[ - { "class": "my-figures", "file": "./figures-combined.md", "title": "Combined List of Figures" } - ] + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "generateFiles": { + "listOfFigures": { + "class": "my-figures" }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-listOfFigures/with-listof-combined", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "listOf": [ + { + "class": "my-figures", + "file": "./figures-combined.md", + "title": "Combined List of Figures" + } + ] + }, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-listOfFigures/with-listof-combined", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-listOfTables/glossarify-md.conf.json b/test/output-expected/config-listOfTables/glossarify-md.conf.json index 29e0c6a0..337d022b 100644 --- a/test/output-expected/config-listOfTables/glossarify-md.conf.json +++ b/test/output-expected/config-listOfTables/glossarify-md.conf.json @@ -1,23 +1,33 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "indexing": { - "groupByHeadingDepth": 1 - }, - "generateFiles": { - "listOfTables": { "file": "./tables.md", "title": "List of Tables" } - }, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../output-actual/config-listOfTables", - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "indexing": { + "groupByHeadingDepth": 1 + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md", + "title": "List of Tables" } -} + }, + "glossaries": [ + { + "file": "./glossary.md" + } + ], + "ignoreCase": false, + "outDir": "../../output-actual/config-listOfTables", + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-reportNotMentioned/false/glossarify-md.conf.json b/test/output-expected/config-reportNotMentioned/false/glossarify-md.conf.json index d187059e..ff0d3152 100644 --- a/test/output-expected/config-reportNotMentioned/false/glossarify-md.conf.json +++ b/test/output-expected/config-reportNotMentioned/false/glossarify-md.conf.json @@ -1,19 +1,26 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "reportNotMentioned": false, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-reportNotMentioned/false", - "dev": { - "reportsFile": "../../../output-actual/config-reportNotMentioned/false/report.txt", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "reportNotMentioned": false, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-reportNotMentioned/false", + "dev": { + "reportsFile": "../../../output-actual/config-reportNotMentioned/false/report.txt", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/config-reportNotMentioned/true/glossarify-md.conf.json b/test/output-expected/config-reportNotMentioned/true/glossarify-md.conf.json index b5f8500d..4f0f0d77 100644 --- a/test/output-expected/config-reportNotMentioned/true/glossarify-md.conf.json +++ b/test/output-expected/config-reportNotMentioned/true/glossarify-md.conf.json @@ -1,19 +1,26 @@ { - "$schema": "../../../../conf.schema.json", - "baseDir": ".", - "linking": "relative", - "includeFiles": ["."], - "excludeFiles": [], - "reportNotMentioned": true, - "glossaries": [ - { "file": "./glossary.md"} - ], - "ignoreCase": false, - "outDir": "../../../output-actual/config-reportNotMentioned/true", - "dev": { - "reportsFile": "../../../output-actual/config-reportNotMentioned/true/report.txt", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "linking": { + "paths": "relative", + "terms": "all" + }, + "includeFiles": [ + "." + ], + "excludeFiles": [], + "reportNotMentioned": true, + "glossaries": [ + { + "file": "./glossary.md" } -} + ], + "ignoreCase": false, + "outDir": "../../../output-actual/config-reportNotMentioned/true", + "dev": { + "reportsFile": "../../../output-actual/config-reportNotMentioned/true/report.txt", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/copy-files/glossarify-md.conf.json b/test/output-expected/copy-files/glossarify-md.conf.json index a1bf1a1f..13e8cc9a 100644 --- a/test/output-expected/copy-files/glossarify-md.conf.json +++ b/test/output-expected/copy-files/glossarify-md.conf.json @@ -1,18 +1,26 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/copy-files", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - {"file": "./glossary.md", "termHint": ""} - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/copy-files", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/count-term-occurrences/glossarify-md.conf.json b/test/output-expected/count-term-occurrences/glossarify-md.conf.json index e7aad683..d420557f 100644 --- a/test/output-expected/count-term-occurrences/glossarify-md.conf.json +++ b/test/output-expected/count-term-occurrences/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/count-term-occurrences", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/count-term-occurrences/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/count-term-occurrences", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/count-term-occurrences/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/glossary-crosslinks/glossarify-md.conf.json b/test/output-expected/glossary-crosslinks/glossarify-md.conf.json index 4add9fdf..35107d72 100644 --- a/test/output-expected/glossary-crosslinks/glossarify-md.conf.json +++ b/test/output-expected/glossary-crosslinks/glossarify-md.conf.json @@ -1,20 +1,31 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/glossary-crosslinks", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary-g1.md", "termHint": "" } - ,{ "file": "./glossary-g2.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/glossary-crosslinks/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/glossary-crosslinks", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary-g1.md", + "termHint": "" + }, + { + "file": "./glossary-g2.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/glossary-crosslinks/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/markdown-extensions/glossarify-md.conf.json b/test/output-expected/markdown-extensions/glossarify-md.conf.json index 6e364bf6..11d21bf3 100644 --- a/test/output-expected/markdown-extensions/glossarify-md.conf.json +++ b/test/output-expected/markdown-extensions/glossarify-md.conf.json @@ -1,18 +1,26 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/markdown-extensions", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "↴" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/markdown-extensions", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "↴" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/markdown/glossarify-md.conf.json b/test/output-expected/markdown/glossarify-md.conf.json index 362cc3fb..b5ca8e93 100644 --- a/test/output-expected/markdown/glossarify-md.conf.json +++ b/test/output-expected/markdown/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/markdown", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "↴" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/markdown/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/markdown", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "↴" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/markdown/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/substring_behavior/glossarify-md.conf.json b/test/output-expected/substring_behavior/glossarify-md.conf.json index 13321345..0c9cd421 100644 --- a/test/output-expected/substring_behavior/glossarify-md.conf.json +++ b/test/output-expected/substring_behavior/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/substring_behavior", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/substring_behavior/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/substring_behavior", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/substring_behavior/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file diff --git a/test/output-expected/term-descriptions/glossarify-md.conf.json b/test/output-expected/term-descriptions/glossarify-md.conf.json index 9cc0a929..2a1e38e5 100644 --- a/test/output-expected/term-descriptions/glossarify-md.conf.json +++ b/test/output-expected/term-descriptions/glossarify-md.conf.json @@ -1,19 +1,27 @@ { - "$schema": "../../../conf.schema.json", - "baseDir": ".", - "outDir": "../../output-actual/term-descriptions", - "includeFiles": ["."], - "excludeFiles": [], - "keepRawFiles": [], - "glossaries": [ - { "file": "./glossary.md", "termHint": "ⓕ" } - ], - "linking": "relative", - "ignoreCase": false, - "dev": { - "termsFile": "../../output-actual/term-descriptions/terms.json", - "printInputAst": false, - "reproducablePaths": true, - "printOutputAst": false + "$schema": "../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../output-actual/term-descriptions", + "includeFiles": [ + "." + ], + "excludeFiles": [], + "keepRawFiles": [], + "glossaries": [ + { + "file": "./glossary.md", + "termHint": "ⓕ" } -} + ], + "linking": { + "paths": "relative", + "terms": "all" + }, + "ignoreCase": false, + "dev": { + "termsFile": "../../output-actual/term-descriptions/terms.json", + "printInputAst": false, + "reproducablePaths": true, + "printOutputAst": false + } +} \ No newline at end of file