Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Update dependencies, fix lints and set updated packages #107

Merged
merged 7 commits into from
May 9, 2024

Conversation

saraswatpuneet
Copy link
Collaborator

@saraswatpuneet saraswatpuneet commented May 7, 2024

Details

  • Retain current version of polkadotjs, multiformats
  • Remove unused dependencies
  • Update linter and fix all the linter related errors, most of them were namespace errors
  • Update remaning depdencies to new version

Tests

  • Run e2e tests to ensure everything is working

@@ -50,7 +50,7 @@ export class BatchAnnouncer {
const writer = await ParquetWriter.openStream(parquetSchema, publishStream as any, writerOptions);
// eslint-disable-next-line no-restricted-syntax
for await (const announcement of announcements) {
await writer.appendRow(announcement);
await writer.appendRow(announcement as Record<string, any>);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No clue why after updates, this error started popping, got fixed by a cast but not sure if its correct


> ERROR in ./apps/worker/src/batch_announcer/batch.announcer.ts:53:30
> TS2345: Argument of type 'Announcement' is not assignable to parameter of type 'Record<string, unknown>'.
>   Type '{ announcementType: AnnouncementType; fromId: string; } & TombstoneFields' is not assignable to type 'Record<string, unknown>'.
>     Index signature for type 'string' is missing in type '{ announcementType: AnnouncementType; fromId: string; } & TombstoneFields'.
>     51 |     // eslint-disable-next-line no-restricted-syntax
>     52 |     for await (const announcement of announcements) {
>   > 53 |       await writer.appendRow(announcement);
>        |                              ^^^^^^^^^^^^
>     54 |     }
>     55 |     await writer.close();
>     56 |
> 
> webpack 5.90.1 compiled with 1 error in 13268 ms
> 

Copy link
Collaborator

Choose a reason for hiding this comment

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

I checked and this is an issue with Parquetjs. I'll work on getting a fix in over there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@saraswatpuneet I found the correct fix and it isn't in the Parquetjs side.

The TypedAnnouncement type needs to explicitly extend intersect with the Record<string, unknown>
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will issue an update for this

@saraswatpuneet saraswatpuneet marked this pull request as ready for review May 9, 2024 13:40
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@wilwade wilwade left a comment

Choose a reason for hiding this comment

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

🙇

@@ -50,7 +50,7 @@ export class BatchAnnouncer {
const writer = await ParquetWriter.openStream(parquetSchema, publishStream as any, writerOptions);
// eslint-disable-next-line no-restricted-syntax
for await (const announcement of announcements) {
await writer.appendRow(announcement);
await writer.appendRow(announcement as Record<string, any>);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I checked and this is an issue with Parquetjs. I'll work on getting a fix in over there.

@saraswatpuneet saraswatpuneet merged commit e07f423 into main May 9, 2024
3 checks passed
@saraswatpuneet saraswatpuneet deleted the update_dependencies_lint branch May 9, 2024 19:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants