From b278f45d75c6330da85be5260defbd9e7ab78fd6 Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Thu, 29 Oct 2026 08:29:29 +0100 Subject: [PATCH 1/4] docs(Roadmap): update roadmap content --- docs/geo-parser/index.md | 4 ---- docs/spatial-core/index.md | 4 ---- docs/spatial-decoder/index.md | 3 --- docs/spatial-encoder/index.md | 3 --- docs/spatial-transformer/index.md | 3 --- docs/spatial-types/index.md | 3 --- docs/spatial-validator/index.md | 5 ----- docs/wkb-parser/index.md | 6 +++--- docs/wkt-parser/index.md | 6 +++--- 9 files changed, 6 insertions(+), 31 deletions(-) diff --git a/docs/geo-parser/index.md b/docs/geo-parser/index.md index 7df1399..b1deb22 100644 --- a/docs/geo-parser/index.md +++ b/docs/geo-parser/index.md @@ -4,7 +4,3 @@ description: Planned evolution of LongitudeOne Geo Parser across major releases. --- This roadmap shows announced support dates and release forecasts for geo-parser. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. -Actual initial release dates are verified against the [published releases](https://github.com/longitude-one/geo-parser/releases). diff --git a/docs/spatial-core/index.md b/docs/spatial-core/index.md index a04f4c0..a686082 100644 --- a/docs/spatial-core/index.md +++ b/docs/spatial-core/index.md @@ -4,7 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Core across major release --- This roadmap shows announced support dates and release forecasts for spatial-core. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. -Actual initial release dates are verified against the [published releases](https://github.com/longitude-one/spatial-core/releases). diff --git a/docs/spatial-decoder/index.md b/docs/spatial-decoder/index.md index 2c2959d..92a519b 100644 --- a/docs/spatial-decoder/index.md +++ b/docs/spatial-decoder/index.md @@ -4,6 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Decoder across major rele --- This roadmap shows announced support dates and release forecasts for spatial-decoder. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. diff --git a/docs/spatial-encoder/index.md b/docs/spatial-encoder/index.md index 0f5994d..a558437 100644 --- a/docs/spatial-encoder/index.md +++ b/docs/spatial-encoder/index.md @@ -4,6 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Encoder across major rele --- This roadmap shows announced support dates and release forecasts for spatial-encoder. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. diff --git a/docs/spatial-transformer/index.md b/docs/spatial-transformer/index.md index 0959317..1709098 100644 --- a/docs/spatial-transformer/index.md +++ b/docs/spatial-transformer/index.md @@ -4,6 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Transformer across major --- This roadmap shows announced support dates and release forecasts for spatial-transformer. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. diff --git a/docs/spatial-types/index.md b/docs/spatial-types/index.md index 9054ffb..ef692a3 100644 --- a/docs/spatial-types/index.md +++ b/docs/spatial-types/index.md @@ -4,6 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Types across major releas --- This roadmap shows announced support dates and release forecasts for spatial-types. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. diff --git a/docs/spatial-validator/index.md b/docs/spatial-validator/index.md index a1beffe..f2fb3fc 100644 --- a/docs/spatial-validator/index.md +++ b/docs/spatial-validator/index.md @@ -4,8 +4,3 @@ description: Planned evolution of LongitudeOne Spatial Validator across major re --- This roadmap shows announced support dates and release forecasts for spatial-validator. - -See the [1.x documentation](./v1/index.md) for the planned first major version. - -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. diff --git a/docs/wkb-parser/index.md b/docs/wkb-parser/index.md index e9f49b4..89f283f 100644 --- a/docs/wkb-parser/index.md +++ b/docs/wkb-parser/index.md @@ -5,6 +5,6 @@ description: Planned evolution of LongitudeOne WKB Parser across major releases. This roadmap shows announced support dates and release forecasts for wkb-parser. -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. -Actual initial release dates are verified against the [published releases](https://github.com/longitude-one/wkb-parser/releases). +After the 1st January 2027, WKB Parser will be deprecated and only receive security support until 31st December 2028. +The library will be replaced by the [Spatial Decoder](../spatial-decoder/index.md) library and its WKB Decoder strategy, +which will provide a more comprehensive and robust solution for decoding Well-Known Text (WKT) into PHP spatial objects. diff --git a/docs/wkt-parser/index.md b/docs/wkt-parser/index.md index b121887..355be77 100644 --- a/docs/wkt-parser/index.md +++ b/docs/wkt-parser/index.md @@ -5,6 +5,6 @@ description: Planned evolution of LongitudeOne WKT Parser across major releases. This roadmap shows announced support dates and release forecasts for wkt-parser. -Dates and Composer constraints come from the [shared roadmap configuration](../shared/support-timeline-generation.md#maintaining-library-roadmaps). -Support dates retain the existing roadmap commitments. Monthly release forecasts remain approximate until an exact date is announced. -Actual initial release dates are verified against the [published releases](https://github.com/longitude-one/wkt-parser/releases). +After the 1st January 2027, WKT Parser will be deprecated and only receive security support until 31st December 2028. +The library will be replaced by the [Spatial Decoder](../spatial-decoder/index.md) library and its WKT Decoder strategy, +which will provide a more comprehensive and robust solution for decoding Well-Known Text (WKT) into PHP spatial objects. From 65e3d4b8e6d9e8659f3ae621f6c4ef97de5100f1 Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Thu, 29 Oct 2026 08:29:53 +0100 Subject: [PATCH 2/4] docs(Roadmaps): update planned release dates and PHP targets --- config/roadmaps/geo-parser.json | 12 ++++++------ config/roadmaps/spatial-core.json | 8 ++++---- config/roadmaps/spatial-decoder.json | 6 +++--- config/roadmaps/spatial-encoder.json | 6 +++--- config/roadmaps/spatial-transformer.json | 4 ++-- config/roadmaps/spatial-types.json | 6 +++--- config/roadmaps/spatial-validator.json | 6 +++--- config/roadmaps/wkb-parser.json | 2 +- config/roadmaps/wkt-parser.json | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/config/roadmaps/geo-parser.json b/config/roadmaps/geo-parser.json index 7a589b9..f083fe8 100644 --- a/config/roadmaps/geo-parser.json +++ b/config/roadmaps/geo-parser.json @@ -24,22 +24,22 @@ { "version": "5.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2027-01-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", - "php": null, - "notes": "Release forecast: January 2027; exact date unannounced. Previously listed PHP target: 8.4 and 8.5; Composer constraint unannounced." + "php": "^8.4", + "notes": null }, { "version": "6.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, - "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5; Composer constraint unannounced." + "php": "^8.5", + "notes": null } ] } diff --git a/config/roadmaps/spatial-core.json b/config/roadmaps/spatial-core.json index eddfc8e..65622b8 100644 --- a/config/roadmaps/spatial-core.json +++ b/config/roadmaps/spatial-core.json @@ -14,21 +14,21 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2027-01-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", - "php": null, + "php": "^8.4", "notes": "Release forecast: September 2026; exact date unannounced. Previously listed PHP target: 8.4 to 8.6; Composer constraint unannounced." }, { "version": "3.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, + "php": "^8.5", "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5 and 8.6; Composer constraint unannounced." } ] diff --git a/config/roadmaps/spatial-decoder.json b/config/roadmaps/spatial-decoder.json index 51c518f..ad35384 100644 --- a/config/roadmaps/spatial-decoder.json +++ b/config/roadmaps/spatial-decoder.json @@ -4,7 +4,7 @@ { "version": "1.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2027-01-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", @@ -14,11 +14,11 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, + "php": "^8.5", "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5; Composer constraint unannounced." } ] diff --git a/config/roadmaps/spatial-encoder.json b/config/roadmaps/spatial-encoder.json index 46f7e0d..e989628 100644 --- a/config/roadmaps/spatial-encoder.json +++ b/config/roadmaps/spatial-encoder.json @@ -4,7 +4,7 @@ { "version": "1.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2027-01-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", @@ -14,11 +14,11 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, + "php": "^8.5", "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5; Composer constraint unannounced." } ] diff --git a/config/roadmaps/spatial-transformer.json b/config/roadmaps/spatial-transformer.json index ee889a7..8651eb8 100644 --- a/config/roadmaps/spatial-transformer.json +++ b/config/roadmaps/spatial-transformer.json @@ -4,7 +4,7 @@ { "version": "1.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2027-01-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", @@ -14,7 +14,7 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", diff --git a/config/roadmaps/spatial-types.json b/config/roadmaps/spatial-types.json index dff4731..c95c4fc 100644 --- a/config/roadmaps/spatial-types.json +++ b/config/roadmaps/spatial-types.json @@ -4,7 +4,7 @@ { "version": "1.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2026-12-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", @@ -14,11 +14,11 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, + "php": "^8.5", "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5; Composer constraint unannounced." } ] diff --git a/config/roadmaps/spatial-validator.json b/config/roadmaps/spatial-validator.json index d52fde6..ff089e8 100644 --- a/config/roadmaps/spatial-validator.json +++ b/config/roadmaps/spatial-validator.json @@ -4,7 +4,7 @@ { "version": "1.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2026-12-01", "releaseDate": null, "activeSupportUntil": "2027-12-31", "securitySupportUntil": "2028-12-31", @@ -14,11 +14,11 @@ { "version": "2.x", "status": "planned", - "plannedReleaseDate": null, + "plannedReleaseDate": "2028-01-01", "releaseDate": null, "activeSupportUntil": "2028-12-31", "securitySupportUntil": "2029-12-31", - "php": null, + "php": "^8.5", "notes": "Release forecast: January 2028; exact date unannounced. Previously listed PHP target: 8.5; Composer constraint unannounced." } ] diff --git a/config/roadmaps/wkb-parser.json b/config/roadmaps/wkb-parser.json index 5f08b66..0743c64 100644 --- a/config/roadmaps/wkb-parser.json +++ b/config/roadmaps/wkb-parser.json @@ -19,7 +19,7 @@ "activeSupportUntil": "2026-12-31", "securitySupportUntil": "2027-12-31", "php": "^8.1", - "notes": null + "notes": "This library will be deprecated after 1st January 2027 and it will be replaced by the Spatial Decoder library." } ] } diff --git a/config/roadmaps/wkt-parser.json b/config/roadmaps/wkt-parser.json index db88766..74b1247 100644 --- a/config/roadmaps/wkt-parser.json +++ b/config/roadmaps/wkt-parser.json @@ -19,7 +19,7 @@ "activeSupportUntil": "2026-12-31", "securitySupportUntil": "2027-12-31", "php": "^8.1", - "notes": null + "notes": "This library will be deprecated after 1st January 2027 and it will be replaced by the Spatial Decoder library." } ] } From 4137c3e366518c58b4fbe355b3cfa9d3b5d77b6a Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Thu, 29 Oct 2026 08:35:12 +0100 Subject: [PATCH 3/4] fix: preserve authored library content before roadmaps --- docs/shared/support-timeline-generation.md | 5 +- scripts/roadmap-publication.mjs | 7 ++- tests/export-markdown.test.mjs | 26 +++++++++-- tests/roadmap-publication.test.mjs | 53 ++++++++++++++++------ 4 files changed, 69 insertions(+), 22 deletions(-) diff --git a/docs/shared/support-timeline-generation.md b/docs/shared/support-timeline-generation.md index 39ee591..d96e66a 100644 --- a/docs/shared/support-timeline-generation.md +++ b/docs/shared/support-timeline-generation.md @@ -161,7 +161,9 @@ node scripts/generate-roadmap-timeline.mjs tests/fixtures/roadmaps/example-libra Edit `config/roadmaps/.json` to update a roadmap. Both the SVG and table consume that file on the next build. The library landing page is `docs//index.md`. Keep its required `title` and `description` front matter appropriate to the library. -The build replaces the entire body with the generated timeline and table in both HTML and portable Markdown; it does not append to existing prose. +The build preserves the complete authored body in its original order in both HTML and portable Markdown. +Generated roadmap text, timeline, support table and documentation-version links follow all authored headings, prose, lists, links, images and code blocks. +Repeated builds do not duplicate either part; configuration changes refresh only the generated content. Source files are not rewritten during the build. Version landing pages such as `docs//v2/index.md` remain separate and unchanged. Do not keep a separate library-level `roadmap.md` page or a hand-written support table. @@ -169,6 +171,7 @@ A missing library JSON file, a blank file, an empty JSON object (`{}`), or a val > The roadmap for this library has not been established yet. +The default message and any documentation-version links follow the complete authored body. No timeline or support table is generated in that case, and a previously generated image is removed on the next export. A populated branch list remains configured even if every date is `null`. Malformed non-empty JSON, invalid populated data, and configurations for unknown libraries fail the build with an error. An otherwise empty branch list must still satisfy the full schema. diff --git a/scripts/roadmap-publication.mjs b/scripts/roadmap-publication.mjs index ba789ba..7dc8b93 100644 --- a/scripts/roadmap-publication.mjs +++ b/scripts/roadmap-publication.mjs @@ -70,8 +70,11 @@ export function appendRoadmapSupport(tree, sourcePath, roadmaps, { html = false const library = sourcePath.split('/')[0]; if (!Object.hasOwn(roadmaps, library)) return; const { roadmap, versions } = roadmaps[library]; - // Keep source metadata, replacing every body node. Reapplying is idempotent. - tree.children = [...tree.children.filter(({ type }) => type === 'yaml'), ...roadmapSupportNodes(roadmap, { library, versions, html })]; + // Refresh only build-owned nodes; authored content (including metadata) stays in order. + const authored = tree.children.filter((node) => !node.data?.generatedRoadmapSupport); + const generated = roadmapSupportNodes(roadmap, { library, versions, html }); + for (const node of generated) node.data = { ...node.data, generatedRoadmapSupport: true }; + tree.children = [...authored, ...generated]; } export default function remarkRoadmapSupport({ roadmaps, docsDirectory }) { diff --git a/tests/export-markdown.test.mjs b/tests/export-markdown.test.mjs index 9861c54..8bee9a4 100644 --- a/tests/export-markdown.test.mjs +++ b/tests/export-markdown.test.mjs @@ -27,7 +27,7 @@ test('export generates roadmap images and portable support tables from one confi }] }; const { root, run } = await fixture(t, { 'docs/index.md': document('Home', 'Home.', '[Roadmap](./example-library/index.md)'), - 'docs/example-library/index.md': document('Example Library', 'Release and support roadmap.', 'Stale body must be replaced.'), + 'docs/example-library/index.md': document('Example Library', 'Release and support roadmap.', '## Introduction\n\nAuthored introduction with [version](./v1/index.md).\n\n- First\n- Second\n\n```php\n$example = 1;\n```\n\nFinal authored paragraph.'), 'docs/example-library/v1/index.md': document('Version 1', 'Version documentation.'), 'config/roadmaps/window.json': JSON.stringify({ startDate: '2024-01-01', endDate: '2029-12-31' }), 'config/roadmaps/example-library.json': JSON.stringify(roadmap), @@ -38,7 +38,10 @@ test('export generates roadmap images and portable support tables from one confi await exportRoadmap(); const output = await readFile(path.join(root, '.generated-markdown/example-library/index.md'), 'utf8'); assert.match(output, /2027-02-01 \(forecast\)/); - assert.doesNotMatch(output, /Stale body must be replaced|Get started/); + assert.ok(output.indexOf('Final authored paragraph.') < output.indexOf('## Release timeline')); + assert.match(output, /\[version\]\(v1\/index\.md\)/); + assert.match(output, /```php\n\$example = 1;/); + const source = await readFile(path.join(root, 'docs/example-library/index.md'), 'utf8'); assert.match(output, /\[1\.x\]\(v1\/index\.md\)/); assert.match(output, /\^8.4.*\^8.5/); assert.match(output, /\.\.\/assets\/roadmaps\/example-library.svg/); @@ -57,7 +60,20 @@ test('export generates roadmap images and portable support tables from one confi const updated = await readFile(path.join(root, '.generated-markdown/example-library/index.md'), 'utf8'); assert.notEqual(updated, original); assert.match(updated, /2027-03-01 \(forecast\)/); + assert.equal(updated.slice(0, updated.indexOf('## Release timeline')), output.slice(0, output.indexOf('## Release timeline'))); + assert.equal(await readFile(path.join(root, 'docs/example-library/index.md'), 'utf8'), source); assert.match(await readFile(path.join(root, 'static/assets/roadmaps/example-library.svg'), 'utf8'), /2027-03-01/); + for (const configuration of [null, '', '{}', JSON.stringify({ ...roadmap, branches: [] })]) { + const filename = path.join(root, 'config/roadmaps/example-library.json'); + if (configuration === null) await rm(filename); + else await writeFile(filename, configuration); + await exportRoadmap(); + const fallback = await readFile(path.join(root, '.generated-markdown/example-library/index.md'), 'utf8'); + assert.ok(fallback.indexOf('Final authored paragraph.') < fallback.indexOf('The roadmap for this library')); + assert.ok(fallback.indexOf('The roadmap for this library') < fallback.indexOf('## Documentation versions')); + assert.doesNotMatch(fallback, /## Release timeline|## Branch support/); + assert.equal(await readFile(path.join(root, 'docs/example-library/index.md'), 'utf8'), source); + } }); function document(title, description, body = '', extraMetadata = '') { @@ -143,14 +159,16 @@ async function landingFixture(t, entryDocument = 'index.md') { return { ...result, exportLanding: () => result.run({ NODE_OPTIONS: `--import=${preload}` }) }; } -test('exports unestablished library landing pages without superseded navigation or support content', async (t) => { +test('exports unestablished library landing pages after authored content without invented support content', async (t) => { const { root, exportLanding } = await landingFixture(t); await exportLanding(); const landing = await readFile(path.join(root, '.generated-markdown/spatial-core/index.md'), 'utf8'); assert.match(landing, /The roadmap for this library has not been established yet\./); assert.match(landing, /\[v1\]\(v1\/index\.md\)/); assert.match(landing, /\[v2\]\(v2\/index\.md\)/); - assert.doesNotMatch(landing, /Library summary|Requirements|Get started|composer require|Release timeline|Branch support/); + assert.ok(landing.indexOf('Library summary') < landing.indexOf('## Requirements')); + assert.ok(landing.indexOf('## Requirements') < landing.indexOf('The roadmap for this library')); + assert.doesNotMatch(landing, /Get started|composer require|Release timeline|Branch support/); const version = await readFile(path.join(root, '.generated-markdown/spatial-core/v1/index.md'), 'utf8'); assert.match(version, /View the library roadmap\]\(\.\.\/index\.md\)/); }); diff --git a/tests/roadmap-publication.test.mjs b/tests/roadmap-publication.test.mjs index c639f3f..01dc54e 100644 --- a/tests/roadmap-publication.test.mjs +++ b/tests/roadmap-publication.test.mjs @@ -154,21 +154,44 @@ for (const configuration of ['{', 'null', '[]', '{"branches":[]}', JSON.stringif }); } -test('replacement preserves front matter, removes stale body and remains idempotent', () => { - const source = '---\ntitle: Library\ndescription: Library roadmap.\nsidebar_position: 2\n---\n\nStale introduction.\n\n## Old content\n'; - const tree = processor.parse(source); - const metadata = structuredClone(tree.children[0]); - const data = { 'example-library': { roadmap: roadmap(), versions: ['v1'] } }; - appendRoadmapSupport(tree, 'example-library/index.md', data); - const first = structuredClone(tree); - appendRoadmapSupport(tree, 'example-library/index.md', data); - assert.deepEqual(tree, first); - assert.deepEqual(tree.children[0], metadata); - assert.doesNotMatch(processor.stringify(tree), /Stale introduction|Old content/); - const versionTree = processor.parse(source); - appendRoadmapSupport(versionTree, 'example-library/v1/index.md', data); - assert.deepEqual(versionTree, processor.parse(source)); -}); +const authoredSource = '---\ntitle: Library\ndescription: Library roadmap.\nsidebar_position: 2\n---\n\n' + + '## Introduction\n\nAuthored **explanation** with [version](v1/index.md).\n\n' + + '- First item\n- Second item\n\n![Diagram](../assets/diagram.svg)\n\n' + + '```php\n$example = "Release timeline";\n```\n\n## Branch support\n\nFinal authored paragraph.\n'; + +for (const html of [false, true]) { + for (const input of [roadmap(), null, roadmap([])]) { + test(`authored content precedes generated content and survives refresh (html=${html}, roadmap=${input?.branches.length ?? 'missing'})`, () => { + const tree = processor.parse(authoredSource); + const authored = structuredClone(tree.children); + const data = { 'example-library': { roadmap: input, versions: ['v1'] } }; + const apply = () => html + ? remarkRoadmapSupport({ roadmaps: data, docsDirectory: '/site/docs' })(tree, { path: '/site/docs/example-library/index.md' }) + : appendRoadmapSupport(tree, 'example-library/index.md', data); + apply(); + assert.deepEqual(tree.children.slice(0, authored.length), authored); + assert.equal(tree.children[authored.length].type, input?.branches.length ? 'heading' : 'paragraph'); + const first = structuredClone(tree); + apply(); + assert.deepEqual(tree, first); + data['example-library'].roadmap = roadmap([branch({ notes: 'Updated configuration' })]); + apply(); + assert.deepEqual(tree.children.slice(0, authored.length), authored); + assert.match(processor.stringify(tree), /Updated configuration/); + assert.equal(tree.children.filter(({ type }) => type === 'table').length, 1); + data['example-library'].roadmap = null; + apply(); + assert.deepEqual(tree.children.slice(0, authored.length), authored); + assert.equal(tree.children.filter(({ type }) => type === 'table').length, 0); + assert.equal(tree.children[authored.length].children[0].value, 'The roadmap for this library has not been established yet.'); + assert.equal(tree.children.at(-1).children[0].children[0].children[0].url, + html ? `${expectedHtmlDirectory}v1/index.html` : 'v1/index.md'); + const versionTree = processor.parse(authoredSource); + appendRoadmapSupport(versionTree, 'example-library/v1/index.md', data, { html }); + assert.deepEqual(versionTree, processor.parse(authoredSource)); + }); + } +} test('documented majors link to version landing pages in both representations, missing versions stay text', async (t) => { const root = await fixture(t); From 4a601622fb17c3e7f8990ac46160c740c7ffc0c0 Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Thu, 29 Oct 2026 08:39:57 +0100 Subject: [PATCH 4/4] fix(Roadmaps): Date fixed --- docs/wkb-parser/index.md | 4 ++-- docs/wkt-parser/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/wkb-parser/index.md b/docs/wkb-parser/index.md index 89f283f..a64ea44 100644 --- a/docs/wkb-parser/index.md +++ b/docs/wkb-parser/index.md @@ -5,6 +5,6 @@ description: Planned evolution of LongitudeOne WKB Parser across major releases. This roadmap shows announced support dates and release forecasts for wkb-parser. -After the 1st January 2027, WKB Parser will be deprecated and only receive security support until 31st December 2028. +After the 1st January 2027, WKB Parser will be deprecated and only receive security support until 31st December 2027. The library will be replaced by the [Spatial Decoder](../spatial-decoder/index.md) library and its WKB Decoder strategy, -which will provide a more comprehensive and robust solution for decoding Well-Known Text (WKT) into PHP spatial objects. +which will provide a more comprehensive and robust solution for decoding Well-Known Binary (WKB) into PHP spatial objects. diff --git a/docs/wkt-parser/index.md b/docs/wkt-parser/index.md index 355be77..e72c37f 100644 --- a/docs/wkt-parser/index.md +++ b/docs/wkt-parser/index.md @@ -5,6 +5,6 @@ description: Planned evolution of LongitudeOne WKT Parser across major releases. This roadmap shows announced support dates and release forecasts for wkt-parser. -After the 1st January 2027, WKT Parser will be deprecated and only receive security support until 31st December 2028. +After the 1st January 2027, WKT Parser will be deprecated and only receive security support until 31st December 2027. The library will be replaced by the [Spatial Decoder](../spatial-decoder/index.md) library and its WKT Decoder strategy, which will provide a more comprehensive and robust solution for decoding Well-Known Text (WKT) into PHP spatial objects.