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 3fcf035
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ jobs:
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Copy package.json compatible with node version
run: |
if [[ ${{ 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
51 changes: 51 additions & 0 deletions ci-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"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",
"@types/crypto-js": "^4.2.2",
"@types/lz-string": "^1.5.0",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.3",
"globals": "^15.4.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"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": ">=10.0"
},
"engineStrict": true
}

0 comments on commit 3fcf035

Please sign in to comment.