Skip to content

Commit

Permalink
Added contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantdhiman committed Aug 1, 2016
1 parent 3dadcfb commit 393e94f
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 40 deletions.
73 changes: 73 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributing Guidelines

## Introduction

Contributions are always welcomed. You can help `node-mysql2` community in various ways. Here are our major priorities, listed in order of importance.

- `node-mysql` API incompatibility fixes
- Documentation
- Adding tests or improving existing ones
- Improving benchmarks
- Bug Fixes
- TODO from source
- Performance improvements
- Add Features

## Security Issues

Please contact project maintainers privately before opening a security issue on Github. It will allow us to fix the issue before attackers know about it.

**Contact**

- Andrey Sidorov, [email protected]

## New Features

Its better to discuss an API before actaully start implementing it. You can open an issue on Github. We can discuss design of API and implementation ideas.

## Development

We assume you already have these tools installed on your system
- MySQL Server
- Node.JS

As `node-mysql2` is purely JS based you can develop it on Linux, Mac or Windows. Please follow these steps

```bash
# clone node-mysql2
git clone https://github.com/sidorares/node-mysql2.git

cd /path/to/node-mysql2

# install node modules
npm install
```

### Running Tests

Running tests requires MySQL server and an empty database. You can run `bash` command given below to create `test` database

```bash
# assuming MySQL have a user root with no password
echo "CREATE DATABASE test;" | mysql -uroot
```

```sh
# Run once to setup the local environment variables.
export CI=1;
export MYSQL_HOST='127.0.0.1';
export MYSQL_USER='root';
export MYSQL_PASSWORD='root';
export MYSQL_DATABASE='test';

# If test user has no password, unset the `CI` variable.

# Run the test suite
npm run test
```

Use `FILTER` environment variable to run a subset of tests with matching names, e.g.

```sh
FILTER='test-timestamp' npm run test
```
2 changes: 1 addition & 1 deletion License
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013 Andrey Sidorov ([email protected]) and contributors
Copyright (c) 2016 Andrey Sidorov ([email protected]) and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 6 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]

Mysql client for node.js. Written in native JavaScript and aims to be mostly api compatible with [node-mysql](https://github.com/felixge/node-mysql)
MySql client for node.js. Written in native JavaScript and aims to be mostly api compatible with [node-mysql](https://github.com/felixge/node-mysql)

[![NPM](https://nodei.co/npm/mysql2.png?downloads=true&stars=true)](https://nodei.co/npm/mysql2/)
[![NPM](https://nodei.co/npm-dl/mysql2.png?months=6)](https://nodei.co/npm/mysql2/)
Expand All @@ -15,11 +15,11 @@ Mysql client for node.js. Written in native JavaScript and aims to be mostly api

In addition to client-side query/escape and connection pooling

- [fast](https://gist.github.com/sidorares/ffe9ee9c423f763e3b6b)
- [Fast](https://gist.github.com/sidorares/ffe9ee9c423f763e3b6b)
- MySQL server API for proxies and mocks
- SSL and compression
- prepared statements
- binlog protocol client
- Prepared statements
- Binary log protocol client

## Documentation

Expand Down Expand Up @@ -391,30 +391,6 @@ In addition special events are emitted for [commands](https://dev.mysql.com/doc/
* **field_list**(table: string, fields: string) - Default: return ER_WARN_DEPRECATED_SYNTAX
* **ping**() - Default: return OK

## Running Tests

Running the tests requires MySQL server and an empty database.

```sh
# Run once to setup the local environment variables.
export CI=1;
export MYSQL_HOST='127.0.0.1';
export MYSQL_USER='root';
export MYSQL_PASSWORD='root';
export MYSQL_DATABASE='test';

# If test user has no password, unset the `CI` variable.

# Run the test suite
npm run test
```

Use `FILTER` environment variable to run a subset of tests with matching names, e.g.

```sh
FILTER='test-timestamp' npm run test
```

## License

MIT
Expand Down Expand Up @@ -451,17 +427,8 @@ FILTER='test-timestamp' npm run test

## Contributing

Feel free to create pull requests.
TODO in order of importance:

- node-mysql api incompatibility fixes
- documentation
- tests
- benchmarks
- bug fixes
- TODOs in source code
- performance improvements
- features
Want to improve something in `node-mysql2`. Please check [Contributing.md](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md) for detailed instruction on how to get started.


[npm-image]: https://img.shields.io/npm/v/mysql2.svg
[npm-url]: https://npmjs.org/package/mysql2
Expand Down

0 comments on commit 393e94f

Please sign in to comment.