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

typescript migration #223

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

typescript migration #223

wants to merge 8 commits into from

Conversation

acao
Copy link
Member

@acao acao commented Aug 5, 2023

redo of #191 , with a graphql upgrade as well

  • type: module so that we're using the latest and greatest in module resolution/etc
  • jest -> vitest because jest doesn't support esm well
  • vitest.config.ts contains an alias to use cjs graphql because graphql-relay doesn't publish a module bundle yet (otherwise tests have realm error)
  • tweak tests because of changes in graphql 14 -> 16, and in upstream data source values (text where number strings are expected, etc)
  • dynamic imports seemed to be the best approach for importing data
  • drop babel because it's not needed for a server side application (previously swapi was entirely clientside, so it makes sense it was there before)
  • switch from complex eslint setup to typescript eslint recommended for simplicity
  • add github action workflow
  • replace dev scripts with netlify dev environment, which mocks the functions interface and models reverse proxy and redirect rules
  • remove everything flow related, replace with typescript
  • cache cache/data.json both in netlify and github actions for faster CI
  • note: most of the net lines of change are reflected in package-lock.json

Update: lost a ton of data when switching to swapi.tech

I will pull in the raw datasource in this PR and fix the issue for once and for all

@acao acao force-pushed the typescript-migration branch 4 times, most recently from c94d7df to 7db5316 Compare August 6, 2023 21:28
@acao acao requested review from benjie and JoviDeCroock January 14, 2025 06:19
@acao
Copy link
Member Author

acao commented Jan 14, 2025

need to update b/c of #236 especially

@acao acao force-pushed the typescript-migration branch from c08fc3d to 4f2a7c8 Compare January 14, 2025 08:33
@acao acao marked this pull request as draft January 14, 2025 08:50
@acao
Copy link
Member Author

acao commented Jan 14, 2025

moving this back to draft state, as the missing data in the new source is causing big issues with tests/etc

for reference, this rewrite happened when we were using swapi.dev, but now that it's gone, we're using swapi.tech which is missing a lot of data on index routes

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.

2 participants