navapbc / template-application-nextjs

Next.js, TypeScript, USWDS, and Storybook template, including CI/CD, for teams at Nava building web applications
Apache License 2.0
10 stars 2 forks source link

Mark Evidently class as server-only #323

Closed sawyerh closed 2 months ago

sawyerh commented 2 months ago

Resolves #312

github-actions[bot] commented 2 months ago

Coverage report for app

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements
93.1% (+0.08% πŸ”Ό)
81/87
🟒 Branches 82.35% 14/17
🟒 Functions 93.33% 14/15
🟒 Lines
93.59% (+0.08% πŸ”Ό)
73/78

Test suite run success

16 tests passing in 5 suites.

Report generated by πŸ§ͺjest coverage report action from 741d8ecd5faadb2946b5d801d6721490f8befb48

rylew1 commented 2 months ago

Thanks for picking this one up @sawyerh !

Would it make sense for the route handler to also be marked server only? Though it's not really accessing anything secure at the moment.

sawyerh commented 2 months ago

@rylew1 Are you referring to api/hello/route.ts? My understanding is these only run on the server already.

rylew1 commented 2 months ago

Yea nvm then - I was just looking for other places where it might be used but where you have it on the evidently code might be the only place - or the only place where things might be inadvertently imported into a client component.