Skip to content

Commit

Permalink
feat: Support for rxjs v7 (#59)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed support for rxjs v5, minimum version is rxjs v7. Removed support for Node.js v6, minimum version is v16
  • Loading branch information
thilohaas committed Dec 20, 2022
1 parent 984fd45 commit c588708
Show file tree
Hide file tree
Showing 23 changed files with 606 additions and 587 deletions.
19 changes: 0 additions & 19 deletions .appveyor.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@smartive/eslint-config"]
}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Unit Tests
on:
push:
branches:
- master
pull_request:
branches: [master, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run Tests
run: |
npm install
npm test
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@smartive/prettier-config"
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Basically instantiate the `Etl` class and add extractors (which pull data from a

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

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

##### A bunch of badges

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

```typescript
import {Etl} from 'proc-that';
import { Etl } from "proc-that";

new Etl()
.addExtractor(/* class that implements Extractor */)
.addTransformer(/* class that implements Transformer */)
.addLoader(/* class that implements Loader */)
.start()
.subscribe(progress, error, success);
.addExtractor(/* class that implements Extractor */)
.addTransformer(/* class that implements Transformer */)
.addLoader(/* class that implements Loader */)
.start()
.subscribe(progress, error, success);
```

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

## Extractors

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

## Loaders

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

## Implement your own

Expand Down
25 changes: 8 additions & 17 deletions jest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
{
"collectCoverage": true,
"mapCoverage": true,
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testMatch": [
"**/test/**/*.spec.ts"
],
"testPathIgnorePatterns": [
"/node_modules/"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
]
"collectCoverage": true,
"mapCoverage": true,
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": ["**/test/**/*.spec.ts"],
"testPathIgnorePatterns": ["/node_modules/"],
"moduleFileExtensions": ["ts", "tsx", "js", "json"]
}
37 changes: 22 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
"clean": "del-cli ./build ./coverage",
"build": "npm run clean && tsc -p ./config/tsconfig.build.json",
"develop": "npm run clean && tsc -p .",
"lint": "tslint -c ./tslint.json -p ./config/tsconfig.build.json",
"lint": "npm run lint:ts && npm run prettier",
"lint:fix": "npm run lint:ts:fix && npm run prettier:fix",
"lint:ts": "eslint --max-warnings=-1",
"lint:ts:fix": "eslint --max-warnings=-1 --fix",
"prettier": "prettier --config .prettierrc.json --list-different \"./**/*.{ts,tsx}\"",
"prettier:fix": "prettier --config .prettierrc.json --list-different \"./**/*.{ts,tsx}\" --write",
"test": "npm run lint && npm run clean && jest -c ./jest.json",
"test:watch": "npm run clean && jest -c ./jest.json --watch",
"typedoc": "del-cli ./docs && typedoc --ignoreCompilerErrors --out ./docs --mode file --tsconfig ./config/tsconfig.build.json ./src/",
Expand All @@ -20,7 +25,7 @@
"typescript"
],
"engines": {
"node": ">=6"
"node": ">=16"
},
"repository": {
"type": "git",
Expand All @@ -30,20 +35,22 @@
"author": "Christoph Bühler <christoph.buehler@bluewin.ch>",
"license": "MIT",
"devDependencies": {
"@smartive/tslint-config": "^2.0.0",
"@types/jest": "^22.0.1",
"del-cli": "^1.1.0",
"jest": "^22.1.1",
"semantic-release": "^12.2.2",
"ts-jest": "^22.0.1",
"tslint": "^5.9.1",
"tsutils": "^2.18.0",
"typedoc": "^0.10.0",
"typescript": "^2.6.2"
"@smartive/eslint-config": "^3.1.1",
"@smartive/prettier-config": "^3.0.0",
"@types/jest": "^29.2.4",
"del-cli": "^5.0.0",
"eslint": "^8.30.0",
"jest": "^29.3.1",
"prettier": "^2.8.1",
"semantic-release": "^19.0.5",
"ts-jest": "^29.0.3",
"tsutils": "^3.21.0",
"typedoc": "^0.23.23",
"typescript": "^4.9.4"
},
"dependencies": {
"@types/node": "^9.3.0",
"rxjs": "^5.5.6",
"tslib": "^1.8.1"
"@types/node": "^18.11.17",
"rxjs": "^7.8.0",
"tslib": "^2.4.1"
}
}
Loading

0 comments on commit c588708

Please sign in to comment.