Skip to content

Commit

Permalink
modernize for Node.js 10
Browse files Browse the repository at this point in the history
  • Loading branch information
rhendric committed Jun 15, 2018
1 parent a8f23f5 commit f08cc0f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,5 +2,5 @@ language: node_js
node_js:
- 4
- 6
- 7
- 8
- 10
7 changes: 5 additions & 2 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/parser.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -46,8 +46,8 @@
"dependencies": {
"prelude-ls": "~1.1.2",
"optionator": "~0.8.1",
"source-map": "^0.5.6",
"source-map-support": "^0.4.11"
"source-map": "=0.6.1",
"source-map-support": "=0.5.6"
},
"devDependencies": {
"jison": "0.4.18",
Expand Down
4 changes: 2 additions & 2 deletions package.json.ls
Expand Up @@ -47,8 +47,8 @@ repository:
dependencies:
'prelude-ls': '~1.1.2'
optionator: '~0.8.1'
'source-map': '^0.5.6'
'source-map-support': '^0.4.11'
'source-map': '=0.6.1'
'source-map-support': '=0.5.6'

dev-dependencies:
jison: '0.4.18'
Expand Down
4 changes: 3 additions & 1 deletion src/index.ls
Expand Up @@ -26,6 +26,8 @@ parser <<<
@tokens = it
upcoming-input: -> ''

bufferFrom = Buffer.from or -> new Buffer it

exports <<<
VERSION: '1.5.0'

Expand Down Expand Up @@ -54,7 +56,7 @@ exports <<<
map-path = "#{path.basename output-filename}.map"
result.code += "\n//# sourceMappingURL=#map-path\n"
else
result.code += "\n//# sourceMappingURL=data:application/json;base64,#{ new Buffer result.map.to-string! .to-string 'base64' }\n"
result.code += "\n//# sourceMappingURL=data:application/json;base64,#{ bufferFrom result.map.to-string! .to-string 'base64' }\n"
result
else
output.to-string!
Expand Down
2 changes: 1 addition & 1 deletion test/assignment.ls
Expand Up @@ -460,7 +460,7 @@ new
o = {}
eq 1, -~=o.0
eq false, !=o
eq 0, -=o
eq -0, -=o
eq 1, ! += o
eq true, !!=o

Expand Down

0 comments on commit f08cc0f

Please sign in to comment.