Changelog
phil/structured-dataPas encore traduite
Cette page n’est pas encore traduite en français ; elle est montrée en anglais.
All notable changes to phil/structured-data will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
0.1.1-alpha - 2026-11-11
Security
- The
Validatorreads an address property (url,sameAs,image…) byphil/url, as a browser reads it, no longer byparse_url(), which took a user name for a host:https://example.com@evil.example/, which leads to evil.example, passed as valid. An address with a user name or a password, or whose host is an IP address (https://127.0.0.1/,https://2130706433/), a single name, an empty label (https://example..com/) or an escape (https://%zz.example/), or with port 0, is now aninvalid-urlerror.
Added
Validator'sallowLocalhost,falseby default, kept bywithRules():true, in development and tests, makes an address onlocalhostor under.localhostvalid; an IP address stays aninvalid-url.Schema::allowLocalhost(), for the factories:true, once in development and tests, lets the nodes built after hold an address onlocalhostor under.localhost.
Changed
- The package requires
phil/url0.1.3.
0.1.0-alpha - 2026-11-11
Added
Node: an immutable schema.org node with its types, its@idand its properties — texts, numbers, booleans, dates written as ISO 8601, backed enums written as their values, language strings, references, nested nodes and lists of them —, its terms and identifiers checked, 32 levels deep at most;Node::fromArray()reads schema.org data as JSON-LD decodes it;mergedWith()merges two nodes of one thing.Reference,LanguageString,LanguageTag(BCP 47 tags, locales with underscores read too) andId, whoseId::of()makes stable identifiers of an address and a fragment;InvalidStructuredData.Graph: the nodes of a page, merged by@idwhere the first stands, nested nodes with an@idlifted to the top and replaced by references, the language of its texts written in its context, 10,000 nodes at most.- Factories of
Thing,WebSite(with itsSearchAction),WebPage,BreadcrumbList,Organization,LocalBusiness,Person,Event,Place,PostalAddress,Product,Offer,Book,CreativeWork,Article,SoftwareSourceCode,SoftwareApplication,FAQPageandImageObject, with the enumsEventStatus,EventAttendanceMode,ItemAvailabilityandBookFormat. JsonLd: the JSON-LD of a graph, and its one script element with the nonce of a content security policy, unable to be closed by its data.Validator,Rules,TypeRules,Report,IssueandSeverity: the required and recommended properties of each type and of its parents, dates, addresses, currencies and languages checked, references to missing nodes and untyped nodes reported.Schema: the factories ofArticle,Product,Offer,Event,Place,PostalAddress,Organization,Person,WebSite,WebPage,BreadcrumbListandImageObject, each node checked by the validator at once and refused with its errors.JsonLdReaderandExtraction: the JSON-LD elements of a page read back into one graph, bounded for pages written by anyone, with a fuzz target.NodeCollector, the port where the parts of an application pour the nodes of a page.- A benchmark of the assembly and the writing of a page's graph.
- The documentation in
doc/, indexed by the README. CONTRIBUTING.md,SECURITY.mdandCODE_OF_CONDUCT.md.