Skip to content

Commit 57730a9

Browse files
committedNov 12, 2020
chore: update deps and tool configuration
1 parent a123018 commit 57730a9

File tree

7 files changed

+15710
-43
lines changed

7 files changed

+15710
-43
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ components
1616
node_modules
1717
npm-debug.log
1818

19+
.nyc_output/
1920
coverage/
2021

2122
pathval.js

‎index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22

3+
34
/* !
45
* Chai - pathval utility
56
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -82,7 +83,7 @@ function parsePath(path) {
8283
if (mArr) {
8384
parsed = { i: parseFloat(mArr[1]) };
8485
} else {
85-
parsed = { p: value.replace(/\\([.\[\]])/g, '$1') };
86+
parsed = { p: value.replace(/\\([.[\]])/g, '$1') };
8687
}
8788

8889
return parsed;

‎karma.conf.js

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
/* eslint no-process-env: "off" */
2+
13
'use strict';
4+
25
var packageJson = require('./package.json');
36
var defaultTimeout = 120000;
47
var browserifyIstanbul = require('browserify-istanbul');
58
module.exports = function configureKarma(config) {
6-
var localBrowsers = [
7-
'PhantomJS',
8-
];
9+
var localBrowsers = [ 'PhantomJS' ];
910
var sauceLabsBrowsers = {
1011
SauceChromeLatest: {
1112
base: 'SauceLabs',
@@ -41,7 +42,9 @@ module.exports = function configureKarma(config) {
4142
config.set({
4243
basePath: '',
4344
browsers: localBrowsers,
44-
logLevel: process.env.npm_config_debug ? config.LOG_DEBUG : config.LOG_INFO,
45+
logLevel: process.env.npm_config_debug ?
46+
config.LOG_DEBUG :
47+
config.LOG_INFO,
4548
frameworks: [ 'browserify', 'mocha' ],
4649
files: [ 'test/*.js' ],
4750
exclude: [],
@@ -51,9 +54,7 @@ module.exports = function configureKarma(config) {
5154
browserify: {
5255
debug: true,
5356
bare: true,
54-
transform: [
55-
browserifyIstanbul({ ignore: [ '**/node_modules/**', '**/test/**' ] }),
56-
],
57+
transform: [ browserifyIstanbul({ ignore: [ '**/node_modules/**', '**/test/**' ] }) ],
5758
},
5859
reporters: [ 'progress', 'coverage' ],
5960
coverageReporter: {
@@ -82,14 +83,11 @@ module.exports = function configureKarma(config) {
8283
browsers: localBrowsers.concat(Object.keys(sauceLabsBrowsers)),
8384
sauceLabs: {
8485
testName: packageJson.name,
85-
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER || new Date().getTime(),
86+
tunnelIdentifier:
87+
process.env.TRAVIS_JOB_NUMBER || new Date().getTime(),
8688
recordVideo: true,
87-
startConnect: ('TRAVIS' in process.env) === false,
88-
tags: [
89-
'pathval_' + packageJson.version,
90-
process.env.SAUCE_USERNAME + '@' + branch,
91-
build,
92-
],
89+
startConnect: 'TRAVIS' in process.env === false,
90+
tags: [ 'pathval_' + packageJson.version, process.env.SAUCE_USERNAME + '@' + branch, build ],
9391
},
9492
});
9593
}

‎package-lock.json

+15,670
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
"url": "git+ssh://git@github.com/chaijs/pathval.git"
2020
},
2121
"scripts": {
22-
"build": "browserify --bare $npm_package_main --standalone pathval -o pathval.js",
22+
"build": "browserify --standalone pathval -o pathval.js",
2323
"lint": "eslint --ignore-path .gitignore .",
2424
"prepublish": "npm run build",
2525
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
2626
"pretest": "npm run lint",
2727
"test": "npm run test:node && npm run test:browser && npm run upload-coverage",
2828
"test:browser": "karma start --singleRun=true",
29-
"test:node": "istanbul cover _mocha",
29+
"test:node": "nyc mocha",
3030
"upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"
3131
},
3232
"config": {
@@ -50,27 +50,27 @@
5050
}
5151
},
5252
"devDependencies": {
53-
"browserify": "^13.0.0",
54-
"browserify-istanbul": "^1.0.0",
55-
"coveralls": "2.11.9",
56-
"eslint": "^2.4.0",
57-
"eslint-config-strict": "^8.5.0",
58-
"eslint-plugin-filenames": "^0.2.0",
59-
"ghooks": "^1.0.1",
60-
"istanbul": "^0.4.2",
61-
"karma": "^0.13.22",
62-
"karma-browserify": "^5.0.2",
63-
"karma-coverage": "^0.5.5",
64-
"karma-mocha": "^0.2.2",
65-
"karma-phantomjs-launcher": "^1.0.0",
66-
"karma-sauce-launcher": "^0.3.1",
67-
"lcov-result-merger": "^1.0.2",
68-
"mocha": "^3.1.2",
69-
"phantomjs-prebuilt": "^2.1.5",
70-
"semantic-release": "^4.3.5",
53+
"browserify": "^17.0.0",
54+
"browserify-istanbul": "^3.0.1",
55+
"coveralls": "^3.1.0",
56+
"eslint": "^7.13.0",
57+
"eslint-config-strict": "^14.0.1",
58+
"eslint-plugin-filenames": "^1.3.2",
59+
"ghooks": "^2.0.4",
60+
"karma": "^5.2.3",
61+
"karma-browserify": "^7.0.0",
62+
"karma-coverage": "^2.0.3",
63+
"karma-mocha": "^2.0.1",
64+
"karma-phantomjs-launcher": "^1.0.4",
65+
"karma-sauce-launcher": "^4.3.3",
66+
"lcov-result-merger": "^3.1.0",
67+
"mocha": "^8.2.1",
68+
"nyc": "^15.1.0",
69+
"phantomjs-prebuilt": "^2.1.16",
70+
"semantic-release": "^17.2.2",
7171
"simple-assert": "^1.0.0",
72-
"travis-after-all": "^1.4.4",
73-
"validate-commit-msg": "^2.3.1"
72+
"travis-after-all": "^1.4.5",
73+
"validate-commit-msg": "^2.14.0"
7474
},
7575
"engines": {
7676
"node": "*"

‎test/.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"mocha": true
88
},
99
"rules": {
10+
"eslint no-process-env": "off",
1011
"no-new-wrappers": 0,
1112
"no-array-constructor": 0,
1213
"no-new-object": 0,

‎test/index.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ describe('getPathValue', function () {
121121
hello: 'world',
122122
},
123123
world: [ 'hello', 'universe' ],
124-
complex: [
125-
{ hello: 'universe' },
126-
{ universe: 'world' },
127-
[ { hello: 'world' } ],
128-
],
124+
complex: [ { hello: 'universe' }, { universe: 'world' }, [ { hello: 'world' } ] ],
129125
};
130126

131127
var arr = [ [ true ] ];
@@ -171,7 +167,7 @@ describe('setPathValue', function () {
171167
});
172168

173169
it('allows value to be set in complex object', function () {
174-
var obj = { hello: { } };
170+
var obj = { hello: {} };
175171
pathval.setPathValue(obj, 'hello.universe', 42);
176172
assert(obj.hello.universe === 42);
177173
});

0 commit comments

Comments
 (0)
Please sign in to comment.