- Breaking change: Expect Node >= 8
- Fix: Require
json
as "own" property - Fix: wrap: false returning inconsistent data types (@CacheControl)
- Fix: Ensure throwing with a bad result type
- Fix: Allow empty string keys
- Fix: Avoid erring when value before parent selector is falsey
- Fix: If
resultType
is "all", if path resolves internally to a non-array (string), ensure it is converted to an array before converting to pointer forpointer
- Enhancement: Allow path as array in non-object signature
- Docs: Add locally-generated badges for testing, coverage, etc.
- Linting (ESLint): As per latest ash-nazg
- Linting (ESLint): Remove redundant "use strict" with switch to ESM
- Maintenance: 2 sp. for package.json
- Testing: Add nyc for coverage
- Testing: Test against source (using
esm
) - Testing: Improve coverage (more type operator tests)
- Testing: Check vm
- npm: Add
test-cov
script - npm: Update devDeps
- Breaking change: Throw
TypeError
instead ofError
for missingotherTypeCallback
when using@other
- Breaking change: Throw
TypeError
instead ofError
for missingpath
- Enhancement: Throw
TypeError
for missingjson
(fixes #110) - Enhancement: Use more efficient
new Function
overeval
; also allows use of cyclic context objects - Maintenance: Add
.editorconfig
- Docs: Document options in jsdoc; add return values to callbacks; fix constructor doc sig.
- Testing: Add test for missing
path
orjson
- Testing: Remove unneeded closures
- npm: Update devDeps
- Enhancement: Add
@root
filter selector - Enhancement: Use more efficient
new Function
overeval
; also allows use of cyclic context objects - npm: Update devDeps and
package-lock.json
- Enhancement: Add explicit 'any' to
evaluate()
declaration (for use withnoImplicitAny
TypeScript option) - Build: Update minified build files
- Travis: Update to check Node 6, 10, 12
- npm: Ignore
.idea
/.remarkrc
files - npm: Update devDeps (Babel, linting, Rollup, TypeScript related)
- npm: Avoid eslint script within test script
- npm: Ignore typescript docs
- Add TypeScript declaration
- npm: Avoid adding
core-js-bundle
as peerDep. (fixes #95)
- Build: Add
browserslist
for Babel builds - Linting: Conform to ESLint updates (jsdoc)
- Testing: Switch from end-of-lifed nodeunit to Mocha
- Testing: Add performance test to browser, but bump duration
- npm: Update devDeps; add core-js-bundle to peerDependencies
- npm: Ignore some unneeded files
- Bump Node version in Travis to avoid erring with object rest in eslint-plugin-node routine
- Docs (README): Indicate features, including performance (removing old note)
- Docs (README): Add headings for setup and fix headings levels
- Docs (README): Indicate parent selector was not present in original spec (not just not documented)
- Docs (README): Fix escaping
- Linting: Switch to Unix line breaks and other changes per ash-nazg, including linting Markdown JS
- Linting: Use recommended
.json
extension - Linting: Switch to ash-nazg
- Linting: Add lgtm.yml file for lgtm.com
- npm: Update devDeps, and update per security audit
- Fix: Expose
pointer
onresultType: "all"
- Security enhancement: Use global eval instead of regular eval
- Fix: Handle React-Native environment's lack of support for Node vm (@simon-scherzinger); closes #87
- Refactoring: Use arrow functions, for-of, declare block scope vars closer to block
- Docs: Clarify current
wrap
behavior - npm: Add Rollup to test scripts
- Breaking change: With Node use, must now use
require('jsonpath-plus').JSONPath
. - Breaking change: Stop including polyfills for array and string
includes
(can get with@babel/polyfill
or own) - Breaking change: Remove deprecated
JSONPath.eval
- License: Remove old and unneeded license portion from within source file (already have external file)
- Fix: Support object shorthand functions on sandbox objects
(
toString()
had not been working properly with them) - Enhancement: Add Rollup/Babel/Terser and
module
inpackage.json
- Refactoring: Use ES6 features such as object shorthand
- Linting: prefer const and no var
- Testing: Replace custom server code with
node-static
and addopn-cli
; mostly switch to ESM - npm: Update devDeps; add
package-lock.json
; remove non-functioning remark
- Breaking change: Give preference to treating special chars in a property as special (override with backtick operator)
- Breaking feature: Add custom ` operator to allow unambiguous literal sequences (if an initial backtick is needed, an additional one must now be added)
- Fix:
toPathArray
caching bug - Improvements: Performance optimizations
- Dev testing: Rename test file
- Fix: Fixing support for sandbox in the case of functions
- Feature: Use
this
if present for global export - Docs: Clarify function signature
- Docs: Update testing section
- Dev testing: Add in missing test for browser testing
- Dev testing: Add remark linting to testing process (#70)
- Dev testing: Lint JS test support files
- Dev testing: Split out tests into
eslint
,remark
,lint
,nodeunit
- Dev testing: Remove need for nodeunit build step
- Dev testing: Simplify nodeunit usage and make available
as
npm run browser-test
- Feature: Add
@scalar()
type operator (in JavaScript mode, will also include)
- Fix: Avoid double-encoding path in results
- Breaking change (from version 0.11): Silently strip
~
and^
operators and type operators such as@string()
inJSONPath.toPathString()
calls. - Breaking change: Remove
Array.isArray
polyfill as no longer supporting IE <= 8 - Feature: Allow omission of options first argument to
JSONPath
- Feature: Add
JSONPath.toPointer()
and "pointer"resultType
option. - Fix: Correctly support
callback
andotherTypeCallback
as numbered arguments toJSONPath
. - Fix: Enhance Node checking to avoid issue reported with angular-mock
- Fix: Allow for
@
or other special characters in at-sign-prefixed property names (by use of[?(@['...'])]
or[(@['...'])]
).
- Breaking change: Problems with upper-case letters in npm is causing us to rename the package, so have renamed package to "jsonpath-plus" (there are already package with lower-case "jsonpath" or "json-path"). The new name also reflects that there have been changes to the original spec.
- Docs: Actually add the warning in the README that problems in npm with upper-case letters is causing us to rename to "jsonpath-plus" (next version will actually apply the change).
- Docs: Give warning in README that problems in npm with upper-case letters is causing us to rename to "jsonpath-plus" (next version will actually apply the change).
- Breaking change: For unwrapped results, return
undefined
instead offalse
upon failure to find path (to allow distinguishing ofundefined
--a non-allowed JSON value--from the valid JSON values,null
orfalse
) and return the exact value upon falsy single results (in order to allow return ofnull
) - Deprecated: Use of
jsonPath.eval()
; use new class-based API instead - Feature: AMD export
- Feature: By using
self
instead ofwindow
export, allow JSONPath to be trivially imported into web workers, without breaking compatibility in normal scenarios. See MDN on self - Feature: Offer new class-based API and object-based arguments (with
option to run new queries via
evaluate()
method without resupplying config) - Feature: Allow new
preventEval=true
andautostart=false
option - Feature: Allow new callback option to allow a callback function to execute as each final result node is obtained
- Feature: Allow type operators: JavaScript types (
@boolean()
,@number()
,@string()
), other fundamental JavaScript types (@null()
,@object()
,@array()
), the JSONSchema-added type,@integer()
, and the following non-JSON types that can nevertheless be used with JSONPath when querying non-JSON JavaScript objects (@undefined()
,@function()
,@nonFinite()
). Finally,@other()
is made available in conjunction with a new callback option,otherTypeCallback
, can be used to allow user-defined type detection (at least until JSON Schema awareness may be provided). - Feature: Support "parent" and "parentProperty" for resultType along with "all" (which also includes "path" and "value" together)
- Feature: Support custom
@parent
,@parentProperty
,@property
(in addition to custom property@path
) inside evaluations - Feature: Support a custom operator (
~
) to allow grabbing of property names - Feature: Support
$
for retrieval of root, and document this as well as$..
behavior - Feature: Expose cache on
JSONPath.cache
for those who wish to preserve and reuse it - Feature: Expose class methods
toPathString
for converting a path as array into a (normalized) path as string andtoPathArray
for the reverse (though accepting unnormalized strings as well as normalized) - Fix: Allow
^
as property name - Fix: Support
.
within properties - Fix:
@path
in index/property evaluations
- Feature: Support for parent selection via
^
- Feature: Access current path via
@path
in test statements - Feature: Allowing for multi-statement evals
- Improvements: Performance
- Feature: Support a sandbox arg to eval
- Improvements: Use
vm.runInNewContext
in place of eval