ultimatedarktower 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [2.1.2] - 2026-02-19
8
+
9
+ ### Fixed
10
+
11
+ - **ESM named imports broken** — `import { UltimateDarkTower } from 'ultimatedarktower'` previously threw `SyntaxError: The requested module does not provide an export named 'UltimateDarkTower'` in Node.js ESM projects because the `"import"` export condition pointed to the CommonJS build. The package now ships a true ES Module bundle so named imports work correctly.
12
+
13
+ ### Added
14
+
15
+ - **ESM build** (`dist/esm/index.mjs`) — a native ES Module bundle produced by esbuild, included in the published package alongside the existing CommonJS build
16
+
17
+ ### Changed
18
+
19
+ - `package.json` `exports["import"]` condition now points to `dist/esm/index.mjs` instead of the CommonJS output; `exports["require"]` is unchanged
20
+ - `package.json` `files` now includes `dist/esm/**/*`
21
+
22
+ ## [2.1.1] - 2026-02-19
23
+
24
+ ### Added
25
+
26
+ - Integration test for tower calibration using Node.js Bluetooth adapter, located in `tests/integration/calibration.integration.ts`
27
+ - `npm run test:integration` script to run integration tests requiring real hardware
28
+ - Integration tests are now organized under `tests/integration/` and are not run by default with unit tests or during publish
29
+
7
30
  ## [2.1.0] - 2026-02-19
8
31
 
9
32
  ### Added
@@ -56,6 +79,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
56
79
  - Tower Game ("The Tower's Challenge") example web app
57
80
  - Complete API reference documentation
58
81
 
82
+ [2.1.2]: https://github.com/ChessMess/UltimateDarkTower/compare/v2.1.1...v2.1.2
83
+ [2.1.1]: https://github.com/ChessMess/UltimateDarkTower/compare/v2.1.0...v2.1.1
59
84
  [2.1.0]: https://github.com/ChessMess/UltimateDarkTower/compare/v2.0.0...v2.1.0
60
85
  [2.0.0]: https://github.com/ChessMess/UltimateDarkTower/compare/v1.0.0...v2.0.0
61
86
  [1.0.0]: https://github.com/ChessMess/UltimateDarkTower/releases/tag/v1.0.0
package/README.md CHANGED
@@ -44,6 +44,7 @@ I have spent many hours reverse engineering the Tower's protocol in order to cre
44
44
  - **Tower Control** - Complete control over lights, sounds, and drum rotation
45
45
  - **Game State Tracking** - Track glyph positions, broken seals, and skull counts
46
46
  - **Event System** - Callback-based event handling for tower events
47
+ - **ESM + CJS** - Ships both an ES Module build and a CommonJS build; works with `import` and `require` without configuration
47
48
  - **TypeScript Support** - Full TypeScript definitions and type safety
48
49
  - **Comprehensive Logging** - Multi-output logging system for debugging
49
50
  - **Battery Monitoring** - Real-time battery level tracking and low battery warnings
@@ -143,6 +144,25 @@ Comprehensive documentation with TypeScript examples, best practices, and troubl
143
144
  - **Best Practices** - Performance tips, error handling, and common patterns
144
145
  - **Troubleshooting** - Solutions for common issues and debugging techniques
145
146
 
147
+ ## Integration Testing
148
+
149
+ Integration tests that require real hardware are located in `tests/integration/` and are not run by default with the main test suite. These tests use the Node.js Bluetooth adapter and require a physical Return to Dark Tower device in range.
150
+
151
+ To run the calibration integration test:
152
+
153
+ ```bash
154
+ npm run test:integration
155
+ ```
156
+
157
+ - This will connect to the tower, perform a full calibration sequence, and print the resulting glyph positions.
158
+ - The test will fail if the tower is not available or calibration does not complete within 60 seconds.
159
+ - Integration tests are not included in automated test runs or npm publish.
160
+
161
+ **Prerequisites:**
162
+
163
+ - Tower must be powered on and in Bluetooth range
164
+ - `@stoprocent/noble` must be installed (it is a peer dependency)
165
+
146
166
  ## Development
147
167
 
148
168
  ### Building and Testing