From cfca89bed9cf0ca9c7811e7f9b8fff24fc8e2d33 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:29:53 +0200 Subject: [PATCH 01/12] feat(md): support Moldovan plates, multi-mask input and regression tests (#2) --- .github/workflows/test.yml | 3 +++ README.md | 8 +++++- README_IT.md | 8 +++++- _php_variant/EuroPlateValidator.php | 12 +++++++++ package.json | 4 ++- scripts/test-moldova.mjs | 40 +++++++++++++++++++++++++++++ scripts/test-random.mjs | 14 ++++++++++ scripts/test-samples.mjs | 3 +++ src/client/europlate.client.ts | 12 ++++++--- src/countries.ts | 38 ++++++++++++++++++++++++--- 10 files changed, 132 insertions(+), 10 deletions(-) create mode 100644 scripts/test-moldova.mjs mode change 100755 => 100644 scripts/test-random.mjs mode change 100755 => 100644 scripts/test-samples.mjs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bda8e5d..fcaad19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,5 +28,8 @@ jobs: - name: Run tests run: npm test + - name: Moldova regression tests + run: npm run test:moldova + - name: CLI smoke test run: node ./bin/cli.mjs "AB 123 CD" --countries IT --type car --pretty diff --git a/README.md b/README.md index 0698b2f..44fade1 100644 --- a/README.md +++ b/README.md @@ -388,7 +388,13 @@ Exit codes: ## ๐ŸŒ Supported Countries -๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA +๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD + +Moldova (`MD`) supports current (`ABC 123`), legacy (`AB CD 123`, `C AB 123`, `K AB 123`), diplomatic (`CD 123 AB`), police (`MAI 1234`) and Transnistrian (`T 123 AB`) formats. This is **syntax-only** validation, not confirmation of registration status or regional legal recognition. + +```ts +validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true +``` --- diff --git a/README_IT.md b/README_IT.md index 05d9c89..a878463 100644 --- a/README_IT.md +++ b/README_IT.md @@ -395,7 +395,13 @@ Exit code: `0` valido, `1` non valido, `2` errori input. ## ๐ŸŒ Supported Countries -๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA +๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD + +La Moldavia (`MD`) supporta targhe attuali (`ABC 123`), storiche (`AB CD 123`, `C AB 123`, `K AB 123`), diplomatiche (`CD 123 AB`), della polizia (`MAI 1234`) e della Transnistria (`T 123 AB`). La verifica รจ **solo sintattica**; non accerta immatricolazione o riconoscimento delle targhe regionali. + +```ts +validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true +``` --- diff --git a/_php_variant/EuroPlateValidator.php b/_php_variant/EuroPlateValidator.php index 7e69794..ce81acd 100644 --- a/_php_variant/EuroPlateValidator.php +++ b/_php_variant/EuroPlateValidator.php @@ -95,6 +95,18 @@ function europlate_rx_map(): array 'LT' => ['name' => 'Lithuania', 'car' => ['/^[A-Z]{3}\s?\d{3}$/']], 'LV' => ['name' => 'Latvia', 'car' => ['/^[A-Z]{2}-\d{4}$/']], 'EE' => ['name' => 'Estonia', 'car' => ['/^\d{3}\s?[A-Z]{3}$/']], + 'MD' => [ + 'name' => 'Moldova', + 'car' => [ + '/^[A-Z]{3}\s?\d{3}$/', + '/^[A-Z]{2}\s?[A-Z]{2}\s?\d{3}$/', + '/^C\s?[A-Z]{2}\s?\d{3}$/', + '/^K\s?[A-Z]{2}\s?\d{3}$/', + '/^CD\s?\d{3}\s?[A-Z]{2}$/', + '/^MAI\s?\d{4}$/', + '/^T\s?\d{3}\s?[A-Z]{2}$/' + ] + ], 'UA' => ['name' => 'Ukraine', 'car' => ['/^[A-Z]{2}\s?\d{4}\s?[A-Z]{2}$/']] ]; } diff --git a/package.json b/package.json index ec917a2..f51d597 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "belgium", "scandinavia", "balkans", - "ukraine" + "ukraine", + "moldova" ], "type": "module", "main": "./dist/index.cjs", @@ -109,6 +110,7 @@ "cli-test": "node ./bin/cli.mjs \"AB 123 CD\" --countries IT --type car --pretty", "test": "node -e \"import('./dist/index.js').then(m=>console.log(m.validatePlate('AB 123 CD',['IT'])))\"", "test:samples": "npm run build && node ./scripts/test-samples.mjs", + "test:moldova": "node ./scripts/test-moldova.mjs", "test:random": "npm run build && node ./scripts/test-random.mjs", "format": "prettier --write .", "format:check": "prettier --check ." diff --git a/scripts/test-moldova.mjs b/scripts/test-moldova.mjs new file mode 100644 index 0000000..2b29ebf --- /dev/null +++ b/scripts/test-moldova.mjs @@ -0,0 +1,40 @@ +// Issue #2 - Moldova syntax regression tests (run after npm run build). +import assert from "node:assert/strict"; +import { supportedCountries, COUNTRY_CODES, COUNTRIES, RX, FLAG_MAP, normalizeCode, getFlagSlug, getCountryName, getInputMask, getDisplayFormat, validatePlate } from "../dist/index.js"; + +assert.ok(supportedCountries.includes("MD")); +assert.ok(COUNTRY_CODES.includes("MD")); +assert.ok(COUNTRIES.some((country) => country.code === "MD")); +assert.equal(normalizeCode("md"), "MD"); +assert.equal(getFlagSlug("MD"), "md"); +assert.equal(FLAG_MAP.MD, "md"); +assert.equal(getCountryName("MD"), "Moldova"); +assert.equal(RX.MD.name, "Moldova"); +assert.match(getDisplayFormat("MD"), /MAI 9999/); +const mask = getInputMask("MD"); +assert.ok(mask && Array.isArray(mask.mask)); +assert.equal(mask.mask.length, 7); +assert.ok(mask.mask.includes("CD 999 LL")); + +const positive = [ + ["standard", "ABC 123"], ["standard compact", "ABC123"], + ["legacy", "AB CD 123"], ["legacy compact", "ABCD123"], ["legacy partially spaced", "ABCD 123"], + ["Chiศ™inฤƒu C", "C AB 123"], ["Chiศ™inฤƒu K", "K AB 123"], + ["diplomatic", "CD 123 AB"], ["diplomatic compact", "CD123AB"], + ["MAI", "MAI 1234"], ["MAI lowercase", "mai1234"], + ["Transnistria", "T 123 AB"], ["Transnistria compact", "T123AB"], +]; +for (const [label, plate] of positive) { + const result = validatePlate(plate, ["MD"], { vehicleType: "car" }); + assert.equal(result.isValid, true, `${label}: ${plate}`); + assert.deepEqual(result.matches, [{ country: "MD", name: "Moldova" }]); + assert.ok(validatePlate(plate).matches.some((match) => match.country === "MD")); + assert.equal(validatePlate(plate, ["MD"], { vehicleType: "motorcycle" }).isValid, false); +} +const negative = ["", "AB 12", "ABC-123", "AB_CD_123", "AB CDE 123", "ABCDE123", "CD 12 AB", "CD 123 ABC", "MAI 123", "MAI 12345", "T 12 AB", "T 123 ABC", "C AB 12", "AAA 12A", "123 ABC"]; +for (const plate of negative) { + assert.equal(validatePlate(plate, ["MD"]).isValid, false, `Invalid MD plate: ${plate}`); +} +assert.deepEqual(validatePlate("ABC 123", ["ZZ"]).checked, []); +assert.deepEqual(validatePlate("ABC 123", ["ZZ"]).errors, ["no_countries_selected"]); +console.log(`Moldova regression: ${positive.length} valid + ${negative.length} invalid cases passed`); diff --git a/scripts/test-random.mjs b/scripts/test-random.mjs old mode 100755 new mode 100644 index bc83f30..f1239e6 --- a/scripts/test-random.mjs +++ b/scripts/test-random.mjs @@ -169,6 +169,19 @@ function sampleUA() { return `${R.A(2)} ${R.N(4)} ${R.A(2)}`; } +function sampleMD() { + const variants = [ + () => `${R.A(3)} ${R.N(3)}`, + () => `${R.A(2)} ${R.A(2)} ${R.N(3)}`, + () => `C ${R.A(2)} ${R.N(3)}`, + () => `K ${R.A(2)} ${R.N(3)}`, + () => `CD ${R.N(3)} ${R.A(2)}`, + () => `MAI ${R.N(4)}`, + () => `T ${R.N(3)} ${R.A(2)}`, + ]; + return variants[Math.floor(Math.random() * variants.length)](); +} + // Generatori per paese const GEN = { IT: sampleIT, @@ -200,6 +213,7 @@ const GEN = { LV: sampleLV, EE: sampleEE, UA: sampleUA, + MD: sampleMD, }; // Negative fisse diff --git a/scripts/test-samples.mjs b/scripts/test-samples.mjs old mode 100755 new mode 100644 index 0e03b8a..36fb8c0 --- a/scripts/test-samples.mjs +++ b/scripts/test-samples.mjs @@ -47,6 +47,7 @@ const POS = { LV: ["AB-1234", "ZZ-0001", "AA-9999"], EE: ["123 ABC", "001 ABC", "999 ZZZ"], UA: ["AA 1234 BB", "BC1234DE", "AK 0001 AA"], + MD: ["ABC 123", "AB CD 123", "C AB 123", "K AB 123", "CD 123 AB", "MAI 1234", "T 123 AB"], }; // Alcune negative per rumore @@ -60,6 +61,8 @@ const NEG = [ { plate: "B 1234-MA", countries: ["DE"] }, // FR separatori sbagliati { plate: "AB_123_CD", countries: ["FR"] }, + { plate: "ABC-123", countries: ["MD"] }, + { plate: "MAI 123", countries: ["MD"] }, ]; let pass = 0, diff --git a/src/client/europlate.client.ts b/src/client/europlate.client.ts index 82d756d..cf00aad 100644 --- a/src/client/europlate.client.ts +++ b/src/client/europlate.client.ts @@ -750,7 +750,7 @@ const DICT: Record< countries: { IT: "Italia", UK: "Regno Unito", DE: "Germania", FR: "Francia", ES: "Spagna", PT: "Portogallo", NL: "Paesi Bassi", BE: "Belgio", CH: "Svizzera", AT: "Austria", IE: "Irlanda", LU: "Lussemburgo", DK: "Danimarca", SE: "Svezia", NO: "Norvegia", FI: "Finlandia", PL: "Polonia", CZ: "Cechia", SK: "Slovacchia", HU: "Ungheria", RO: "Romania", BG: "Bulgaria", - SI: "Slovenia", HR: "Croazia", GR: "Grecia", LT: "Lituania", LV: "Lettonia", EE: "Estonia", UA: "Ucraina" + SI: "Slovenia", HR: "Croazia", GR: "Grecia", LT: "Lituania", LV: "Lettonia", EE: "Estonia", UA: "Ucraina", MD: "Moldavia" }, }, en: { @@ -762,7 +762,7 @@ const DICT: Record< countries:{ IT: "Italy", UK: "United Kingdom", DE: "Germany", FR: "France", ES: "Spain", PT: "Portugal", NL: "Netherlands", BE: "Belgium", CH: "Switzerland", AT: "Austria", IE: "Ireland", LU: "Luxembourg", DK: "Denmark", SE: "Sweden", NO: "Norway", FI: "Finland", PL: "Poland", CZ: "Czechia", SK: "Slovakia", HU: "Hungary", RO: "Romania", BG: "Bulgaria", SI: "Slovenia", - HR: "Croatia", GR: "Greece", LT: "Lithuania", LV: "Latvia", EE: "Estonia", UA: "Ukraine" + HR: "Croatia", GR: "Greece", LT: "Lithuania", LV: "Latvia", EE: "Estonia", UA: "Ukraine", MD: "Moldova" }, }, }; @@ -1213,7 +1213,13 @@ export function createEuroPlate(EuroMod: any, opts: EuroPlateOptions): EuroPlate // .replace(/A\{(\d+)\}/g, (_, n) => "A".repeat(+n)) // .replace(/9\{(\d+)\}/g, (_, n) => "9".repeat(+n)); - const normalizePattern = (p: string) => String(p).replace(/([ALH9X])\{(\d)\}/g, (_, t, n) => String(t).repeat(n)); + function normalizePattern(p: string): string; + function normalizePattern(p: string[]): string[]; + function normalizePattern(p: string | string[]): string | string[] { + return Array.isArray(p) + ? p.map((part) => normalizePattern(part)) + : p.replace(/([ALH9X])\{(\d+)\}/g, (_, t, n) => t.repeat(Number(n))); + } // ===== Logging centralizzato (usa BADGE/LOG se presenti) ===== function imLog(level: "debug" | "info" | "warn" | "error", title: string, payload?: any) { diff --git a/src/countries.ts b/src/countries.ts index 9490b88..96d3153 100644 --- a/src/countries.ts +++ b/src/countries.ts @@ -3,7 +3,7 @@ import { finalizeInputMaskLayouts } from "./utils/placeholders.js"; // prettier-ignore /** Tutti i country code supportati (Russia esclusa) */ -export type CountryKey = "IT" | "UK" | "DE" | "FR" | "ES" | "PT" | "NL" | "BE" | "CH" | "AT" | "IE" | "LU" | "DK" | "SE" | "NO" | "FI" | "PL" | "CZ" | "SK" | "HU" | "RO" | "BG" | "SI" | "HR" | "GR" | "LT" | "LV" | "EE" | "UA"; +export type CountryKey = "IT" | "UK" | "DE" | "FR" | "ES" | "PT" | "NL" | "BE" | "CH" | "AT" | "IE" | "LU" | "DK" | "SE" | "NO" | "FI" | "PL" | "CZ" | "SK" | "HU" | "RO" | "BG" | "SI" | "HR" | "GR" | "LT" | "LV" | "EE" | "UA" | "MD"; /** Tipo veicolo */ export type VehicleType = "car" | "motorcycle" | "any"; @@ -11,14 +11,14 @@ export type VehicleType = "car" | "motorcycle" | "any"; // prettier-ignore /** Lista di paesi supportati (const + tipizzato) */ export const supportedCountries = [ - "IT", "UK", "DE", "FR", "ES", "PT", "NL", "BE", "CH", "AT", "IE", "LU", "DK", "SE", "NO", "FI", "PL", "CZ", "SK", "HU", "RO", "BG", "SI", "HR", "GR", "LT", "LV", "EE", "UA", + "IT", "UK", "DE", "FR", "ES", "PT", "NL", "BE", "CH", "AT", "IE", "LU", "DK", "SE", "NO", "FI", "PL", "CZ", "SK", "HU", "RO", "BG", "SI", "HR", "GR", "LT", "LV", "EE", "UA", "MD", ] as const satisfies ReadonlyArray; // prettier-ignore export const FLAG_MAP = { IT:"it", UK:"gb", DE:"de", FR:"fr", ES:"es", PT:"pt", NL:"nl", BE:"be", CH:"ch", AT:"at", IE:"ie", LU:"lu", DK:"dk", SE:"se", NO:"no", FI:"fi", PL:"pl", CZ:"cz", SK:"sk", HU:"hu", RO:"ro", BG:"bg", SI:"si", HR:"hr", - GR:"gr", LT:"lt", LV:"lv", EE:"ee", UA:"ua" + GR:"gr", LT:"lt", LV:"lv", EE:"ee", UA:"ua", MD:"md" } as const; // prettier-ignore @@ -26,7 +26,7 @@ export const COUNTRY_NAMES = { IT:"Italy", UK:"United Kingdom", DE:"Germany", FR:"France", ES:"Spain", PT:"Portugal", NL:"Netherlands", BE:"Belgium", CH:"Switzerland", AT:"Austria", IE:"Ireland", LU:"Luxembourg", DK:"Denmark", SE:"Sweden", NO:"Norway", FI:"Finland", PL:"Poland", CZ:"Czechia", SK:"Slovakia", HU:"Hungary", RO:"Romania", BG:"Bulgaria", - SI:"Slovenia", HR:"Croatia", GR:"Greece", LT:"Lithuania", LV:"Latvia", EE:"Estonia", UA:"Ukraine" + SI:"Slovenia", HR:"Croatia", GR:"Greece", LT:"Lithuania", LV:"Latvia", EE:"Estonia", UA:"Ukraine", MD:"Moldova" } as const; export type CountryCode = keyof typeof FLAG_MAP; @@ -127,6 +127,7 @@ export const DISPLAY_FORMATS: Partial> = { EE: "123 ABC", UA: "AA 1234 AA", UK: "AB12 CDE", + MD: "AAA 999 | AA AA 999 | C AA 999 | K AA 999 | CD 999 AA | MAI 9999 | T 999 AA", }; /** Layout Inputmask per digitazione assistita (coerenti con le regex) */ @@ -329,6 +330,16 @@ export const INPUTMASK_LAYOUTS: Partial> = { keepStatic: true, }, + // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ MOLDOVA โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ + MD: { + // Modern, historic, Chiศ™inฤƒu (C/K), diplomatic, MAI and Transnistrian layouts. + mask: ["LLL 999", "LL LL 999", "C LL 999", "K LL 999", "CD 999 LL", "MAI 9999", "T 999 LL"], + placeholder: "___ ___", + keepStatic: true, + showMaskOnHover: false, + showMaskOnFocus: false, + }, + // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ LUSSEMBURGO โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ LU: { // 4โ€“6 cifre oppure 1โ€“2 cifre - 3โ€“4 cifre @@ -530,5 +541,24 @@ export const RX: Record = { LT: { name: "Lithuania", patterns: { car: [{ rx: /^[A-Z]{3}\s?\d{3}$/ }] } }, LV: { name: "Latvia", patterns: { car: [{ rx: /^[A-Z]{2}-\d{4}$/ }] } }, EE: { name: "Estonia", patterns: { car: [{ rx: /^\d{3}\s?[A-Z]{3}$/ }] } }, + MD: { + name: "Moldova", + patterns: { + car: [ + // Current, three letters and three digits. + { rx: /^[A-Z]{3}\s?\d{3}$/ }, + // Legacy, two region letters, two serial letters and three digits. + { rx: /^[A-Z]{2}\s?[A-Z]{2}\s?\d{3}$/ }, + // Legacy Chiศ™inฤƒu C and K prefixes. + { rx: /^C\s?[A-Z]{2}\s?\d{3}$/ }, + { rx: /^K\s?[A-Z]{2}\s?\d{3}$/ }, + // Diplomatic / Ministry of Internal Affairs. + { rx: /^CD\s?\d{3}\s?[A-Z]{2}$/ }, + { rx: /^MAI\s?\d{4}$/ }, + // Transnistrian regional series from issue #2. + { rx: /^T\s?\d{3}\s?[A-Z]{2}$/ }, + ], + }, + }, UA: { name: "Ukraine", patterns: { car: [{ rx: /^[A-Z]{2}\s?\d{4}\s?[A-Z]{2}$/ }] } }, } satisfies Record; From 27efc4c6810530d8175e5bedf7042ae24cb7d821 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:30:29 +0200 Subject: [PATCH 02/12] fix(types): accept union input in Inputmask normalizer overloads --- src/client/europlate.client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/europlate.client.ts b/src/client/europlate.client.ts index cf00aad..b9667a2 100644 --- a/src/client/europlate.client.ts +++ b/src/client/europlate.client.ts @@ -1215,6 +1215,7 @@ export function createEuroPlate(EuroMod: any, opts: EuroPlateOptions): EuroPlate function normalizePattern(p: string): string; function normalizePattern(p: string[]): string[]; + function normalizePattern(p: string | string[]): string | string[]; function normalizePattern(p: string | string[]): string | string[] { return Array.isArray(p) ? p.map((part) => normalizePattern(part)) From 59e2a1fb95884493aff7166823cdd6f50949a49b Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:31:46 +0200 Subject: [PATCH 03/12] test(md): avoid ambiguous generic-standard negative case (#2) --- scripts/test-moldova.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-moldova.mjs b/scripts/test-moldova.mjs index 2b29ebf..9d1ffd0 100644 --- a/scripts/test-moldova.mjs +++ b/scripts/test-moldova.mjs @@ -31,7 +31,7 @@ for (const [label, plate] of positive) { assert.ok(validatePlate(plate).matches.some((match) => match.country === "MD")); assert.equal(validatePlate(plate, ["MD"], { vehicleType: "motorcycle" }).isValid, false); } -const negative = ["", "AB 12", "ABC-123", "AB_CD_123", "AB CDE 123", "ABCDE123", "CD 12 AB", "CD 123 ABC", "MAI 123", "MAI 12345", "T 12 AB", "T 123 ABC", "C AB 12", "AAA 12A", "123 ABC"]; +const negative = ["", "AB 12", "ABC-123", "AB_CD_123", "AB CDE 123", "ABCDE123", "CD 12 AB", "CD 123 ABC", "MAI 12", "MAI 12345", "T 12 AB", "T 123 ABC", "C AB 12", "AAA 12A", "123 ABC"]; for (const plate of negative) { assert.equal(validatePlate(plate, ["MD"]).isValid, false, `Invalid MD plate: ${plate}`); } From 8daf04536ba07357928484bbd08647c5f1674b3b Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:31:49 +0200 Subject: [PATCH 04/12] test(md): avoid ambiguous generic-standard negative case (#2) --- scripts/test-samples.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-samples.mjs b/scripts/test-samples.mjs index 36fb8c0..fd738ef 100644 --- a/scripts/test-samples.mjs +++ b/scripts/test-samples.mjs @@ -62,7 +62,7 @@ const NEG = [ // FR separatori sbagliati { plate: "AB_123_CD", countries: ["FR"] }, { plate: "ABC-123", countries: ["MD"] }, - { plate: "MAI 123", countries: ["MD"] }, + { plate: "MAI 12", countries: ["MD"] }, ]; let pass = 0, From ae711cd649a1850d73b3e4fbd7be268d71f9f93e Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:36:02 +0200 Subject: [PATCH 05/12] feat: moldova --- dist-types/client/europlate.client.d.ts.map | 2 +- dist-types/countries.d.ts | 6 +- dist-types/countries.d.ts.map | 2 +- package-lock.json | 655 ++++++++++++++++++-- package.json | 3 + 5 files changed, 609 insertions(+), 59 deletions(-) diff --git a/dist-types/client/europlate.client.d.ts.map b/dist-types/client/europlate.client.d.ts.map index 562bed1..1e110f3 100644 --- a/dist-types/client/europlate.client.d.ts.map +++ b/dist-types/client/europlate.client.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"europlate.client.d.ts","sourceRoot":"","sources":["../../src/client/europlate.client.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAMzE,wBAAsB,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAkB,EAAE,GAAG,GAAE,UAAqB,iBAkB9H;AAMD,kCAAkC;AAClC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjD,8CAA8C;AAC9C,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,CA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;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0DAA0D;IAC1D,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAE5C,+CAA+C;IAC/C,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAEtC,8DAA8D;IAC9D,cAAc,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAEzC,sCAAsC;IACtC,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhC,mEAAmE;IACnE,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAEtC,4DAA4D;IAC5D,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAElC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAEjE,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,gDAAgD;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAypBF;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CA05BvF;AAQD;;;;;;;;;;;;;;;;;GAiBG"} \ No newline at end of file diff --git a/dist-types/countries.d.ts b/dist-types/countries.d.ts index 38a12b4..a867cd4 100644 --- a/dist-types/countries.d.ts +++ b/dist-types/countries.d.ts @@ -1,9 +1,9 @@ /** Tutti i country code supportati (Russia esclusa) */ -export type CountryKey = "IT" | "UK" | "DE" | "FR" | "ES" | "PT" | "NL" | "BE" | "CH" | "AT" | "IE" | "LU" | "DK" | "SE" | "NO" | "FI" | "PL" | "CZ" | "SK" | "HU" | "RO" | "BG" | "SI" | "HR" | "GR" | "LT" | "LV" | "EE" | "UA"; +export type CountryKey = "IT" | "UK" | "DE" | "FR" | "ES" | "PT" | "NL" | "BE" | "CH" | "AT" | "IE" | "LU" | "DK" | "SE" | "NO" | "FI" | "PL" | "CZ" | "SK" | "HU" | "RO" | "BG" | "SI" | "HR" | "GR" | "LT" | "LV" | "EE" | "UA" | "MD"; /** Tipo veicolo */ export type VehicleType = "car" | "motorcycle" | "any"; /** Lista di paesi supportati (const + tipizzato) */ -export declare const supportedCountries: readonly ["IT", "UK", "DE", "FR", "ES", "PT", "NL", "BE", "CH", "AT", "IE", "LU", "DK", "SE", "NO", "FI", "PL", "CZ", "SK", "HU", "RO", "BG", "SI", "HR", "GR", "LT", "LV", "EE", "UA"]; +export declare const supportedCountries: readonly ["IT", "UK", "DE", "FR", "ES", "PT", "NL", "BE", "CH", "AT", "IE", "LU", "DK", "SE", "NO", "FI", "PL", "CZ", "SK", "HU", "RO", "BG", "SI", "HR", "GR", "LT", "LV", "EE", "UA", "MD"]; export declare const FLAG_MAP: { readonly IT: "it"; readonly UK: "gb"; @@ -34,6 +34,7 @@ export declare const FLAG_MAP: { readonly LV: "lv"; readonly EE: "ee"; readonly UA: "ua"; + readonly MD: "md"; }; export declare const COUNTRY_NAMES: { readonly IT: "Italy"; @@ -65,6 +66,7 @@ export declare const COUNTRY_NAMES: { readonly LV: "Latvia"; readonly EE: "Estonia"; readonly UA: "Ukraine"; + readonly MD: "Moldova"; }; export type CountryCode = keyof typeof FLAG_MAP; /** diff --git a/dist-types/countries.d.ts.map b/dist-types/countries.d.ts.map index 40ff6d4..07ee3b7 100644 --- a/dist-types/countries.d.ts.map +++ b/dist-types/countries.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"countries.d.ts","sourceRoot":"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,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iDAAiD;AACjD,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAgC/D,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CA2N1E,CAAC;AAIF,eAAO,MAAM,uBAAuB,8CAGnC,CAAC;AAGF,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,0BAE/C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEnE;AAED;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CA6LJ,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 780a28f..a38a99b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@codecorn/euro-plate-validator", - "version": "1.0.14", + "version": "1.0.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@codecorn/euro-plate-validator", - "version": "1.0.14", + "version": "1.0.15", "license": "MIT", "bin": { "euro-plate-validator": "bin/cli.mjs" @@ -32,6 +32,91 @@ "inputmask": ">=5" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/darwin-x64": { "version": "0.25.10", "cpu": [ @@ -47,10 +132,351 @@ "node": ">=18" } }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -68,6 +494,7 @@ "version": "3.4.3", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -79,6 +506,7 @@ "version": "4.12.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -87,6 +515,7 @@ "version": "0.21.0", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", @@ -100,6 +529,7 @@ "version": "0.4.0", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@eslint/core": "^0.16.0" }, @@ -111,6 +541,7 @@ "version": "0.16.0", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@types/json-schema": "^7.0.15" }, @@ -122,6 +553,7 @@ "version": "3.3.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -144,6 +576,7 @@ "version": "9.37.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -155,6 +588,7 @@ "version": "2.1.6", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -163,6 +597,7 @@ "version": "0.4.0", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@eslint/core": "^0.16.0", "levn": "^0.4.1" @@ -172,29 +607,51 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=12.22" }, @@ -207,6 +664,7 @@ "version": "0.4.3", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=18.18" }, @@ -215,25 +673,6 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "dev": true, @@ -264,7 +703,8 @@ "node_modules/@types/estree": { "version": "1.0.8", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/inputmask": { "version": "5.0.7", @@ -286,7 +726,8 @@ "node_modules/@types/json-schema": { "version": "7.0.15", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/node": { "version": "24.6.2", @@ -336,14 +777,18 @@ "version": "5.3.2", "dev": true, "license": "MIT", + "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { - "version": "6.12.6", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -383,17 +828,22 @@ "node_modules/argparse": { "version": "2.0.1", "dev": true, - "license": "Python-2.0" + "license": "Python-2.0", + "peer": true }, "node_modules/balanced-match": { "version": "1.0.2", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/brace-expansion": { - "version": "1.1.12", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -403,6 +853,7 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -411,6 +862,7 @@ "version": "4.1.2", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -441,7 +893,8 @@ "node_modules/concat-map": { "version": "0.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/cross-spawn": { "version": "7.0.6", @@ -460,6 +913,7 @@ "version": "4.4.3", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ms": "^2.1.3" }, @@ -475,7 +929,8 @@ "node_modules/deep-is": { "version": "0.1.4", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/eastasianwidth": { "version": "0.2.0", @@ -531,6 +986,7 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -602,7 +1058,6 @@ "version": "10.1.8", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -646,6 +1101,7 @@ "version": "8.4.0", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -661,6 +1117,7 @@ "version": "4.2.1", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -672,6 +1129,7 @@ "version": "10.4.0", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", @@ -688,6 +1146,7 @@ "version": "1.6.0", "dev": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -699,6 +1158,7 @@ "version": "4.3.0", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -710,6 +1170,7 @@ "version": "5.3.0", "dev": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=4.0" } @@ -718,6 +1179,7 @@ "version": "2.0.3", "dev": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -725,7 +1187,8 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fast-diff": { "version": "1.3.0", @@ -735,17 +1198,20 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/file-entry-cache": { "version": "8.0.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "flat-cache": "^4.0.0" }, @@ -757,6 +1223,7 @@ "version": "5.0.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -772,6 +1239,7 @@ "version": "4.0.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -781,9 +1249,12 @@ } }, "node_modules/flatted": { - "version": "3.3.3", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", "dev": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/foreground-child": { "version": "3.3.1", @@ -801,13 +1272,16 @@ } }, "node_modules/glob": { - "version": "11.0.3", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", + "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -826,6 +1300,7 @@ "version": "6.0.2", "dev": true, "license": "ISC", + "peer": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -833,15 +1308,40 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "10.0.3", + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "license": "ISC", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "balanced-match": "^4.0.2" }, "engines": { "node": "20 || >=22" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -851,6 +1351,7 @@ "version": "14.0.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -862,6 +1363,7 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -870,6 +1372,7 @@ "version": "5.3.2", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 4" } @@ -878,6 +1381,7 @@ "version": "3.3.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -893,6 +1397,7 @@ "version": "0.1.4", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.19" } @@ -906,6 +1411,7 @@ "version": "2.1.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -922,6 +1428,7 @@ "version": "4.0.3", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -949,9 +1456,22 @@ } }, "node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", + "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -962,22 +1482,26 @@ "node_modules/json-buffer": { "version": "3.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/keyv": { "version": "4.5.4", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "json-buffer": "3.0.1" } @@ -986,6 +1510,7 @@ "version": "0.4.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -998,6 +1523,7 @@ "version": "6.0.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -1011,7 +1537,8 @@ "node_modules/lodash.merge": { "version": "4.6.2", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lru-cache": { "version": "11.2.2", @@ -1022,9 +1549,12 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", + "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1043,17 +1573,20 @@ "node_modules/ms": { "version": "2.1.3", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/optionator": { "version": "0.9.4", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1070,6 +1603,7 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1084,6 +1618,7 @@ "version": "5.0.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -1103,6 +1638,7 @@ "version": "1.0.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -1114,6 +1650,7 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -1145,6 +1682,7 @@ "version": "1.2.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -1153,7 +1691,6 @@ "version": "3.6.2", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -1179,6 +1716,7 @@ "version": "2.3.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -1187,6 +1725,7 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=4" } @@ -1331,6 +1870,7 @@ "version": "3.1.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" }, @@ -1342,6 +1882,7 @@ "version": "7.2.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1372,6 +1913,7 @@ "version": "0.4.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -1402,6 +1944,7 @@ "version": "4.4.1", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "punycode": "^2.1.0" } @@ -1424,6 +1967,7 @@ "version": "1.2.5", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -1513,6 +2057,7 @@ "version": "0.1.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index f51d597..39df528 100644 --- a/package.json +++ b/package.json @@ -134,5 +134,8 @@ }, "engines": { "node": ">=18" + }, + "allowScripts": { + "esbuild": true } } From b849a6116eaed635189d6231fbc3c347f1cde2b5 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:36:09 +0200 Subject: [PATCH 06/12] modified: README.md modified: README_IT.md modified: package-lock.json modified: package.json --- README.md | 40 ++++++++++++++++++++-------------------- README_IT.md | 38 +++++++++++++++++++------------------- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 44fade1..67da007 100644 --- a/README.md +++ b/README.md @@ -33,25 +33,25 @@ npm install @codecorn/euro-plate-validator --- -## ๐Ÿ”— CDN (v1.0.15) +## ๐Ÿ”— CDN (v1.0.16) > Use **versioned URLs** to avoid stale CDN caches. ### Core module -- **ESM (browser)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/browser/index.esm.js` +- **ESM (browser)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/browser/index.esm.js` -- **IIFE (global `window.EuroPlateValidator`)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/browser/index.iife.min.js` +- **IIFE (global `window.EuroPlateValidator`)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/browser/index.iife.min.js` ### Client SDK (UI) -- **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/client/index.mjs` +- **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.mjs` -- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/client/europlate.client.cjs` +- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/europlate.client.cjs` ### Assets (CSS) -- `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/assets/css/styles.css` +- `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/assets/css/styles.css` - (compat alias) `โ€ฆ/assets/css/styles.css` --- @@ -197,13 +197,13 @@ type EuroPlateInstance = { ### A ) Quick start with a shared `common` config + autoload deps ( Inputmask , jQuery , Toastr ) ```html - +
'; } @@ -400,7 +400,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true ## ๐Ÿงพ Changelog (highlights) -### 1.0.15 +### 1.0.16 - **Inputmask** - Safe merge of `definitions` (no hard override of defaults). @@ -415,7 +415,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true - Examples updated with `autoLoadDeps: { inputmask: true, jquery: true, toastr: true }` and `useToastrLogger: true`. - **Docs** - - CDN bumped to **1.0.15**. + - CDN bumped to **1.0.16**. - Notes about lowercase acceptance and uppercase coercion. - Guidance to **not** override `A`/`9` and define only custom tokens for restricted alphabets. diff --git a/README_IT.md b/README_IT.md index a878463..7175cc8 100644 --- a/README_IT.md +++ b/README_IT.md @@ -39,19 +39,19 @@ npm install @codecorn/euro-plate-validator ### Core (browser) -- **ESM (browser)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/browser/index.esm.js` +- **ESM (browser)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/browser/index.esm.js` -- **IIFE (global `window.EuroPlateValidator`)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/browser/index.iife.min.js` +- **IIFE (global `window.EuroPlateValidator`)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/browser/index.iife.min.js` ### Client SDK (UI) -- **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/client/index.mjs` +- **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.mjs` -- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/client/europlate.client.cjs` +- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/europlate.client.cjs` ### Assets CSS -- `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.15/dist/assets/css/styles.css` +- `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/assets/css/styles.css` - (compat shim) `โ€ฆ/assets/css/styles.css` โ†’ include/forward a `styles.css` > Se vedi file non aggiornati, puoi forzare un purge su jsDelivr. @@ -177,13 +177,13 @@ type EuroPlateInstance = { ### A ) Avvio rapido con configurazione `common` condivisa + autoload dipendenze ( Inputmask , jQuery , Toastr ) ```html - +
'; } @@ -407,7 +407,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true ## ๐Ÿงพ Changelog (highlights) -### 1.0.15 +### 1.0.16 - **Inputmask** - Merge sicuro delle `definitions` (niente override secco dei default). @@ -422,7 +422,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true - Esempi aggiornati con `autoLoadDeps: { inputmask: true, jquery: true, toastr: true }` e `useToastrLogger: true`. - **Docs** - - CDN aggiornato a **1.0.15**. + - CDN aggiornato a **1.0.16**. - Nota su minuscole accettate + uppercase automatico. - ## Linee guida: **non** ridefinire `A`/`9`; definire solo token custom per alfabeti ristretti. diff --git a/package-lock.json b/package-lock.json index a38a99b..8946985 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@codecorn/euro-plate-validator", - "version": "1.0.15", + "version": "1.0.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@codecorn/euro-plate-validator", - "version": "1.0.15", + "version": "1.0.16", "license": "MIT", "bin": { "euro-plate-validator": "bin/cli.mjs" diff --git a/package.json b/package.json index 39df528..ff205d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codecorn/euro-plate-validator", - "version": "1.0.15", + "version": "1.0.16", "description": "European license plate validator (Russia excluded).Syntax-only validation via regex for multiple EU/EEA countries including Italy, UK, Germany, France, Spain and more.Supports Node.js (TypeScript package) and PHP library.", "keywords": [ "license-plate", From d8b60b0edddb9c0057e9bdf851294fd63d357943 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:42:29 +0200 Subject: [PATCH 07/12] docs(md): update Moldova usage and release highlights --- README.md | 73 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 67da007..a4eb3db 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ๐ŸŒ @codecorn/euro-plate-validator -> ๐Ÿš— European license plate validator (Russia excluded). Multi-country, regex-based validation for EU/EEA license plates. Works in **Node.js**, **TypeScript**, and the **browser** (with a lightweight UI client). +> ๐Ÿš— Syntax-only license plate validator for European and nearby countries, including Moldova and Ukraine (Russia excluded). Supports Node.js, TypeScript, browser and PHP. [![Lang: IT](https://img.shields.io/badge/docs-Italiano-green?style=for-the-badge)](./README_IT.md) [![Demo](https://img.shields.io/badge/demo-GitHub%20Pages-0b6efd?style=for-the-badge)](https://codecorntech.github.io/euro-plate-validator/) @@ -14,7 +14,7 @@ ## โœจ Features -- โœ… **Multi-country** support (25+ EU/EEA) +- โœ… **30 supported countries**, including Moldova (`MD`) โ€” automatic or fixed-country mode - ๐Ÿšซ **Russia excluded** by design - ๐Ÿ”  Normalizes input (spaces, hyphens, case) - ๐Ÿง  Smart regex engine per-country (car/motorcycle aware) @@ -33,9 +33,9 @@ npm install @codecorn/euro-plate-validator --- -## ๐Ÿ”— CDN (v1.0.16) +## ๐Ÿ”— CDN (v1.0.16 โ€” after npm publication) -> Use **versioned URLs** to avoid stale CDN caches. +> v1.0.16 CDN assets will be available **after npm publishing**. Use versioned URLs to avoid stale caches. ### Core module @@ -47,7 +47,7 @@ npm install @codecorn/euro-plate-validator - **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.mjs` -- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/europlate.client.cjs` +- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.cjs` ### Assets (CSS) @@ -56,29 +56,6 @@ npm install @codecorn/euro-plate-validator --- -## ๐Ÿง  Core API - -### Node.js / TypeScript - -```ts -import { validatePlate } from "@codecorn/euro-plate-validator"; - -// Italy (car) -validatePlate("AB 123 CD", ["IT"], { vehicleType: "car" }); -// โ†’ { isValid: true, matches: [{country:"IT", name:"Italy"}], checked:["IT"] } - -// UK vs IE -validatePlate("AB12 CDE", ["UK", "IE"]); -``` - ---- - -## ๐Ÿงฉ Browser Client SDK โ€” `createEuroPlate()` - -The browser client auto-generates a full UI (`flag + input + dropdown + status`) or attaches to an existing ``. ecco la versione **EN** tradotta 1 : 1 . Ho lasciato **il codice invariato** , e ho applicato lo spazio prima / dopo la punteggiatura solo al testo in prosa . - ---- - ## ๐Ÿง  Core API ( Node / TS ) ```ts @@ -386,22 +363,50 @@ Exit codes: --- -## ๐ŸŒ Supported Countries +## ๐ŸŒ Supported countries + +The package supports **30 countries**, including Moldova (`MD`). -๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD +๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT +๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU | ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU +๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR | ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD -Moldova (`MD`) supports current (`ABC 123`), legacy (`AB CD 123`, `C AB 123`, `K AB 123`), diplomatic (`CD 123 AB`), police (`MAI 1234`) and Transnistrian (`T 123 AB`) formats. This is **syntax-only** validation, not confirmation of registration status or regional legal recognition. +### ๐Ÿ‡ฒ๐Ÿ‡ฉ Moldova (MD) + +| Category | Example | +| --- | --- | +| Current standard | `ABC 123` | +| Four-letter legacy | `AB CD 123` | +| Chiศ™inฤƒu C | `C AB 123` | +| Chiศ™inฤƒu K | `K AB 123` | +| Diplomatic | `CD 123 AB` | +| Police / MAI | `MAI 1234` | +| Transnistria | `T 123 AB` | ```ts -validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true +import { validatePlate, getInputMask } from "@codecorn/euro-plate-validator"; +validatePlate("ABC 123", ["MD"], { vehicleType: "car" }).isValid; // true +validatePlate("MAI 1234", ["MD"]).isValid; // true +validatePlate("ABC-123", ["MD"]).isValid; // false +getInputMask("MD"); // seven mask variants ``` ---- +Lowercase and compact unspaced forms are supported, but hyphens are not. Validation checks **syntax only**, not actual registration or legal recognition. AUTO mode may report multiple countries for overlapping patterns. See [issue #2](https://github.com/CodeCornTech/euro-plate-validator/issues/2). +--- ## ๐Ÿงพ Changelog (highlights) ### 1.0.16 +- Moldova (`MD`) support: seven plate formats, metadata, flag and IT/EN country labels. +- PHP validator updated alongside the TypeScript core. +- Inputmask now preserves arrays of alternative masks. +- Dedicated positive/negative tests and CI regression coverage. + +> **Upcoming:** GitHub release and npm publish after merge. See [CHANGELOG.md](./CHANGELOG.md). + +### 1.0.15 + - **Inputmask** - Safe merge of `definitions` (no hard override of defaults). - New **`L`** token (letter) accepts lowercase and forces **UPPERCASE** (`casing: "upper"`). @@ -415,7 +420,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true - Examples updated with `autoLoadDeps: { inputmask: true, jquery: true, toastr: true }` and `useToastrLogger: true`. - **Docs** - - CDN bumped to **1.0.16**. + - CDN bumped to **1.0.15**. - Notes about lowercase acceptance and uppercase coercion. - Guidance to **not** override `A`/`9` and define only custom tokens for restricted alphabets. From 297dc9e6ed2dcd6b787177cd42a18638ecabf37f Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:42:32 +0200 Subject: [PATCH 08/12] docs(md): update Moldova usage and release highlights --- README_IT.md | 50 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/README_IT.md b/README_IT.md index 7175cc8..272d726 100644 --- a/README_IT.md +++ b/README_IT.md @@ -1,6 +1,6 @@ # ๐ŸŒ @codecorn/euro-plate-validator -> ๐Ÿš— Validatore di targhe europee (Russia esclusa). Validazione della sintassi basata su espressioni regex multi-paese per targhe UE/SEE. Funziona in **Node.js/TypeScript** e nel **browser** (UI client leggera). +> ๐Ÿš— Validatore sintattico per targhe europee e Paesi vicini, inclusi Moldavia e Ucraina (Russia esclusa). Per Node.js, TypeScript, browser e PHP. [![Lang: EN](https://img.shields.io/badge/docs-English-red?style=for-the-badge)](./README.md) [![Demo](https://img.shields.io/badge/demo-GitHub%20Pages-0b6efd?style=for-the-badge)](https://codecorntech.github.io/euro-plate-validator/) @@ -14,7 +14,7 @@ ## โœจ Caratteristiche -- โœ… **Multi-country** (25+ EU/EEA) โ€” auto o paese fisso +- โœ… **30 Paesi supportati**, inclusa la Moldavia (`MD`) โ€” modalitร  automatica o Paese fisso - ๐Ÿ๏ธ Tipi veicolo: `car`, `bike`, `any` - ๐Ÿ”  Normalizzazione (spazi/trattini) + formattatori per paese - โ†•๏ธ **Minuscole accettate** in input e forzate a **MAIUSCOLO** in mask (token `L` custom) @@ -33,9 +33,9 @@ npm install @codecorn/euro-plate-validator --- -## ๐Ÿ”— CDN (v1.0.13) +## ๐Ÿ”— CDN (v1.0.16 โ€” dopo la pubblicazione npm) -> Usa URL **versionati** per evitare cache stantia. +> La v1.0.16 verrร  resa disponibile su CDN **dopo la pubblicazione npm**. Usare URL versionati per evitare cache obsolete. ### Core (browser) @@ -47,7 +47,7 @@ npm install @codecorn/euro-plate-validator - **ESM** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.mjs` -- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/europlate.client.cjs` +- **CJS (Node)** `https://cdn.jsdelivr.net/npm/@codecorn/euro-plate-validator@1.0.16/dist/client/index.cjs` ### Assets CSS @@ -393,22 +393,50 @@ Exit code: `0` valido, `1` non valido, `2` errori input. --- -## ๐ŸŒ Supported Countries +## ๐ŸŒ Paesi supportati -๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT | ๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU | ๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD +Il pacchetto supporta **30 Paesi**, inclusa la Moldavia (`MD`). -La Moldavia (`MD`) supporta targhe attuali (`ABC 123`), storiche (`AB CD 123`, `C AB 123`, `K AB 123`), diplomatiche (`CD 123 AB`), della polizia (`MAI 1234`) e della Transnistria (`T 123 AB`). La verifica รจ **solo sintattica**; non accerta immatricolazione o riconoscimento delle targhe regionali. +๐Ÿ‡ฎ๐Ÿ‡น IT | ๐Ÿ‡ฌ๐Ÿ‡ง UK | ๐Ÿ‡ฉ๐Ÿ‡ช DE | ๐Ÿ‡ซ๐Ÿ‡ท FR | ๐Ÿ‡ช๐Ÿ‡ธ ES | ๐Ÿ‡ต๐Ÿ‡น PT | ๐Ÿ‡ณ๐Ÿ‡ฑ NL | ๐Ÿ‡ง๐Ÿ‡ช BE | ๐Ÿ‡จ๐Ÿ‡ญ CH | ๐Ÿ‡ฆ๐Ÿ‡น AT +๐Ÿ‡ฎ๐Ÿ‡ช IE | ๐Ÿ‡ฑ๐Ÿ‡บ LU | ๐Ÿ‡ฉ๐Ÿ‡ฐ DK | ๐Ÿ‡ธ๐Ÿ‡ช SE | ๐Ÿ‡ณ๐Ÿ‡ด NO | ๐Ÿ‡ซ๐Ÿ‡ฎ FI | ๐Ÿ‡ต๐Ÿ‡ฑ PL | ๐Ÿ‡จ๐Ÿ‡ฟ CZ | ๐Ÿ‡ธ๐Ÿ‡ฐ SK | ๐Ÿ‡ญ๐Ÿ‡บ HU +๐Ÿ‡ท๐Ÿ‡ด RO | ๐Ÿ‡ง๐Ÿ‡ฌ BG | ๐Ÿ‡ธ๐Ÿ‡ฎ SI | ๐Ÿ‡ญ๐Ÿ‡ท HR | ๐Ÿ‡ฌ๐Ÿ‡ท GR | ๐Ÿ‡ฑ๐Ÿ‡น LT | ๐Ÿ‡ฑ๐Ÿ‡ป LV | ๐Ÿ‡ช๐Ÿ‡ช EE | ๐Ÿ‡บ๐Ÿ‡ฆ UA | ๐Ÿ‡ฒ๐Ÿ‡ฉ MD + +### ๐Ÿ‡ฒ๐Ÿ‡ฉ Moldavia (MD) + +| Categoria | Esempio | +| --- | --- | +| Standard attuale | `ABC 123` | +| Storica a quattro lettere | `AB CD 123` | +| Chiศ™inฤƒu C | `C AB 123` | +| Chiศ™inฤƒu K | `K AB 123` | +| Diplomatica | `CD 123 AB` | +| Polizia / MAI | `MAI 1234` | +| Transnistria | `T 123 AB` | ```ts -validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true +import { validatePlate, getInputMask } from "@codecorn/euro-plate-validator"; +validatePlate("ABC 123", ["MD"], { vehicleType: "car" }).isValid; // true +validatePlate("MAI 1234", ["MD"]).isValid; // true +validatePlate("ABC-123", ["MD"]).isValid; // false +getInputMask("MD"); // seven mask variants ``` ---- +Sono accettate le minuscole e le varianti compatte senza spazi, ma non i trattini. La verifica รจ **solo sintattica**, non prova che una targa sia immatricolata o legalmente riconosciuta. I formati condivisi possono generare piรน corrispondenze in modalitร  automatica. Vedi la [issue #2](https://github.com/CodeCornTech/euro-plate-validator/issues/2). +--- ## ๐Ÿงพ Changelog (highlights) ### 1.0.16 +- Supporto alle targhe moldave (`MD`): sette formati, metadati, bandiera e localizzazione IT/EN. +- Variante PHP aggiornata insieme al core TypeScript. +- Fix Inputmask: conserviamo gli array delle maschere alternative. +- Nuovi test positivi/negativi e regressione in CI. + +> **In preparazione:** release e pubblicazione npm solo dopo il merge. Leggi [CHANGELOG.md](./CHANGELOG.md). + +### 1.0.15 + - **Inputmask** - Merge sicuro delle `definitions` (niente override secco dei default). - Nuovo token **`L`** (lettera) che accetta minuscole e le forza a **MAIUSCOLO** (`casing: "upper"`). @@ -422,7 +450,7 @@ validatePlate("ABC 123", ["MD"], { vehicleType: "car" }); // isValid: true - Esempi aggiornati con `autoLoadDeps: { inputmask: true, jquery: true, toastr: true }` e `useToastrLogger: true`. - **Docs** - - CDN aggiornato a **1.0.16**. + - CDN aggiornato a **1.0.15**. - Nota su minuscole accettate + uppercase automatico. - ## Linee guida: **non** ridefinire `A`/`9`; definire solo token custom per alfabeti ristretti. From 6f923be2684e1b78a9de029109de2b1284b29b59 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:43:17 +0200 Subject: [PATCH 09/12] docs: add changelog for Moldova support and pending npm release --- CHANGELOG.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..43d18dd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,59 @@ +# Changelog + +Notable changes to **@codecorn/euro-plate-validator**. See also [GitHub releases](https://github.com/CodeCornTech/euro-plate-validator/releases). + +## Upcoming release โ€” publication pending + +### 1.0.16 + +> Prepared in [PR #3](https://github.com/CodeCornTech/euro-plate-validator/pull/3). The GitHub release and npm publication are deferred until after the merge into `main`. + +#### Added + +- **Moldova (`MD`)** added to the country codes, names, flag lookups and default multi-country validation (30 supported countries total). +- Seven Moldovan plate variants proposed in [issue #2](https://github.com/CodeCornTech/euro-plate-validator/issues/2): + - Current standard: `ABC 123` + - Historical four-letter: `AB CD 123` + - Chiศ™inฤƒu (C): `C AB 123` + - Chiศ™inฤƒu (K): `K AB 123` + - Diplomatic: `CD 123 AB` + - Police (MAI): `MAI 1234` + - Transnistria: `T 123 AB` +- Moldova display formats and Inputmask alternatives, with IT/EN country labels in the browser client. +- Matching Moldova regex patterns in the standalone PHP validator. +- Positive, negative and randomized Moldova test coverage; dedicated GitHub Actions regression step. +- English and Italian README documentation with format examples and an API usage snippet. + +#### Fixed + +- Preserve Inputmask alternative-mask arrays when normalizing mask patterns, instead of converting them to a comma-separated string. +- Add a TypeScript overload for `string | string[]` in the browser mask normalizer. + +#### Notes + +- This package validates **syntax only**, not actual registration, plate authenticity or legal recognition of regional plates. +- Lowercase input and valid compact forms without spaces are supported; hyphens are not accepted by the Moldova formats. +- Multiple country matches are possible in AUTO mode when patterns overlap. +- No Moldova motorcycle-specific format or new runtime dependency was added. + +## Previous version highlights + +### 1.0.15 + +- Improved Inputmask merging while retaining default definitions. +- Added uppercase-normalizing `L` letter token and safer restricted-letter masks. +- Improved placeholder derivation, mask application during country switching and client logging. + +### 1.0.14 + +- See [GitHub release v1.0.14](https://github.com/CodeCornTech/euro-plate-validator/releases/tag/v1.0.14). + +### 1.0.13 + +- Configurable inline, block or hidden validation status, with icon and text options. +- Improved handling of empty/partial input and country changes. + +### 1.0.12 + +- Introduced `autoFocusOnInit` and `preserveInputAttrs`. +- Standardized `epv__*` CSS classes and updated Inputmask autoload and localization behavior. From 0244f7590ff9d8d96a4a77c630c5d9a7264f1bcb Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:44:08 +0200 Subject: [PATCH 10/12] docs: polish release notes and README formatting --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a4eb3db..9712315 100644 --- a/README.md +++ b/README.md @@ -394,6 +394,7 @@ getInputMask("MD"); // seven mask variants Lowercase and compact unspaced forms are supported, but hyphens are not. Validation checks **syntax only**, not actual registration or legal recognition. AUTO mode may report multiple countries for overlapping patterns. See [issue #2](https://github.com/CodeCornTech/euro-plate-validator/issues/2). --- + ## ๐Ÿงพ Changelog (highlights) ### 1.0.16 @@ -434,11 +435,11 @@ Lowercase and compact unspaced forms are supported, but hyphens are not. Validat - `showStatusText: boolean` - `iconPosition: "left" | "right"` -- Riserva spazio automatica via `:has([data-state])` -- Nessuno stato su campo vuoto / parziale -- Fix cambio paese (ITโ†”FR) e Inputmask merge (`A/H/9`) -- Refactor UI status (`setValidityUI` unico writer) -- Add `clearStatusUI()` per idle neutro +- Automatic layout space reservation via `:has([data-state])` +- No status shown for empty or partial input +- Fixed country switching (ITโ†”FR) and Inputmask definitions merging (`A/H/9`) +- Refactored status rendering with `setValidityUI` as the single writer +- Added `clearStatusUI()` for a neutral idle state --- From e7d4ccd6cb5b5ba6ae42de0d4e77e75ec02a4404 Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:44:12 +0200 Subject: [PATCH 11/12] docs: polish release notes and README formatting --- README_IT.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README_IT.md b/README_IT.md index 272d726..9312517 100644 --- a/README_IT.md +++ b/README_IT.md @@ -424,7 +424,8 @@ getInputMask("MD"); // seven mask variants Sono accettate le minuscole e le varianti compatte senza spazi, ma non i trattini. La verifica รจ **solo sintattica**, non prova che una targa sia immatricolata o legalmente riconosciuta. I formati condivisi possono generare piรน corrispondenze in modalitร  automatica. Vedi la [issue #2](https://github.com/CodeCornTech/euro-plate-validator/issues/2). --- -## ๐Ÿงพ Changelog (highlights) + +## ๐Ÿงพ Novitร  e changelog ### 1.0.16 @@ -452,7 +453,7 @@ Sono accettate le minuscole e le varianti compatte senza spazi, ma non i trattin - **Docs** - CDN aggiornato a **1.0.15**. - Nota su minuscole accettate + uppercase automatico. - - ## Linee guida: **non** ridefinire `A`/`9`; definire solo token custom per alfabeti ristretti. + - Linee guida: **non** ridefinire `A`/`9`; definire solo token personalizzati per alfabeti ristretti. --- From 3e6092930a9165fc28fa1931b32f2ef329fe8e6f Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Thu, 15 Oct 2026 07:44:15 +0200 Subject: [PATCH 12/12] docs: polish release notes and README formatting --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d18dd..22c5620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,8 +36,6 @@ Notable changes to **@codecorn/euro-plate-validator**. See also [GitHub releases - Multiple country matches are possible in AUTO mode when patterns overlap. - No Moldova motorcycle-specific format or new runtime dependency was added. -## Previous version highlights - ### 1.0.15 - Improved Inputmask merging while retaining default definitions.