Skip to content

Fix broken task runner and improve readability medium solution#1

Open
Ferdi-Cocelli wants to merge 1 commit into
Solirius-QE:mainfrom
Ferdi-Cocelli:fix/script-mapping-and-esm-support
Open

Fix broken task runner and improve readability medium solution#1
Ferdi-Cocelli wants to merge 1 commit into
Solirius-QE:mainfrom
Ferdi-Cocelli:fix/script-mapping-and-esm-support

Conversation

@Ferdi-Cocelli

Copy link
Copy Markdown

The run category script expected filenames like 2-medium.ts but the actual task files are just named medium.ts. Updated the difficulty mapping to match the real filenames.

The readability medium task uses top level await, which requires ESM. Added "type": "module" to package.json to enable this. Since the helper scripts (run category, decrypt) use require(), they've been renamed from .js to .cjs so Node treats them as CommonJS while the rest of the project runs as ESM.

Also refactored the readability medium task itself by splitting the single compound assertion into three separate assertions with descriptive error messages, and destructured response.data to reduce repetition.

Ferdi, Christian, Nathan, Henry

The run category script expected filenames like 2-medium.ts but the
actual task files are just named medium.ts. Updated the difficulty
mapping to match the real filenames.

The readability medium task uses top level await, which requires ESM.
Added "type": "module" to package.json to enable this. Since the
helper scripts (run category, decrypt) use require(), they've been
renamed from .js to .cjs so Node treats them as CommonJS while the
rest of the project runs as ESM.

Also refactored the readability medium task itself by splitting the
single compound assertion into three separate assertions with
descriptive error messages, and destructured response.data to reduce
repetition.

Ferdi, Christian, Nathan, Henry
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