Skip to content

Conversation

clairep94
Copy link
Collaborator

@clairep94 clairep94 commented Sep 7, 2025

pr05 Typescript Migration 10: Set up TS dependencies to the server folder & migrate an instance of the server folder.

Changes:

  • Set up tsconfig for server folder & add typecheck:server to package.json commands
    • Manually checked this is working
  • Update root/index to have babel/register use babel/preset-typescript for ts files
  • Update nodemon to hot-reload when ts files update
  • Update webpack to resolve extensions with server folder modules
  • Migrate:
    • /server/views/previewIndex
    • /server/views/index
    • /server/utils/generateFileSystemSafeName

Other:

  • any updates to use named exports & auto-linting

@clairep94 clairep94 changed the title Pr05/setup server ts deps pr05 Typescript Migration #10: Setup Server TS Dependencies & migrate instance of server file Sep 7, 2025
@clairep94 clairep94 marked this pull request as ready for review September 8, 2025 00:30
@clairep94 clairep94 added the pr05 Grant Projects pr05 Grant Projects label Sep 8, 2025
@clairep94
Copy link
Collaborator Author

@raclim @khanniie ready for review!

Copy link
Collaborator

@khanniie khanniie left a comment

Choose a reason for hiding this comment

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

great work!!!

@@ -5,12 +5,10 @@
* @param {String} string
* @param {String} replacer (optional) character to replace invalid characters
*/
function generateFileSystemSafeName(string, replacer) {
export function generateFileSystemSafeName(string: string, replacer: string) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there any way we can rename this from string to something else? i assume it's not causing a bug but it just makes me nervous haha

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe "unsafeName" or more general, like "name"?

window.process.env.UPLOAD_LIMIT = ${process.env.UPLOAD_LIMIT ? `${process.env.UPLOAD_LIMIT}` : undefined};
window.process.env.TRANSLATIONS_ENABLED = ${process.env.TRANSLATIONS_ENABLED === 'true' ? true : false};
window.process.env.LOGIN_ENABLED = ${
process.env.LOGIN_ENABLED !== 'false'
Copy link
Collaborator

@khanniie khanniie Sep 10, 2025

Choose a reason for hiding this comment

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

no big deal either way but would you want to use the helper utils you wrote for this case & the ones below?

export function parseBoolean(

the only thing is you'd have to move the utility file into common/

@khanniie khanniie requested a review from raclim September 10, 2025 17:36
"target": "ES2022",
"module": "commonjs",
"lib": ["ES2022"],
"types": ["node", "jest"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't need to be changed at all, but just wanted to add a super small style note that the repo’s convention is to skip trailing commas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr05 Grant Projects pr05 Grant Projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants