New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

theming

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

theming - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

5

CHANGELOG.md

@@ -6,2 +6,7 @@ # Changelog

### 1.2.0 (2017-11-12)
- Update React to v16
- Update brcast
### 1.1.0 (2017-07-12)

@@ -8,0 +13,0 @@

27

package.json
{
"name": "theming",
"version": "1.1.0",
"version": "1.2.0",
"description": "Unified CSSinJS theming solution for React",

@@ -45,2 +45,3 @@ "main": "dist/cjs",

"all": true,
"cache": true,
"reporter": [

@@ -71,5 +72,5 @@ "lcov",

"devDependencies": {
"ava": "^0.20.0",
"ava": "^0.22.0",
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-eslint": "^8.0.1",
"babel-preset-env": "^1.4.0",

@@ -80,6 +81,7 @@ "babel-preset-es2017": "^6.24.1",

"babel-register": "^6.24.1",
"browser-env": "2.0.31",
"coveralls": "^2.13.1",
"browser-env": "^3.2.1",
"coveralls": "3.0.0",
"cross-env": "^5.0.1",
"enzyme": "^2.8.2",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"eslint": "^4.1.0",

@@ -92,13 +94,16 @@ "eslint-config-pedant": "^0.10.0",

"nyc": "^11.0.2",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"rimraf": "^2.6.1"
},
"dependencies": {
"brcast": "^2.0.0",
"brcast": "^3.0.1",
"is-function": "^1.0.1",
"is-plain-object": "^2.0.1",
"prop-types": "^15.5.8",
"react": "^15.5.4"
"prop-types": "^15.5.8"
},
"peerDependencies": {
"react": ">=0.15"
}
}

@@ -327,3 +327,3 @@ # theming

const { channel, withTheme, ThemeProvider } = theming;
const { channel, withTheme, ThemeProvider, themeListener } = theming;

@@ -334,2 +334,3 @@ export default {

ThemeProvider,
themeListener,
};

@@ -336,0 +337,0 @@ ```

@@ -5,3 +5,4 @@ import test from 'ava';

import createBroadcast from 'brcast';
import { mount } from 'enzyme';
import { mount, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import isFunction from 'is-function';

@@ -13,2 +14,4 @@ import isPainObject from 'is-plain-object';

configure({ adapter: new Adapter() });
test(`createThemeListener's type`, t => {

@@ -15,0 +18,0 @@ const actual = isFunction(createThemeListener);

@@ -68,3 +68,3 @@ import React from 'react';

if (this.context[CHANNEL]) {
this.unsubscribe = this.context[CHANNEL].subscribe(this.setOuterTheme);
this.subscriptionId = this.context[CHANNEL].subscribe(this.setOuterTheme);
}

@@ -88,4 +88,5 @@ }

componentWillUnmount() {
if (typeof this.unsubscribe === 'function') {
this.unsubscribe();
if (this.subscriptionId !== undefined) {
this.context[CHANNEL].unsubscribe(this.subscriptionId);
delete this.subscriptionId;
}

@@ -92,0 +93,0 @@ }

import test from 'ava';
import React, { Component } from 'react';
import { mount } from 'enzyme';
import { mount, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

@@ -11,2 +12,4 @@ import isFunction from 'is-function';

configure({ adapter: new Adapter() });
import {

@@ -54,3 +57,2 @@ getChannel,

const broadcast = createBroadcast(theme);
const unsubscribed = getInterceptor(false);

@@ -62,8 +64,15 @@ const wrapper = mount(

t.false(unsubscribed());
const { subscriptionId } = wrapper.instance();
t.true(wrapper.instance().subscriptionId !== undefined, 'brcast subscriptionId is undefined');
t.true(typeof wrapper.instance().subscriptionId === 'number', 'brcast subscriptionId expected to be number');
wrapper.instance().unsubscribe = () => unsubscribed(true);
const subscription = getInterceptor(subscriptionId);
const brcastInst = wrapper.context(channel);
brcastInst.unsubscribe = (id) => subscription(id);
wrapper.setContext({[channel]: brcastInst});
wrapper.unmount();
t.true(unsubscribed(), `ThemeProvider should unsubscribe on unmounting`);
t.true(subscription() === subscriptionId, `ThemeProvider should unsubscribe on unmounting`);
});

@@ -70,0 +79,0 @@

import test from 'ava';
import React, { Component } from 'react';
import { mount, shallow } from 'enzyme';
import { mount, shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

@@ -18,2 +19,4 @@ import isFunction from 'is-function';

configure({ adapter: new Adapter() });
test(`createWithTheme's type`, t => {

@@ -20,0 +23,0 @@ const actual = isFunction(createWithTheme);

import test from 'ava';
import React from 'react';
import { mount } from 'enzyme';
import { mount, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import isFunction from 'is-function';

@@ -10,2 +11,4 @@ import isPlainObject from 'is-plain-object';

configure({ adapter: new Adapter() });
test(`createTheming's type`, t => {

@@ -12,0 +15,0 @@ const actual = isFunction(createTheming);

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