Skip to content

anchored-docs v2.0.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 22:46
· 15 commits to main since this release
e6b735a

Breaking changes:

  • The scripts are Node.js ES modules. The scripts use Node.js 22 or a higher version and have no packages to install. The skill does not use Python. Each command changes from python3 <skill>/scripts/NAME.py to node <skill>/scripts/NAME.mjs.
  • _glossary.yaml, _map.yaml, and org-glossary.yaml changed to JSON files: _glossary.json, _map.json, org-glossary.json. The frontmatter of a doc stays YAML, because OKF tells you to use YAML. INSTALL.md, section "Upgrading from 1.x", gives the steps.

Behavior:

  • The output is the same as the output of 1.2.0 on a set of 41 tests, apart from the new file names. The Node.js scripts also give the same results as the Python scripts on 2.5 MB of prose and source comments.
  • Corrected: docs_check.mjs links did not read .mjs files. Thus it found no code back-links in a Node.js repository with ES modules. After this change, it reads the same source files as ste_check.mjs.
  • New: ste_check.mjs and docs_check.mjs also read .cjs, .mts, and .cts files. The two scripts check the doc comments and the back-links in these files with the JavaScript and TypeScript rules.
  • Corrected: the scan for code back-links did not read the source files when a parent folder of the repository had a special name. These names are build, bin, obj, dist, node_modules, third_party, and .git. At this time the scan examines only the folders in the repository.
  • Corrected: docs_check.mjs affected compared capital letters and small letters as different on Linux and macOS, and as the same on Windows. At this time it compares them as different on all systems. The okf check of sources globs also compares them as different on Windows and macOS.
  • Corrected before the release: on Windows, ste_check.mjs checked index.md and log.md. The script does not check them on all systems, as in 1.2.0.
  • Corrected before the release: a long sequence of spaces or | characters in a line made ste_check.mjs very slow. At this time, the time increases only as much as the length of the line.
  • Corrected before the release: docs_check.mjs stale --days accepted values such as 1.0, 1e3, 0x10, and an empty value. The option accepts only an integer, as in 1.2.0. The option accepts only the digits 0 to 9.
  • New: when a script cannot read a file, the script stops with exit 2 and a message that names the file. Examples are a folder with the name x.md, a broken file link, and a file that the user cannot read. The script prints the findings that it found before the stop. In 1.2.0 the script stopped with a traceback and exit 1.
  • Corrected before the release: ste_check.mjs showed the notice for a remaining _glossary.yaml on the organization glossary file. The script shows the notice on the _glossary.yaml file.
  • Corrected: the output does not change when PyYAML is installed. With PyYAML, some messages showed the time in a different format.
  • Corrected: ste_check.mjs --glossary-report gives names with the same count in alphabetical sequence. Before this change, the sequence came from the folder scan and was different on different computers. docs_check.mjs links also gives the code back-links in the same sequence each time.
  • New: a glossary file or a map file that is not correct JSON stops the script with a message that names the file. When a remaining _glossary.yaml or _map.yaml has no JSON file, the script gives a notice. Before this change, the script ignored that file.
  • Removed: rule 3.2 from the help text. The checker did not show rule 3.2.
  • Added references/glossary.md. That file contains the comments from the YAML glossary files, because JSON has no comments.
  • Corrected the OKF link in references/okf.md. The specification is at https://github.com/GoogleCloudPlatform/open-knowledge-format.