-
Notifications
You must be signed in to change notification settings - Fork 9
Specifying node versions #29
Comments
Just wanted to share an addition details after exploring three different CLIs. Here's my comment on issue: wip/app#61 (comment)
And by just using just
Hope this will be helpful. I too will check some other possibilities. 😄 |
At Heroku, I built http://semver.io/ to answer this question.
Opened a Glitch support issue about it: https://support.glitch.com/t/irregular-support-for-semver-engines/3535 |
I know I've talked to you about it before @bkeepers but I'm still a huge fan of just installing Installing the That means that you:
It's not documented a ton and I'm not sure how many people use it but if it's just downloading and executing a binary I feel like the risk is pretty low. Here's I would see it working. With these changes to diff --git a/bin/probot.js b/bin/probot.js
index fa29e7d..af28900 100755
--- a/bin/probot.js
+++ b/bin/probot.js
@@ -3,6 +3,8 @@
const semver = require('semver')
const version = require('../package').engines.node
+console.log(`You are running Node.js version ${process.version}.`)
+
if (!semver.satisfies(process.version, version)) {
console.log(`Node.js version ${version} is required. You have ${process.version}.`)
process.exit(1) and these changes to my bot but should be made to diff --git a/package.json b/package.json
index 3aad438..18ec228 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"test": "jest && standard"
},
"dependencies": {
+ "node": "^9.11.0",
"probot": "^5.0.0"
},
"devDependencies": {
@@ -17,9 +18,6 @@
"smee-client": "^1.0.1",
"standard": "^10.0.3"
},
- "engines": {
- "node" : "9.6.0"
- },
"standard": {
"env": [
"jest" I cannot run the bot with the wrong version: ☁ eslint-disable-bot [master] ⚡ n 6
☁ eslint-disable-bot [master] ⚡ node --version
v6.14.1
☁ eslint-disable-bot [master] ⚡ npm start
> [email protected] start /Users/koddsson/koddsson/eslint-disable-bot
> probot run ./index.js
You are running Node.js version v9.11.0. I was going to try to set up a small app on glitch but this method doesn't seem to work on their so maybe this isn't such a good solution. Here's the app if you wanna take a look: https://abiding-coast.glitch.me/ I'd be interested in seeing if other platforms fail on this as well. 📚Previous work
|
Getting closer: https://support.glitch.com/t/irregular-support-for-semver-engines/3535/4?u=zeke
|
Is this still causing friction? If so, please comment with any updates or addition details. |
Gave it a nudge: https://twitter.com/zeke/status/1008566309955592193
|
Is this still causing friction? If so, please comment with any updates or addition details. |
Hello @Stale. Yes, still causing friction this is. |
Is this still causing friction? If so, please comment with any updates or addition details. |
Yep, still fricative. |
Is this still causing friction? If so, please comment with any updates or addition details. |
Yes. Still. |
Is this still causing friction? If so, please comment with any updates or addition details. |
Specifying an acceptable version of Node to use across a bunch of different apps running a bunch of different platfroms (Heroku, glitch, nodenv, nvm, etc) has been a pretty big hassle.
Behavior I want: all Probot apps should default to using the latest LTS release. They can override it if they need to.
Here's all the places we currently specify a node version:
engines
that every generated app inherits$ probot
CLI checksengines
specified in probot'spackage.json
There's also challenges with:
engines
, but doesn't understand semver: Node dependency version fix. template#44engines
up to date as it evolves. Updating Probot (e.g. with Greenkeeper) doesn't updateengines
engines
Is there a better strategy or method for specifying node versions? Is there a way that apps can delegate to Probot for the version?
cc @gr2m @zeke @koddsson
The text was updated successfully, but these errors were encountered: