This isn't a comprehensive doc because to our knowledge there are no OSS consumers of this lib, but for posterities sake here are the breaking changes:
Fixes xd -> JSON -> xd process by converting clue answer to an answer that includes the rebus (if there is one), adding back in pipes/splits (if there are any) and then replacing the rebus symbols back to their word mappings.
Adds a fn for generating semantic diffs between xd crossword files: xdDiff
.
-
The xdparser is now a recoverable parser, what this means is that it will not throw at the first sign of some unexpected input. This means you can't rely on
try {}
to determine if you have a successful parse. Thus: a breaking semver change. -
Added a new
report
object on the JSON response fromxdToJSON
. This will contain any errors or warnings that were encountered during parsing and asuccess
boolean. -
Added the concept of warnings. These are generalized messages which you probably want to act on, but really shouldn't be blocking builds.
-
Added a markdown parser to the clue - we don't make assumptions about the rendering engine and so have a mini-markdown parser in the code base, which gives you a JSON array of the clue's text and formatting. See the README for more.
- Clues from .puz files have newlines stripped out of them
-
Adds support taking an
.xd
and getting it into a format so it can be used with@confuzzle/writepuz
to generate a.puz
file -
Fixes the editor info for the down clues!
- The output for the xd from the app now always uses lowercase keys for the meta section
-
Makes the older hint format of:
A1. Gardener's concerns with A2 and D4. ~ BULB A1. Turned on to illuminate a room. ~ BULB
throw an error. The new format is:
A1. Gardener's concerns with A2 and D4. ~ BULB A1 ^Hint: Turned on to illuminate a room. A1 ^Refs: A2 D4
Includes an auto-migration to a 'hint' which wll be removed with v5 when not in strict mode.
-
Strict mode parsing is also switched to default as 'off' if you don't pass that parameter to
xdToJSON
. -
Converts license from ISC to MIT. ISC is the default for npm projects, but I'm old school and I like MIT. Adds a license file to the root of the project, so that automated tooling can get it.
-
The text for a crossword's clue's field used to be
hint
and now lives inbody
Clue formats changed to handle secondary clue parsing
Shifted the type exports in a way which was breaking but made it easier to have a crossword app extend the types.