@@ -13,15 +13,14 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: git hash | - name: git hash | ||||
run: | | run: | | ||||
git rev-parse HEAD | git rev-parse HEAD | ||||
- name: test lesspass-pure package | - name: test lesspass-pure package | ||||
run: | | run: | | ||||
cd packages/lesspass-pure | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass-pure run test | |||||
build-and-commit-and-push: | build-and-commit-and-push: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -32,7 +31,7 @@ jobs: | |||||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: build lesspass-pure package | - name: build lesspass-pure package | ||||
run: | | run: | | ||||
cd packages/lesspass-pure | cd packages/lesspass-pure | ||||
@@ -17,6 +17,7 @@ jobs: | |||||
run: | | run: | | ||||
cd cli | cd cli | ||||
./test | ./test | ||||
deploy-cli: | deploy-cli: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
needs: test-cli | needs: test-cli | ||||
@@ -12,12 +12,11 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test lesspass-crypto package | - name: test lesspass-crypto package | ||||
run: | | run: | | ||||
cd packages/lesspass-crypto | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass-crypto run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -26,7 +25,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: deploy lesspass-crypto package | - name: deploy lesspass-crypto package | ||||
run: | | run: | | ||||
cd packages | cd packages | ||||
@@ -12,12 +12,11 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test lesspass-entropy package | - name: test lesspass-entropy package | ||||
run: | | run: | | ||||
cd packages/lesspass-entropy | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass-entropy run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -26,7 +25,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: deploy lesspass-entropy package | - name: deploy lesspass-entropy package | ||||
run: | | run: | | ||||
cd packages | cd packages | ||||
@@ -12,12 +12,11 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test lesspass-fingerprint package | - name: test lesspass-fingerprint package | ||||
run: | | run: | | ||||
cd packages/lesspass-fingerprint | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass-fingerprint run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -26,7 +25,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: deploy lesspass-fingerprint package | - name: deploy lesspass-fingerprint package | ||||
run: | | run: | | ||||
cd packages | cd packages | ||||
@@ -12,12 +12,11 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test lesspass package | - name: test lesspass package | ||||
run: | | run: | | ||||
cd packages/lesspass | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -26,7 +25,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: deploy lesspass package | - name: deploy lesspass package | ||||
run: | | run: | | ||||
cd packages | cd packages | ||||
@@ -6,13 +6,25 @@ on: | |||||
- "packages/lesspass-pure/dist/**" | - "packages/lesspass-pure/dist/**" | ||||
jobs: | jobs: | ||||
test: | |||||
runs-on: ubuntu-18.04 | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-node@v1 | |||||
with: | |||||
node-version: "14" | |||||
- name: test lesspass-pure package | |||||
run: | | |||||
yarn install | |||||
yarn workspace lesspass-pure run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
steps: | steps: | ||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: git hash | - name: git hash | ||||
run: | | run: | | ||||
git rev-parse HEAD | git rev-parse HEAD | ||||
@@ -12,12 +12,11 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test lesspass-render-password package | - name: test lesspass-render-password package | ||||
run: | | run: | | ||||
cd packages/lesspass-render-password | |||||
yarn install | yarn install | ||||
yarn test | |||||
yarn workspace lesspass-render-password run test | |||||
deploy: | deploy: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -26,7 +25,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: deploy lesspass-render-password package | - name: deploy lesspass-render-password package | ||||
run: | | run: | | ||||
cd packages | cd packages | ||||
@@ -3,65 +3,16 @@ name: test | |||||
on: [push, pull_request] | on: [push, pull_request] | ||||
jobs: | jobs: | ||||
test-lesspass-crypto: | |||||
test-packages: | |||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
steps: | steps: | ||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- run: | | - run: | | ||||
cd packages/lesspass-crypto | |||||
yarn install | yarn install | ||||
yarn test | |||||
test-lesspass-entropy: | |||||
runs-on: ubuntu-18.04 | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-node@v1 | |||||
with: | |||||
node-version: "12" | |||||
- run: | | |||||
cd packages/lesspass-entropy | |||||
yarn install | |||||
yarn test | |||||
test-lesspass-fingerprint: | |||||
runs-on: ubuntu-18.04 | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-node@v1 | |||||
with: | |||||
node-version: "12" | |||||
- run: | | |||||
cd packages/lesspass-fingerprint | |||||
yarn install | |||||
yarn test | |||||
test-lesspass-render-password: | |||||
runs-on: ubuntu-18.04 | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-node@v1 | |||||
with: | |||||
node-version: "12" | |||||
- run: | | |||||
cd packages/lesspass-render-password | |||||
yarn install | |||||
yarn test | |||||
test-lesspass-site: | |||||
runs-on: ubuntu-18.04 | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-node@v1 | |||||
with: | |||||
node-version: "12" | |||||
- run: | | |||||
cd packages/lesspass-site | |||||
yarn install | |||||
yarn build | |||||
yarn workspaces run test | |||||
test-mobile: | test-mobile: | ||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
@@ -69,7 +20,7 @@ jobs: | |||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
- uses: actions/setup-node@v1 | - uses: actions/setup-node@v1 | ||||
with: | with: | ||||
node-version: "12" | |||||
node-version: "14" | |||||
- name: test mobile | - name: test mobile | ||||
run: | | run: | | ||||
cd mobile | cd mobile | ||||
@@ -0,0 +1,20 @@ | |||||
{ | |||||
"name": "lesspass-root", | |||||
"description": "Stateless Password Manager", | |||||
"repository": "git@github.com:lesspass/lesspass.git", | |||||
"author": "Guillaume Vincent <guillaume@oslab.fr>", | |||||
"license": "GPL-3.0", | |||||
"private": true, | |||||
"workspaces": [ | |||||
"packages/*" | |||||
], | |||||
"devDependencies": { | |||||
"browserify": "^17.0.0", | |||||
"jest": "^27.2.4", | |||||
"karma": "^6.3.4", | |||||
"karma-browserify": "^8.1.0", | |||||
"karma-chrome-launcher": "^3.1.0", | |||||
"karma-mocha": "^2.0.1", | |||||
"mocha": "^9.1.2" | |||||
} | |||||
} |
@@ -10,8 +10,5 @@ | |||||
"main": "index.js", | "main": "index.js", | ||||
"scripts": { | "scripts": { | ||||
"test": "jest" | "test": "jest" | ||||
}, | |||||
"devDependencies": { | |||||
"jest": "latest" | |||||
} | } | ||||
} | } |
@@ -17,14 +17,6 @@ | |||||
"test:browser": "karma start test/karma.conf.js" | "test:browser": "karma start test/karma.conf.js" | ||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"lesspass-crypto": "9.1.9" | |||||
}, | |||||
"devDependencies": { | |||||
"browserify": "^17.0.0", | |||||
"karma": "^6.1.2", | |||||
"karma-browserify": "^8.0.0", | |||||
"karma-chrome-launcher": "^3.1.0", | |||||
"karma-mocha": "^2.0.1", | |||||
"mocha": "^8.3.1" | |||||
"lesspass-crypto": "9.1.10" | |||||
} | } | ||||
} | |||||
} |
@@ -17,14 +17,6 @@ | |||||
"test:browser": "karma start test/karma.conf.js" | "test:browser": "karma start test/karma.conf.js" | ||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"lesspass-crypto": "9.1.9" | |||||
}, | |||||
"devDependencies": { | |||||
"browserify": "^17.0.0", | |||||
"karma": "^6.1.2", | |||||
"karma-browserify": "^8.0.0", | |||||
"karma-chrome-launcher": "^3.1.0", | |||||
"karma-mocha": "^2.0.1", | |||||
"mocha": "^8.3.1" | |||||
"lesspass-crypto": "9.1.10" | |||||
} | } | ||||
} | } |
@@ -1,2 +1,2 @@ | |||||
cypress/videos | |||||
cypress/screenshots | |||||
tests/e2e/videos | |||||
tests/e2e/screenshots |
@@ -1,3 +1,4 @@ | |||||
{ | { | ||||
"baseUrl": "http://localhost:8000" | |||||
"baseUrl": "http://localhost:8000", | |||||
"pluginsFile": "tests/e2e/plugins/index.js" | |||||
} | } |
@@ -1 +0,0 @@ | |||||
module.exports = (on, config) => {}; |
@@ -1 +0,0 @@ | |||||
@@ -10,25 +10,41 @@ | |||||
"i18n:build": "node src/i18n/build.js", | "i18n:build": "node src/i18n/build.js", | ||||
"i18n:translate": "node src/i18n/translate.js", | "i18n:translate": "node src/i18n/translate.js", | ||||
"prettier": "prettier --write 'src/**/*'", | "prettier": "prettier --write 'src/**/*'", | ||||
"cypress:run": "cypress run", | |||||
"cypress:open": "cypress open", | |||||
"test": "npm run test:unit && npm run test:e2e", | "test": "npm run test:unit && npm run test:e2e", | ||||
"test:watch": "jest --watch", | "test:watch": "jest --watch", | ||||
"test:unit": "jest", | |||||
"test:e2e": "start-server-and-test start http://localhost:8000 cypress:run" | |||||
"test:unit": "vue-cli-service test:unit", | |||||
"test:e2e": "vue-cli-service test:e2e --headless", | |||||
"lint": "vue-cli-service lint" | |||||
}, | }, | ||||
"jest": { | "jest": { | ||||
"testPathIgnorePatterns": [ | |||||
"cypress" | |||||
], | |||||
"moduleFileExtensions": [ | |||||
"js", | |||||
"vue" | |||||
"preset": "@vue/cli-plugin-unit-jest" | |||||
}, | |||||
"eslintConfig": { | |||||
"root": true, | |||||
"env": { | |||||
"node": true, | |||||
"browser": true, | |||||
"webextensions": true | |||||
}, | |||||
"extends": [ | |||||
"plugin:vue/essential", | |||||
"eslint:recommended" | |||||
], | ], | ||||
"transform": { | |||||
".*\\.(vue)$": "vue-jest", | |||||
"^.+\\.js$": "babel-jest" | |||||
} | |||||
"parserOptions": { | |||||
"parser": "babel-eslint" | |||||
}, | |||||
"rules": {}, | |||||
"overrides": [ | |||||
{ | |||||
"files": [ | |||||
"**/__tests__/*.{j,t}s?(x)", | |||||
"**/tests/unit/**/*.spec.{j,t}s?(x)" | |||||
], | |||||
"env": { | |||||
"jest": true | |||||
} | |||||
} | |||||
] | |||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"@oslab/atob": "^0.1.0", | "@oslab/atob": "^0.1.0", | ||||
@@ -40,7 +56,7 @@ | |||||
"core-js": "^3.9.1", | "core-js": "^3.9.1", | ||||
"font-awesome": "^4.7.0", | "font-awesome": "^4.7.0", | ||||
"jwt-decode": "^3.1.2", | "jwt-decode": "^3.1.2", | ||||
"lesspass": "^9.0.0", | |||||
"lesspass": "9.2.0", | |||||
"lodash": "^4.17.21", | "lodash": "^4.17.21", | ||||
"vue": "^2.6.12", | "vue": "^2.6.12", | ||||
"vue-polyglot": "^2.0.1", | "vue-polyglot": "^2.0.1", | ||||
@@ -51,26 +67,22 @@ | |||||
"vuex-router-sync": "^5.0.0" | "vuex-router-sync": "^5.0.0" | ||||
}, | }, | ||||
"devDependencies": { | "devDependencies": { | ||||
"@babel/core": "^7.13.10", | |||||
"@google-cloud/translate": "^6.1.0", | |||||
"@vue/cli-plugin-babel": "^4.5.11", | |||||
"@vue/cli-service": "^4.5.11", | |||||
"@vue/test-utils": "^1.1.3", | |||||
"axios-mock-adapter": "^1.19.0", | |||||
"babel-core": "7.0.0-bridge.0", | |||||
"cypress": "^6.8.0", | |||||
"@vue/cli-plugin-babel": "~4.5.0", | |||||
"@vue/cli-plugin-e2e-cypress": "~4.5.0", | |||||
"@vue/cli-plugin-eslint": "~4.5.0", | |||||
"@vue/cli-plugin-unit-jest": "~4.5.0", | |||||
"@vue/cli-service": "~4.5.0", | |||||
"@vue/test-utils": "^1.0.3", | |||||
"axios-mock-adapter": "^1.20.0", | |||||
"babel-eslint": "^10.1.0", | |||||
"cypress-plugin-tab": "^1.0.5", | "cypress-plugin-tab": "^1.0.5", | ||||
"jest": "^26.6.3", | |||||
"jquery": "^3.6.0", | |||||
"popper.js": "^1.16.1", | |||||
"start-server-and-test": "^1.12.1", | |||||
"vue-jest": "^3.0.7", | |||||
"vue-polyglot-utils": "^0.1.1", | |||||
"vue-template-compiler": "^2.6.12", | |||||
"walk": "^2.3.14" | |||||
"eslint": "^6.7.2", | |||||
"eslint-plugin-vue": "^6.2.2", | |||||
"vue-template-compiler": "^2.6.11" | |||||
}, | }, | ||||
"browserslist": [ | "browserslist": [ | ||||
"> 1%", | "> 1%", | ||||
"last 2 versions" | |||||
"last 2 versions", | |||||
"not dead" | |||||
] | ] | ||||
} | } |
@@ -97,7 +97,7 @@ export default { | |||||
methods: { | methods: { | ||||
fullReload() { | fullReload() { | ||||
this.$store.dispatch("resetPassword"); | this.$store.dispatch("resetPassword"); | ||||
this.$router.push({ name: "home" }).catch(e => {}); | |||||
this.$router.push({ name: "home" }).catch(console.error); | |||||
}, | }, | ||||
saveOrUpdatePassword() { | saveOrUpdatePassword() { | ||||
this.$store.dispatch("saveOrUpdatePassword"); | this.$store.dispatch("saveOrUpdatePassword"); | ||||
@@ -122,7 +122,7 @@ export default { | |||||
}) | }) | ||||
.catch(() => message.displayGenericError()); | .catch(() => message.displayGenericError()); | ||||
}) | }) | ||||
.catch(err => { | |||||
.catch(() => { | |||||
message.error( | message.error( | ||||
this.$t( | this.$t( | ||||
"ChangePasswordError", | "ChangePasswordError", | ||||
@@ -282,20 +282,25 @@ export default { | |||||
); | ); | ||||
}, | }, | ||||
sharePasswordProfile() { | sharePasswordProfile() { | ||||
const copied = copy(this.passwordURL); | |||||
if (copied) { | |||||
const copySuccessMessage = this.$t( | |||||
"PasswordProfileCopied", | |||||
"Your password profile has been copied" | |||||
); | |||||
const element = document.getElementById("sharePasswordProfileButton"); | |||||
showTooltip(element, copySuccessMessage, "left"); | |||||
setTimeout(() => hideTooltip(element), 2000); | |||||
} else { | |||||
message.warning( | |||||
this.$t("SorryCopy", "Sorry, copying only works in modern browsers.") | |||||
navigator.clipboard | |||||
.writeText(this.passwordURL) | |||||
.then(() => { | |||||
const copySuccessMessage = this.$t( | |||||
"PasswordProfileCopied", | |||||
"Your password profile has been copied" | |||||
); | |||||
const element = document.getElementById("sharePasswordProfileButton"); | |||||
showTooltip(element, copySuccessMessage, "left"); | |||||
setTimeout(() => hideTooltip(element), 2000); | |||||
}) | |||||
.catch(() => | |||||
message.warning( | |||||
this.$t( | |||||
"SorryCopy", | |||||
"Sorry, copying only works in modern browsers." | |||||
) | |||||
) | |||||
); | ); | ||||
} | |||||
}, | }, | ||||
setSite(site) { | setSite(site) { | ||||
this.password.site = site; | this.password.site = site; | ||||
@@ -108,9 +108,6 @@ export default { | |||||
var siteMatch = password.site.match(new RegExp(this.searchQuery, "i")); | var siteMatch = password.site.match(new RegExp(this.searchQuery, "i")); | ||||
return loginMatch || siteMatch; | return loginMatch || siteMatch; | ||||
}); | }); | ||||
this.pagination.pageCount = Math.ceil( | |||||
passwords.length / this.pagination.perPage | |||||
); | |||||
return passwords.slice( | return passwords.slice( | ||||
this.pagination.currentPage * this.pagination.perPage - | this.pagination.currentPage * this.pagination.perPage - | ||||
this.pagination.perPage, | this.pagination.perPage, | ||||
@@ -118,6 +115,16 @@ export default { | |||||
); | ); | ||||
} | } | ||||
}, | }, | ||||
watch: { | |||||
filteredPasswords: { | |||||
deep: true, | |||||
handler: function(newVal) { | |||||
this.pagination.pageCount = Math.ceil( | |||||
newVal.length / this.pagination.perPage | |||||
); | |||||
} | |||||
} | |||||
}, | |||||
beforeMount() { | beforeMount() { | ||||
this.$store.dispatch("getPasswords"); | this.$store.dispatch("getPasswords"); | ||||
}, | }, | ||||
@@ -0,0 +1,10 @@ | |||||
module.exports = { | |||||
plugins: ["cypress"], | |||||
env: { | |||||
mocha: true, | |||||
"cypress/globals": true | |||||
}, | |||||
rules: { | |||||
strict: "off" | |||||
} | |||||
}; |
@@ -0,0 +1,25 @@ | |||||
/* eslint-disable arrow-body-style */ | |||||
// https://docs.cypress.io/guides/guides/plugins-guide.html | |||||
// if you need a custom webpack configuration you can uncomment the following import | |||||
// and then use the `file:preprocessor` event | |||||
// as explained in the cypress docs | |||||
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples | |||||
// /* eslint-disable import/no-extraneous-dependencies, global-require */ | |||||
// const webpack = require('@cypress/webpack-preprocessor') | |||||
module.exports = (on, config) => { | |||||
// on('file:preprocessor', webpack({ | |||||
// webpackOptions: require('@vue/cli-service/webpack.config'), | |||||
// watchOptions: {} | |||||
// })) | |||||
return Object.assign({}, config, { | |||||
fixturesFolder: 'tests/e2e/fixtures', | |||||
integrationFolder: 'tests/e2e/specs', | |||||
screenshotsFolder: 'tests/e2e/screenshots', | |||||
videosFolder: 'tests/e2e/videos', | |||||
supportFile: 'tests/e2e/support/index.js' | |||||
}) | |||||
} |
@@ -1,6 +1,6 @@ | |||||
import axios from "axios"; | import axios from "axios"; | ||||
import MockAdapter from "axios-mock-adapter"; | import MockAdapter from "axios-mock-adapter"; | ||||
import Passwords from "./password"; | |||||
import Passwords from "@/api/password"; | |||||
const mock = new MockAdapter(axios); | const mock = new MockAdapter(axios); | ||||
@@ -1,6 +1,6 @@ | |||||
import axios from "axios"; | import axios from "axios"; | ||||
import MockAdapter from "axios-mock-adapter"; | import MockAdapter from "axios-mock-adapter"; | ||||
import User from "./user"; | |||||
import User from "@/api/user"; | |||||
const mock = new MockAdapter(axios); | const mock = new MockAdapter(axios); | ||||
@@ -1,8 +1,8 @@ | |||||
import { mount } from "@vue/test-utils"; | import { mount } from "@vue/test-utils"; | ||||
import InputSite from "./InputSite.vue"; | |||||
import InputSite from "@/components/InputSite.vue"; | |||||
jest.mock("../services/url-parser"); | |||||
import { getSuggestions } from "../services/url-parser"; | |||||
jest.mock("@/services/url-parser"); | |||||
import { getSuggestions } from "@/services/url-parser"; | |||||
const createWrapper = data => | const createWrapper = data => | ||||
mount({ | mount({ |
@@ -1,4 +1,4 @@ | |||||
import formValidator from "./form-validator"; | |||||
import formValidator from "@/services/form-validator"; | |||||
test("formValidator.increment()", () => { | test("formValidator.increment()", () => { | ||||
expect(formValidator.increment(1, { min: 0, max: 10 })).toBe(2); | expect(formValidator.increment(1, { min: 0, max: 10 })).toBe(2); |
@@ -1,4 +1,4 @@ | |||||
import * as urlParser from "./url-parser"; | |||||
import * as urlParser from "@/services/url-parser"; | |||||
test("cleanUrl", () => { | test("cleanUrl", () => { | ||||
expect(urlParser.cleanUrl("https://lesspass.com/#!/")).toBe("lesspass.com"); | expect(urlParser.cleanUrl("https://lesspass.com/#!/")).toBe("lesspass.com"); |
@@ -1,4 +1,4 @@ | |||||
import * as getters from "./getters"; | |||||
import * as getters from "@/store/getters"; | |||||
test("passwordURL", () => { | test("passwordURL", () => { | ||||
const state = { | const state = { |
@@ -1,6 +1,6 @@ | |||||
import mutations from "./mutations"; | |||||
import * as types from "./mutation-types"; | |||||
import defaultPassword from "./defaultPassword"; | |||||
import mutations from "@/store/mutations"; | |||||
import * as types from "@/store/mutation-types"; | |||||
import defaultPassword from "@/store/defaultPassword"; | |||||
test("LOGOUT", () => { | test("LOGOUT", () => { | ||||
const LOGOUT = mutations[types.LOGOUT]; | const LOGOUT = mutations[types.LOGOUT]; |
@@ -11,5 +11,6 @@ module.exports = { | |||||
optimization: { | optimization: { | ||||
splitChunks: false | splitChunks: false | ||||
} | } | ||||
} | |||||
}, | |||||
chainWebpack: config => config.resolve.symlinks(false) | |||||
}; | }; |
@@ -14,8 +14,5 @@ | |||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"big-integer": "1.6.48" | "big-integer": "1.6.48" | ||||
}, | |||||
"devDependencies": { | |||||
"jest": "^26.6.3" | |||||
} | } | ||||
} | } |
@@ -12,7 +12,7 @@ | |||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"express": "^4.17.1", | "express": "^4.17.1", | ||||
"lesspass-pure": "latest" | |||||
"lesspass-pure": "9.5.2" | |||||
}, | }, | ||||
"devDependencies": { | "devDependencies": { | ||||
"favicons": "^6.2.1", | "favicons": "^6.2.1", | ||||
@@ -12,11 +12,8 @@ | |||||
"test": "jest" | "test": "jest" | ||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"lesspass-entropy": "latest", | |||||
"lesspass-fingerprint": "latest", | |||||
"lesspass-render-password": "latest" | |||||
}, | |||||
"devDependencies": { | |||||
"jest": "^26.6.3" | |||||
"lesspass-entropy": "9.1.9", | |||||
"lesspass-fingerprint": "9.1.9", | |||||
"lesspass-render-password": "9.1.9" | |||||
} | } | ||||
} | } |
@@ -61,16 +61,9 @@ | |||||
"eslintConfig": { | "eslintConfig": { | ||||
"extends": "react-app" | "extends": "react-app" | ||||
}, | }, | ||||
"browserslist": { | |||||
"production": [ | |||||
">0.2%", | |||||
"not dead", | |||||
"not op_mini all" | |||||
], | |||||
"development": [ | |||||
"last 1 chrome version", | |||||
"last 1 firefox version", | |||||
"last 1 safari version" | |||||
] | |||||
} | |||||
"browserslist": [ | |||||
"> 1%", | |||||
"last 2 versions", | |||||
"not dead" | |||||
] | |||||
} | } |