Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
linting
  • Loading branch information
commenthol committed Mar 3, 2018
1 parent 5933e03 commit 3068d00
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ sudo: false
language: node_js

node_js:
- "4.8"
- "6.10"
- 6
- 8
- node

script:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 commenthol
Copyright (c) 2016-present commenthol

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion lib/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function serialize (source, opts) {
} else if (util.isBuffer(source)) {
// check for buffer first otherwise tests fail on [email protected]
// looks like buffers are accidentially detected as typed arrays
out += "new Buffer('" + source.toString('base64') + "', 'base64')"
out += "new Buffer('" + source.toString('base64') + "', 'base64')" // FIXME replace with Buffer.from
} else if ((type = util.isTypedArray(source))) {
tmp = []
for (i = 0; i < source.length; i++) {
Expand Down
76 changes: 40 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,36 @@
"name": "serialize-to-js",
"version": "1.1.1",
"description": "serialize objects to javascript",
"main": "lib",
"engines": {
"node": ">=4.0.0"
"keywords": [
"javascript",
"objects",
"serialize"
],
"homepage": "https://github.com/commenthol/serialize-to-js",
"bugs": {
"url": "https://github.com/commenthol/serialize-to-js/issues"
},
"license": "MIT",
"author": "commenthol <[email protected]>",
"main": "lib",
"directories": {
"doc": "doc",
"test": "test"
},
"dependencies": {
"js-beautify": "~1.6.8",
"safer-eval": "^1.2.1"
},
"devDependencies": {
"eslint": "^3.13.1",
"eslint-config-standard": "^7.0.0-beta.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"rimraf": "^2.5.4"
},
"scripts": {
"test": "mocha test/*.js",
"cover": "istanbul cover _mocha --report lcov --report text -- --reporter dot --check-leaks test/*.js",
"doc": "jsdox -o doc lib/*.js",
"lint": "eslint --quiet '**/*.js'",
"readme": "markedpp --githubid -i README.md -o README.md",
"clean": "rimraf doc coverage node_modules"
},
"repository": {
"type": "git",
"url": "https://github.com/commenthol/serialize-to-js.git"
},
"keywords": [
"serialize",
"javascript",
"objects"
],
"author": "commenthol <[email protected]>",
"maintainers": "commenthol <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/commenthol/serialize-to-js/issues"
"scripts": {
"all": "npm run lint && npm test",
"clean": "rimraf doc coverage node_modules *.tgz",
"cover": "nyc -r text -r html npm test",
"doc": "jsdox -o doc lib/*.js",
"lint": "eslint '**/*.js'",
"prepublishOnly": "npm run all",
"readme": "markedpp --githubid -i README.md -o README.md",
"test": "mocha"
},
"homepage": "https://github.com/commenthol/serialize-to-js",
"eslintConfig": {
"extends": "standard",
"plugins": [
Expand All @@ -55,5 +40,24 @@
"rules": {
"key-spacing": 0
}
}
},
"dependencies": {
"js-beautify": "~1.7.5",
"safer-eval": "^1.2.3"
},
"devDependencies": {
"eslint": "^4.18.2",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"istanbul": "^0.4.5",
"mocha": "^5.0.1",
"rimraf": "^2.6.2"
},
"engines": {
"node": ">=4.0.0"
},
"maintainers": "commenthol <[email protected]>"
}
2 changes: 1 addition & 1 deletion test/deserialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var serialize = M.serialize
var deserialize = M.deserialize
var fixtures = require('./fixtures')

function log (arg) {
function log (arg) { // eslint-disable-line no-unused-vars
console.log(JSON.stringify(arg))
}

Expand Down
13 changes: 11 additions & 2 deletions test/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,21 @@ if (!isBrowser) {
}
Object.assign(module.exports, {
'buffer': [
new Buffer('buffer'),
new Buffer('buffer'), // eslint-disable-line node/no-deprecated-api
"new Buffer('YnVmZmVy', 'base64')"
],
'empty buffer': [
new Buffer(''),
new Buffer(''), // eslint-disable-line node/no-deprecated-api
"new Buffer('', 'base64')"
]
})

if (Buffer.from) {
Object.assign(module.exports, {
'buffer.from': [
Buffer.from('buffer'),
"new Buffer('YnVmZmVy', 'base64')"
]
})
}
}
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var M = require('..')
var serialize = M.serialize
var fixtures = require('./fixtures')

function log (arg) {
function log (arg) { // eslint-disable-line no-unused-vars
console.log(JSON.stringify(arg))
}

Expand Down

0 comments on commit 3068d00

Please sign in to comment.