Skip to content

Commit 13b758b

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

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@ 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 }} == 8* ]]; then
41+
cp ci-package.json package.json
42+
elif [[ ${{ matrix.node_version }} == 10* ]]; then
43+
cp ci-package.json package.json
44+
elif [[ ${{ matrix.node_version }} == 12* ]]; then
45+
cp ci-package.json package.json
46+
elif [[ ${{ matrix.node_version }} == 13* ]]; then
47+
cp ci-package.json package.json
48+
elif [[ ${{ matrix.node_version }} == 14* ]]; then
49+
cp ci-package.json package.json
50+
elif [[ ${{ matrix.node_version }} == 15* ]]; then
51+
cp ci-package.json package.json
52+
elif [[ ${{ matrix.node_version }} == 16* ]]; then
53+
cp ci-package.json package.json
54+
elif [[ ${{ matrix.node_version }} == 19* ]]; then
55+
cp ci-package.json package.json
56+
fi
57+
3858
- name: Install dependencies and run tests with coverage
3959
run: |
4060
yarn install

ci-package.json

Lines changed: 47 additions & 0 deletions
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": ">=10.0"
45+
},
46+
"engineStrict": true
47+
}

package.json

Lines changed: 1 addition & 1 deletion
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)