Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #167

Merged
merged 3 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"check-codestyle": "eslint ./",
"fix-codestyle": "eslint ./ --fix",
"preintegration-tests": "npm run build",
"integration-tests": "mocha test/index.js",
"integration-tests": "mocha --exit test/index.js",
"//": "`in-publish` is used so that the CI doesn’t run tests during the installation. If it does and the tests fail, the build gets errored instead of failed.",
"prepublish": "in-publish && npm run test || not-in-publish"
},
Expand All @@ -35,11 +35,11 @@
"chai-as-promised": "^5.3.0",
"chromedriver": "^80.0.1",
"cross-env": "^3.1.3",
"css-loader": "^0.26.1",
"eslint": "^2.9.0",
"css-loader": "^3.4.2",
"eslint": "^6.6.0",
"extract-text-webpack-plugin": "2.0.0-beta.4",
"in-publish": "^2.0.0",
"mocha": "^2.5.3",
"mocha": "^7.0.1",
"selenium-webdriver": "^3.0.0-beta-2",
"static-server": "^2.0.3",
"style-loader": "^0.13.1",
Expand Down
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,9 @@ We support IE 10+, Safari 9+ and the latest versions of Chrome, Firefox and Edge

# Development
Please use the [Github commit style](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53).
Before pushing: `npm test`.
Before pushing make sure the tests are green and the linter does not complain.
```bash
npm test
npm run-script check-codestyle
```
Also please add your own tests if you are submitting a feature.
8 changes: 4 additions & 4 deletions source/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ global.__likelyCallbacks = {};
* @returns {String}
*/
export const wrapSVG = (coords) =>
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" ' +
'viewBox="0 0 16 16"><path d="M' +
coords +
'z"/></svg>';
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" ' +
'viewBox="0 0 16 16"><path d="M' +
coords +
'z"/></svg>';

/**
* Create node from HTML
Expand Down
2 changes: 1 addition & 1 deletion source/services/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
popupWidth: 600,
popupHeight: 450,
click() {
if (!/[\.\?:\-–—]\s*$/.test(this.options.title)) {
if (!/[.?:\-–—]\s*$/.test(this.options.title)) {
this.options.title += ':';
}

Expand Down
16 changes: 8 additions & 8 deletions source/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bool = { yes: true, no: false };
*/
export const each = (object, callback) => {
for (const key in object) {
if (object.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
callback(object[key], key);
}
}
Expand Down Expand Up @@ -37,7 +37,7 @@ export const merge = function () {

if (arg) {
for (const key in arg) {
if (arg.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(arg, key)) {
result[key] = arg[key];
}
}
Expand All @@ -56,7 +56,7 @@ export const merge = function () {
*/
export const extend = (target, subject) => {
for (const key in subject) {
if (subject.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(subject, key)) {
target[key] = subject[key];
}
}
Expand Down Expand Up @@ -85,7 +85,7 @@ export const getDataset = (node) => {

for (i = attributes.length - 1; i >= 0; i--) {
attribute = attributes[i];
if (attribute && attribute.name && (/^data-\w[\w\-]*$/).test(attribute.name)) {
if (attribute && attribute.name && (/^data-\w[\w-]*$/).test(attribute.name)) {
attributeName = attribute.name.substr(5).replace(/-./g, toUpperCase);
dataset[attributeName] = attribute.value;
}
Expand All @@ -105,7 +105,7 @@ export const bools = (node) => {
const data = getDataset(node);

for (const key in data) {
if (data.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
const value = data[key];

result[key] = bool[value] || value;
Expand All @@ -123,7 +123,7 @@ export const bools = (node) => {
* @returns {String}
*/
export const template = (text, data) => {
return text ? text.replace(/\{([^\}]+)\}/g, function (value, key) {
return text ? text.replace(/\{([^}]+)\}/g, function (value, key) {
return key in data ? data[key] : value;
}) : '';
};
Expand All @@ -137,7 +137,7 @@ export const template = (text, data) => {
*/
export const makeUrl = (text, data) => {
for (const key in data) {
if (data.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
data[key] = encodeURIComponent(data[key]);
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ export const set = (object, key, value) => {
}

if (index !== frags.length - 1) {
object = object[key]; // eslint-disable-line no-param-reassign
object = object[key]; // eslint-disable-line no-param-reassign
}

last = key;
Expand Down
2 changes: 1 addition & 1 deletion source/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Likely {
*/
init() {
toArray(this.container.children)
.forEach(this.addButton.bind(this));
.forEach(this.addButton.bind(this));

if (this.options.counters) {
this.timer = setTimeout(this.appear.bind(this), this.options.wait);
Expand Down