fix(types): add schema property to TimeseriesIndex type#521
fix(types): add schema property to TimeseriesIndex type#521
Conversation
Expected version change and release notes:1.5.0-dev.19 (v1.5.0-dev.18...fix-ts_errors_index_gen ) (2025-11-05T14:48 UTC)Fixes
Other
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-521.westus2.2.azurestaticapps.net |
There was a problem hiding this comment.
Pull Request Overview
This PR adds schema metadata to the timeseries index to track the version and generation timestamp. The changes introduce a schema field containing version (set to 1) and generatedAt (ISO timestamp) to both the generated index file and the build script's type definition.
Key changes:
- Added
schemaproperty toTimeseriesIndextype definition in the build script - Populated
schemafield in the generated index with version 1 and current timestamp - Updated the generated
index.gen.tsfile to include the new schema metadata
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/build-timeseries-files.ts | Adds schema field to TimeseriesIndex type and populates it with version and generation timestamp during build |
| src/data/index.gen.ts | Auto-generated file updated to include the new schema metadata field |
Comments suppressed due to low confidence (1)
src/data/index.gen.ts:21
- The new
schemafield in theTimeseriesIndextype is not validated or tested. Consider adding a test insrc/utils/timeseriesIndex.test.tsto verify that the schema field is present and has the expected structure (version as number, generatedAt as valid ISO string).
schema: { version: number; generatedAt: string };
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-521.westus2.2.azurestaticapps.net |
|
Closing in favour of #529 |
AlexAxthelm
left a comment
There was a problem hiding this comment.
This works, but the schema object was pretty noisy in the original version (timestamp made a bunch of diffs). I worked up #529 in its place.
schematype definition withversionandgeneratedAtfieldsbuild-timeseries-files.tsschemaproperty to generatedindex.gen.tsoutputAlso adds
"src/data/index.gen.ts"totsconfig.node.json, sinceindex.gen.tsis used insrc/utils/timeseriesIndex.ts(which itself is insrc/utils/*).Relates to #514