Skip to content

fix: align Node.js requirements and validate metadata URLs#8

Merged
dawidope merged 3 commits intofeat/public-release-prepfrom
copilot/sub-pr-3-one-more-time
Feb 8, 2026
Merged

fix: align Node.js requirements and validate metadata URLs#8
dawidope merged 3 commits intofeat/public-release-prepfrom
copilot/sub-pr-3-one-more-time

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Description

Addresses review feedback on PR #3: Node.js version constraints were inconsistent across docs/CI/package.json, openGraph.url was hardcoded to GitHub instead of deriving from deployment URL, and NEXT_PUBLIC_SITE_URL lacked validation.

Changes:

  • Metadata URL handling: Removed hardcoded openGraph.url—now derives from metadataBase. Added getMetadataBaseUrl() to validate NEXT_PUBLIC_SITE_URL has protocol, fallback to localhost:3000 if missing/malformed.

  • Node.js version alignment: Updated badge (18+ → 18.18.0+), added engines.node: ">=18.18.0" to package.json, changed CI matrix (18.x → 18.18.x) to match Next.js 15 requirement.

function getMetadataBaseUrl(): string {
  const siteUrl = process.env.NEXT_PUBLIC_SITE_URL;
  if (!siteUrl) return 'http://localhost:3000';
  if (!/^https?:\/\//i.test(siteUrl)) {
    console.warn(`NEXT_PUBLIC_SITE_URL ('${siteUrl}') missing protocol. Using default: http://localhost:3000`);
    return 'http://localhost:3000';
  }
  return siteUrl;
}

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring

Testing

  • Lint and build passed
  • CodeQL security scan clean

Checklist

  • Code follows project style guidelines
  • No debug code left in
  • Tested locally
  • Updated README if needed

💡 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 and others added 2 commits February 8, 2026 11:31
- Remove hardcoded openGraph.url to let it derive from metadataBase
- Add validation for NEXT_PUBLIC_SITE_URL to ensure valid URL format
- Update README badge from Node.js 18+ to 18.18.0+
- Add engines.node field to package.json (>=18.18.0)
- Update CI workflow to use Node 18.18.x instead of 18.x

Co-authored-by: dawidope <1847552+dawidope@users.noreply.github.com>
Co-authored-by: dawidope <1847552+dawidope@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare repository for public GitHub release fix: align Node.js requirements and validate metadata URLs Feb 8, 2026
Copilot AI requested a review from dawidope February 8, 2026 11:35
@dawidope dawidope marked this pull request as ready for review February 8, 2026 11:35
@dawidope dawidope merged commit df91786 into feat/public-release-prep Feb 8, 2026
@dawidope dawidope deleted the copilot/sub-pr-3-one-more-time branch February 24, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants