Skip to content

Commit 61c654f

Browse files
committed
- Linting: As per latest ash-nazg
- npm: Update devDeps. - npm: Bump to 5.0.4
1 parent 6d31ded commit 61c654f

13 files changed

+951
-1001
lines changed

.eslintrc.js

+19-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
'use strict';
2+
23
module.exports = {
3-
extends: ['ash-nazg/sauron-node'],
4-
parserOptions: {
5-
ecmaVersion: 2020,
6-
sourceType: 'module'
7-
},
4+
extends: ['ash-nazg/sauron-node-overrides'],
85
settings: {
96
polyfills: [
107
'Array.isArray',
@@ -21,21 +18,15 @@ module.exports = {
2118
]
2219
},
2320
overrides: [
24-
{
25-
files: ['.eslintrc.js', '.mocharc.js'],
26-
extends: ['plugin:node/recommended-script'],
27-
rules: {
28-
'import/no-commonjs': 'off',
29-
'import/ambiguous': 'off'
30-
}
31-
},
3221
{
3322
files: ['src/jsonpath-node.js', 'test-helpers/node-env.js'],
34-
// Apparent bug with `overrides` necessitating this
35-
globals: {
36-
require: 'readonly',
37-
run: 'readonly',
38-
module: 'readonly'
23+
env: {
24+
mocha: true
25+
},
26+
// ESLint doesn't seem to remember this
27+
parserOptions: {
28+
ecmaVersion: 2020,
29+
sourceType: 'module'
3930
},
4031
rules: {
4132
'node/no-unsupported-features/es-syntax': ['error', {
@@ -46,13 +37,16 @@ module.exports = {
4637
}
4738
},
4839
{
49-
files: ['*.md'],
40+
files: ['*.md/*.js', '*.md/*.html'],
5041
rules: {
5142
'import/unambiguous': 0,
5243
'import/no-commonjs': 0,
5344
'import/no-unresolved': ['error', {
5445
ignore: ['jsonpath-plus']
5546
}],
47+
'no-multiple-empty-lines': ['error', {
48+
max: 1, maxEOF: 2, maxBOF: 2
49+
}],
5650
'no-undef': 0,
5751
'no-unused-vars': ['error', {
5852
varsIgnorePattern: 'json|result'
@@ -64,9 +58,12 @@ module.exports = {
6458
'node/no-missing-require': ['error', {
6559
allowModules: ['jsonpath-plus']
6660
}],
67-
'node/no-missing-import': ['error', {
68-
allowModules: ['jsonpath-plus']
69-
}]
61+
// Unfortunately, with the new processor approach, the filename
62+
// is now README.md so our paths must be `../`. However, even
63+
// with that, eslint-plugin-node is not friendly to such
64+
// imports, so we disable
65+
'node/no-missing-import': 'off',
66+
'node/no-unpublished-import': 'off'
7067
}
7168
},
7269
{

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ mocha-multi-reporters.json
1717
.github
1818
.nojekyll
1919
ignore
20+
pnpm-lock.yaml

CHANGES.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGES for jsonpath-plus
22

3+
## 5.0.4 (2021-03-02)
4+
5+
- Fix: allow falsey at values in filter (now may require checking for
6+
presence of `@` in some cases); fixes #136
7+
- Docs: Add old missing release info (reconciling with GitHub releases)
8+
- Docs: Update README to reflect 1.2.0 was not a released version (subsume
9+
release details into 2.0.0)
10+
- Linting: As per latest ash-nazg
11+
- npm: Update devDeps.
12+
313
## 5.0.3 (2021-02-06)
414

515
- Fix: Add package exports for browser and umd (#145) (@gjvoosten)

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ magic is necessary:
8989

9090
<script>
9191
92-
const result = JSONPath.JSONPath({path: '...', json: ...});
92+
const result = JSONPath.JSONPath({path: '...', json: {}});
9393
9494
</script>
9595
```
@@ -101,8 +101,11 @@ You may also use ES6 Module imports (for modern browsers):
101101
```html
102102
<script type="module">
103103
104-
import {JSONPath} from './node_modules/jsonpath-plus/dist/index-browser-esm.js';
105-
const result = JSONPath({path: '...', json: ...});
104+
import {
105+
JSONPath
106+
} from './node_modules/jsonpath-plus/dist/index-browser-esm.js';
107+
108+
const result = JSONPath({path: '...', json: {}});
106109
107110
</script>
108111
```

dist/index-browser-esm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function _isNativeReflectConstruct() {
5757
if (typeof Proxy === "function") return true;
5858

5959
try {
60-
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
60+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
6161
return true;
6262
} catch (e) {
6363
return false;

dist/index-browser-esm.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-esm.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
if (typeof Proxy === "function") return true;
6464

6565
try {
66-
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
66+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
6767
return true;
6868
} catch (e) {
6969
return false;

dist/index-browser-umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Stefan Goessner",
33
"name": "jsonpath-plus",
4-
"version": "5.0.3",
4+
"version": "5.0.4",
55
"main": "dist/index-node-cjs.js",
66
"exports": {
77
".": {
@@ -57,15 +57,15 @@
5757
},
5858
"dependencies": {},
5959
"devDependencies": {
60-
"@babel/core": "^7.12.13",
61-
"@babel/preset-env": "^7.12.13",
62-
"@mysticatea/eslint-plugin": "^13.0.0",
63-
"@rollup/plugin-babel": "^5.2.3",
60+
"@babel/core": "^7.13.8",
61+
"@babel/preset-env": "^7.13.9",
62+
"@brettz9/eslint-plugin": "^1.0.3",
63+
"@rollup/plugin-babel": "^5.3.0",
6464
"chai": "^4.3.0",
65-
"core-js-bundle": "^3.8.3",
65+
"core-js-bundle": "^3.9.1",
6666
"coveradge": "^0.6.0",
67-
"eslint": "^7.19.0",
68-
"eslint-config-ash-nazg": "^26.1.0",
67+
"eslint": "^7.21.0",
68+
"eslint-config-ash-nazg": "^29.8.1",
6969
"eslint-config-standard": "^16.0.2",
7070
"eslint-plugin-array-func": "^3.1.7",
7171
"eslint-plugin-chai-expect": "^2.2.0",
@@ -74,30 +74,30 @@
7474
"eslint-plugin-eslint-comments": "^3.2.0",
7575
"eslint-plugin-html": "^6.1.1",
7676
"eslint-plugin-import": "^2.22.1",
77-
"eslint-plugin-jsdoc": "^31.6.0",
78-
"eslint-plugin-markdown": "^1.0.2",
77+
"eslint-plugin-jsdoc": "^32.2.0",
78+
"eslint-plugin-markdown": "^2.0.0",
7979
"eslint-plugin-no-unsanitized": "^3.1.4",
8080
"eslint-plugin-no-use-extend-native": "^0.5.0",
8181
"eslint-plugin-node": "^11.1.0",
82-
"eslint-plugin-promise": "^4.2.1",
83-
"eslint-plugin-radar": "^0.2.0",
82+
"eslint-plugin-promise": "^4.3.1",
83+
"eslint-plugin-radar": "^0.2.1",
8484
"eslint-plugin-standard": "^4.1.0",
85-
"eslint-plugin-unicorn": "^27.0.0",
85+
"eslint-plugin-unicorn": "^28.0.2",
8686
"esm": "^3.2.25",
87+
"http-server": "^0.12.3",
8788
"license-badger": "^0.18.0",
88-
"mocha": "^8.2.1",
89+
"mocha": "^8.3.0",
8990
"mocha-badge-generator": "^0.9.0",
9091
"mocha-multi-reporters": "^1.5.1",
91-
"node-static": "^0.7.11",
9292
"nyc": "^15.1.0",
9393
"open-cli": "^6.0.1",
9494
"remark-cli": "^9.0.0",
9595
"remark-lint-code-block-style": "^2.0.1",
9696
"remark-lint-ordered-list-marker-value": "^2.0.1",
97-
"rollup": "2.38.5",
97+
"rollup": "2.40.0",
9898
"rollup-plugin-terser": "^7.0.2",
99-
"typedoc": "^0.20.21",
100-
"typescript": "^4.1.3"
99+
"typedoc": "^0.20.28",
100+
"typescript": "^4.2.2"
101101
},
102102
"keywords": [
103103
"json",
@@ -127,7 +127,7 @@
127127
]
128128
},
129129
"scripts": {
130-
"prepublishOnly": "npm run license-badges",
130+
"prepublishOnly": "pnpm i && echo 'reenable this when may be working for pnpm: npm run license-badges'",
131131
"license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
132132
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
133133
"license-badges": "npm run license-badge && npm run license-badge-dev",
@@ -138,7 +138,7 @@
138138
"coverage-badge": "coveradge badges/coverage-badge.svg",
139139
"node-import-test": "node --experimental-modules demo/node-import-test.mjs",
140140
"open": "open-cli http://localhost:8084/demo/ && npm start",
141-
"start": "static -p 8084",
141+
"start": "http-server -p 8084",
142142
"typescript": "tsc -p src",
143143
"mocha": "mocha --require esm --require test-helpers/node-env.js --reporter-options configFile=mocha-multi-reporters.json test",
144144
"nyc": "rm -Rf ./coverage && rm -Rf ./node_modules/.cache && nyc --all npm run mocha && npm run coverage-badge",

0 commit comments

Comments
 (0)