wili 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,38 +7,38 @@ jobs:
7
7
  runs-on: ${{ matrix.os }}
8
8
  strategy:
9
9
  matrix:
10
- node-version: ['lts/*']
10
+ node-version: ['lts/*', '*']
11
11
  os: [ubuntu-latest]
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
15
15
  with:
16
16
  fetch-depth: 1
17
17
 
18
- - uses: actions/setup-node@v2
18
+ - uses: actions/setup-node@v3
19
19
  with:
20
20
  node-version: ${{ matrix.node-version }}
21
21
 
22
- - name: Cache node modules
23
- uses: actions/cache@v2
24
- env:
25
- cache-name: cache-node-modules
22
+ - name: Cache pnpm modules
23
+ uses: actions/cache@v3
26
24
  with:
27
- path: ~/.npm
28
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
25
+ path: ~/.pnpm-store
26
+ key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
29
27
  restore-keys: |
30
- ${{ runner.os }}-build-${{ env.cache-name }}-
31
- ${{ runner.os }}-build-
32
28
  ${{ runner.os }}-
33
29
 
34
- - name: Install Packages Dependencies
35
- run: npm ci
30
+ - uses: pnpm/action-setup@v2
31
+ with:
32
+ version: 6
33
+ run_install: |
34
+ - recursive: true
35
+ - args: [--frozen-lockfile, --strict-peer-dependencies]
36
36
 
37
37
  - name: Lint Source
38
- run: npm run lint --if-present
38
+ run: pnpm run lint --if-present
39
39
 
40
40
  - name: Build Source
41
- run: npm run build --if-present
41
+ run: pnpm run build --if-present
42
42
 
43
43
  - name: Run Tests
44
- run: npm run test --if-present
44
+ run: pnpm run test --if-present
@@ -15,7 +15,7 @@ jobs:
15
15
  stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
16
16
  close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.'
17
17
  close-pr-message: 'This PR was closed because it has been stalled for 14 days with no activity.'
18
- days-before-issue-stale: 30
19
- days-before-pr-stale: 30
20
- days-before-issue-close: 14
21
- days-before-pr-close: 14
18
+ days-before-issue-stale: 90
19
+ days-before-pr-stale: 90
20
+ days-before-issue-close: 30
21
+ days-before-pr-close: 30
package/README.de.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![npm](https://flat.badgen.net/npm/license/wili)](https://www.npmjs.org/package/wili)
4
4
  [![npm](https://flat.badgen.net/npm/v/wili)](https://www.npmjs.org/package/wili)
5
5
  [![CI](https://img.shields.io/github/workflow/status/idleberg/node-wili/CI?style=flat-square)](https://github.com/idleberg/node-wili/actions)
6
- [![David](https://flat.badgen.net/david/dep/idleberg/node-wili)](https://david-dm.org/idleberg/node-wili)
7
6
 
8
7
  [English](README.md) | **Deutsch**
9
8
 
@@ -24,32 +23,28 @@ Beispielanwendung:
24
23
  ```js
25
24
  import { WienerLinien } from 'wili';
26
25
 
27
- // Der API-Key kann weggelassen werden, wenn
28
- // process.env.WIENER_LINIEN_API_KEY gesetzt ist
29
- const wl = new WienerLinien(API_KEY);
26
+ const wili = new WienerLinien();
30
27
 
31
28
  const options = {
32
29
  relatedLine: ['U2', 'U4', 'U6']
33
30
  };
34
31
 
35
32
  // Promise API
36
- wl.trafficInfoList(options)
37
- .then( data => {
38
- console.log(data.trafficInfos);
39
- })
40
- .catch( error => {
41
- console.error(error);
42
- });
43
-
44
- // async/await
45
- (async () => {
46
- try {
47
- let data = await wl.trafficInfoList(options);
33
+ wili.trafficInfoList(options)
34
+ .then( data => {
48
35
  console.log(data.trafficInfos);
49
- } catch (output) {
36
+ })
37
+ .catch( error => {
50
38
  console.error(error);
51
- }
52
- })();
39
+ });
40
+
41
+ // async/await
42
+ try {
43
+ let data = await wili.trafficInfoList(options);
44
+ console.log(data.trafficInfos);
45
+ } catch (output) {
46
+ console.error(error);
47
+ }
53
48
  ```
54
49
 
55
50
  ## API
package/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![npm](https://flat.badgen.net/npm/license/wili)](https://www.npmjs.org/package/wili)
4
4
  [![npm](https://flat.badgen.net/npm/v/wili)](https://www.npmjs.org/package/wili)
5
5
  [![CI](https://img.shields.io/github/workflow/status/idleberg/node-wili/CI?style=flat-square)](https://github.com/idleberg/node-wili/actions)
6
- [![David](https://flat.badgen.net/david/dep/idleberg/node-wili)](https://david-dm.org/idleberg/node-wili)
7
6
 
8
7
  **English** | [Deutsch](README.de.md)
9
8
 
@@ -24,32 +23,28 @@ Example usage in script:
24
23
  ```js
25
24
  import { WienerLinien } from 'wili';
26
25
 
27
- // The API key can be omitted when
28
- // process.env.WIENER_LINIEN_API_KEY is set
29
- const wl = new WienerLinien(API_KEY);
26
+ const wili = new WienerLinien();
30
27
 
31
28
  const options = {
32
29
  relatedLine: ['U2', 'U4', 'U6']
33
30
  };
34
31
 
35
32
  // Promise API
36
- wl.trafficInfoList(options)
37
- .then( data => {
38
- console.log(data.trafficInfos);
39
- })
40
- .catch( error => {
41
- console.error(error);
42
- });
43
-
44
- // async/await
45
- (async () => {
46
- try {
47
- let data = await wl.trafficInfoList(options);
33
+ wili.trafficInfoList(options)
34
+ .then( data => {
48
35
  console.log(data.trafficInfos);
49
- } catch (output) {
36
+ })
37
+ .catch( error => {
50
38
  console.error(error);
51
- }
52
- })();
39
+ });
40
+
41
+ // async/await
42
+ try {
43
+ let data = await wili.trafficInfoList(options);
44
+ console.log(data.trafficInfos);
45
+ } catch (output) {
46
+ console.error(error);
47
+ }
53
48
  ```
54
49
 
55
50
  ## API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wili",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "A Node client for the Wiener Linien public transport API",
5
5
  "author": "Jan T. Sott",
6
6
  "license": "MIT",
@@ -32,24 +32,24 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "isomorphic-fetch": "^3.0.0",
35
- "query-string": "^7.0.1"
35
+ "query-string": "^7.1.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@rollup/plugin-commonjs": "^19.0.1",
38
+ "@rollup/plugin-commonjs": "^22.0.1",
39
39
  "@rollup/plugin-json": "^4.1.0",
40
- "@rollup/plugin-node-resolve": "^13.0.4",
41
- "@rollup/plugin-typescript": "^8.2.0",
42
- "@types/node": "^14.0.26",
43
- "@typescript-eslint/eslint-plugin": "^4.16.1",
44
- "@typescript-eslint/parser": "^4.16.1",
45
- "ava": "^3.15.0",
40
+ "@rollup/plugin-node-resolve": "^13.3.0",
41
+ "@rollup/plugin-typescript": "^8.3.3",
42
+ "@types/node": "^16.11.45",
43
+ "@typescript-eslint/eslint-plugin": "^5.31.0",
44
+ "@typescript-eslint/parser": "^5.31.0",
45
+ "ava": "^4.3.1",
46
46
  "encoding": "^0.1.13",
47
- "eslint": "^7.5.0",
48
- "husky": "^7.0.0",
49
- "lint-staged": "^11.1.1",
50
- "rollup": "^2.23.0",
51
- "tslib": "^2.2.0",
52
- "typescript": "^4.2.3"
47
+ "eslint": "^8.20.0",
48
+ "husky": "^8.0.1",
49
+ "lint-staged": "^13.0.3",
50
+ "rollup": "^2.77.2",
51
+ "tslib": "^2.4.0",
52
+ "typescript": "^4.7.4"
53
53
  },
54
54
  "lint-staged": {
55
55
  "*.ts": "eslint --cache --fix"