Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump camaro from 4.2.0 to 5.0.0 #137

Merged
merged 3 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"camaro": "^4.1.2",
"camaro": "^5.0.0",
"chai": "^4.2.0",
"cheerio": "^0.22.0",
"eslint": "^6.0.1",
Expand Down
4 changes: 3 additions & 1 deletion test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/


const { transform } = require('camaro');
const { ready, transform } = require('camaro');

const template = {
rss: {
Expand Down Expand Up @@ -53,6 +53,7 @@ const template = {
};

const detectFeedType = async xml => {
await ready();
const sample = await transform(xml, {
rss: 'rss/channel/title',
atom: 'feed/title'
Expand All @@ -64,6 +65,7 @@ const detectFeedType = async xml => {
};

const parseFeed = async xml => {
await ready();
const type = await detectFeedType(xml);
const output = await transform(xml, template[type]);
return output;
Expand Down