Skip to content

Commit

Permalink
Merge pull request #12 from pcvg/SU-1122_Bug-insecure-operation-error…
Browse files Browse the repository at this point in the history
…-on-votes

Removed FingerPrint; Updated docs; Security updates
  • Loading branch information
ain authored Mar 10, 2021
2 parents 51b3af2 + 9ceff7e commit 1ce24e0
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 10,424 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: yarn
run: npm install
- name: Run test
run: yarn test
run: npm test
linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: yarn
run: npm install
- name: Run linters
run: yarn lint
run: npm run lint
publish:
name: Publish
needs: [test,linters]
Expand All @@ -32,7 +32,7 @@ jobs:
with:
node-version: '12.x'
registry-url: https://registry.npmjs.org/
- run: yarn
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,20 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: yarn
run: npm install
- name: Run test
run: yarn test
- name: Coveralls
uses: coverallsapp/github-action@master
run: npm test
env:
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
COVERALLS_GIT_BRANCH: "${{ github.ref }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: yarn
run: npm install
- name: Run linters
run: yarn lint
run: npm run lint
notify-failure:
runs-on: ubuntu-latest
needs: [test,linters]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ yarn-error.log*
.DS_Store
package-lock.json
.nyc_output/
coverage/
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint && npm run build
174 changes: 0 additions & 174 deletions coverage/lcov.info

This file was deleted.

9 changes: 3 additions & 6 deletions dist/Zvezdochki.3283b0c3.js

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions dist/demo.d3b53871.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
starDataAttr: "emoji",
ratingDataAttr: "rating",
votedClassName: 'emoji-rating--blocked',
voted: false,
fingerPrint: true
voted: false
};

new Zvezdochki(ratingEl, options);
Expand Down
48 changes: 18 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@savingsunited/zvezdochki",
"version": "1.2.0",
"version": "2.0.0",
"description": "The component for easy creation of star rating components",
"main": "dist/Zvezdochki.3283b0c3.js",
"repository": "https://github.com/pcvg/zvezdochki",
Expand All @@ -12,53 +12,41 @@
"build": "del-cli dist/* && parcel build src/index.html --public-url /zvezdochki --no-content-hash --no-source-maps",
"eslint": "./node_modules/.bin/eslint src",
"stylelint": "./node_modules/.bin/stylelint src",
"lint": "yarn eslint && yarn stylelint",
"test": "nyc mocha --require @babel/register -r jsdom-global/register -r mock-local-storage tests && yarn report-coverage",
"report-coverage": "nyc report --reporter=text-lcov > ./coverage/lcov.info",
"deploy": "yarn build && gh-pages -d dist"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn build"
}
"lint": "npm run eslint && npm run stylelint",
"test": "nyc mocha --require @babel/register -r jsdom-global/register -r mock-local-storage tests && nyc report --reporter=text-lcov | coveralls",
"deploy": "npm run build && gh-pages -d dist",
"prepare": "husky install"
},
"babel": {
"presets": [
"@babel/preset-env"
]
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/preset-env": "^7.12.7",
"@babel/register": "^7.12.1",
"canvas": "^2.6.1",
"chai": "^4.2.0",
"@babel/core": "^7.13.8",
"@babel/preset-env": "^7.13.9",
"@babel/register": "^7.13.8",
"canvas": "^2.7.0",
"chai": "^4.3.0",
"coveralls": "^3.1.0",
"cssnano": "^4.1.10",
"del-cli": "^3.0.1",
"eslint": "^7.14.0",
"eslint": "^7.21.0",
"gh-pages": "^3.1.0",
"husky": "^4.3.0",
"husky": "^5.1.3",
"jsdom": "^16.4.0",
"jsdom-global": "^3.0.2",
"microlight": "^0.0.7",
"mocha": "^8.2.1",
"mocha": "^8.3.0",
"mocha-lcov-reporter": "^1.3.0",
"mock-local-storage": "^1.1.15",
"mock-local-storage": "^1.1.17",
"node-sass": "^5.0.0",
"nyc": "^15.1.0",
"parcel": "^1.12.4",
"postcss": "^8.1.10",
"parcel": "1.12.3",
"postcss": "^8.2.6",
"postcss-preset-env": "^6.7.0",
"stylelint": "^13.8.0",
"stylelint": "^13.11.0",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-scss": "^3.18.0"
},
"peerDependencies": {
"postcss": "^8.1.10"
},
"dependencies": {
"fingerprintjs2": "^2.1.2",
"yarn": "^1.22.10"
"stylelint-scss": "^3.19.0"
}
}
Loading

0 comments on commit 1ce24e0

Please sign in to comment.