<commit_before>import React = require("react");
import semver = require('semver');

import { Link } from 'react-router';
import { Library, libhash } from './Index';

function SortVersion(a: string, b: string) {
	if (semver.gt(a, b)) return -1;
	if (semver.lt(a, b)) return 1;
	return 0;
}

class Props {
	public key: string;
	public library: Library;
}

class Component extends React.Component<Props, {}> {
	constructor() {
		super();
		this.state = {};
	}

	render() {
		var lib = this.props.library;
		var hash = libhash(lib);
		var name = lib.name;
		var homepage = lib.homepage;
		var stars = lib.stars;

		var vkeys = Object.keys(lib.versions).sort(SortVersion);

		var versions: JSX.Element[] = vkeys.map((k): JSX.Element => {
			var vdata = lib.versions[k];
			var zip = vdata.zipball_url;
			return <div key={k} className="label label-success vspan breaker">{k}</div>
		});

		var header = <h4 className="list-group-item-heading">{name}</h4>;
		if (homepage!="") {
			header =
			<h4 className="list-group-item-heading">
				<a href={homepage}>{name}</a> <Link to="lib" params={{hash: hash}}>Lib</Link>
			</h4>;
		}

		var rating = 
		<button type="button" className="btn btn-default btn-lg" disabled={true}>
			Stars: {stars}
		</button>

		var rating2 = 
		<span>
			Stars: {stars}
		</span>

		return <div className="list-group-item">
			<p className="pullright">
				{rating2}
			</p>
			{header}
			<p className="list-group-item-text">
				{this.props.library.description}
			</p>
			<p className="centered">
				{versions}
			</p>
		</div>;
	}
}

export = Component;<commit_msg>Removed version list from search results<commit_after>import React = require("react");
import semver = require('semver');

import { Link } from 'react-router';
import { Library, libhash } from './Index';

function SortVersion(a: string, b: string) {
	if (semver.gt(a, b)) return -1;
	if (semver.lt(a, b)) return 1;
	return 0;
}

class Props {
	public key: string;
	public library: Library;
}

class Component extends React.Component<Props, {}> {
	constructor() {
		super();
		this.state = {};
	}

	render() {
		var lib = this.props.library;
		var hash = libhash(lib);
		var name = lib.name;
		var homepage = lib.homepage;
		var stars = lib.stars;

		var vkeys = Object.keys(lib.versions).sort(SortVersion);

		var header = <h4 className="list-group-item-heading">{name}</h4>;
		if (homepage!="") {
			header =
			<h4 className="list-group-item-heading">
				<a href={homepage}>{name}</a> <Link to="lib" params={{hash: hash}}>Lib</Link>
			</h4>;
		}

		var rating = 
		<button type="button" className="btn btn-default btn-lg" disabled={true}>
			Stars: {stars}
		</button>

		var rating2 = 
		<span>
			Stars: {stars}
		</span>

		return <div className="list-group-item">
			<p className="pullright">
				{rating2}
			</p>
			{header}
			<p className="list-group-item-text">
				{this.props.library.description}
			</p>
		</div>;
	}
}

export = Component;
{'fraction_non_alphanumeric': 0.17808683853459972, 'fraction_numerical': 0.006105834464043419, 'mean_word_length': 3.5934579439252334, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '863199', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1048, 'n_words': 254}