-
Notifications
You must be signed in to change notification settings - Fork 15
CLOUDP-298233: use JS instead of cjs #427
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
Conversation
|
any reason why? |
|
@gssbzn You mean node versions? |
why move from commonjs to module js? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node uses commonjs by default should this be .mjs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it esm is the standard nowadays
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have all files as js (which should be fine) using (mjs) import format.
This PR makes single change to align to that format.
If we want to change extension or import format let me know. Can do it across repo comprehensively.
|
I introduced it before but we agreed with @lovisaberggren to use esm (js + import format) across all the repository. |
| @@ -1 +1,2 @@ | |||
| golang 1.23.0 | |||
| nodejs 20.9.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked at the package json reference, we can specify there if we want: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#engines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That is very common practice. Adding it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding it to the package.json just produces warnings
c1500d5 to
1558240
Compare
1558240 to
794fd8a
Compare
Proposed changes
CLOUDP-298233
Make transformation to use js. Added nodejs runtime to tools as bonus.