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

Refactor archinfo.js to typescript #10624

Merged
merged 1 commit into from
Jul 21, 2019

Conversation

pmogollons
Copy link
Contributor

@pmogollons pmogollons commented Jul 11, 2019

  • Updated code to use modern JS
  • Added types
  • Stopped using 2 underscore functions (1 remaining)
  • TS complains about execFileSync not being exported. I think it requires the update of that file too.

@@ -1,7 +1,7 @@
var _ = require('underscore');
var os = require('os');
const { max } = require('underscore');
Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand, the reason this wasn't transformed into an import statement is because there wasn't a type definition for underscore. A better way to solve this would be to install @types/underscore. The local tools/node_modules is a symlink to dev_bundle/lib/node_modules so I'm currently trying to find which package.json should be changed in order to add the package.

Since dev_bundle changes can be made just by the MDG maybe @benjamn or someone else could help with this. I'm currently trying to figure out which particular package.json has to be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but the main reason for not going that way was taking a look to a file that @benjamn already refactor to TS and was requiring underscore instead of importing it and installing the types.

tools/isobuild/resolver.ts

But installing the types should be the way to go. Or even better just removing underscore completely. But that requires some additional work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, I'm still new to the codebase so it's hard to understand the reasoning behind leaving the require.

Copy link
Contributor

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

Looks good @pmogollons! I changed the import from tools/utils/utils.js back to use require for now, because of the execFileSync issue. That should be resolved when #10634 is merged.

* Updated code to use modern JS
* Added types
* Stopped using 2 underscore functions (1 remaining)
@benjamn benjamn merged commit 2ae2690 into meteor:release-1.8.2 Jul 21, 2019
@pmogollons
Copy link
Contributor Author

Awesome. Thanks.

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

Successfully merging this pull request may close these issues.

3 participants