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

Lines changed: 19 additions & 22 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 10 additions & 0 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.js

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)