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

ink-spinner

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-spinner - npm Package Compare versions

Comparing version 4.0.3 to 5.0.0

build/index.js.map

8

build/index.d.ts

@@ -1,4 +0,4 @@

import type { FC } from 'react';
/// <reference types="react" />
import type { SpinnerName } from 'cli-spinners';
interface Props {
type Props = {
/**

@@ -11,7 +11,7 @@ * Type of a spinner.

type?: SpinnerName;
}
};
/**
* Spinner.
*/
declare const Spinner: FC<Props>;
declare function Spinner({ type }: Props): JSX.Element;
export default Spinner;

@@ -1,14 +0,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const react_1 = require("react");
const ink_1 = require("ink");
const spinners = require("cli-spinners");
import React, { useState, useEffect } from 'react';
import { Text } from 'ink';
import spinners from 'cli-spinners';
/**
* Spinner.
*/
const Spinner = ({ type = 'dots' }) => {
const [frame, setFrame] = react_1.useState(0);
function Spinner({ type = 'dots' }) {
const [frame, setFrame] = useState(0);
const spinner = spinners[type];
react_1.useEffect(() => {
useEffect(() => {
const timer = setInterval(() => {

@@ -24,4 +21,5 @@ setFrame(previousFrame => {

}, [spinner]);
return React.createElement(ink_1.Text, null, spinner.frames[frame]);
};
exports.default = Spinner;
return React.createElement(Text, null, spinner.frames[frame]);
}
export default Spinner;
//# sourceMappingURL=index.js.map
{
"name": "ink-spinner",
"version": "4.0.3",
"version": "5.0.0",
"description": "Spinner component for Ink",

@@ -9,9 +9,12 @@ "license": "MIT",

"name": "Vadim Demedes",
"email": "vdemedes@gmail.com",
"url": "github.com/vadimdemedes"
"email": "vadimdemedes@hey.com",
"url": "https://github.com/vadimdemedes"
},
"main": "build",
"types": "build/index.d.ts",
"type": "module",
"exports": {
"types": "./build/index.d.ts",
"default": "./build/index.js"
},
"engines": {
"node": ">=10"
"node": ">=14.16"
},

@@ -36,50 +39,39 @@ "scripts": {

"dependencies": {
"cli-spinners": "^2.3.0"
"cli-spinners": "^2.7.0"
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/preset-react": "^7.10.1",
"@sindresorhus/tsconfig": "^0.7.0",
"@types/react": "^16.9.46",
"@vdemedes/prettier-config": "^1.0.0",
"ava": "^3.9.0",
"delay": "^4.1.0",
"eslint-config-xo-react": "^0.23.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.4",
"husky": "^4.2.5",
"ink": "^3.0.0-4",
"ink-testing-library": "^2.0.0",
"@sindresorhus/tsconfig": "^3.0.1",
"@types/react": "^18.0.0",
"@vdemedes/prettier-config": "^1.0.1",
"ava": "^5.1.1",
"delay": "^5.0.0",
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"ink": "^4.0.0",
"ink-testing-library": "^3.0.0",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"react": "^16.8.2",
"typescript": "^3.9.5",
"xo": "^0.32.0"
"react": "^18.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"xo": "^0.53.0"
},
"peerDependencies": {
"react": ">=16.8.2",
"ink": ">=3.0.5"
"ink": ">=4.0.0",
"react": ">=18.0.0"
},
"ava": {
"babel": {
"testOptions": {
"presets": [
"@babel/preset-react"
]
}
}
"extensions": {
"ts": "module",
"tsx": "module"
},
"nodeArguments": [
"--loader=ts-node/esm"
]
},
"xo": {
"extends": "xo-react",
"prettier": true,
"rules": {
"react/prop-types": "off"
}
"prettier": true
},
"prettier": "@vdemedes/prettier-config",
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
"prettier": "@vdemedes/prettier-config"
}

Sorry, the diff of this file is not supported yet

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