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

ansi-to-react

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-to-react - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

40

package.json
{
"name": "ansi-to-react",
"version": "1.4.2",
"version": "1.5.0",
"description": "ANSI to React Elements",

@@ -20,4 +20,5 @@ "main": "lib/index.js",

"type": "git",
"url": "git+https://github.com/nteract/ansi-to-react.git"
"url": "git+https://github.com/nteract/nteract.git"
},
"homepage": "https://github.com/nteract/nteract/tree/master/packages/ansi-to-react",
"keywords": [

@@ -27,39 +28,16 @@ "ansi",

],
"babel": {
"presets": [
"es2015",
"stage-3",
"react"
],
"plugins": [
"transform-flow-strip-types"
]
},
"author": "Kyle Kelley <rgbkrk@gmail.com>",
"license": "MPL-2.0",
"dependencies": {
"anser": "^1.1.0",
"escape-carriage": "^1.0.1"
"anser": "^1.4.1",
"escape-carriage": "^1.2.0"
},
"peerDependencies": {
"react": "^15.0.0-0"
"react": "^15.6.1",
"react-dom": "^15.6.1"
},
"devDependencies": {
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-3": "^6.22.0",
"chai": "^3.5.0",
"enzyme": "^2.2.0",
"flow-bin": "^0.46.0",
"flow-copy-source": "^1.1.0",
"mkdirp": "0.5.1",
"mocha": "^3.2.0",
"react": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-dom": "^15.0.1",
"rimraf": "^2.5.2"
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}

@@ -6,18 +6,22 @@ const Ansi = require('../src/index');

const GREEN_FG = '\u001b[32m';
const YELLOW_BG = '\u001b[43m';
const RESET = '\u001b[0;m';
const GREEN_FG = "\u001b[32m";
const YELLOW_BG = "\u001b[43m";
const RESET = "\u001b[0;m";
describe('Ansi', () => {
it('hello world', () => {
const el = enzyme.shallow(React.createElement(Ansi, null, 'hello world'));
describe("Ansi", () => {
it("hello world", () => {
const el = enzyme.shallow(React.createElement(Ansi, null, "hello world"));
expect(el).to.not.be.null;
expect(el.text()).to.equal('hello world');
expect(el.text()).to.equal("hello world");
});
it('can color', () => {
const el = enzyme.shallow(React.createElement(Ansi, null, `hello ${GREEN_FG}world`));
it("can color", () => {
const el = enzyme.shallow(
React.createElement(Ansi, null, `hello ${GREEN_FG}world`)
);
expect(el).to.not.be.null;
expect(el.text()).to.equal('hello world');
expect(el.html()).to.equal('<code><span>hello </span><span style="color:rgb(0, 187, 0);">world</span></code>');
expect(el.text()).to.equal("hello world");
expect(el.html()).to.equal(
'<code><span>hello </span><span style="color:rgb(0, 187, 0);">world</span></code>'
);
});

@@ -35,4 +39,6 @@

expect(el).to.not.be.null;
expect(el.text()).to.equal('hello world');
expect(el.html()).to.equal('<code><span>hello </span><span style="color:rgb(0, 187, 0);">wo</span><span style="background-color:rgb(187, 187, 0);color:rgb(0, 187, 0);">rl</span><span>d</span></code>');
expect(el.text()).to.equal("hello world");
expect(el.html()).to.equal(
'<code><span>hello </span><span style="color:rgb(0, 187, 0);">wo</span><span style="background-color:rgb(187, 187, 0);color:rgb(0, 187, 0);">rl</span><span>d</span></code>'
);
});

@@ -39,0 +45,0 @@

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