Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate entries to Supabase #466

Merged
merged 17 commits into from
Aug 24, 2024
Merged

Migrate entries to Supabase #466

merged 17 commits into from
Aug 24, 2024

Conversation

jacob-8
Copy link
Collaborator

@jacob-8 jacob-8 commented Jul 11, 2024

No description provided.

Copy link

vercel bot commented Jul 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
living-dictionaries ✅ Ready (Inspect) Visit Preview Aug 23, 2024 8:42am

return { success, todo }
}

function convert_entry(_entry: Partial<ActualDatabaseEntry> & Record<string, any>) {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

id: randomUUID(),
}

for (const [key, value] of Object.entries(_entry) as [keyof ActualDatabaseEntry, any][]) {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

if (_entry.sf) {
const audio_id = randomUUID()
// TODO: use speakerName
// eslint-disable-next-line unused-imports/no-unused-vars

Choose a reason for hiding this comment

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

⚠️ [eslint] reported by reviewdog 🐶
Unused eslint-disable directive (no problems were reported from 'unused-imports/no-unused-vars').

Suggested change
// eslint-disable-next-line unused-imports/no-unused-vars

entry.lexeme = { default: _entry.lx }
delete _entry.lx

for (const [key, value] of Object.entries(_entry) as [keyof ActualDatabaseEntry, any][]) {
Copy link

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

return new Date(seconds * 1000).toISOString()
}

function isEmptyArray(value: any): boolean {
Copy link

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

return Array.isArray(value) && value.length === 0
}

function isEmptyObject(value: any): boolean {
Copy link

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

test(convert_entry, { timeout: 16000 }, async () => {
// const count = 266408
const count = 278631 // total entries
const success: any[] = []

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

// const count = 266408
const count = 278631 // total entries
const success: any[] = []
const todo: any[] = []

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

const success: any[] = []
const todo: any[] = []

const result: Promise<any[]> = new Promise<void>((resolve, reject) => {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

resolve(success)
})

pipeline.on('error', (err: any) => {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

expect(specific_entries).toMatchFileSnapshot('convert-entries.specific.snap.json')
})

function remove_seconds_underscore(entry: Partial<ActualDatabaseEntry> & Record<string, any>) {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

const admin_uid_if_no_owner = 'de2d3715-6337-45a3-a81a-d82c3210b2a7' // jacob@livingtongues.org
const old_talking_dictionaries = '00000000-0000-0000-0000-000000000000' // TODO - decide what user to use or create one for attribution

export function convert_entry(_entry: Partial<ActualDatabaseEntry> & Record<string, any>) {

Choose a reason for hiding this comment

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

⚠️ [eslint] <ts/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.

Copy link

⚡️Lighthouse report

Results for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/ (see detailed report)

Category Score
🔴 Performance 43
🟢 Accessibility 90
🟢 Best practices 100
🟢 SEO 96
🟢 PWA 90

Results for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/achi/entries/list (see detailed report)

Category Score
🟠 Performance 55
🟠 Accessibility 88
🟢 Best practices 100
🟢 SEO 97
🟢 PWA 90

Results for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/jaRhn6MAZim4Blvr1iEv/entry/yt9ja7ymh9xgba5i (see detailed report)

Category Score
🟠 Performance 70
🟠 Accessibility 89
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 90

@jacob-8 jacob-8 merged commit d9849d7 into main Aug 24, 2024
8 checks passed
@jacob-8 jacob-8 deleted the migrate-entries branch August 24, 2024 01:34
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.

1 participant