Skip to content
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/tests-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node-version: [16.x, 18.x, 19.x]
node-version: [22.x, 24.x, 25.x]
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node-version: [16.x, 18.x, 19.x]
node-version: [22.x, 24.x, 25.x]
steps:
- uses: actions/checkout@v2
with:
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# Changelog

[remark]: https://github.com/remarkjs/remark/tags

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [8.0.0](https://github.com/about-code/glossarify-md/compare/v7.1.0...v8.0.0) (2026-07-03)

This is mostly a maintenance update which implies changes from upgrading software dependencies.

### ⚠ BREAKING CHANGES

- End of support for NodeJS `16.x`, `18.x`, `20.x`
- Upgrading to latest major versions of [remark], the internal Markdown parser and serializer.
- Configuration
- Part of its configuration surface has changed. It is not officially part of glossarify-md and not officially supported. Nevertheless, if you have customized output options, please check error messages whether they provide hints of misconfiguration. Then please compare glossarify-md v7 vs. v8 `package.json` to see the major version changes on our side and have a look at breaking changes between those versions in the [remark changelog][remark].
- We have observed changes in `remark-stringify` setting `listItemIndent` which no longer accepts arbitrary integer values but only one of `one`, `tab` or `mixed`.
- Markdown Output
- bullet point syntax now defaults to `*`.
- list indentation changed and is closer to CommonMark syntax specfication


## [7.1.0](https://github.com/about-code/glossarify-md/compare/v7.0.0...v7.1.0) (2023-08-27)


Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,17 @@ See **[here][doc-extended]**, for advanced topics:

The term *support* refers to *runs on the given platform* and is subject to the terms and conditions in [LICENSE](#license).

| NodeJS | glossarify-md | Current Test Matrix |
| ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Current | v7 | Tested. Should node.js introduce breaking changes which affect [glossarify-md], then we may choose to step back from supporting *Current* until it becomes the next LTS. |
| 18 LTS | v6, v7 | Tested + Supported
| 16 LTS | v5, v6, v7 | Tested + Supported |
| 14 LTS | v4, v5, v6 | |
| 12 LTS | v3, v4, v5 | |
| 10 LTS | v2, v3, v4 | |
| NodeJS | glossarify-md | Current Test Matrix | |
| ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- |
| Current | v8 | Tested. Should node.js introduce breaking changes which affect [glossarify-md], then we may choose to step back from supporting *Current* until it becomes the next LTS. | |
| 24 LTS | v7, v8 | Tested + Supported
| 22 LTS | v7, v8 | Tested + Supported | |
| 20 LTS | v6, v7 | | |
| 18 LTS | v6, v7 | | |
| 16 LTS | v5, v6, v7 | | |
| 14 LTS | v4, v5, v6 | | |
| 12 LTS | v3, v4, v5 | | |
| 10 LTS | v2, v3, v4 | | |

## Special Thanks go to

Expand Down
46 changes: 30 additions & 16 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import minimist from "minimist";
import nodeFs from "node:fs";
import { createRequire } from "node:module";
import path from "node:path";
import proc from "node:process";
import {argv as _argv, cwd, exit} from "node:process";
import { NO_BASEDIR, NO_OUTDIR, OUTDIR_IS_BASEDIR, OUTDIR_IS_BASEDIR_WITH_DROP } from "../lib/cli/messages.js";
import { upgrade } from "../lib/cli/upgrade.js";
import * as main from "../lib/main.js";
import { watch } from "chokidar";
import { toMinimistOpts } from "../lib/cli/compatMinimist.js";

const require_ = createRequire(import.meta.url);
const confSchema = require_("../conf/v5/schema.json");
const packageJson = require_("../package.json");
const version = packageJson.version;
const CWD = proc.cwd();
const CWD = cwd();
const banner =
`┌──────────────────────────┐
│ glossarify-md v${version} │
Expand All @@ -28,7 +29,7 @@ const cli = {
alias: "c"
,description: "Path to config file, e.g. './glossarify-md.conf.json'."
,type: "string"
,default: "./glossarify-md.conf.json"
,default: ""
}
,"deep": {
alias: ""
Expand Down Expand Up @@ -84,8 +85,16 @@ const cli = {
,type: "boolean"
,default: false
}
,"verbose": {
alias: "v"
,description: "Print additional details such as the effective configuration, applied."
,type: "boolean"
,default: false
}
};
const argv = minimist(proc.argv.slice(2), cli);

// Convert CLI to minimist options interface
const argv = minimist(_argv.slice(2), toMinimistOpts(cli));

// --logfile
if (argv.logfile) {
Expand Down Expand Up @@ -118,9 +127,9 @@ if (!argv.init) {
}

// --help (or no args at all)
if (argv.help || proc.argv.length === 2) {
if (argv.help) {
printHelp(cli);
proc.exit(0);
exit(0);
}

/**
Expand Down Expand Up @@ -156,7 +165,7 @@ async function configure(argv, cwd) {
}
} catch (e) {
console.error(`Failed to read config '${confPath}'.\nReason:\n ${e.message}\n`);
proc.exit(1);
exit(1);
}
}

Expand All @@ -167,7 +176,7 @@ async function configure(argv, cwd) {
confUser = merge(confUser, confUserCli);
} catch (e) {
console.error(`Failed to parse value for --deep.\nReason:\n ${e.message}\n`);
proc.exit(1);
exit(1);
}
}
// --shallow
Expand All @@ -177,7 +186,7 @@ async function configure(argv, cwd) {
confUser = Object.assign(confUser, confUserCli);
} catch (e) {
console.error(`Failed to parse value for --shallow.\nReason:\n ${e.message}\n`);
proc.exit(1);
exit(1);
}
}

Expand All @@ -199,27 +208,26 @@ function validateConf(conf) {
if (conf.baseDir === "") {
console.log(NO_BASEDIR);
console.log("ABORTED.\n");
proc.exit(0);
exit(0);
}

if (conf.outDir === "") {
console.log(NO_OUTDIR);
console.log("ABORTED.\n");
proc.exit(0);
exit(0);
}

console.log(`☛ Reading from: ${conf.baseDir}`);
console.log(`☛ Writing to: ${conf.outDir}\n`);

if (conf.outDir === conf.baseDir) {
if (conf.outDirDropOld) {
console.log(OUTDIR_IS_BASEDIR_WITH_DROP);
console.log("ABORTED.\n");
proc.exit(0);
exit(0);
} else if (!argv.force) {
console.log(OUTDIR_IS_BASEDIR);
console.log("ABORTED.\n");
proc.exit(0);
exit(0);
}
}
}
Expand Down Expand Up @@ -297,13 +305,19 @@ async function run() {
// --init
if (argv.init) {
writeConf(conf, argv);
proc.exit(0);
exit(0);
}

// Resolve baseDir relative to confDir and outDir relative to baseDir
conf.baseDir = path.resolve(confDir, conf.baseDir);
conf.outDir = path.resolve(conf.baseDir, conf.outDir);
validateConf(conf, argv);

// --config without path: print current config.
if (argv.verbose) {
console.info(`Using effective configuration:\n\n ${JSON.stringify(conf, null, 2)}\n`);
}

try {
// --watch
if (argv.watch) {
Expand All @@ -326,7 +340,7 @@ async function run() {
}
} catch (err) {
console.error(err);
proc.exit(1);
exit(1);
}
}
run();
12 changes: 6 additions & 6 deletions conf/v5/doc/schema-defs-csvdialect.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ A character sequence to use as the field separator.

`delimiter`

* is required
* is required

* Type: `string`
* Type: `string`

### delimiter Default Value

Expand All @@ -30,9 +30,9 @@ A one-character string for surrounding field values in CSV data (no matter wheth

`quoteChar`

* is optional
* is optional

* Type: `string`
* Type: `string`

### quoteChar Default Value

Expand All @@ -48,9 +48,9 @@ Specifies a one-character string to use as an escape character within a field va

`escapeChar`

* is optional
* is optional

* Type: `string`
* Type: `string`

### escapeChar Default Value

Expand Down
4 changes: 2 additions & 2 deletions conf/v5/doc/schema-defs-csvtableschema.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

`fields`

* is required
* is required

* Type: `object[]` ([Details](schema-defs-csvtableschemafield.md))
* Type: `object[]` ([Details](schema-defs-csvtableschemafield.md))

### fields Constraints

Expand Down
4 changes: 2 additions & 2 deletions conf/v5/doc/schema-defs-csvtableschemafield.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ A name for this field.

`name`

* is optional
* is optional

* Type: `string`
* Type: `string`

### name Default Value

Expand Down
24 changes: 12 additions & 12 deletions conf/v5/doc/schema-defs-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,56 @@ File where to write the configuration that is applied effectively after merging

`effectiveConfFile`

* is optional
* is optional

* Type: `string`
* Type: `string`

## printInputAst

Print the AST of scanned markdown documents prior to linkification. May be a Regex to only print AST for particular document.

`printInputAst`

* is optional
* is optional

* Type: any of the following: `boolean` or `string` ([Details](schema-defs-dev-properties-printinputast.md))
* Type: any of the following: `boolean` or `string` ([Details](schema-defs-dev-properties-printinputast.md))

## printOutputAst

Print the AST of scanned markdown documents after linkification. May be a Regex to only print AST for particular document.

`printOutputAst`

* is optional
* is optional

* Type: any of the following: `boolean` or `string` ([Details](schema-defs-dev-properties-printoutputast.md))
* Type: any of the following: `boolean` or `string` ([Details](schema-defs-dev-properties-printoutputast.md))

## reportsFile

File where to write console report output. Enables testing the report output generated by the 'writer' component.

`reportsFile`

* is optional
* is optional

* Type: `string`
* Type: `string`

## reproducablePaths

Write system-independent paths into 'termsFile' to produce reproducable output across environments.

`reproducablePaths`

* is optional
* is optional

* Type: `boolean`
* Type: `boolean`

## termsFile

File where to write term book to. Enables testing the term extraction results of the 'terminator' component.

`termsFile`

* is optional
* is optional

* Type: `string`
* Type: `string`
Loading
Loading