-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes: We are deprecating support for Node.js v0.12, to be removed in next major version!
- Loading branch information
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ coverage/ | |
README.hbs | ||
output.md | ||
output/ | ||
src/ | ||
test/ | ||
examples/ | ||
lib-doc/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
module.exports = require('./src/telegram'); | ||
/** | ||
* If running on Nodejs 0.12, we load the transpiled code. | ||
* Otherwise, we use the ES6 code. | ||
* We are deprecating support for Node.js v0.x | ||
*/ | ||
const majorVersion = process.versions.node.split('.')[0]; | ||
if (majorVersion === '0') { | ||
const deprecate = require('depd')('node-telegram-bot-api'); | ||
deprecate('Node.js v0.12 and below will no longer be supported in the future'); | ||
module.exports = require('./lib/telegram'); | ||
} else { | ||
module.exports = require('./src/telegram'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters