Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 27, 2025

This PR updates key dependencies to improve security and maintain compatibility with the beta branch development. The updates focus on addressing security vulnerabilities while ensuring backward compatibility.

Key Changes

Security Fixes

  • undici: Updated from 7.4.0 to ^7.15.0 to address a denial of service vulnerability (CVE-related)
  • Applied npm audit fixes for additional low-severity vulnerabilities

Development Dependencies

  • @types/node: Updated from ^22.13.9 to ^22.18.0 for improved TypeScript definitions
  • @types/semver: Updated from ^7.5.8 to ^7.7.0 for latest type definitions
  • typescript: Updated from ^5.8.2 to ^5.8.3 for patch-level improvements
  • nodemon: Updated from ^3.1.9 to ^3.1.10 for development tooling improvements
  • eslint: Updated from ^9.21.0 to ^9.34.0 for enhanced linting capabilities

Testing

All updates have been thoroughly tested:

  • ✅ Build process completes successfully
  • ✅ All 12 tests pass
  • ✅ ESLint validation passes
  • ✅ TypeScript compilation works correctly
  • ✅ Core functionality (SwitchBotBLE, SwitchBotOpenAPI imports) verified

Compatibility Notes

The updates maintain full backward compatibility. More aggressive updates (like @antfu/eslint-config to v5.x) were intentionally avoided to prevent breaking changes that could affect the beta branch integration.

Fixes #304.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 21, 2025 00:27
…sitory (#300)

This PR adds a comprehensive `.github/copilot-instructions.md` file that
provides GitHub Copilot coding agents with detailed instructions on how
to work effectively in the node-switchbot codebase.

## Key Features

**Validated Commands and Timing**: Every command has been tested from a
clean environment with actual timing measurements:
- `npm install`: ~5-25 seconds (varies by cache)
- `npm run build`: ~5 seconds (TypeScript compilation)
- `npm run test`: ~1 second (12 tests)
- `npm run lint`: ~3 seconds (ESLint validation)

**Platform-Specific Requirements**: Clear documentation of constraints:
- BLE functionality requires Linux-based OS only (Raspbian, Ubuntu,
etc.)
- Windows and macOS are NOT supported for BLE operations
- Node.js versions: ^20, ^22, or ^24 required
- ES Modules: Project uses `"type": "module"`

**Development Workflow**: Step-by-step instructions for common tasks:
- Bootstrap and setup procedures
- Build, test, and lint validation cycles
- Adding new device support
- Working with both BLE and OpenAPI interfaces

**Manual Validation Scenarios**: Specific tests to run after making
changes:
```javascript
// Basic functionality validation
const { SwitchBotBLE, SwitchBotOpenAPI } = require('./dist/index.js');
const ble = new SwitchBotBLE(); // Should not throw
const api = new SwitchBotOpenAPI('test', 'test'); // Should not throw
```

**Timeout Warnings**: Explicit "NEVER CANCEL" warnings with timeout
recommendations for all build operations to prevent premature
cancellation of long-running commands.

## Project Structure Documentation

The instructions include comprehensive information about:
- Source code organization (`src/switchbot-ble.ts`,
`src/switchbot-openapi.ts`, device classes)
- Configuration files (TypeScript, ESLint, package.json)
- Build output structure (`dist/` directory)
- Documentation generation (TypeDoc)

## Validation Completed

All instructions have been thoroughly validated by:
- Following step-by-step procedures from a clean environment
- Testing basic functionality scenarios
- Verifying ES module imports work correctly
- Confirming full development workflow chain
- Measuring actual timing for all operations

The instructions follow the required imperative tone ("Run [this
command]", "Do not do [this]") and provide exhaustive guidance for
GitHub Copilot agents to work effectively in this TypeScript Node.js
library for controlling SwitchBot devices via Bluetooth Low Energy and
OpenAPI.

Fixes #299.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
@donavanbecker donavanbecker changed the base branch from latest to beta-3.6.0 August 27, 2025 15:32
- Update undici: 7.4.0 → 7.15.0 (fixes security vulnerability)
- Update @types/node: 22.13.9 → 22.18.0 (minor type updates)
- Update @types/semver: 7.5.8 → 7.7.0 (minor type updates)
- Update typescript: 5.8.2 → 5.8.3 (patch update)
- Update nodemon: 3.1.9 → 3.1.10 (patch update)
- Update eslint: 9.21.0 → 9.34.0 (minor update)
- Applied npm audit fix for additional low-severity vulnerabilities

All updates are backward-compatible and focus on security fixes and minor improvements.

Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Dependencies Update dependencies for beta branch compatibility Aug 27, 2025
Copilot AI requested a review from donavanbecker August 27, 2025 15:53
Copilot finished work on behalf of donavanbecker August 27, 2025 15:53
@github-actions github-actions bot added dependencies Pull requests that update a dependency file beta labels Aug 27, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17274131461

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 32.538%

Totals Coverage Status
Change from base Build 17193297413: 0.0%
Covered Lines: 1034
Relevant Lines: 3329

💛 - Coveralls

@donavanbecker donavanbecker marked this pull request as ready for review August 27, 2025 17:41
@donavanbecker donavanbecker merged commit 3fbf316 into beta-3.6.0 Aug 27, 2025
5 checks passed
@donavanbecker donavanbecker deleted the copilot/fix-304 branch August 27, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Dependencies

3 participants