Skip to content

Commit

Permalink
- Fix: Proper Node CommonJS export; fixes JSONPath-Plus#143
Browse files Browse the repository at this point in the history
- Docs: Properly indicate new browser paths
- npm: Bump to 5.0.1
  • Loading branch information
Brett Zamir committed Jan 14, 2021
1 parent 3a06227 commit 5e3a797
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.iml
.DS_Store
.idea
ignore
temp
node_modules
pids
Expand Down
7 changes: 6 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# CHANGES for jsonpath-plus

## 5.0.0 (2020-07-11)
## 5.0.1 (2021-01-15)

- Fix: Proper Node CommonJS export; fixes #143
- Docs: Properly indicate new browser paths

## 5.0.0 (2021-01-14)

- Breaking change: Add `type: 'commonjs'` and `exports: {import, require}`
(with `node-import-test` npm script to demo)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const result = JSONPath({path: '...', json});

### Browser

For browser usage you can directly include `dist/index-umd.js`; no Browserify
For browser usage you can directly include `dist/index-browser-umd.js`; no Browserify
magic is necessary:

```html
Expand All @@ -102,7 +102,7 @@ You may also use ES6 Module imports (for modern browsers):
```html
<script type="module">
import {JSONPath} from './node_modules/jsonpath-plus/dist/index-browser-es.js';
import {JSONPath} from './node_modules/jsonpath-plus/dist/index-browser-esm.js';
const result = JSONPath({path: '...', json: ...});
</script>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"author": "Stefan Goessner",
"name": "jsonpath-plus",
"version": "5.0.0",
"version": "5.0.1",
"type": "commonjs",
"main": "dist/index-node-umd.js",
"main": "dist/index-node-cjs.js",
"exports": {
"import": "dist/index-node-esm.mjs",
"require": "dist/index-node-umd.js"
"require": "dist/index-node-cjs.js"
},
"module": "dist/index-node-esm.mjs",
"browser": "dist/index-browser-esm.js",
Expand Down

0 comments on commit 5e3a797

Please sign in to comment.