Skip to content

fix(types): add schema property to TimeseriesIndex type#521

Closed
jdhoffa wants to merge 3 commits intomainfrom
fix-ts_errors_index_gen
Closed

fix(types): add schema property to TimeseriesIndex type#521
jdhoffa wants to merge 3 commits intomainfrom
fix-ts_errors_index_gen

Conversation

@jdhoffa
Copy link
Collaborator

@jdhoffa jdhoffa commented Nov 5, 2025

  • Add schema type definition with version and generatedAt fields
  • Implement schema property in output object of build-timeseries-files.ts
  • Add schema property to generated index.gen.ts output

Also adds "src/data/index.gen.ts" to tsconfig.node.json, since index.gen.ts is used in src/utils/timeseriesIndex.ts (which itself is in src/utils/*).

Relates to #514

Copilot AI review requested due to automatic review settings November 5, 2025 14:26
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

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

  • types: add schema property to TimeseriesIndex (a19cbc1)

Other

  • add index.gen.ts to ts node config (07a04e5)

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-521.westus2.2.azurestaticapps.net

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 schema property to TimeseriesIndex type definition in the build script
  • Populated schema field in the generated index with version 1 and current timestamp
  • Updated the generated index.gen.ts file 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 schema field in the TimeseriesIndex type is not validated or tested. Consider adding a test in src/utils/timeseriesIndex.test.ts to 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.

@jdhoffa jdhoffa requested a review from AlexAxthelm November 5, 2025 14:29
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-521.westus2.2.azurestaticapps.net

This was referenced Nov 6, 2025
@jdhoffa
Copy link
Collaborator Author

jdhoffa commented Nov 6, 2025

Closing in favour of #529

@jdhoffa jdhoffa closed this Nov 6, 2025
Copy link
Collaborator

@AlexAxthelm AlexAxthelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jdhoffa jdhoffa deleted the fix-ts_errors_index_gen branch November 17, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants