You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
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:
2
2
3
+
### 12.0.0
4
+
5
+
- Fix bug with pipe positions inside rebus answers that occurred when converting xd format to JSON and back to xd. This change updates the format of JSON puzzle to include `rebusInternalSplits`, and updates the signature of the resolveFullClueAnswer function to no longer take a rebusMap parameter.
|`puzToXD`| Converts .puz file buffer to XD format |`buffer: ArrayBuffer`|`string`| Handles rebus symbols, circles, shades, and metadata |
4557
-
|`uclickXMLToXD`| Converts UClick XML format to XD |`str: string`|`string`| Parses XML crossword data and converts to XD format |
4558
-
|`jpzToXD`| Converts JPZ (XML) format to XD |`xmlString: string`|`string`| Handles JPZ crossword puzzle format conversion |
4559
-
|`amuseToXD`| Converts Amuse JSON format to XD |`amuseJSON: AmuseTopLevel`|`string`| Converts Amuse Labs crossword format to XD |
4560
-
|`JSONToXD`| Converts CrosswordJSON back to XD format string |`json: CrosswordJSON`|`string`| Main function for converting parsed data back to XD |
4561
-
|`JSONToPuzJSON`| Converts CrosswordJSON to .puz format JSON |`json: CrosswordJSON`, `config?: {filled?: boolean}`|`any`| Creates JSON for @confuzzle/writepuz|
4562
-
|`puzEncode`| Encodes puzzle data to .puz binary format |`puzzle: Puzzle`|`Uint8Array`| Low-level binary .puz file encoding |
4563
-
|`puzDecode`| Decodes .puz binary format to JSON |`bytes: ArrayBuffer`|`Puz2JSONResult`| Low-level binary .puz file decoding |
4564
-
|`editorInfoAtCursor`| Gets crossword information at cursor position |`data: CrosswordJSON`|`(line: number, index: number) => PositionInfo`| For editor integrations - requires editorInfo |
4565
-
|`xdDiff`| Creates semantic diff between two XD files |`beforeXD: string`, `afterXD: string`|`DiffResults`| Line-by-line differences with metadata awareness |
4566
-
|`runLinterForClue`| Runs linting checks on individual clues |`clue: Clue`, `ordinal: "across" \| "down"`|`Report[]`| Checks for common crossword construction issues |
4567
-
|`validateClueAnswersMatchGrid`| Validates clue answers match grid tiles |`json: CrosswordJSON`|`Report[]`| Checks consistency between answers and grid |
4568
-
|`resolveFullClueAnswer`| Resolves clue answer with rebus and splits |`clue: Clue`, `splitChar: string`|`string`| Handles rebus substitution and split characters |
4554
+
| Function | Description | Parameters | Return Type | Notes |
|`puzToXD`| Converts .puz file buffer to XD format |`buffer: ArrayBuffer`|`string`| Handles rebus symbols, circles, shades, and metadata |
4557
+
|`uclickXMLToXD`| Converts UClick XML format to XD |`str: string`|`string`| Parses XML crossword data and converts to XD format |
4558
+
|`jpzToXD`| Converts JPZ (XML) format to XD |`xmlString: string`|`string`| Handles JPZ crossword puzzle format conversion |
4559
+
|`amuseToXD`| Converts Amuse JSON format to XD |`amuseJSON: AmuseTopLevel`|`string`| Converts Amuse Labs crossword format to XD |
4560
+
|`JSONToXD`| Converts CrosswordJSON back to XD format string |`json: CrosswordJSON`|`string`| Main function for converting parsed data back to XD |
4561
+
|`JSONToPuzJSON`| Converts CrosswordJSON to .puz format JSON |`json: CrosswordJSON`, `config?: {filled?: boolean}`|`any`| Creates JSON for @confuzzle/writepuz|
4562
+
|`puzEncode`| Encodes puzzle data to .puz binary format |`puzzle: Puzzle`|`Uint8Array`| Low-level binary .puz file encoding |
4563
+
|`puzDecode`| Decodes .puz binary format to JSON |`bytes: ArrayBuffer`|`Puz2JSONResult`| Low-level binary .puz file decoding |
4564
+
|`editorInfoAtCursor`| Gets crossword information at cursor position |`data: CrosswordJSON`|`(line: number, index: number) => PositionInfo`| For editor integrations - requires editorInfo |
4565
+
|`xdDiff`| Creates semantic diff between two XD files |`beforeXD: string`, `afterXD: string`|`DiffResults`| Line-by-line differences with metadata awareness |
4566
+
|`runLinterForClue`| Runs linting checks on individual clues |`clue: Clue`, `ordinal: "across" \| "down"`|`Report[]`| Checks for common crossword construction issues |
4567
+
|`validateClueAnswersMatchGrid`| Validates clue answers match grid tiles |`json: CrosswordJSON`|`Report[]`| Checks consistency between answers and grid |
4568
+
|`resolveFullClueAnswer`| Resolves clue answer with rebus and splits |`clue: Clue`, `splitChar: string`|`string`| Handles rebus substitution and split characters |
4569
4569
4570
4570
### xd-crossword-tools-parser Utility Functions
4571
4571
@@ -4587,15 +4587,45 @@ The `xd-crossword-tools-parser` package exports several utility functions for wo
4587
4587
|`stringGridToTiles`| Converts a 2D string array to a 2D Tile array |`rebuses: Rebuses`, `strArr: string[][]`|`Tile[][]`|
4588
4588
|`replaceWordWithSymbol`| Replaces a word in tiles with a rebus symbol |`word: string`, `tiles: Tile[]`, `splitChar: string`|`void`|
4589
4589
4590
-
## Deploys
4590
+
## Publishing and deployment
4591
4591
4592
-
Happen on CI, you. just write the changelog and then bump the version:
4592
+
### NPM Package Publishing
4593
4593
4594
-
```sh
4595
-
yarn workspaces foreach -A version [major|minor|patch]
4594
+
NPM package publishing happens automatically via GitHub Actions when changes are pushed to the `main` branch. The workflow compares local package versions with published versions on npm and only publishes if versions have been bumped.
4596
4595
4597
-
# e.g.
4598
-
yarn workspaces foreach -A version patch
4599
-
git add .; git commit -m "Prepare for release"
4600
-
git push
4601
-
```
4596
+
#### To Prepare a New Release:
4597
+
4598
+
1.**Update the changelog** (if applicable) to document changes in this release
4599
+
4600
+
2.**Bump package versions** using Yarn workspaces:
4601
+
4602
+
```sh
4603
+
# Bump all workspace packages by the same amount
4604
+
yarn workspaces foreach -A version [major|minor|patch]
4605
+
4606
+
# Examples:
4607
+
yarn workspaces foreach -A version patch # 1.0.0 -> 1.0.1
4608
+
yarn workspaces foreach -A version minor # 1.0.0 -> 1.1.0
4609
+
yarn workspaces foreach -A version major # 1.0.0 -> 2.0.0
4610
+
```
4611
+
4612
+
3.**Commit and push** the version changes:
4613
+
4614
+
```sh
4615
+
git add .
4616
+
git commit -m "v1.2.3"# Use the new version number
4617
+
git push
4618
+
```
4619
+
4620
+
4.**Automated CI process** runs on push to `main`:
4621
+
- Builds both packages (`xd-crossword-tools-parser` and `xd-crossword-tools`)
4622
+
- Runs type checking and tests
4623
+
- Compares local versions with npm registry versions
4624
+
- Publishes any packages with version mismatches
4625
+
- Creates a git tag for the release (e.g., `v1.2.3`)
4626
+
4627
+
**Note:** The workflow automatically handles the dependency between packages - it converts `workspace:*` references to actual version numbers before publishing.
4628
+
4629
+
### Website Deployment
4630
+
4631
+
The interactive playground website deploys automatically to GitHub Pages on every push to `main`.
0 commit comments