Skip to content

Commit c588708

Browse files
authored
feat: Support for rxjs v7 (#59)
BREAKING CHANGE: Removed support for rxjs v5, minimum version is rxjs v7. Removed support for Node.js v6, minimum version is v16
1 parent 984fd45 commit c588708

23 files changed

+606
-587
lines changed

.appveyor.yml

-19
This file was deleted.

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@smartive/eslint-config"]
3+
}

.github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: "lts/*"
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: npx semantic-release

.github/workflows/test.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Unit Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches: [master, develop]
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [16.x, 18.x]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: Run Tests
21+
run: |
22+
npm install
23+
npm test

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@smartive/prettier-config"

.travis.yml

-41
This file was deleted.

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Basically instantiate the `Etl` class and add extractors (which pull data from a
66

77
A basic, hypothetic example could be: "Load data from a JSON array, snake_case all properties and store those objects into a mongoDB."
88

9-
The package is written in `typescript` but can be used in plain javascript as well.
9+
The package is written in `typescript` but can be used in plain javascript as well
1010

1111
##### A bunch of badges
1212

@@ -21,14 +21,14 @@ The package is written in `typescript` but can be used in plain javascript as we
2121
## Usage
2222

2323
```typescript
24-
import {Etl} from 'proc-that';
24+
import { Etl } from "proc-that";
2525

2626
new Etl()
27-
.addExtractor(/* class that implements Extractor */)
28-
.addTransformer(/* class that implements Transformer */)
29-
.addLoader(/* class that implements Loader */)
30-
.start()
31-
.subscribe(progress, error, success);
27+
.addExtractor(/* class that implements Extractor */)
28+
.addTransformer(/* class that implements Transformer */)
29+
.addLoader(/* class that implements Loader */)
30+
.start()
31+
.subscribe(progress, error, success);
3232
```
3333

3434
After all objects are extracted, transformed and loaded, the `.start()` observable completes and the process is finished.
@@ -37,15 +37,15 @@ Below is a list if extractors and loaders that are already implemented. Feel fre
3737

3838
## Extractors
3939

40-
Name | Description | Link
41-
--------------------------------|--------------------------------------------------|-------------------------------------------------------
42-
`proc-that-rest-extractor` | Extract objects from GET requests | https://github.com/smartive/proc-that-rest-extractor
40+
| Name | Description | Link |
41+
| -------------------------- | --------------------------------- | ---------------------------------------------------- |
42+
| `proc-that-rest-extractor` | Extract objects from GET requests | https://github.com/smartive/proc-that-rest-extractor |
4343

4444
## Loaders
4545

46-
Name | Description | Link
47-
--------------------------------|--------------------------------------------------|-------------------------------------------------------
48-
`proc-that-elastic-loader` | Load transformed objects into elasticsearch | https://github.com/smartive/proc-that-elastic-loader
46+
| Name | Description | Link |
47+
| -------------------------- | ------------------------------------------- | ---------------------------------------------------- |
48+
| `proc-that-elastic-loader` | Load transformed objects into elasticsearch | https://github.com/smartive/proc-that-elastic-loader |
4949

5050
## Implement your own
5151

jest.json

+8-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
{
2-
"collectCoverage": true,
3-
"mapCoverage": true,
4-
"transform": {
5-
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
6-
},
7-
"testMatch": [
8-
"**/test/**/*.spec.ts"
9-
],
10-
"testPathIgnorePatterns": [
11-
"/node_modules/"
12-
],
13-
"moduleFileExtensions": [
14-
"ts",
15-
"tsx",
16-
"js",
17-
"json"
18-
]
2+
"collectCoverage": true,
3+
"mapCoverage": true,
4+
"transform": {
5+
"^.+\\.tsx?$": "ts-jest"
6+
},
7+
"testMatch": ["**/test/**/*.spec.ts"],
8+
"testPathIgnorePatterns": ["/node_modules/"],
9+
"moduleFileExtensions": ["ts", "tsx", "js", "json"]
1910
}

package.json

+22-15
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
"clean": "del-cli ./build ./coverage",
99
"build": "npm run clean && tsc -p ./config/tsconfig.build.json",
1010
"develop": "npm run clean && tsc -p .",
11-
"lint": "tslint -c ./tslint.json -p ./config/tsconfig.build.json",
11+
"lint": "npm run lint:ts && npm run prettier",
12+
"lint:fix": "npm run lint:ts:fix && npm run prettier:fix",
13+
"lint:ts": "eslint --max-warnings=-1",
14+
"lint:ts:fix": "eslint --max-warnings=-1 --fix",
15+
"prettier": "prettier --config .prettierrc.json --list-different \"./**/*.{ts,tsx}\"",
16+
"prettier:fix": "prettier --config .prettierrc.json --list-different \"./**/*.{ts,tsx}\" --write",
1217
"test": "npm run lint && npm run clean && jest -c ./jest.json",
1318
"test:watch": "npm run clean && jest -c ./jest.json --watch",
1419
"typedoc": "del-cli ./docs && typedoc --ignoreCompilerErrors --out ./docs --mode file --tsconfig ./config/tsconfig.build.json ./src/",
@@ -20,7 +25,7 @@
2025
"typescript"
2126
],
2227
"engines": {
23-
"node": ">=6"
28+
"node": ">=16"
2429
},
2530
"repository": {
2631
"type": "git",
@@ -30,20 +35,22 @@
3035
"author": "Christoph Bühler <christoph.buehler@bluewin.ch>",
3136
"license": "MIT",
3237
"devDependencies": {
33-
"@smartive/tslint-config": "^2.0.0",
34-
"@types/jest": "^22.0.1",
35-
"del-cli": "^1.1.0",
36-
"jest": "^22.1.1",
37-
"semantic-release": "^12.2.2",
38-
"ts-jest": "^22.0.1",
39-
"tslint": "^5.9.1",
40-
"tsutils": "^2.18.0",
41-
"typedoc": "^0.10.0",
42-
"typescript": "^2.6.2"
38+
"@smartive/eslint-config": "^3.1.1",
39+
"@smartive/prettier-config": "^3.0.0",
40+
"@types/jest": "^29.2.4",
41+
"del-cli": "^5.0.0",
42+
"eslint": "^8.30.0",
43+
"jest": "^29.3.1",
44+
"prettier": "^2.8.1",
45+
"semantic-release": "^19.0.5",
46+
"ts-jest": "^29.0.3",
47+
"tsutils": "^3.21.0",
48+
"typedoc": "^0.23.23",
49+
"typescript": "^4.9.4"
4350
},
4451
"dependencies": {
45-
"@types/node": "^9.3.0",
46-
"rxjs": "^5.5.6",
47-
"tslib": "^1.8.1"
52+
"@types/node": "^18.11.17",
53+
"rxjs": "^7.8.0",
54+
"tslib": "^2.4.1"
4855
}
4956
}

0 commit comments

Comments
 (0)