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

NodeJS course : Shifting from CJS to ESM #29158

Open
3 tasks done
RushilJalal opened this issue Dec 7, 2024 · 3 comments
Open
3 tasks done

NodeJS course : Shifting from CJS to ESM #29158

RushilJalal opened this issue Dec 7, 2024 · 3 comments

Comments

@RushilJalal
Copy link
Contributor

Checks

Describe your suggestion

ESM has become the norm over the years, gradually phasing out CJS.
I do understand that CJS is still widely used. Thus, I believe we should let the user decide between CJS and ESM syntax for the same code.
We could also approach this by converting all course code from CJS to ESM.
Let me know your views on this:)

Path

Node / JS

Lesson Url

https://www.theodinproject.com/paths/full-stack-javascript/courses/nodejs

(Optional) Discord Name

willyWonka

(Optional) Additional Comments

No response

@MaoShizhong
Copy link
Contributor

MaoShizhong commented Dec 7, 2024

The team is currently in the process of revamping the Node course and the CJS/ESM thing is on the agenda but for a future milestone. Note that the things marked "Dump" are just idea dumps and not actual set plans - each milestone gets discussed and addressed once the previous has been completed and shipped.

@wise-king-sullyman
Copy link
Member

@MaoShizhong do you know if the CJS -> ESM migration is actually blocked by anything?

@MaoShizhong
Copy link
Contributor

MaoShizhong commented Dec 10, 2024

Mainly team discussion and agreement on exactly how we want to approach things, e.g. full ESM, full ESM with a lesson or so on CJS, start CJS then transition to ESM, introduce both then let people use what they wish etc.

That'd primarily be a decision for @01zulfi but I remember past discussion involving "we like ESM, we'll be doing stuff with it but there's stuff to consider so we'll deal with that later". More of the resources/docs we were linking to were using CJS examples. I imagine after milestone 2 is released (APIs/auth), there will be much less reliance on external CJS so a decision on and transition to ESM in some capacity will be much simpler. Since there's no urgency behind such a transition, I'd personally be in favour of leaving it until the appropriate milestone to discuss and implement.

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

No branches or pull requests

3 participants