ink-spinner
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -1,23 +0,16 @@ | ||
"use strict"; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var _react = _interopRequireWildcard(require("react")); | ||
const React = require('react'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
const PropTypes = require('prop-types'); | ||
var _ink = require("ink"); | ||
const { | ||
Box | ||
} = require('ink'); | ||
var _cliSpinners = _interopRequireDefault(require("cli-spinners")); | ||
const spinners = require('cli-spinners'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
class Spinner extends _react.Component { | ||
class Spinner extends React.Component { | ||
constructor(...args) { | ||
@@ -45,3 +38,3 @@ super(...args); | ||
const spinner = this.getSpinner(); | ||
return _react.default.createElement(_ink.Box, null, spinner.frames[this.state.frame]); | ||
return /*#__PURE__*/React.createElement(Box, null, spinner.frames[this.state.frame]); | ||
} | ||
@@ -59,3 +52,3 @@ | ||
getSpinner() { | ||
return _cliSpinners.default[this.props.type] || _cliSpinners.default.dots; | ||
return spinners[this.props.type] || spinners.dots; | ||
} | ||
@@ -65,6 +58,4 @@ | ||
exports.default = Spinner; | ||
_defineProperty(Spinner, "propTypes", { | ||
type: _propTypes.default.string | ||
type: PropTypes.string | ||
}); | ||
@@ -74,2 +65,5 @@ | ||
type: 'dots' | ||
}); | ||
}); | ||
module.exports = Spinner; | ||
module.exports.default = Spinner; |
{ | ||
"name": "ink-spinner", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Spinner component for Ink", | ||
@@ -13,2 +13,3 @@ "license": "MIT", | ||
"main": "build/index.js", | ||
"types": "index.d.ts", | ||
"engines": { | ||
@@ -19,3 +20,3 @@ "node": ">=8" | ||
"pretest": "npm run build", | ||
"test": "xo && ava", | ||
"test": "tsc --noEmit --jsx react --module commonjs index.test-d.tsx && xo && ava", | ||
"build": "babel src --out-dir=build", | ||
@@ -25,3 +26,4 @@ "prepare": "npm run build" | ||
"files": [ | ||
"build" | ||
"build", | ||
"index.d.ts" | ||
], | ||
@@ -43,2 +45,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@ava/babel": "^1.0.1", | ||
"@babel/cli": "^7.2.3", | ||
@@ -48,11 +51,14 @@ "@babel/core": "^7.3.3", | ||
"@babel/preset-react": "^7.0.0", | ||
"ava": "*", | ||
"babel-eslint": "^10.0.1", | ||
"@babel/register": "^7.10.3", | ||
"ava": "^3.9.0", | ||
"babel-eslint": "^10.1.0", | ||
"delay": "^4.1.0", | ||
"eslint-config-xo-react": "^0.13.0", | ||
"eslint-plugin-react": "^7.1.0", | ||
"eslint-config-xo-react": "^0.23.0", | ||
"eslint-plugin-react": "^7.20.0", | ||
"eslint-plugin-react-hooks": "^4.0.4", | ||
"ink": "^2.0.0", | ||
"ink-testing-library": "^1.0.0", | ||
"react": "^16.8.2", | ||
"xo": "*" | ||
"typescript": "^3.9.5", | ||
"xo": "^0.32.0" | ||
}, | ||
@@ -68,6 +74,11 @@ "peerDependencies": { | ||
"presets": [ | ||
"@ava/stage-4", | ||
"@babel/preset-react" | ||
] | ||
}, | ||
"ava": { | ||
"babel": true, | ||
"require": [ | ||
"@babel/register" | ||
] | ||
}, | ||
"xo": { | ||
@@ -77,4 +88,8 @@ "parser": "babel-eslint", | ||
"xo-react" | ||
], | ||
"ignores": [ | ||
"index.d.ts", | ||
"index.test-d.tsx" | ||
] | ||
} | ||
} |
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
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
6419
5
76
17