Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 11, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides detailed guidance for GitHub Copilot and developers working with the hash library codebase, merges updates from the main branch, and bumps the package version to 4.0.2.

Key Features

Critical Requirements Documentation

  • Documents the mandatory Node.js 22.11+ requirement for --experimental-strip-types feature
  • Provides exact installation commands for Node.js 22.12.0
  • Explains why the specific version is needed

Validated Command Instructions
All commands have been thoroughly tested and include measured timing:

  • npm ci --ignore-scripts - ~7 seconds (dependency installation)
  • npm run ci:compile - ~3 seconds (TypeScript type checking)
  • npm run ci:test - <1 second (5 tests with Node.js test runner)
  • npm run ci:lint - ~4-6 seconds (ESLint validation)
  • npm run ci:style - ~7 seconds (Prettier formatting check)
  • npm run prepublishOnly - ~4 seconds (builds dist-types and dist-mjs)
  • npm test - ~15 seconds total (complete CI suite)

Manual Validation Scenarios
Includes specific test commands to verify:

  • Hash function generates consistent UUIDs for identical inputs
  • Different inputs produce different UUIDs
  • Built distribution packages work correctly
  • All functionality operates as expected

Architecture Documentation

  • Source code structure and file purposes
  • Build output explanation (dist-types/, dist-mjs/)
  • Core functionality overview (UUID generation from SHA-512 hashes)
  • Package.json scripts reference

Troubleshooting Guidance

  • Solutions for Node.js version compatibility issues
  • ESLint scanning behavior and clean directory requirements
  • Build artifact management

Timing Expectations with Safety Margins
All timeout recommendations include "NEVER CANCEL" warnings with generous buffers to prevent premature command termination during CI processes.

Main Branch Integration

This PR also merges updates from the main branch (v4.0.1) which included:

  • Updated @checkdigit/prettier-config dependency to version 7.1.1
  • Applied new formatting rules across all source files
  • Resolved version conflicts while maintaining the intended 4.0.2 version bump

Version Update
Bumps package version from 4.0.0 to 4.0.2 to be relative to the current main branch version (4.0.1). Package-lock.json has been regenerated to match the updated version and incorporate the latest dependency updates.

The instructions follow an imperative tone as specified and prioritize validated, working commands over theoretical guidance. Every command was executed and timed to ensure accuracy.

Fixes #29.


💡 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 in the docs.

Copilot AI changed the title [WIP] ✨Set up Copilot instructions Add comprehensive GitHub Copilot instructions for the hash library Aug 11, 2025
Copilot AI requested a review from lukebrdn August 11, 2025 15:59
@lukebrdn lukebrdn added the PATCH label Aug 11, 2025
Copilot AI and others added 2 commits August 11, 2025 12:20
Signed-off-by: Luke Bearden <luke.bearden@gmail.com>
Co-authored-by: lukebrdn <3859351+lukebrdn@users.noreply.github.com>
Signed-off-by: Luke Bearden <luke.bearden@gmail.com>
@lukebrdn
Copy link
Contributor

@copilot bump the package version according to the PR label

Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot bump the package version according to the PR label

Package version bumped from 4.0.0 to 4.0.1 according to the PATCH label. Commit: 2504080

@lukebrdn
Copy link
Contributor

@copilot please bump this PR's version relative to what's in main

Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot please bump this PR's version relative to what's in main

Package version bumped to 4.0.2 relative to main branch (which has 4.0.1). Commit: de08b4e

Copilot AI changed the title Add comprehensive GitHub Copilot instructions for the hash library Add comprehensive GitHub Copilot instructions and bump version to 4.0.2 Aug 11, 2025
@lukebrdn
Copy link
Contributor

@copilot regenerate the package-lock so that it includes the updated package version

Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot regenerate the package-lock so that it includes the updated package version

Package-lock.json regenerated to include the updated version 4.0.2. The version fields in the lock file now match the package.json version. Commit: ae8a2ea

@lukebrdn
Copy link
Contributor

@copilot resolve conflicts

Copy link
Contributor Author

Copilot AI commented Aug 12, 2025

@copilot resolve conflicts

Merge conflicts resolved successfully. Merged main branch (v4.0.1) with prettier config updates while preserving version 4.0.2. All tests passing. Commit: 60b6cbd

Copilot AI changed the title Add comprehensive GitHub Copilot instructions and bump version to 4.0.2 Add comprehensive GitHub Copilot instructions, merge main branch updates, and bump version to 4.0.2 Aug 12, 2025
Copilot AI and others added 2 commits August 12, 2025 13:52
Co-authored-by: lukebrdn <3859351+lukebrdn@users.noreply.github.com>
Signed-off-by: Luke Bearden <luke.bearden@gmail.com>
Co-authored-by: lukebrdn <3859351+lukebrdn@users.noreply.github.com>
Signed-off-by: Luke Bearden <luke.bearden@gmail.com>
…ges (#28)

Signed-off-by: Luke Bearden <luke.bearden@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lukebrdn <3859351+lukebrdn@users.noreply.github.com>
Co-authored-by: Luke Bearden <luke.bearden@gmail.com>
@lukebrdn lukebrdn marked this pull request as ready for review August 12, 2025 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive GitHub Copilot instructions for the hash library, integrates main branch updates, and bumps the version to 4.0.2. The main focus is providing detailed developer guidance and documentation for working with the TypeScript utility library that generates UUIDs from hash values.

  • Adds a detailed .github/copilot-instructions.md file with setup, build, test, and troubleshooting guidance
  • Merges updates from main branch (v4.0.1) including dependency updates
  • Bumps package version from 4.0.1 to 4.0.2

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
package.json Version bump from 4.0.1 to 4.0.2
.github/copilot-instructions.md New comprehensive documentation file with setup instructions, build commands, testing scenarios, and troubleshooting guidance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

tar -xJf node.tar.xz
export PATH=$PWD/node-v22.12.0-linux-x64/bin:$PATH
node --version # Should show v22.12.0 or higher
```
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installation instructions assume a Linux x64 environment but don't provide alternatives for other operating systems (Windows, macOS, ARM architectures). Consider adding platform-specific installation commands or referencing the official Node.js installation guide.

Suggested change
```
- **Install Node.js 22.12.0 or later**:
> **Note:** The following instructions are for Linux x64. For other platforms (Windows, macOS, ARM), please refer to the [official Node.js installation guide](https://nodejs.org/en/download/) for platform-specific instructions.
**Linux x64 example:**
```bash
curl -fsSL https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-x64.tar.xz -o node.tar.xz
tar -xJf node.tar.xz
export PATH=$PWD/node-v22.12.0-linux-x64/bin:$PATH
node --version # Should show v22.12.0 or higher

macOS example (using Homebrew):

brew install node@22
node --version  # Should show v22.12.0 or higher

Windows example (using Chocolatey):

choco install nodejs-lts --version=22.12.0
node --version  # Should show v22.12.0 or higher

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied

### Core Functionality

- `hash(value: string): string` - Generates UUID from SHA-512 hash of input
- Uses custom UUID v5 implementation with namespace `f25d4515-fea7-44c7-8baf-f3ca50865e66`
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded namespace UUID should be documented with its purpose or significance. Consider explaining why this specific namespace is used or if it's project-specific.

Suggested change
- Uses custom UUID v5 implementation with namespace `f25d4515-fea7-44c7-8baf-f3ca50865e66`
- Uses custom UUID v5 implementation with namespace `f25d4515-fea7-44c7-8baf-f3ca50865e66`
- This namespace UUID is project-specific and was randomly generated for this library to ensure deterministic UUID generation. It should not be reused across unrelated projects.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh.

bobwieler
bobwieler previously approved these changes Aug 12, 2025
Copy link
Contributor

@bobwieler bobwieler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lftm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
lukebrdn and others added 2 commits August 13, 2025 11:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

## Critical Requirements

**REQUIRED NODE.JS VERSION**: This project requires Node.js 22.11 or higher for the `--experimental-strip-types` feature. The CI pipeline runs on Node.js 22.x and 23.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24.x?

**Linux x64 example:**

```bash
curl -fsSL https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-x64.tar.xz -o node.tar.xz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should tell it to test with both 22 and 24 somewhere explicitly

@github-actions
Copy link

Beta Published - Install Command: npm install @checkdigit/hash@4.0.2-PR.30-f814

@lukebrdn lukebrdn requested a review from carlansley August 15, 2025 19:38
@github-actions
Copy link

❌ PR review status - not all reviewers have approved - 2 approved - 1 outstanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up Copilot instructions

4 participants