From b02c5e0e25f0bbfb9a6414991fa45d1b6631b9b6 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Mon, 2 Dec 2024 21:43:46 +0100 Subject: [PATCH] ci: fail when codegen generates something new (#528) --- docs/Images.md | 2 +- docs/MapView.md | 2 +- docs/docs.json | 4 ++-- scripts/codegen.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Images.md b/docs/Images.md index a500e76db..8bcf3d1c3 100644 --- a/docs/Images.md +++ b/docs/Images.md @@ -10,6 +10,6 @@ Images defines the images used in Symbol etc layers |   [object Object] | `union` | `none` | `true` | FIX ME NO DESCRIPTION | | nativeAssetImages | `Array` | `none` | `false` | If you have an asset under Image.xcassets on iOS and the drawables directory on android
you can specify an array of string names with assets as the key `['pin']`. | | id | `string` | `none` | `false` | FIX ME NO DESCRIPTION | -| children | `ReactElement` | `none` | `true` | FIX ME NO DESCRIPTION | +| children | `ReactElement` | `none` | `false` | FIX ME NO DESCRIPTION | diff --git a/docs/MapView.md b/docs/MapView.md index dde92d465..5cdda00c5 100644 --- a/docs/MapView.md +++ b/docs/MapView.md @@ -28,7 +28,7 @@ MapView backed by MapLibre Native | onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated.
*signature:*`(location:Location) => void` | | regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events | | regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events | -| children | `ReactNode` | `none` | `true` | FIX ME NO DESCRIPTION | +| children | `ReactNode` | `none` | `false` | FIX ME NO DESCRIPTION | ## Methods ### `getPointInView(coordinate)` diff --git a/docs/docs.json b/docs/docs.json index 5a1a79982..70aa44398 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1537,7 +1537,7 @@ }, { "name": "children", - "required": true, + "required": false, "type": "ReactElement", "default": "none", "description": "FIX ME NO DESCRIPTION" @@ -2549,7 +2549,7 @@ }, { "name": "children", - "required": true, + "required": false, "type": "ReactNode", "default": "none", "description": "FIX ME NO DESCRIPTION" diff --git a/scripts/codegen.ts b/scripts/codegen.ts index 7cdb633d3..fee15098b 100644 --- a/scripts/codegen.ts +++ b/scripts/codegen.ts @@ -1,6 +1,6 @@ import maplibreGlStyleSpec from "@maplibre/maplibre-gl-style-spec/src/reference/latest"; import ejs from "ejs"; -import { exec } from "node:child_process"; +import { execSync } from "node:child_process"; import { promises as fs } from "node:fs"; import path from "node:path"; import prettier from "prettier"; @@ -327,7 +327,7 @@ async function generate() { // Check if any generated files changed try { - exec( + execSync( `git diff --exit-code docs/ ${TEMPLATE_MAPPINGS.map((m) => m.output).join(" ")}`, ); // eslint-disable-next-line @typescript-eslint/no-unused-vars