Skip to content

Commit

Permalink
chore: update githb-action to support lower node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
softvar committed Jun 19, 2024
1 parent 1a3e805 commit e32ce42
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ jobs:
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Copy package.json compatible with node version
run: |
if [[ ${{ matrix.node_version }} == 8* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 10* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 12* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 13* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 14* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 15* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 16* ]]; then
cp ci-package.json package.json
elif [[ ${{ matrix.node_version }} == 19* ]]; then
cp ci-package.json package.json
fi
- name: Install dependencies and run tests with coverage
run: |
yarn install
Expand Down
47 changes: 47 additions & 0 deletions ci-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "secure-ls",
"description": "Secure localStorage/sessionStorage data with high level of encryption and data compression",
"main": "./dist/secure-ls.js",
"browser": "./dist/secure-ls.js",
"typings": "./types/secure-ls.d.ts",
"scripts": {
"build": "yarn build-dev && yarn build-prod",
"build-dev": "webpack --mode=development",
"build-prod": "webpack --mode=production",
"build:patch": "yarn build-dev --env type=patch npm version patch",
"build:minor": "yarn build-dev --env type=minor npm version minor",
"build:major": "yarn build-dev --env type=major npm version major",
"lint": "eslint src/*.js --fix",
"prettier": "prettier -w **/*.js *.md",
"test:dev": "jest --watch --runInBand --debug --colors --errorOnDeprecated",
"test:prod": "jest --runInBand --colors --errorOnDeprecated",
"test:coverage": "jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info"
},
"dependencies": {
"crypto-js": "^4.2.0",
"lz-string": "^1.5.0"
},
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"babel-jest": "^25.x.x",
"jest": "^25.x.x",
"jest-environment-jsdom": "^25.x.x",
"semver": "^7.6.2"
},
"repository": {
"type": "git",
"url": "https://github.com/softvar/secure-ls.git"
},
"keywords": ["secure-ls", "localStorage", "encryption", "compression", "webpack", "es6", "umd", "commonjs"],
"author": "Varun Malhotra",
"license": "MIT",
"bugs": {
"url": "https://github.com/softvar/secure-ls/issues"
},
"homepage": "https://github.com/softvar/secure-ls",
"engines": {
"node": ">=8.0"
},
"engineStrict": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"homepage": "https://github.com/softvar/secure-ls",
"engines": {
"node": ">=10.0"
"node": ">=8.0"
},
"engineStrict": true
}

0 comments on commit e32ce42

Please sign in to comment.