Skip to content

Commit

Permalink
update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed Mar 11, 2021
1 parent 2243205 commit fac2b4d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '8', '10', '12', '13' ]
node: [ '10', '12', '13' ]

steps:
- name: Clone repository
Expand Down
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,22 @@
],
"main": "src/index.js",
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "eslint . && mocha",
"coverage": "nyc mocha",
"coveralls": "npm run coverage && nyc report --reporter=lcov"
},
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"mocha": "^7.0.0",
"chai": "^4.3.3",
"eslint": "^7.21.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"mocha": "^8.3.1",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.0.0"
"nyc": "^15.1.0"
}
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function (url, length) {
url = url.replace(/^www\./, '');

// Replace /foo/bar/foo/ with /…/…/…/
var urlLength = url.length;
let urlLength = url.length;
while (urlLength > length) {
url = url.replace(/(.*[^/])\/[^/…]+\/([^/])/, '$1/…/$2');
if (url.length === urlLength) {
Expand All @@ -33,7 +33,7 @@ module.exports = function (url, length) {
url = url.replace(/\/…\/(?:…\/)+/, '/…/');

// Replace all params except first
var idx;
let idx;
while (url.length > length) {
idx = url.lastIndexOf('&');
if (idx === -1) {
Expand Down
2 changes: 1 addition & 1 deletion test/test-crop-url.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

require('chai').should();
var cropUrl = require('../src/index.js');
const cropUrl = require('../src/index.js');

describe('cropUrl', function () {
it('should check input type', function () {
Expand Down

0 comments on commit fac2b4d

Please sign in to comment.