Skip to content

Commit e79bcf5

Browse files
committed
bump version and add change entry to packages
1 parent 326b1a4 commit e79bcf5

File tree

4 files changed

+60
-26
lines changed

4 files changed

+60
-26
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
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:
22

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.
6+
37
### 11.1.0
48

59
Markup changes:

README.md

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4551,21 +4551,21 @@ T { bar-top: true }
45514551

45524552
The main `xd-crossword-tools` package provides comprehensive functionality for format conversion, validation, and development tools:
45534553

4554-
| Function | Description | Parameters | Return Type | Notes |
4555-
| ------------------------------ | ----------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------------- |
4556-
| `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 |
4555+
| ------------------------------ | ----------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------- | ---------------------------------------------------- |
4556+
| `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 |
45694569

45704570
### xd-crossword-tools-parser Utility Functions
45714571

@@ -4587,15 +4587,45 @@ The `xd-crossword-tools-parser` package exports several utility functions for wo
45874587
| `stringGridToTiles` | Converts a 2D string array to a 2D Tile array | `rebuses: Rebuses`, `strArr: string[][]` | `Tile[][]` |
45884588
| `replaceWordWithSymbol` | Replaces a word in tiles with a rebus symbol | `word: string`, `tiles: Tile[]`, `splitChar: string` | `void` |
45894589

4590-
## Deploys
4590+
## Publishing and deployment
45914591

4592-
Happen on CI, you. just write the changelog and then bump the version:
4592+
### NPM Package Publishing
45934593

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.
45964595

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`.

packages/xd-crossword-tools-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xd-crossword-tools-parser",
3-
"version": "11.1.4",
3+
"version": "12.0.0",
44
"main": "dist/index.js",
55
"module": "./dist/index.mjs",
66
"types": "./dist/index.d.ts",

packages/xd-crossword-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xd-crossword-tools",
3-
"version": "11.1.4",
3+
"version": "12.0.0",
44
"main": "dist/index.js",
55
"module": "./dist/index.mjs",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)