cron-converter-u2q 0.1.4 → 0.1.9

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.
package/.eslintrc.yml ADDED
@@ -0,0 +1,14 @@
1
+ env:
2
+ browser: true
3
+ es2021: true
4
+ extends:
5
+ - eslint:recommended
6
+ - plugin:@typescript-eslint/recommended
7
+ parser: "@typescript-eslint/parser"
8
+ parserOptions:
9
+ ecmaVersion: latest
10
+ sourceType: module
11
+ plugins:
12
+ - "@typescript-eslint"
13
+ rules:
14
+ "@typescript-eslint/no-unused-vars": "off"
@@ -0,0 +1,37 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build and Test
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ node-version: [16.x, 18.x, 20.x]
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v3
21
+
22
+ - name: Setup Node.js ${{ matrix.node-version }}
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: ${{ matrix.node-version }}
26
+
27
+ - name: Clean Install Dependencies
28
+ run: npm ci
29
+
30
+ - name: Run Tests
31
+ run: npm test
32
+
33
+ - name: Linting
34
+ run: npm run lint
35
+
36
+ - name: Run build
37
+ run: npm run build --if-present
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # cron-converter-u2q
2
- Easily convert cron expressions between Unix and Quartz formats with the `cron-converter-u2q` package
3
2
 
3
+ Easily convert cron expressions between Unix and Quartz formats with the `cron-converter-u2q` package
4
4
 
5
+ ![example event parameter](https://github.com/rahu619/cron-converter-u2q/actions/workflows/integration.yml/badge.svg?event=push)
6
+ [![NPM version](https://badge.fury.io/js/cron-conveter-u2q.svg)](https://www.npmjs.com/package/cron-conveter-u2q)
5
7
 
6
8
  ### Features
7
9
 
8
10
  :arrows_counterclockwise: Two-way conversion: from Unix to Quartz and Quartz to Unix.
9
11
 
10
- :zap: Lightweight.
11
-
12
12
  ### Installation
13
13
 
14
14
  Using npm:
@@ -24,28 +24,37 @@ yarn add cron-converter
24
24
  ```
25
25
 
26
26
  ### Usage
27
+
27
28
  Firstly, import the CronConverterU2Q module:
29
+
28
30
  ```javascript
29
- import { CronConverterU2Q as c2q } from 'cron-converter';
31
+ var cron_converter_u2q = require("cron-converter-u2q");
32
+
33
+ var c2q = cron_converter_u2q.CronConverterU2Q;
30
34
  ```
31
35
 
32
36
  If you're using ES6 Modules
37
+
33
38
  ```javascript
34
- import { CronConverterU2Q as c2q } from 'cron-converter';
39
+ import { CronConverterU2QModule as c2q } from "cron-converter-u2q";
35
40
  ```
41
+
36
42
  Convert from Unix to Quartz
43
+
37
44
  ```javascript
38
- const quartzExpression = c2q.unixToQuartz('5 * * * *');
45
+ const quartzExpression = c2q.unixToQuartz("5 * * * *");
39
46
  ```
47
+
40
48
  Convert from Quartz to Unix
49
+
41
50
  ```javascript
42
- const unixExpression = c2q.quartzToUnix('* */5 * ? * * *');
51
+ const unixExpression = c2q.quartzToUnix("* */5 * ? * * *");
43
52
  ```
44
53
 
45
54
  ### Development Notice
55
+
46
56
  This package is still under active development. Some methods and features might not be stable yet. We're working diligently to improve and stabilize the package. Any feedback, suggestions, or contributions are highly appreciated!
47
57
 
48
58
  ## License
49
59
 
50
60
  This project is licensed under the [MIT License](https://opensource.org/license/mit/)
51
-
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "cron-converter-u2q",
3
- "version": "0.1.4",
3
+ "version": "0.1.9",
4
4
  "description": "Converts cron expressions between unix and quartz formats",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "test": "jest --no-watchman --coverage"
9
+ "test": "jest --no-watchman --coverage",
10
+ "lint": "npx eslint src/**/*.ts --fix"
10
11
  },
11
12
  "author": "BitBundler <rahu619@gmail.com>",
12
13
  "keywords": [
@@ -21,6 +22,9 @@
21
22
  "@types/jest": "^29.5.3",
22
23
  "@types/mocha": "^10.0.1",
23
24
  "@types/node": "^20.4.9",
25
+ "@typescript-eslint/eslint-plugin": "^6.3.0",
26
+ "@typescript-eslint/parser": "^6.3.0",
27
+ "eslint": "^8.46.0",
24
28
  "jest": "^29.6.2",
25
29
  "ts-jest": "^29.1.1",
26
30
  "ts-node": "^10.9.1",