oembetter
Advanced tools
Comparing version 1.1.3 to 1.1.4-alpha.1
# Changelog | ||
## UNRELEASED | ||
- Hardcode the YouTube oembed endpoint for sharing URLs too. | ||
## 1.1.3 (2024-08-07) | ||
@@ -4,0 +8,0 @@ |
@@ -232,2 +232,6 @@ const oembed = require('./oembed.js'); | ||
endpoint: 'https://www.youtube.com/oembed' | ||
}, | ||
{ | ||
domain: 'youtu.be', | ||
endpoint: 'https://www.youtube.com/oembed' | ||
} | ||
@@ -234,0 +238,0 @@ ]; |
{ | ||
"name": "oembetter", | ||
"version": "1.1.3", | ||
"version": "1.1.4-alpha.1", | ||
"description": "A modern oembed client. Allows you to register filters to improve or supply oembed support for sites that don't normally have it. You can also supply a allowlist of services you trust to prevent XSS attacks.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -82,3 +82,7 @@ | ||
}); | ||
it('should return an oembed response for youtube', function(done) { | ||
it('should return an oembed response for youtube full links', function(done) { | ||
const oembetter = require('../index.js')(); | ||
// Use the suggested endpoints, youtube sometimes has discovery issues | ||
// so we always do this in production | ||
oembetter.endpoints(oembetter.suggestedEndpoints); | ||
oembetter.fetch('https://www.youtube.com/watch?v=zsl_auoGuy4', function(err, response) { | ||
@@ -91,2 +95,14 @@ assert(!err); | ||
}); | ||
it('should return an oembed response for youtube sharing links', function(done) { | ||
const oembetter = require('../index.js')(); | ||
// Use the suggested endpoints, youtube sometimes has discovery issues | ||
// so we always do this in production | ||
oembetter.endpoints(oembetter.suggestedEndpoints); | ||
oembetter.fetch('https://youtu.be/RRfHbyCQDCo?si=U5yxvQeXgACwajqa', function(err, response) { | ||
assert(!err); | ||
assert(response); | ||
assert(response.html); | ||
done(); | ||
}); | ||
}); | ||
it('should return an oembed response for youtube with forced use of XML', function(done) { | ||
@@ -93,0 +109,0 @@ require('../oembed.js').setForceXml(true); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37660
603
1