Skip to content

Commit

Permalink
Merge pull request #12 from gregoranders/development
Browse files Browse the repository at this point in the history
0.0.4 Release
  • Loading branch information
gregoranders authored Jun 20, 2020
2 parents 25d308f + 953842c commit 5f74a47
Show file tree
Hide file tree
Showing 18 changed files with 325 additions and 100 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- development

env:
CI: true

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -26,13 +29,9 @@ jobs:
- name: npm install
run: |
npm install
env:
CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
env:
CI: true
7 changes: 3 additions & 4 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- feature/*

env:
CI: true

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -26,13 +29,9 @@ jobs:
- name: npm install
run: |
npm install
env:
CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
env:
CI: true
51 changes: 24 additions & 27 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master

env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -26,37 +30,30 @@ jobs:
- name: npm install
run: |
npm install
env:
CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
- name: publish code coverage to code climate
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: paambaati/[email protected]
env:
CI: true
# - name: publish code coverage to code climate
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
# uses: paambaati/[email protected]
# env:
# CI: true
# CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
# with:
# coverageCommand: npm run test
# coverageLocations: |
# ./test/coverage/lcov.info:lcov
# debug: true
# - name: create release
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
# id: createrelease
# uses: gregoranders/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
# with:
# tag: v${{ steps.projectinfo.outputs.version }}
# name: ${{ steps.projectinfo.outputs.version }} Release
# body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
# target: ${{ github.ref }}
# draft: true
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: create release
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
id: createrelease
uses: gregoranders/[email protected]
env:
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
with:
tag: v${{ steps.projectinfo.outputs.version }}
name: ${{ steps.projectinfo.outputs.version }} Release
body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
target: ${{ github.ref }}
draft: true
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release CI

on:
release:
types:
- edited

env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: nodejs project information
id: projectinfo
uses: gregoranders/[email protected]
- name: npm install
run: |
npm install
- name: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public
7 changes: 0 additions & 7 deletions .npmignore

This file was deleted.

44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
#### 0.0.4 (2020-06-20)

##### Build System / Dependencies

* **release:** add release workflow ([0e68a0e4](https://github.com/gregoranders/ts-csv/commit/0e68a0e4da12f3ae86cd1b225b2517325d98f9c8))

##### Chores

* **release:**
* update lib version in code ([d1dae662](https://github.com/gregoranders/ts-csv/commit/d1dae6621ab25a93850aaa8ebbaeba1417f107fd))
* bump version ([b4f4ae25](https://github.com/gregoranders/ts-csv/commit/b4f4ae256b29fd27ec3e8e60c2f97d0c1607d17a))
* remove file ([dfb954df](https://github.com/gregoranders/ts-csv/commit/dfb954df74bb4ef7c84a2795a67d972a2dd17719))
* **SECURITY:** update ([a0a78fa6](https://github.com/gregoranders/ts-csv/commit/a0a78fa6b4e29519f8c1a25b24afed9d6f9c9c4d))
* **npm:** remove .npmignore ([9742113e](https://github.com/gregoranders/ts-csv/commit/9742113ecb8136a1d3cbd34360043c915cb2ce05))
* **package:** remove tasks ([72c5be24](https://github.com/gregoranders/ts-csv/commit/72c5be2458f963b037e54d1a1ffcd6f0a7cdfc31))
* **eslint:** move config ([9ec51457](https://github.com/gregoranders/ts-csv/commit/9ec51457a62f9eaefd6d889026f57973fef771e3))

##### Documentation Changes

* **CHANGELOG:** update changelog ([1be6a3cb](https://github.com/gregoranders/ts-csv/commit/1be6a3cbbe5d21cf9a297ad01e45d97e6c7be75d))
* **api:** update api docs ([ef535a35](https://github.com/gregoranders/ts-csv/commit/ef535a3596d3cc21f7bca61fea741d7adcbdf2f6))
* **README:** update docs ([e08b309d](https://github.com/gregoranders/ts-csv/commit/e08b309d26726a0665a16368d6f903d3a935fce0))

##### Bug Fixes

* **build:** fix code quality issue ([99756f37](https://github.com/gregoranders/ts-csv/commit/99756f37f67d200ca23586c5e767237ab825a143))
* **tsconfig:** remove DOM ([1773dc79](https://github.com/gregoranders/ts-csv/commit/1773dc798ac9c1f8481514a7f6608b2146753596))

##### Other Changes

* gregoranders/ts-csv into development ([9143c2c3](https://github.com/gregoranders/ts-csv/commit/9143c2c3c9eaf04ff49a725d5e87ed451fef8b9f))
* bump lint-staged from 10.2.10 to 10.2.11 ([fbd4d5a8](https://github.com/gregoranders/ts-csv/commit/fbd4d5a8e8c7ae044870f47822a73ddc3b6d74b0))
* bump jest-spec-reporter from 1.0.13 to 1.0.14 ([dba06913](https://github.com/gregoranders/ts-csv/commit/dba06913af3e0f818ef798058e854e10f8a92e90))
* bump @microsoft/api-documenter from 7.8.12 to 7.8.13 ([9332c321](https://github.com/gregoranders/ts-csv/commit/9332c3211edde18c78ca88e54943f909ada6007e))
* bump @typescript-eslint/eslint-plugin from 3.2.0 to 3.3.0 ([c1787f9c](https://github.com/gregoranders/ts-csv/commit/c1787f9cb92661d0fe51660cdaa70b71b2d5114e))
* bump @typescript-eslint/parser from 3.2.0 to 3.3.0 ([56fd575a](https://github.com/gregoranders/ts-csv/commit/56fd575a97b2c295be040990c2ee043ef5136557))
* bump @microsoft/api-extractor from 7.8.11 to 7.8.12 ([460142f1](https://github.com/gregoranders/ts-csv/commit/460142f161d4e48f6c646f70ac9c504f5e1144d6))
* bump eslint-plugin-prettier from 3.1.3 to 3.1.4 ([55fbd046](https://github.com/gregoranders/ts-csv/commit/55fbd0460cce18c54f731e0f8a672bc9360041ee))

##### Refactors

* **index:** make result immutable ([ae46c5d8](https://github.com/gregoranders/ts-csv/commit/ae46c5d87b0a7336617f624fdb9f086f7efbeba6))
* **build:** refactor workflows ([07c95115](https://github.com/gregoranders/ts-csv/commit/07c951150201720b79e7bb6b6ba0e742653fe2b4))

#### 0.0.3 (2020-06-14)

##### Documentation Changes
Expand Down
84 changes: 73 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @gregoranders/csv

## Simple CSV parser in [TypeScript](http://www.typescriptlang.org/)
## Simple CSV parser in [TypeScript][typescript-url]

## [API Docs](./docs/index.md)

Expand All @@ -12,13 +12,14 @@
[![types][npm-types-image]][npm-types-url]
[![node][node-image]][node-url]

[![Main Language](https://img.shields.io/github/languages/top/gregoranders/ts-csv)][code-metric-url] [![Languages](https://img.shields.io/github/languages/count/gregoranders/ts-csv)][code-metric-url] [![Code Size](https://img.shields.io/github/languages/code-size/gregoranders/ts-csv)][code-metric-url] [![Repo-Size](https://img.shields.io/github/repo-size/gregoranders/ts-csv)][code-metric-url]
[![Main Language][language-image]][code-metric-url] [![Languages][languages-image]][code-metric-url] [![Code Size][code-size-image]][code-metric-url] [![Repo-Size][repo-size-image]][code-metric-url]

## Features

- TypeScript
- Jest Snapshot/Unit Tests with Code Coverage
- GitHub CI Integration (feature, development, master)
- [TypeScript][typescript-url]
- [Jest][jest-url] Unit Tests with Code Coverage
- GitHub CI Integration (feature, development, master, release)
- Publish via CI
- Code Quality via Code Climate

| | | |
Expand All @@ -30,16 +31,72 @@
## Example

```sh
npm install --save-dev @gregoranders/csv
npm install @gregoranders/csv
```

```ts
import Parser from '@gregoranders/csv';

const parser = new Parser();
const rows = parser.parse('a,b,c\n1,2,3');

console.log(rows);
const rows = parser.parse('a,b,c\n1,2,3\n4,5,6');
```
```ts
console.log(JSON.stringify(rows, null, 2));

[
[
"a",
"b",
"c"
],
[
"1",
"2",
"3"
],
[
"4",
"5",
"6"
]
]
```
```ts
console.log(JSON.stringify(parser.rows, null, 2));

[
[
"a",
"b",
"c"
],
[
"1",
"2",
"3"
],
[
"4",
"5",
"6"
]
]
```
```ts
console.log(JSON.stringify(parser.json, null, 2));

[
{
"a": "1",
"b": "2",
"c": "3"
},
{
"a": "4",
"b": "5",
"c": "6"
}
]
```

### Clone repository
Expand All @@ -62,8 +119,7 @@ npm run build

### Testing

#### Test using [Jest](https://jestjs.io/)

#### Test using [Jest][jest-url]
```
npm test
```
Expand Down Expand Up @@ -122,3 +178,9 @@ npm run clear
[npm-types-image]: https://img.shields.io/npm/types/@gregoranders/csv
[release-url]: https://www.npmjs.com/package/@gregoranders/csv
[release-image]: https://img.shields.io/github/release/gregoranders/ts-csv
[language-image]: https://img.shields.io/github/languages/top/gregoranders/ts-csv
[languages-image]: https://img.shields.io/github/languages/count/gregoranders/ts-csv
[code-size-image]: https://img.shields.io/github/languages/code-size/gregoranders/ts-csv
[repo-size-image]: https://img.shields.io/github/repo-size/gregoranders/ts-csv
[typescript-url]: http://www.typescriptlang.org/
[jest-url]: https://jestjs.io
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
| Version | Supported |
| ------- | ------------------ |
| 0.0.3 | :white_check_mark: |
| 0.0.4 | :white_check_mark: |
| 0.0.3 | :x: |
| 0.0.2 | :x: |
| 0.0.1 | :x: |
Expand Down
2 changes: 1 addition & 1 deletion docs/csv.libversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ library version
<b>Signature:</b>

```typescript
libversion = "0.0.3"
libversion = "0.0.4"
```
1 change: 1 addition & 0 deletions docs/csv.parser.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ returns rows as JSON using the first row as property name provider
<b>Signature:</b>

```typescript
/** @virtual */
get json(): readonly T[];
```
4 changes: 1 addition & 3 deletions docs/csv.parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ export declare class Parser<T = Record<string, string>>
import Parser from '@gregoranders/csv';

const parser = new Parser();
const rows = parser.parse('a,b,c\n1,2,3');

console.log(rows);
const rows = parser.parse('a,b,c\n1,2,3\n4,5,6');

```

Expand Down
1 change: 1 addition & 0 deletions docs/csv.parser.rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ returns rows
<b>Signature:</b>

```typescript
/** @virtual */
get rows(): readonly Row[];
```
Loading

0 comments on commit 5f74a47

Please sign in to comment.