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

bv-ui-core

Package Overview
Dependencies
Maintainers
9
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bv-ui-core - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

5

CHANGELOG.md
# Changelog
## 0.10.1
* Check for existence of callback to loadScript/loadStylesheet before attempting to call.
* Always allow 'www' subdomain with any url in domainPolice.
## 0.10.0

@@ -4,0 +9,0 @@

2

lib/domainPolice/index.js

@@ -28,3 +28,3 @@ /**

return host === domain;
return host === domain || host === ("www." + domain);
}

@@ -31,0 +31,0 @@

@@ -51,2 +51,4 @@ # domainPolice

Prefixing `.` on the `domain` will allow it to match all subdomains as well.
URL hosts which include `www.` will be allowed with domain name match.
Given the above example, the following domains are all valid:

@@ -59,2 +61,3 @@

- `no-prefixing-dot.foo.com`
- `www.no-prefixing-dot.foo.com`

@@ -61,0 +64,0 @@ Domains that would not be allowed:

@@ -135,3 +135,5 @@ /* eslint no-use-before-define: 0 */

// to reload it, so we'll just call the callback and return.
callback();
if (typeof callback === 'function') {
callback();
}
return;

@@ -276,3 +278,5 @@ }

// to reload it, so we'll just call the callback and return.
callback();
if (typeof callback === 'function') {
callback();
}
return;

@@ -279,0 +283,0 @@ }

{
"name": "bv-ui-core",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache 2.0",

@@ -5,0 +5,0 @@ "description": "Bazaarvoice UI-related JavaScript",

@@ -43,2 +43,3 @@ ![](https://travis-ci.org/bazaarvoice/bv-ui-core.svg)

- [cookie](./lib/cookie)
- [cssLoadChecker](./lib/cssLoadChecker)
- [date.now](./lib/date.now)

@@ -45,0 +46,0 @@ - [domainPolice](./lib/domainPolice)

@@ -37,2 +37,8 @@ /**

{
domain: 'www.no-prefixing-dot.foo.com',
matchedDomain: 'no-prefixing-dot.foo.com',
isValid: true,
thirdPartyCookieEnabled: true
},
{
domain: 'foo.com',

@@ -39,0 +45,0 @@ matchedDomain: undefined,

@@ -150,2 +150,14 @@ /* eslint no-use-before-define: 0 */

it('doesn\'t try to execute non-existent callback on second load', function () {
expect(function () {
window.BV = window.BV || {}
window.BV.loadedUrls = {
'/base/test/fixtures/lib.loader.loadscript.js': true
}
loader.loadScript('/base/test/fixtures/lib.loader.loadscript.js', {
namespaceName: 'BV',
forceLoad: false
});
}).to.not.throw(Error);
});
});

@@ -492,2 +504,15 @@

it('doesn\'t try to execute non-existent callback on second load', function () {
expect(function () {
window.BV = window.BV || {}
window.BV.loadedUrls = {
'/base/test/fixtures/lib.loader.loadstylesheet.css': true
}
loader.loadStyleSheet('/base/test/fixtures/lib.loader.loadstylesheet.css', {
namespaceName: 'BV',
forceLoad: false
});
}).to.not.throw(Error);
});
/*

@@ -494,0 +519,0 @@ // TODO: Fix this test; it fails, even though the actual functionality

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