Skip to content

Commit

Permalink
- Linting: As per latest ash-nazg
Browse files Browse the repository at this point in the history
- npm: Update devDeps.
- npm: Bump to 5.0.4
  • Loading branch information
brettz9 committed Mar 2, 2021
1 parent 6d31ded commit 61c654f
Show file tree
Hide file tree
Showing 13 changed files with 951 additions and 1,001 deletions.
41 changes: 19 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
'use strict';

module.exports = {
extends: ['ash-nazg/sauron-node'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
extends: ['ash-nazg/sauron-node-overrides'],
settings: {
polyfills: [
'Array.isArray',
Expand All @@ -21,21 +18,15 @@ module.exports = {
]
},
overrides: [
{
files: ['.eslintrc.js', '.mocharc.js'],
extends: ['plugin:node/recommended-script'],
rules: {
'import/no-commonjs': 'off',
'import/ambiguous': 'off'
}
},
{
files: ['src/jsonpath-node.js', 'test-helpers/node-env.js'],
// Apparent bug with `overrides` necessitating this
globals: {
require: 'readonly',
run: 'readonly',
module: 'readonly'
env: {
mocha: true
},
// ESLint doesn't seem to remember this
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
rules: {
'node/no-unsupported-features/es-syntax': ['error', {
Expand All @@ -46,13 +37,16 @@ module.exports = {
}
},
{
files: ['*.md'],
files: ['*.md/*.js', '*.md/*.html'],
rules: {
'import/unambiguous': 0,
'import/no-commonjs': 0,
'import/no-unresolved': ['error', {
ignore: ['jsonpath-plus']
}],
'no-multiple-empty-lines': ['error', {
max: 1, maxEOF: 2, maxBOF: 2
}],
'no-undef': 0,
'no-unused-vars': ['error', {
varsIgnorePattern: 'json|result'
Expand All @@ -64,9 +58,12 @@ module.exports = {
'node/no-missing-require': ['error', {
allowModules: ['jsonpath-plus']
}],
'node/no-missing-import': ['error', {
allowModules: ['jsonpath-plus']
}]
// Unfortunately, with the new processor approach, the filename
// is now README.md so our paths must be `../`. However, even
// with that, eslint-plugin-node is not friendly to such
// imports, so we disable
'node/no-missing-import': 'off',
'node/no-unpublished-import': 'off'
}
},
{
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ mocha-multi-reporters.json
.github
.nojekyll
ignore
pnpm-lock.yaml
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGES for jsonpath-plus

## 5.0.4 (2021-03-02)

- Fix: allow falsey at values in filter (now may require checking for
presence of `@` in some cases); fixes #136
- Docs: Add old missing release info (reconciling with GitHub releases)
- Docs: Update README to reflect 1.2.0 was not a released version (subsume
release details into 2.0.0)
- Linting: As per latest ash-nazg
- npm: Update devDeps.

## 5.0.3 (2021-02-06)

- Fix: Add package exports for browser and umd (#145) (@gjvoosten)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ magic is necessary:

<script>
const result = JSONPath.JSONPath({path: '...', json: ...});
const result = JSONPath.JSONPath({path: '...', json: {}});
</script>
```
Expand All @@ -101,8 +101,11 @@ You may also use ES6 Module imports (for modern browsers):
```html
<script type="module">
import {JSONPath} from './node_modules/jsonpath-plus/dist/index-browser-esm.js';
const result = JSONPath({path: '...', json: ...});
import {
JSONPath
} from './node_modules/jsonpath-plus/dist/index-browser-esm.js';
const result = JSONPath({path: '...', json: {}});
</script>
```
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function _isNativeReflectConstruct() {
if (typeof Proxy === "function") return true;

try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
if (typeof Proxy === "function") return true;

try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.js.map

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Stefan Goessner",
"name": "jsonpath-plus",
"version": "5.0.3",
"version": "5.0.4",
"main": "dist/index-node-cjs.js",
"exports": {
".": {
Expand Down Expand Up @@ -57,15 +57,15 @@
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.12.13",
"@babel/preset-env": "^7.12.13",
"@mysticatea/eslint-plugin": "^13.0.0",
"@rollup/plugin-babel": "^5.2.3",
"@babel/core": "^7.13.8",
"@babel/preset-env": "^7.13.9",
"@brettz9/eslint-plugin": "^1.0.3",
"@rollup/plugin-babel": "^5.3.0",
"chai": "^4.3.0",
"core-js-bundle": "^3.8.3",
"core-js-bundle": "^3.9.1",
"coveradge": "^0.6.0",
"eslint": "^7.19.0",
"eslint-config-ash-nazg": "^26.1.0",
"eslint": "^7.21.0",
"eslint-config-ash-nazg": "^29.8.1",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-array-func": "^3.1.7",
"eslint-plugin-chai-expect": "^2.2.0",
Expand All @@ -74,30 +74,30 @@
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^6.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^31.6.0",
"eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-jsdoc": "^32.2.0",
"eslint-plugin-markdown": "^2.0.0",
"eslint-plugin-no-unsanitized": "^3.1.4",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-radar": "^0.2.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-radar": "^0.2.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-unicorn": "^27.0.0",
"eslint-plugin-unicorn": "^28.0.2",
"esm": "^3.2.25",
"http-server": "^0.12.3",
"license-badger": "^0.18.0",
"mocha": "^8.2.1",
"mocha": "^8.3.0",
"mocha-badge-generator": "^0.9.0",
"mocha-multi-reporters": "^1.5.1",
"node-static": "^0.7.11",
"nyc": "^15.1.0",
"open-cli": "^6.0.1",
"remark-cli": "^9.0.0",
"remark-lint-code-block-style": "^2.0.1",
"remark-lint-ordered-list-marker-value": "^2.0.1",
"rollup": "2.38.5",
"rollup": "2.40.0",
"rollup-plugin-terser": "^7.0.2",
"typedoc": "^0.20.21",
"typescript": "^4.1.3"
"typedoc": "^0.20.28",
"typescript": "^4.2.2"
},
"keywords": [
"json",
Expand Down Expand Up @@ -127,7 +127,7 @@
]
},
"scripts": {
"prepublishOnly": "npm run license-badges",
"prepublishOnly": "pnpm i && echo 'reenable this when may be working for pnpm: npm run license-badges'",
"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",
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
"license-badges": "npm run license-badge && npm run license-badge-dev",
Expand All @@ -138,7 +138,7 @@
"coverage-badge": "coveradge badges/coverage-badge.svg",
"node-import-test": "node --experimental-modules demo/node-import-test.mjs",
"open": "open-cli http://localhost:8084/demo/ && npm start",
"start": "static -p 8084",
"start": "http-server -p 8084",
"typescript": "tsc -p src",
"mocha": "mocha --require esm --require test-helpers/node-env.js --reporter-options configFile=mocha-multi-reporters.json test",
"nyc": "rm -Rf ./coverage && rm -Rf ./node_modules/.cache && nyc --all npm run mocha && npm run coverage-badge",
Expand Down
Loading

0 comments on commit 61c654f

Please sign in to comment.