Skip to content

Commit ce702df

Browse files
committed
Update module
1 parent fbddd6d commit ce702df

24 files changed

+2166
-2263
lines changed

.eslintrc

Lines changed: 0 additions & 116 deletions
This file was deleted.

.eslintrc.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"ignorePatterns": [
3+
"src/**"
4+
],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:node/recommended"
8+
],
9+
"parserOptions": {
10+
"ecmaVersion": 2022
11+
},
12+
"env": {
13+
"node": true,
14+
"es6": true
15+
},
16+
"rules": {
17+
"arrow-parens": ["error", "always"],
18+
"no-trailing-spaces": [
19+
"error",
20+
{
21+
"skipBlankLines": true
22+
}
23+
],
24+
"indent": [
25+
"error",
26+
"tab",
27+
{
28+
"SwitchCase": 1
29+
}
30+
],
31+
"operator-linebreak": [
32+
"error",
33+
"after",
34+
{
35+
"overrides": {
36+
"?": "before",
37+
":": "before"
38+
}
39+
}
40+
],
41+
"max-len": ["error", 110],
42+
"quotes": [
43+
"error",
44+
"single"
45+
],
46+
"semi": [
47+
"error",
48+
"always"
49+
],
50+
"no-multiple-empty-lines": ["error", { "max": 3, "maxEOF": 1, "maxBOF": 1 }],
51+
"keyword-spacing": ["error", { "before": true, "after": true }],
52+
"space-before-blocks": ["error"],
53+
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
54+
"camelcase": ["error"],
55+
"no-tabs": [0],
56+
"global-require": [0],
57+
"no-underscore-dangle": [0],
58+
"no-plusplus": [0],
59+
"no-shadow": [0],
60+
"node/no-unpublished-require": [0],
61+
"no-process-exit": [0],
62+
"linebreak-style": [0],
63+
"node/no-missing-require": [0],
64+
"no-console": [0],
65+
"node/no-unsupported-features/es-builtins": 0,
66+
"node/no-unsupported-features/node-builtins": 0,
67+
"node/no-unsupported-features/es-syntax": 0,
68+
"func-names": [
69+
"error",
70+
"never",
71+
{
72+
"generators": "never"
73+
}
74+
]
75+
}
76+
}

.github/workflows/eslint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ESLint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
Eslint:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-20.04]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
21+
- name: Fetch Repository
22+
uses: actions/checkout@v3
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18.16.0
30+
cache: 'npm'
31+
32+
- name: Install Modules
33+
run: npm ci
34+
35+
- name: Run Lint
36+
run: npm run eslint

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish to NPM
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
Publish:
11+
if: contains('["raub"]', github.actor)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Fetch Repository
17+
uses: actions/checkout@v3
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18.16.0
25+
cache: 'npm'
26+
27+
- name: Get Package Version
28+
id: package-version
29+
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT
30+
31+
- name: Publish
32+
run: |
33+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
34+
npm publish --ignore-scripts
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: softprops/action-gh-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ steps.package-version.outputs.version }}
45+
name: Release ${{ steps.package-version.outputs.version }}

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
Test:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-20.04]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
21+
- name: Fetch Repository
22+
uses: actions/checkout@v3
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18.16.0
30+
cache: 'npm'
31+
32+
- name: Install Modules
33+
run: npm ci
34+
35+
- name: Run Unit Tests
36+
if: matrix.os == 'ubuntu-20.04'
37+
run: |
38+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ci
39+
xvfb-run --auto-servernum npm run test

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Luis Blanco
3+
Copyright (c) 2023 Luis Blanco
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)