Skip to content

Commit 7be9c85

Browse files
committed
chore: update githb-action to support lower node versions
1 parent 1a3e805 commit 7be9c85

File tree

3 files changed

+67
-2
lines changed

3 files changed

+67
-2
lines changed

.github/workflows/test.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- ubuntu-latest
1919
# - macos-latest
2020
# - windows-latest
21-
node_version: [ 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ]
21+
node_version: [ 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ]
2222

2323
steps:
2424
- uses: actions/checkout@v2
@@ -35,6 +35,24 @@ jobs:
3535
*/*/node_modules
3636
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
3737

38+
- name: Copy package.json compatible with node version
39+
run: |
40+
if [[ ${{ matrix.node_version }} == 10* ]]; then
41+
cp ci-package.json package.json
42+
elif [[ ${{ matrix.node_version }} == 12* ]]; then
43+
cp ci-package.json package.json
44+
elif [[ ${{ matrix.node_version }} == 13* ]]; then
45+
cp ci-package.json package.json
46+
elif [[ ${{ matrix.node_version }} == 14* ]]; then
47+
cp ci-package.json package.json
48+
elif [[ ${{ matrix.node_version }} == 15* ]]; then
49+
cp ci-package.json package.json
50+
elif [[ ${{ matrix.node_version }} == 16* ]]; then
51+
cp ci-package.json package.json
52+
elif [[ ${{ matrix.node_version }} == 19* ]]; then
53+
cp ci-package.json package.json
54+
fi
55+
3856
- name: Install dependencies and run tests with coverage
3957
run: |
4058
yarn install

ci-package.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "secure-ls",
3+
"description": "Secure localStorage/sessionStorage data with high level of encryption and data compression",
4+
"main": "./dist/secure-ls.js",
5+
"browser": "./dist/secure-ls.js",
6+
"typings": "./types/secure-ls.d.ts",
7+
"scripts": {
8+
"build": "yarn build-dev && yarn build-prod",
9+
"build-dev": "webpack --mode=development",
10+
"build-prod": "webpack --mode=production",
11+
"build:patch": "yarn build-dev --env type=patch npm version patch",
12+
"build:minor": "yarn build-dev --env type=minor npm version minor",
13+
"build:major": "yarn build-dev --env type=major npm version major",
14+
"lint": "eslint src/*.js --fix",
15+
"prettier": "prettier -w **/*.js *.md",
16+
"test:dev": "jest --watch --runInBand --debug --colors --errorOnDeprecated",
17+
"test:prod": "jest --runInBand --colors --errorOnDeprecated",
18+
"test:coverage": "jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info"
19+
},
20+
"dependencies": {
21+
"crypto-js": "^4.2.0",
22+
"lz-string": "^1.5.0"
23+
},
24+
"devDependencies": {
25+
"@babel/core": "^7.24.5",
26+
"@babel/preset-env": "^7.24.5",
27+
"babel-jest": "^25.x.x",
28+
"jest": "^25.x.x",
29+
"jest-environment-jsdom": "^25.x.x",
30+
"semver": "^7.6.2"
31+
},
32+
"repository": {
33+
"type": "git",
34+
"url": "https://github.com/softvar/secure-ls.git"
35+
},
36+
"keywords": ["secure-ls", "localStorage", "encryption", "compression", "webpack", "es6", "umd", "commonjs"],
37+
"author": "Varun Malhotra",
38+
"license": "MIT",
39+
"bugs": {
40+
"url": "https://github.com/softvar/secure-ls/issues"
41+
},
42+
"homepage": "https://github.com/softvar/secure-ls",
43+
"engines": {
44+
"node": ">=8.0"
45+
},
46+
"engineStrict": true
47+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
"homepage": "https://github.com/softvar/secure-ls",
7272
"engines": {
73-
"node": ">=10.0"
73+
"node": ">=8.0"
7474
},
7575
"engineStrict": true
7676
}

0 commit comments

Comments
 (0)