Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oembetter

Package Overview
Dependencies
Maintainers
16
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oembetter - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4-alpha.1

4

CHANGELOG.md
# 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 @@ ];

2

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc