diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index fb42b5b..ed45007 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -6,7 +6,7 @@ updates:
schedule:
interval: 'weekly'
labels:
- - 'npm dependencies'
+ - 'github dependencies'
commit-message:
prefix: 'github-actions'
assignees:
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 9bb8762..64970c4 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -18,10 +18,10 @@ jobs:
matrix:
language: ['javascript']
steps:
- - uses: actions/checkout@v3.2.0
+ - uses: actions/checkout@v4.1.1
with:
submodules: recursive
- - uses: actions/setup-node@v3.5.1
+ - uses: actions/setup-node@v4.0.0
with:
node-version: 16.x
- name: Echo Node.js version
diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml
index e406c3b..d917d85 100644
--- a/.github/workflows/development.yml
+++ b/.github/workflows/development.yml
@@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- node-version: [16.x, 18.x, 19.x]
+ node-version: [16.x, 18.x, 19.x, 20.x]
steps:
- - uses: actions/checkout@v3.2.0
+ - uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
- uses: actions/setup-node@v3.5.1
+ uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
- name: nodejs project information
@@ -40,14 +40,14 @@ jobs:
run: |
npm run build
- name: code coverage
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.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 == '16.x'
- uses: paambaati/codeclimate-action@v3.2.0
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
+ uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
@@ -55,7 +55,7 @@ jobs:
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
diff --git a/.github/workflows/feature.yml b/.github/workflows/feature.yml
index 5bb8dc7..a8472a5 100644
--- a/.github/workflows/feature.yml
+++ b/.github/workflows/feature.yml
@@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- node-version: [16.x, 18.x, 19.x]
+ node-version: [16.x, 18.x, 19.x, 20.x]
steps:
- - uses: actions/checkout@v3.2.0
+ - uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
- uses: actions/setup-node@v3.5.1
+ uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
- name: nodejs project information
@@ -40,14 +40,14 @@ jobs:
run: |
npm run build
- name: code coverage
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.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 == '16.x'
- uses: paambaati/codeclimate-action@v3.2.0
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
+ uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
@@ -55,7 +55,7 @@ jobs:
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index cdef623..1c0418c 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- node-version: [16.x, 18.x, 19.x]
+ node-version: [16.x, 18.x, 19.x, 20.x]
steps:
- - uses: actions/checkout@v3.2.0
+ - uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
- uses: actions/setup-node@v3.5.1
+ uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
- name: nodejs project information
@@ -40,14 +40,14 @@ jobs:
run: |
npm run build
- name: code coverage
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.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 == '16.x'
- uses: paambaati/codeclimate-action@v3.2.0
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
+ uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
@@ -55,7 +55,7 @@ jobs:
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
@@ -66,7 +66,7 @@ jobs:
check_name: Unit Test Results node${{ matrix.node-version }}-${{ matrix.os }}
files: test/junit.xml
- name: create release
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
id: createrelease
uses: gregoranders/nodejs-create-release@master
env:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 565ba88..c94cc95 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- node-version: [16.x]
+ node-version: [20.x]
steps:
- - uses: actions/checkout@v3.2.0
+ - uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
- uses: actions/setup-node@v3.5.1
+ uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
@@ -45,7 +45,7 @@ jobs:
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- - uses: actions/setup-node@v3.5.1
+ - uses: actions/setup-node@v4.0.0
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 8e796bf..a0f557f 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -2,4 +2,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
-lint-staged && npm test && npm run build
+npx lint-staged
+npm test
+npm run build
diff --git a/.husky/pre-push b/.husky/pre-push
index 339122a..0f84826 100755
--- a/.husky/pre-push
+++ b/.husky/pre-push
@@ -1,4 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
-npm run clear && npm install && lint-staged && npm test && npm run build && npm run codeclimate
+npm run clear
+npm install
+npm test
+npm run build
+npm run codeclimate
diff --git a/.nvmrc b/.nvmrc
index fb457f3..209e3ef 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-v16.19.0
+20
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 81574ad..8b0991c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,10 +5,8 @@
},
"eslint.validate": ["javascript", "typescript"],
"typescript.tsdk": "node_modules/typescript/lib",
- "files.associations": {
- "*.json": "jsonc"
- },
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
- }
+ },
+ "files.associations": { "api-extractor.json": "jsonc" }
}
diff --git a/SECURITY.md b/SECURITY.md
index a02e201..8a30c28 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,7 +4,8 @@
| Version | Supported |
| ------- | ------------------ |
-| 0.0.12 | :white_check_mark: |
+| 0.0.13 | :white_check_mark: |
+| 0.0.12 | :x: |
| 0.0.11 | :x: |
| 0.0.10 | :x: |
| 0.0.9 | :x: |
diff --git a/docs/csv.configuration.fieldseparator.md b/docs/csv.configuration.fieldseparator.md
index 50ba476..dbc21bf 100644
--- a/docs/csv.configuration.fieldseparator.md
+++ b/docs/csv.configuration.fieldseparator.md
@@ -6,7 +6,7 @@
field separator
-Signature:
+**Signature:**
```typescript
fieldSeparator?: string;
diff --git a/docs/csv.configuration.lineseparator.md b/docs/csv.configuration.lineseparator.md
index f03c089..92be875 100644
--- a/docs/csv.configuration.lineseparator.md
+++ b/docs/csv.configuration.lineseparator.md
@@ -6,7 +6,7 @@
line separator
-Signature:
+**Signature:**
```typescript
lineSeparator?: string;
diff --git a/docs/csv.configuration.md b/docs/csv.configuration.md
index 57e6e7c..e90c93c 100644
--- a/docs/csv.configuration.md
+++ b/docs/csv.configuration.md
@@ -6,7 +6,7 @@
parser configuration
-Signature:
+**Signature:**
```typescript
export interface Configuration
@@ -16,7 +16,7 @@ export interface Configuration
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
-| [fieldSeparator?](./csv.configuration.fieldseparator.md) | | string | (Optional) field separator |
-| [lineSeparator?](./csv.configuration.lineseparator.md) | | string | (Optional) line separator |
-| [quote?](./csv.configuration.quote.md) | | string | (Optional) quote character |
+| [fieldSeparator?](./csv.configuration.fieldseparator.md) | | string | _(Optional)_ field separator |
+| [lineSeparator?](./csv.configuration.lineseparator.md) | | string | _(Optional)_ line separator |
+| [quote?](./csv.configuration.quote.md) | | string | _(Optional)_ quote character |
diff --git a/docs/csv.configuration.quote.md b/docs/csv.configuration.quote.md
index f816aa1..2ceb378 100644
--- a/docs/csv.configuration.quote.md
+++ b/docs/csv.configuration.quote.md
@@ -6,7 +6,7 @@
quote character
-Signature:
+**Signature:**
```typescript
quote?: string;
diff --git a/docs/csv.field.md b/docs/csv.field.md
index 6749f5d..dd0ba62 100644
--- a/docs/csv.field.md
+++ b/docs/csv.field.md
@@ -6,7 +6,7 @@
csv field
-Signature:
+**Signature:**
```typescript
export type Field = string;
diff --git a/docs/csv.libname.md b/docs/csv.libname.md
index 6d8be6a..e0b8893 100644
--- a/docs/csv.libname.md
+++ b/docs/csv.libname.md
@@ -6,7 +6,7 @@
library name
-Signature:
+**Signature:**
```typescript
libname = "@gregoranders/csv"
diff --git a/docs/csv.liburl.md b/docs/csv.liburl.md
index e601358..65b7bf4 100644
--- a/docs/csv.liburl.md
+++ b/docs/csv.liburl.md
@@ -6,7 +6,7 @@
library homepage
-Signature:
+**Signature:**
```typescript
liburl = "https://gregoranders.github.io/ts-csv/"
diff --git a/docs/csv.libversion.md b/docs/csv.libversion.md
index 6708b72..417934b 100644
--- a/docs/csv.libversion.md
+++ b/docs/csv.libversion.md
@@ -6,8 +6,8 @@
library version
-Signature:
+**Signature:**
```typescript
-libversion = "0.0.12"
+libversion = "0.0.13"
```
diff --git a/docs/csv.parser._constructor_.md b/docs/csv.parser._constructor_.md
index 214bb91..5b576e9 100644
--- a/docs/csv.parser._constructor_.md
+++ b/docs/csv.parser._constructor_.md
@@ -6,7 +6,7 @@
constructor
-Signature:
+**Signature:**
```typescript
constructor(configuration?: Configuration);
@@ -16,5 +16,5 @@ constructor(configuration?: Configuration);
| Parameter | Type | Description |
| --- | --- | --- |
-| configuration | [Configuration](./csv.configuration.md) | (Optional) optional configuration |
+| configuration | [Configuration](./csv.configuration.md) | _(Optional)_ optional configuration |
diff --git a/docs/csv.parser.json.md b/docs/csv.parser.json.md
index 8f566aa..b002120 100644
--- a/docs/csv.parser.json.md
+++ b/docs/csv.parser.json.md
@@ -6,7 +6,7 @@
returns rows as JSON using the first row as property name provider
-Signature:
+**Signature:**
```typescript
/** @virtual */
diff --git a/docs/csv.parser.md b/docs/csv.parser.md
index 0828a18..2a1c3c2 100644
--- a/docs/csv.parser.md
+++ b/docs/csv.parser.md
@@ -6,7 +6,7 @@
csv parser
-Signature:
+**Signature:**
```typescript
export declare class Parser>
diff --git a/docs/csv.parser.parse.md b/docs/csv.parser.parse.md
index 89899a3..29cb3fd 100644
--- a/docs/csv.parser.parse.md
+++ b/docs/csv.parser.parse.md
@@ -6,7 +6,7 @@
parse csv
-Signature:
+**Signature:**
```typescript
parse(text: string): readonly Row[];
@@ -18,7 +18,7 @@ parse(text: string): readonly Row[];
| --- | --- | --- |
| text | string | CSV text |
-Returns:
+**Returns:**
readonly [Row](./csv.row.md)\[\]
diff --git a/docs/csv.parser.rows.md b/docs/csv.parser.rows.md
index a450eb7..053eacc 100644
--- a/docs/csv.parser.rows.md
+++ b/docs/csv.parser.rows.md
@@ -6,7 +6,7 @@
returns rows
-Signature:
+**Signature:**
```typescript
/** @virtual */
diff --git a/docs/csv.row.md b/docs/csv.row.md
index 61bc293..1d15767 100644
--- a/docs/csv.row.md
+++ b/docs/csv.row.md
@@ -6,10 +6,10 @@
csv row
-Signature:
+**Signature:**
```typescript
export type Row = Array;
```
-References: [Field](./csv.field.md)
+**References:** [Field](./csv.field.md)
diff --git a/etc/csv.api.md b/etc/csv.api.md
index 7f5ad0f..3d8299a 100644
--- a/etc/csv.api.md
+++ b/etc/csv.api.md
@@ -21,7 +21,7 @@ export const libname = "@gregoranders/csv";
export const liburl = "https://gregoranders.github.io/ts-csv/";
// @public
-export const libversion = "0.0.12";
+export const libversion = "0.0.13";
// @public
class Parser> {
diff --git a/package.json b/package.json
index 0b80958..b0c1cc7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@gregoranders/csv",
- "version": "0.0.12",
+ "version": "0.0.13",
"description": "Simple CSV parser in TypeScript",
"scripts": {
"clear": "rimraf ./node_modules ./dist ./test ./package-lock.json ./temp ./docs-tmp",
@@ -97,31 +97,31 @@
},
"homepage": "https://gregoranders.github.io/ts-csv/",
"devDependencies": {
- "@commitlint/cli": "17.3.0",
- "@commitlint/config-conventional": "17.3.0",
- "@microsoft/api-documenter": "7.19.27",
- "@microsoft/api-extractor": "7.33.7",
- "@types/jest": "29.2.4",
- "@typescript-eslint/eslint-plugin": "5.47.1",
- "@typescript-eslint/parser": "5.47.1",
+ "@commitlint/cli": "18.2.0",
+ "@commitlint/config-conventional": "18.1.0",
+ "@microsoft/api-documenter": "7.23.9",
+ "@microsoft/api-extractor": "7.38.0",
+ "@types/jest": "29.5.6",
+ "@typescript-eslint/eslint-plugin": "6.9.0",
+ "@typescript-eslint/parser": "6.9.0",
"cpx": "1.5.0",
"cross-env": "7.0.3",
- "eslint": "8.30.0",
- "eslint-config-prettier": "8.5.0",
- "eslint-plugin-jest": "27.1.7",
- "eslint-plugin-prettier": "4.2.1",
- "eslint-plugin-unicorn": "45.0.2",
+ "eslint": "8.52.0",
+ "eslint-config-prettier": "9.0.0",
+ "eslint-plugin-jest": "27.6.0",
+ "eslint-plugin-prettier": "5.0.1",
+ "eslint-plugin-unicorn": "48.0.1",
"generate-changelog": "1.8.0",
- "husky": "8.0.2",
- "jest": "29.3.1",
- "jest-cli": "29.3.1",
- "jest-html-reporter": "3.7.0",
- "jest-junit": "15.0.0",
+ "husky": "8.0.3",
+ "jest": "29.7.0",
+ "jest-cli": "29.7.0",
+ "jest-html-reporter": "3.10.2",
+ "jest-junit": "16.0.0",
"jest-spec-reporter": "1.0.19",
- "lint-staged": "13.1.0",
- "prettier": "2.8.1",
- "rimraf": "3.0.2",
- "ts-jest": "29.0.3",
- "typescript": "4.9.4"
+ "lint-staged": "15.0.2",
+ "prettier": "3.0.3",
+ "rimraf": "5.0.5",
+ "ts-jest": "29.1.1",
+ "typescript": "5.2.2"
}
}
diff --git a/src/index.spec.ts b/src/index.spec.ts
index d586201..c660e05 100644
--- a/src/index.spec.ts
+++ b/src/index.spec.ts
@@ -18,7 +18,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
});
it('libversion', () => {
- expect(TestSubject.libversion).toBe('0.0.12');
+ expect(TestSubject.libversion).toBe('0.0.13');
});
it('liburl', () => {
@@ -98,7 +98,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
],
},
].map(({ text, expected }) => {
- it(`${text.replace(/\n/g, '')} = ${JSON.stringify(
+ it(`${text.replaceAll('\n', '')} = ${JSON.stringify(
expected,
)}`, () => {
const parser = new TestSubject.Parser();
@@ -128,7 +128,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
expected: [0, 2],
},
].map(({ text, expected }) => {
- it(`${text.replace(/\n/g, '')} => ParseError(${expected[0]}, ${
+ it(`${text.replaceAll('\n', '')} => ParseError(${expected[0]}, ${
expected[1]
})`, () => {
const parser = new TestSubject.Parser();
@@ -166,7 +166,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
],
},
].map(({ text, expected }) => {
- it(`${text.replace(/\n/g, '')} = ${JSON.stringify(
+ it(`${text.replaceAll('\n', '')} = ${JSON.stringify(
expected,
)}`, () => {
const parser = new TestSubject.Parser({
@@ -192,7 +192,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
expected: [0, 5],
},
].map(({ text, expected }) => {
- it(`${text.replace(/\n/g, '')} => ParseError(${expected[0]}, ${
+ it(`${text.replaceAll('\n', '')} => ParseError(${expected[0]}, ${
expected[1]
})`, () => {
const parser = new TestSubject.Parser({ fieldSeparator: ';' });
diff --git a/src/index.ts b/src/index.ts
index 7ef8830..225fc8f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -18,7 +18,7 @@ export const libname = '@gregoranders/csv';
* @public
* @readonly
*/
-export const libversion = '0.0.12';
+export const libversion = '0.0.13';
/**
* library homepage