-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Stop transpiling detox and detox-server, use sources and require node >=7.6 #404
Conversation
🙏 Really need this 🙏 Nice find/fix, @mrtnrst |
What version of node do you guys use? |
We are currently using v8.6 LTS. I thought for legacy support but unsure how far back you wanted to go. |
263 days since Node 7.6 was released. Good time to say bye to Babel :) |
I can open another PR to remove Babel if you aren't on it already. 🙇 |
yes, please do 🤗 |
@rotemmiz I removed the extra babel packages but kept the build. Also added a min version for node engines which will introduce a breaking change, let me know your thoughts. |
This is not enough, I want to remove all trace of babel.
|
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.
🤗
detox-server/package.json
Outdated
}, | ||
"scripts": { | ||
"build": "BABEL_ENV=test babel src -d lib", | ||
"start": "node lib/cli.js", | ||
"build": "node src -d lib", |
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 can drop build
script altogether
detox/scripts/build.sh
Outdated
@@ -1,7 +1,6 @@ | |||
#!/bin/bash -e | |||
|
|||
echo -e "\nTranspiling JavaScript sources" |
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.
drop the echo
Any quick way to point the package.json to this pull request? |
hey @mrtnrst , any updates on your side ? If you need any help, please ping me. |
@rotemmiz sorry I've had a busy week. Going to spend some time later today to try and get the CI issues resolved. |
@rotemmiz so this was a lot easier than I originally thought! I just have to pay closer attention to my changes. 😁 🎉 |
Tested the PR, it works if I run But when testing on a an empty react-native project with detox and it says this: PS: It's probably because I'm using EDIT: After running |
@mrtnrst , one last thing, in order to really test it works, let's point the test project to use Detox from main and not specifically from source. change: const detox = require('../../src/index'); to const detox = require('detox'); Then, if it passes CI, we're good. |
Thanks ! 🙏 |
Overview
Remove deprecated package and updated to latest suggest package per Babel docs.
Discussion
I was noticing errors with a project that was not importing babel-preset-latest as a dev dependency. Rather than importing deprecated code I went ahead and updated to current logic.
Example:
would return
Couldn't find preset "latest" relative to directory "/Users/arista/***/node_modules/detox"