Skip to content

Commit

Permalink
Merge pull request #145 from ndaidong/3.0.7
Browse files Browse the repository at this point in the history
v3.0.7
  • Loading branch information
ndaidong committed Jul 24, 2022
2 parents 9701b53 + 025d443 commit 66d3aad
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 19 deletions.
30 changes: 30 additions & 0 deletions build.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// release.test

/* eslint-env jest */

import {
existsSync,
readFileSync
} from 'fs'

const pkg = JSON.parse(readFileSync('./package.json'))

const cjsFile = `./dist/cjs/${pkg.name}.js`
const cjsPkg = JSON.parse(readFileSync('./dist/cjs/package.json'))

describe('Validate commonjs version output', () => {
test(`Check if ${cjsFile} created`, () => {
expect(existsSync(cjsFile)).toBeTruthy()
})
test('Check if cjs package info updated', () => {
expect(cjsPkg.name).toEqual(`${pkg.name}-cjs`)
expect(cjsPkg.version).toEqual(pkg.version)
})
const constent = readFileSync(cjsFile, 'utf8')
const lines = constent.split('\n')
test('Check if file meta contains package info', () => {
expect(lines[1].includes(`${pkg.name}@${pkg.version}`)).toBeTruthy()
expect(lines[1].includes(pkg.author)).toBeTruthy()
expect(lines[1].includes(pkg.license)).toBeTruthy()
})
})
12 changes: 8 additions & 4 deletions dist/cjs/oembed-parser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
// oembed-parser@3.0.6, by @ndaidong - built with esbuild at 2022-07-04T04:41:14.012Z - published under MIT license
// oembed-parser@3.0.7, by @ndaidong - built with esbuild at 2022-07-24T14:05:45.604Z - published under MIT license
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
Expand Down Expand Up @@ -12684,7 +12684,6 @@ var fetchEmbed_default = async (url, provider, params = {}) => {
}
const queryParams = new URLSearchParams(query).toString();
const link = getRegularUrl(queryParams, provider.fetchEndpoint);
console.log(link);
const body = retrieve_default(link);
return body;
};
Expand Down Expand Up @@ -12925,9 +12924,13 @@ var providers = [
"schemes": [
"https://audioboom.com/channels/*",
"https://audioboom.com/channel/*",
"https://audioboom.com/posts/*"
"https://audioboom.com/playlists/*",
"https://audioboom.com/podcasts/*",
"https://audioboom.com/podcast/*",
"https://audioboom.com/posts/*",
"https://audioboom.com/episodes/*"
],
"url": "https://audioboom.com/publishing/oembed/v4.{format}",
"url": "https://audioboom.com/publishing/oembed.{format}",
"formats": [
"json",
"xml"
Expand Down Expand Up @@ -15957,6 +15960,7 @@ var providers = [
"schemes": [
"http://soundcloud.com/*",
"https://soundcloud.com/*",
"https://on.soundcloud.com/*",
"https://soundcloud.app.goog.gl/*"
],
"url": "https://soundcloud.com/oembed"
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "oembed-parser-cjs",
"version": "3.0.6",
"version": "3.0.7",
"main": "./oembed-parser.js"
}
11 changes: 8 additions & 3 deletions dist/cjs/providers.latest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// provider data, synchronized at 2022-07-04T04:38:20.547Z
// provider data, synchronized at 2022-07-24T14:03:37.993Z

/* eslint-disable */

Expand Down Expand Up @@ -227,9 +227,13 @@ export const providers = [
"schemes": [
"https://audioboom.com/channels/*",
"https://audioboom.com/channel/*",
"https://audioboom.com/posts/*"
"https://audioboom.com/playlists/*",
"https://audioboom.com/podcasts/*",
"https://audioboom.com/podcast/*",
"https://audioboom.com/posts/*",
"https://audioboom.com/episodes/*"
],
"url": "https://audioboom.com/publishing/oembed/v4.{format}",
"url": "https://audioboom.com/publishing/oembed.{format}",
"formats": [
"json",
"xml"
Expand Down Expand Up @@ -3259,6 +3263,7 @@ export const providers = [
"schemes": [
"http://soundcloud.com/*",
"https://soundcloud.com/*",
"https://on.soundcloud.com/*",
"https://soundcloud.app.goog.gl/*"
],
"url": "https://soundcloud.com/oembed"
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.0.6",
"version": "3.0.7",
"name": "oembed-parser",
"description": "Get oEmbed data from given URL.",
"homepage": "https://www.npmjs.com/package/oembed-parser",
Expand All @@ -8,8 +8,7 @@
"url": "git@github.com:ndaidong/oembed-parser.git"
},
"author": "@ndaidong",
"main": "./dist/cjs/oembed-parser.js",
"module": "./src/main.js",
"main": "./src/main.js",
"type": "module",
"types": "./index.d.ts",
"engines": {
Expand Down Expand Up @@ -38,9 +37,9 @@
]
},
"devDependencies": {
"esbuild": "^0.14.48",
"jest": "^28.1.2",
"nock": "^13.2.8"
"esbuild": "^0.14.49",
"jest": "^28.1.3",
"nock": "^13.2.9"
},
"keywords": [
"oembed",
Expand Down
1 change: 0 additions & 1 deletion src/utils/fetchEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export default async (url, provider, params = {}) => {
const queryParams = new URLSearchParams(query).toString()

const link = getRegularUrl(queryParams, provider.fetchEndpoint)
console.log(link)
const body = retrieve(link)
return body
}
11 changes: 8 additions & 3 deletions src/utils/providers.latest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// provider data, synchronized at 2022-07-04T04:38:20.547Z
// provider data, synchronized at 2022-07-24T14:03:37.993Z

/* eslint-disable */

Expand Down Expand Up @@ -227,9 +227,13 @@ export const providers = [
"schemes": [
"https://audioboom.com/channels/*",
"https://audioboom.com/channel/*",
"https://audioboom.com/posts/*"
"https://audioboom.com/playlists/*",
"https://audioboom.com/podcasts/*",
"https://audioboom.com/podcast/*",
"https://audioboom.com/posts/*",
"https://audioboom.com/episodes/*"
],
"url": "https://audioboom.com/publishing/oembed/v4.{format}",
"url": "https://audioboom.com/publishing/oembed.{format}",
"formats": [
"json",
"xml"
Expand Down Expand Up @@ -3259,6 +3263,7 @@ export const providers = [
"schemes": [
"http://soundcloud.com/*",
"https://soundcloud.com/*",
"https://on.soundcloud.com/*",
"https://soundcloud.app.goog.gl/*"
],
"url": "https://soundcloud.com/oembed"
Expand Down
105 changes: 104 additions & 1 deletion src/utils/providers.prev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// provider data, synchronized at 2022-05-23T15:07:41.370Z
// provider data, synchronized at 2022-07-04T04:38:20.547Z

/* eslint-disable */

Expand Down Expand Up @@ -445,6 +445,20 @@ export const providers = [
}
]
},
{
"provider_name": "Cardinal Blue",
"provider_url": "https://minesweeper.today/",
"endpoints": [
{
"schemes": [
"http://minesweeper.today/*",
"https://minesweeper.today/*"
],
"url": "https://minesweeper.today/api/oembed",
"discovery": true
}
]
},
{
"provider_name": "Catapult",
"provider_url": "https://www.catapult.app/",
Expand Down Expand Up @@ -1464,6 +1478,21 @@ export const providers = [
}
]
},
{
"provider_name": "Heyzine",
"provider_url": "https://heyzine.com",
"endpoints": [
{
"schemes": [
"https://heyzine.com/flip-book/*",
"https://*.hflip.co/*",
"https://*.aflip.in/*"
],
"url": "https://heyzine.com/api1/oembed",
"discovery": true
}
]
},
{
"provider_name": "hihaho",
"provider_url": "https://www.hihaho.com",
Expand Down Expand Up @@ -1585,6 +1614,23 @@ export const providers = [
}
]
},
{
"provider_name": "iMenuPro",
"provider_url": "https://imenupro.com",
"endpoints": [
{
"schemes": [
"http://qr.imenupro.com/*",
"https://qr.imenupro.com/*"
],
"url": "https://qr.imenupro.com/api/oembed",
"formats": [
"json"
],
"discovery": true
}
]
},
{
"provider_name": "Incredible",
"provider_url": "https://incredible.dev",
Expand Down Expand Up @@ -1945,6 +1991,18 @@ export const providers = [
}
]
},
{
"provider_name": "Line Place",
"provider_url": "https://place.line.me",
"endpoints": [
{
"schemes": [
"https://place.line.me/businesses/*"
],
"url": "https://place.line.me/oembed"
}
]
},
{
"provider_name": "Livestream",
"provider_url": "https://livestream.com/",
Expand Down Expand Up @@ -2520,6 +2578,20 @@ export const providers = [
}
]
},
{
"provider_name": "Picturelfy",
"provider_url": "https://www.picturelfy.com/",
"endpoints": [
{
"schemes": [
"http://www.picturelfy.com/p/*",
"https://www.picturelfy.com/p/*"
],
"url": "https://api.picturelfy.com/service/oembed/",
"discovery": false
}
]
},
{
"provider_name": "PingVP",
"provider_url": "https://www.pingvp.com/",
Expand Down Expand Up @@ -2591,6 +2663,24 @@ export const providers = [
}
]
},
{
"provider_name": "Plusdocs",
"provider_url": "http://plusdocs.com",
"endpoints": [
{
"schemes": [
"https://app.plusdocs.com/*/snapshots/*",
"https://app.plusdocs.com/*/pages/edit/*",
"https://app.plusdocs.com/*/pages/share/*"
],
"url": "https://app.plusdocs.com/oembed",
"discovery": true,
"formats": [
"json"
]
}
]
},
{
"provider_name": "Podbean",
"provider_url": "http://podbean.com",
Expand Down Expand Up @@ -3054,6 +3144,19 @@ export const providers = [
}
]
},
{
"provider_name": "Slate App",
"provider_url": "https://slateapp.com",
"endpoints": [
{
"schemes": [
"https://*.slateapp.com/work/*"
],
"url": "https://*.slateapp.com/api/v2/oembed",
"discovery": true
}
]
},
{
"provider_name": "SlideShare",
"provider_url": "http://www.slideshare.net/",
Expand Down

0 comments on commit 66d3aad

Please sign in to comment.