From b8e3c9c042f2aa4cba8dca77a659b496cc0136e3 Mon Sep 17 00:00:00 2001 From: Grace Date: Mon, 27 Apr 2026 15:56:59 +0100 Subject: [PATCH 1/3] Deploy docs if a tag released is made --- .github/workflows/build-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 9aa279d..afccc4e 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -28,7 +28,7 @@ jobs: path: ./packages/microbit-connection/docs/build deploy: - if: false + if: ${{ startsWith(github.ref, 'refs/tags/') }} permissions: pages: write id-token: write From 93b745bf3fc82634e0b96ca959580f6b15fea96b Mon Sep 17 00:00:00 2001 From: Grace Date: Tue, 28 Apr 2026 11:13:41 +0100 Subject: [PATCH 2/3] Fix failed to resolve links --- README.md | 12 ++++++------ packages/microbit-connection/src/device.ts | 2 +- packages/microbit-connection/src/service-events.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 92e2ad3..37f6955 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ A TypeScript library for connecting to micro:bit devices via USB and Bluetooth. Works in browsers (via WebUSB and Web Bluetooth) and in native iOS/Android apps (Bluetooth only, via [Capacitor](https://capacitorjs.com/)). -[Available on NPM](https://www.npmjs.com/package/@microbit/microbit-connection). Migrating from an earlier version? See the [migration guide](https://github.com/microbit-foundation/microbit-connection/blob/apps/MIGRATION.md). +[Available on NPM](https://www.npmjs.com/package/@microbit/microbit-connection). Migrating from an earlier version? See the [migration guide](https://github.com/microbit-foundation/microbit-connection/blob/main/MIGRATION.md). ### Demo apps -- [Demo app](https://microbit-connection.pages.dev/) ([source](apps/demo/)) — WebUSB, Web Bluetooth, and Capacitor for native mobile +- [Demo app](https://microbit-connection.pages.dev/) ([source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo)) — WebUSB, Web Bluetooth, and Capacitor for native mobile ### Projects using this library @@ -112,7 +112,7 @@ To disable this behaviour, pass `pauseOnHidden: false`: const usb = createUSBConnection({ pauseOnHidden: false }); ``` -For more examples see the [demo app source](apps/demo/src/). +For more examples see the [demo app source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo). ### Connect via Bluetooth @@ -129,7 +129,7 @@ await bluetooth.connect(); console.log("Connection status: ", bluetooth.status); // "Connected" ``` -For more examples see the [demo app source](apps/demo/src/). +For more examples see the [demo app source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo). ### Error handling @@ -165,7 +165,7 @@ Open link hex files are not common. The most common source is the micro:bit Crea ## Hardware testing -The [hardware test app](apps/hardware-test/) is a human-in-the-loop test runner for USB flashing. It covers partial and full flash, flash fallback paths, serial data integrity after flash, and reconnection after unplug. Run it with: +The [hardware test app](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/hardware-test) is a human-in-the-loop test runner for USB flashing. It covers partial and full flash, flash fallback paths, serial data integrity after flash, and reconnection after unplug. Run it with: ```bash cd apps/hardware-test @@ -178,7 +178,7 @@ The tests prompt you for physical actions (plugging/unplugging) and verify the r This software is under the MIT open source license. -[SPDX-License-Identifier: MIT](LICENSE) +[SPDX-License-Identifier: MIT](https://github.com/microbit-foundation/microbit-connection/blob/main/LICENSE.md) We use dependencies via the NPM registry as specified by the package.json file under common Open Source licenses. diff --git a/packages/microbit-connection/src/device.ts b/packages/microbit-connection/src/device.ts index 5be721e..20defcd 100644 --- a/packages/microbit-connection/src/device.ts +++ b/packages/microbit-connection/src/device.ts @@ -30,7 +30,7 @@ export type DeviceErrorCode = // -- User cancelled (no error UI needed) -- /** - * **BLE.** The operation was cancelled via an {@link AbortSignal} + * **BLE.** The operation was cancelled via an AbortSignal * supplied by the caller. No user-facing error is needed. */ | "aborted" diff --git a/packages/microbit-connection/src/service-events.ts b/packages/microbit-connection/src/service-events.ts index fabddbb..d7999b4 100644 --- a/packages/microbit-connection/src/service-events.ts +++ b/packages/microbit-connection/src/service-events.ts @@ -54,7 +54,7 @@ export interface PinValue { * * Contains only the input pins whose values changed since the last * notification, up to a firmware limit of 10 pins per event - * (lowest-numbered first). Use {@link MicrobitBluetoothConnection.readPins} + * (lowest-numbered first). Use {@link @microbit/microbit-connection/bluetooth!MicrobitBluetoothConnection.readPins | readPins} * to read all input pins on demand. */ export interface PinData { @@ -72,7 +72,7 @@ export interface ButtonActionData { /** * A raw event from the micro:bit's message bus, received via the - * BLE Event Service. Use {@link MicrobitBluetoothConnection.subscribeToEvent} + * BLE Event Service. Use {@link @microbit/microbit-connection/bluetooth!MicrobitBluetoothConnection.subscribeToEvent | subscribeToEvent} * to register which events the micro:bit should forward. */ export interface MicrobitEventData { From 4091359e92f4707823a0ed0d35e202918bd54fb2 Mon Sep 17 00:00:00 2001 From: Grace Date: Tue, 28 Apr 2026 14:52:37 +0100 Subject: [PATCH 3/3] Remove duplication of defining workspace in build-docs.yml --- .github/workflows/build-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index afccc4e..046391f 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -21,7 +21,7 @@ jobs: cache: npm - run: npm ci - name: Build docs - run: npm run docs -w @microbit/microbit-connection + run: npm run docs - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: