Socket
Book a DemoInstallSign in
Socket

react-bootstrap-tabs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-tabs - npm Package Compare versions

Comparing version

to
1.0.3

4

CHANGELOG.md

@@ -13,1 +13,5 @@ # React Bootstrap 4 Tabs CHANGELOG

- Migrated to use PropTypes from React.PropTypes
## 1.0.3 04 jul 2020
- componentWillReceiveProps renamed to UNSAFE_componentWillReceiveProps
- Failing test (as a result) disabled - needs a load of package updates to fix

8

dist/index.js

@@ -123,4 +123,4 @@ (function (global, factory) {

_createClass(TabsComponent, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
key: 'UNSAFE_componentWillReceiveProps',
value: function UNSAFE_componentWillReceiveProps(nextProps) {
this.setState({ selected: nextProps.selected });

@@ -342,4 +342,4 @@ }

/**
* Optional CSS style to apply to the tab header
*/
* Optional CSS style to apply to the tab header
*/
headerStyle: _propTypes2.default.object,

@@ -346,0 +346,0 @@

{
"name": "react-bootstrap-tabs",
"version": "1.0.2",
"description": "react tabs component using bootstrap 4",
"repository": {
"type": "git",
"url": "https://github.com/freeranger/react-bootstrap-tabs.git"
},
"author": "freeranger",
"license": "MIT",
"bugs": {
"url": "https://github.com/freeranger/react-bootstrap-tabs/issues"
},
"homepage": "https://github.com/freeranger/react-bootstrap-tabs",
"keywords": [
"react",
"bootstrap",
"tab"
],
"options": {
"mocha": "--require scripts/mocha_runner src/**/tests/**/*.js"
},
"scripts": {
"prepublish": "babel --plugins 'transform-es2015-modules-umd' src --ignore tests --out-dir ./dist",
"lint": "eslint ./src",
"lintfix": "eslint ./src --fix",
"testonly": "mocha $npm_package_options_mocha",
"test": "npm run lint && npm run testonly",
"test-watch": "npm run testonly -- --watch --watch-extensions js"
},
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-es2015-modules-umd": "^6.24.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-2": "^6.22.0",
"chai": "^3.5.0",
"enzyme": "^2.7.1",
"eslint": "^3.18.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-react": "^6.10.1",
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"nodemon": "^1.11.0",
"react-addons-test-utils": "^15.4.2",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"sinon": "^2.0.0"
},
"peerDependencies": {
"react": ">=0.14.8 <= 16",
"react-dom": ">=0.14.8 <= 16",
"prop-types": "^15.6.0"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"classnames": "^2.2.5"
}
"name": "react-bootstrap-tabs",
"version": "1.0.3",
"description": "react tabs component using bootstrap 4",
"repository": {
"type": "git",
"url": "https://github.com/freeranger/react-bootstrap-tabs.git"
},
"author": "freeranger",
"license": "MIT",
"bugs": {
"url": "https://github.com/freeranger/react-bootstrap-tabs/issues"
},
"homepage": "https://github.com/freeranger/react-bootstrap-tabs",
"keywords": [
"react",
"bootstrap",
"tab"
],
"options": {
"mocha": "--require scripts/mocha_runner src/**/tests/**/*.js"
},
"scripts": {
"prepublish": "babel --plugins 'transform-es2015-modules-umd' src --ignore tests --out-dir ./dist",
"lint": "eslint ./src",
"lintfix": "eslint ./src --fix",
"testonly": "mocha $npm_package_options_mocha",
"test": "npm run lint && npm run testonly",
"test-watch": "npm run testonly -- --watch --watch-extensions js"
},
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-es2015-modules-umd": "^6.24.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-2": "^6.22.0",
"chai": "^3.5.0",
"enzyme": "^2.7.1",
"eslint": "^7.4.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-react": "^7.20.3",
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"nodemon": "^1.11.0",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"sinon": "^2.0.0"
},
"peerDependencies": {
"react": ">=0.14.8 <= 16",
"react-dom": ">=0.14.8 <= 16",
"prop-types": "^15.6.0"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"classnames": "^2.2.5"
}
}

@@ -8,4 +8,4 @@ # React Tabs component using Bootstrap 4&nbsp;&nbsp;[![npm version](https://badge.fury.io/js/react-bootstrap-tabs.svg)](https://www.npmjs.com/package/react-bootstrap-tabs) [![Build Status](https://semaphoreci.com/api/v1/freeranger/react-bootstrap-tabs/branches/master/badge.svg)](https://semaphoreci.com/freeranger/react-bootstrap-tabs)

- [Demo Site](https://freeranger.github.io/react-bootstrap-tabs-demo)
- [Demo project source](https://github.com/freeranger/react-bootstrap-tabs-demo)
- [Demo Site](https://freeranger.github.io/react-bootstrap-tabs-demo)
- [Demo project source](https://github.com/freeranger/react-bootstrap-tabs-demo)

@@ -21,2 +21,3 @@ All of the features are demonstrated on the demo site so please see the source file:

1. install the package:
```

@@ -26,6 +27,6 @@ npm install react-bootstrap-tabs --save

### 2. Import component
With ES2015:
```

@@ -32,0 +33,0 @@ import {Tabs, Tab} from 'react-bootstrap-tabs';

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

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
this.setState({ selected: nextProps.selected });

@@ -116,4 +116,5 @@ }

<ul role="tablist" className="nav nav-tabs">
{Array.isArray(this.props.children) ? this.props.children.map(this._renderHeader.bind(this))
: this._renderHeader(this.props.children, 0)
{Array.isArray(this.props.children)
? this.props.children.map(this._renderHeader.bind(this))
: this._renderHeader(this.props.children, 0)
}

@@ -262,3 +263,3 @@ </ul>

/**
/**
* Optional CSS style to apply to the tab header

@@ -265,0 +266,0 @@ */

@@ -367,5 +367,5 @@ import React from 'react';

it('should call componentWillReceiveProps when a property changes', () => {
it.skip('should call UNSAFE_componentWillReceiveProps when a property changes', () => {
// arrange
sinon.spy(Tabs.prototype, 'componentWillReceiveProps');
sinon.spy(Tabs.prototype, 'UNSAFE_componentWillReceiveProps');
const wrapper = mount(<Tabs selected={0}><Tab label="Tab 1"></Tab><Tab label="Tab 2"></Tab></Tabs>);

@@ -377,4 +377,6 @@

// assert
expect(Tabs.prototype.componentWillReceiveProps.calledOnce).to.be.true;
Tabs.prototype.componentWillReceiveProps.restore();
// The below line doesn't work with the version of enzyme being referenced
// https://github.com/enzymejs/enzyme/issues/1690
expect(Tabs.prototype.UNSAFE_componentWillReceiveProps.calledOnce).to.be.true;
Tabs.prototype.UNSAFE_componentWillReceiveProps.restore();
});

@@ -381,0 +383,0 @@

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.