Skip to content

Commit

Permalink
chore: add monorepo files
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Jun 21, 2021
1 parent b407ed2 commit 4fe7959
Show file tree
Hide file tree
Showing 12 changed files with 259 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**

A clear and concise description of what the bug is, the CSV package version you are using.

**To Reproduce**

Please provide us with a unit test, an example code or even pseudo-code. It could be written in JavaScript or CoffeeScript, it doesn't matter. What's important is to limit the data to the minimum as well as to strip down the number of options to the only ones with an impact.

**Additional context**

Add any other context about the problem here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
.*
/node_modules
/packages/*/node_modules
!.github
!.gitignore
!.husky
lerna-debug.log
yarn.lock
yarn-error.log
package-lock.json
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity, and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise, unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,9 @@
## How to contribute to CoffeeScript

* Before you open a ticket or send a pull request, [search](https://github.com/adaltas/node-csv/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one.

* Before sending a pull request for a feature, be sure to have [tests](https://github.com/adaltas/node-csv/tree/master/test).

* Use the same coding style as the rest of the [codebase](https://github.com/adaltas/node-csv/tree/master/src). If you’re writing a test and if you're just getting started with CoffeeScript, there’s a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).

* Documentation is published on [GitHub](https://github.com/adaltas/node-csv-docs) and you are invited to submit a pull request with your changes. For convenience, you can also browse the website and click on the Edit link present at the top of every page.
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2010 Adaltas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
@@ -0,0 +1,37 @@

<pre>
_ _ _ _____ _______ __
| \ | | | | / ____|/ ____\ \ / /
| \| | ___ __| | ___ | | | (___ \ \ / /
| . ` |/ _ \ / _` |/ _ \| | \___ \ \ \/ /
| |\ | (_) | (_| | __/| |____ ____) | \ /
|_| \_|\___/ \__,_|\___| \_____|_____/ \/ MIT License

</pre>

This project provides CSV generation, parsing, transformation and serialization for Node.js.

It has been tested and used by a large community over the years and should be considered reliable. It provides every option you would expect from an advanced CSV parser and stringifier.

## Project structure

This repository is a monorepo managed using [Lerna](https://github.com/lerna/lerna). There are 5 packages managed in this codebase, even though we publish them to NPM as separate packages:

* [`csv`](packages/csv/),
an umbrella which is itself split into 4 packages.
* [`csv-generate`](packages/csv-generate/),
a flexible generator of CSV string and Javascript objects.
* [`csv-parse`](packages/csv-parse/),
a parser converting CSV text into arrays or objects.
* [`csv-stringify`](packages/csv-stringify/),
a stringifier converting records into a CSV text.
* [`stream-transform`](packages/stream-transform/),
a transformation framework.

## Documentation

The full documentation for the current version is available [here](https://csv.js.org).

## License

Licensed under the [MIT License](LICENSE).
15 changes: 15 additions & 0 deletions commitlint.config.js
@@ -0,0 +1,15 @@
const {utils: {getPackages}} = require('@commitlint/config-lerna-scopes');

module.exports = {
extends: [
"@commitlint/config-conventional",
"@commitlint/config-lerna-scopes"
],
rules: {
"scope-enum": async ctx =>
[2, "always", [...(await getPackages(ctx)),
// Insert custom scopes below:
"release"
]]
}
};
10 changes: 10 additions & 0 deletions lerna.json
@@ -0,0 +1,10 @@
{
"command": {
"version": {
"message": "chore(release): publish"
}
},
"npmClient": "yarn",
"version": "independent",
"useWorkspaces": true
}
32 changes: 32 additions & 0 deletions package.json
@@ -0,0 +1,32 @@
{
"private": true,
"devDependencies": {
"@commitlint/cli": "^12.1.1",
"@commitlint/config-conventional": "^12.1.1",
"@commitlint/config-lerna-scopes": "^12.1.1",
"cz-conventional-changelog": "^3.3.0",
"husky": "^5.2.0",
"lerna": "^4.0.0"
},
"scripts": {
"build": "lerna run build",
"postinstall": "husky install",
"publish": "lerna publish from-git --yes",
"test": "lerna run test",
"version": "lerna version --conventional-commits"
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/browserify",
"**/browserify/**"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}

0 comments on commit 4fe7959

Please sign in to comment.