Skip to content

Add old-versions-compatibility schema validation and improve validator#1052

Merged
chcg merged 1 commit intonotepad-plus-plus:masterfrom
pingqLIN:infra-schema-validator
Mar 23, 2026
Merged

Add old-versions-compatibility schema validation and improve validator#1052
chcg merged 1 commit intonotepad-plus-plus:masterfrom
pingqLIN:infra-schema-validator

Conversation

@pingqLIN
Copy link
Contributor

This PR contains infrastructure improvements only (split from #1051 per reviewer feedback).

Changes in pl.schema:

  • Add old-versions-compatibility field validation with proper regex pattern

Changes in validator.py:

  • Add format_version_range() and format_old_versions_compatibility() helpers for clearer compatibility reporting
  • Fix win32api.error exception handling (import as win32api_error)
  • Use explicit encoding=utf-8 for all file reads/writes
  • Move import re to module top-level

Notes:

  • Zero whitespace-only changes
  • Based on latest master

Copilot AI review requested due to automatic review settings March 15, 2026 16:33
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 updates the plugin list validator and JSON schema to better support and display plugin compatibility information (including “old versions compatibility”), while also improving file I/O consistency and Windows error handling.

Changes:

  • Add formatting helpers to display npp-compatible-versions and the new old-versions-compatibility field in validator output.
  • Read/write JSON/markdown files explicitly as UTF-8.
  • Extend pl.schema to validate the old-versions-compatibility property and fix exception handling for missing Win32 version info.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
validator.py Adds compatibility formatting and printing, UTF-8 file handling, and correct Win32 exception import/handling.
pl.schema Introduces schema validation for the old-versions-compatibility plugin field via a regex pattern.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@chcg chcg added this to the 1.9.4 milestone Mar 23, 2026
@chcg chcg merged commit cdf01d2 into notepad-plus-plus:master Mar 23, 2026
12 of 16 checks passed
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.

3 participants