Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
update dependencies (#10)
Browse files Browse the repository at this point in the history
* update dependencies

* fix lint errors
  • Loading branch information
alextremp authored Jan 13, 2020
1 parent 1846780 commit 3c0cc9d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ coverage
.github
schibstedspain-openads-appnexus-prebid-*.tgz
versiona.js
.nyc_output
dist/test
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: trusty
language: node_js
node_js:
- "8"
Expand Down
40 changes: 24 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"cleanDistFolder": "rm -Rf ./dist",
"prepublishOnly": "npm run cleanDistFolder && npm run build",
"build": "npm run cleanDistFolder && babel src --ignore test --out-dir dist ",
"test": "mocha --recursive --require babel-polyfill --require babel-core/register \"src/test/**/*.js\"",
"test": "mocha --recursive --require @babel/register \"src/test/**/*.js\"",
"lint": "sui-lint js",
"coverage": "istanbul cover --report html _mocha -- ./src/*test --recursive --compilers js:babel-register",
"coverage:ci": "istanbul cover _mocha -- ./src/*test --recursive --compilers js:babel-register && codecov",
"coverage": "nyc --reporter=html --exclude=\"src/test\" npm run test",
"coverage:ci": "nyc --reporter=cobertura --exclude=\"src/test\" npm run test && codecov",
"check": "npm run lint && npm run test",
"versiona": "node versiona.js"
},
Expand All @@ -29,19 +29,20 @@
"author": "One Punch Team",
"license": "ISC",
"devDependencies": {
"@s-ui/lint": "^2.18.0",
"babel-cli": "^6.24.0",
"babel-loader": "^7.1.1",
"babel-polyfill": "^6.23.0",
"babel-preset-sui": "1",
"babel-register": "^6.24.0",
"chai": "^4.0.2",
"@babel/cli": "^7.8.0",
"@babel/core": "^7.8.0",
"@babel/plugin-transform-modules-commonjs": "^7.8.0",
"@babel/register": "^7.8.0",
"@babel/runtime": "^7.8.0",
"@s-ui/lint": "^3.14.0",
"babel-loader": "^8.0.6",
"babel-preset-sui": "^2.14.0",
"chai": "^4.2.0",
"codecov": "^3.0.1",
"istanbul": "^1.1.0-alpha.1",
"jsdom": "^11.10.0",
"mocha": "^5.2.0",
"onchange": "^3.3.0",
"sinon": "^2.3.4",
"mocha": "^7.0.0",
"nyc": "^15.0.0",
"sinon": "^8.0.4",
"versiona": "^4.2.1"
},
"pre-commit": [
Expand All @@ -51,6 +52,9 @@
"babel": {
"presets": [
"sui"
],
"plugins": [
"@babel/plugin-transform-modules-commonjs"
]
},
"eslintConfig": {
Expand All @@ -59,7 +63,11 @@
]
},
"dependencies": {
"@schibstedspain/openads-connector-api": "^1.2.0",
"@schibstedspain/openads-connector-api": "^2.0.1",
"loglevel": "^1.6.1"
},
"prettier": "./node_modules/@s-ui/lint/.prettierrc.js",
"stylelint": {
"extends": "./node_modules/@s-ui/lint/stylelint.config.js"
}
}
}
7 changes: 2 additions & 5 deletions src/openads-appnexus/repository/AdListenerRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ export default class AdListenerRepository {
}

find({id}) {
return Promise.resolve().then(
() =>
this._ads.has(id)
? this._ads.get(id)
: this._registerAdSubscription({id})
return Promise.resolve().then(() =>
this._ads.has(id) ? this._ads.get(id) : this._registerAdSubscription({id})
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/openads-appnexus/service/generateUUID.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const generateUUID = () => {
let dt = new Date().getTime()
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
let r = (dt + Math.random() * 16) % 16 | 0
const r = (dt + Math.random() * 16) % 16 | 0
dt = Math.floor(dt / 16)
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
})
Expand Down
2 changes: 1 addition & 1 deletion src/test/openads-appnexus/service/DebouncerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe('Debouncer', () => {
]
]

let result = []
const result = []

const debounceCallback = input => {
result.push(input)
Expand Down
4 changes: 2 additions & 2 deletions src/test/openads-appnexus/service/ReplayEventBusTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ describe('ReplayEventBus', () => {
})
})
describe('Given a registered ReplayEventBus', () => {
let observerSpy = sinon.spy()
const observerSpy = sinon.spy()
beforeEach(function() {
observerSpy.reset()
observerSpy.resetHistory()
})
it('Should execute observer callback using the raised payload', done => {
const givenEventName = 'givenEventName'
Expand Down

0 comments on commit 3c0cc9d

Please sign in to comment.