Skip to content

Commit

Permalink
feat: support node10
Browse files Browse the repository at this point in the history
  • Loading branch information
JosepBergay committed May 12, 2021
1 parent e8b6c46 commit 1562bb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const isVersion = key => key === 'version' || key === 'Version';
const readVersion = contents => {
const doc = create(contents);
const versionNode = doc.find(n => isVersion(n.node.nodeName), true, true);
return versionNode?.node.textContent;
return versionNode && versionNode.node.textContent;
};

const writeVersion = (contents, version) => {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"updater"
],
"main": "index.js",
"engines": {
"node": ">=10"
},
"scripts": {
"dev": "jest --watch",
"test": "jest"
Expand Down

0 comments on commit 1562bb3

Please sign in to comment.