Skip to content

Commit

Permalink
Merge pull request #99 from extractus/7.0.0
Browse files Browse the repository at this point in the history
v7.0.0 - Bump version
  • Loading branch information
ndaidong authored Jul 12, 2023
2 parents 044a5d3 + 6180e01 commit 4bdcdb1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ npm i @extractus/feed-extractor
```

```ts
// es6 module
import { extract } from '@extractus/feed-extractor'

// CommonJS
const { extract } = require('@extractus/feed-extractor')

// you can specify exactly path to CommonJS version
const { extract } = require('@extractus/feed-extractor/dist/cjs/feed-extractor.js')

// extract a RSS
const result = await extract('https://news.google.com/rss')
console.log(result)
Expand All @@ -50,7 +43,7 @@ import { extract } from 'npm:@extractus/feed-extractor'
### Browser

```ts
import { extract } from 'https://unpkg.com/@extractus/feed-extractor@latest/dist/feed-extractor.esm.js'
import { extract } from 'https://esm.sh/@extractus/feed-extractor'
```

Please check [the examples](https://github.com/extractus/feed-extractor/tree/main/examples) for reference.
Expand Down Expand Up @@ -354,8 +347,8 @@ See [parserOptions](#parseroptions-optional) above.
```bash
git clone https://github.com/extractus/feed-extractor.git
cd feed-extractor
npm i
npm test
pnpm i
pnpm test
```

![feed-extractor-test.png](https://i.imgur.com/2b5xt6S.png)
Expand All @@ -366,9 +359,8 @@ npm test
```bash
git clone https://github.com/extractus/feed-extractor.git
cd feed-extractor
npm install

npm run eval https://news.google.com/rss
pnpm i
pnpm eval https://news.google.com/rss
```

## License
Expand Down
8 changes: 8 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"imports": {
"cross-fetch": "./src/deno/cross-fetch.js",
"html-entities": "https://esm.sh/[email protected]",
"fast-xml-parser": "https://esm.sh/[email protected]",
"bellajs": "https://esm.sh/[email protected]"
}
}
4 changes: 2 additions & 2 deletions eval.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// eval.js
// to quickly test with a single url or file

import { read } from './src/main.js'
import { extract } from './src/main.js'

const run = async (url) => {
try {
console.time('extract-feed')
const feed = await read(url)
const feed = await extract(url)
console.log(feed)
console.timeEnd('extract-feed')
} catch (err) {
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.3.0",
"version": "7.0.0",
"name": "@extractus/feed-extractor",
"description": "To read and normalize RSS/ATOM/JSON feed data",
"homepage": "https://extractor-demos.pages.dev",
Expand All @@ -11,7 +11,10 @@
"main": "./src/main.js",
"type": "module",
"imports": {
"cross-fetch": "./src/deno/cross-fetch.js"
"cross-fetch": "./src/deno/cross-fetch.js",
"html-entities": "https://esm.sh/[email protected]",
"fast-xml-parser": "https://esm.sh/[email protected]",
"bellajs": "https://esm.sh/[email protected]"
},
"browser": {
"cross-fetch": "./src/deno/cross-fetch.js"
Expand All @@ -36,8 +39,8 @@
},
"devDependencies": {
"eslint": "^8.44.0",
"https-proxy-agent": "^7.0.0",
"jest": "^29.6.0",
"https-proxy-agent": "^7.0.1",
"jest": "^29.6.1",
"nock": "^13.3.1"
},
"keywords": [
Expand Down

0 comments on commit 4bdcdb1

Please sign in to comment.