From 6541fbade8c141a47930248ee3e971248f3b0361 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 5 Mar 2021 13:39:44 -0500 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20upgrade=20addons/aut?= =?UTF-8?q?h=20to=20Ember=203.24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/auth/.eslintcache | 1 + addons/auth/.eslintignore | 1 + addons/auth/.eslintrc.js | 36 ++++++----- addons/auth/.npmignore | 1 + addons/auth/.prettierignore | 21 +++++++ addons/auth/.prettierrc.js | 5 ++ addons/auth/.template-lintrc.js | 2 +- addons/auth/.travis.yml | 59 +++++++++++++++++++ addons/auth/addon/authenticators/base.js | 15 ++--- addons/auth/addon/authenticators/password.js | 3 +- addons/auth/addon/session-stores/cookie.js | 3 + addons/auth/config/ember-try.js | 20 ++----- addons/auth/package.json | 50 +++++++++------- .../tests/dummy/app/templates/application.hbs | 2 + .../tests/dummy/config/ember-cli-update.json | 2 +- addons/auth/tests/index.html | 7 +++ addons/auth/tests/test-helper.js | 4 ++ .../tests/unit/authenticators/base-test.js | 33 +++++++---- ui/desktop/.gitignore | 1 + 19 files changed, 193 insertions(+), 73 deletions(-) create mode 100644 addons/auth/.eslintcache create mode 100644 addons/auth/.prettierignore create mode 100644 addons/auth/.prettierrc.js create mode 100644 addons/auth/.travis.yml diff --git a/addons/auth/.eslintcache b/addons/auth/.eslintcache new file mode 100644 index 000000000..c6163907a --- /dev/null +++ b/addons/auth/.eslintcache @@ -0,0 +1 @@ +[{"/Users/randallmorey/git/boundary-ui/addons/auth/.eslintrc.js":"1","/Users/randallmorey/git/boundary-ui/addons/auth/.prettierrc.js":"2","/Users/randallmorey/git/boundary-ui/addons/auth/.template-lintrc.js":"3","/Users/randallmorey/git/boundary-ui/addons/auth/addon/authenticators/base.js":"4","/Users/randallmorey/git/boundary-ui/addons/auth/addon/authenticators/password.js":"5","/Users/randallmorey/git/boundary-ui/addons/auth/addon/session-stores/cookie.js":"6","/Users/randallmorey/git/boundary-ui/addons/auth/addon/session-stores/local-storage.js":"7","/Users/randallmorey/git/boundary-ui/addons/auth/config/ember-try.js":"8","/Users/randallmorey/git/boundary-ui/addons/auth/config/environment.js":"9","/Users/randallmorey/git/boundary-ui/addons/auth/ember-cli-build.js":"10","/Users/randallmorey/git/boundary-ui/addons/auth/index.js":"11","/Users/randallmorey/git/boundary-ui/addons/auth/testem.js":"12","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/app.js":"13","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/authenticators/base.js":"14","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/authenticators/password.js":"15","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/router.js":"16","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/session-stores/cookie.js":"17","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/session-stores/local-storage.js":"18","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/config/environment.js":"19","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/config/targets.js":"20","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/config.js":"21","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/scenarios/default.js":"22","/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/serializers/application.js":"23","/Users/randallmorey/git/boundary-ui/addons/auth/tests/test-helper.js":"24","/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/authenticators/base-test.js":"25","/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/authenticators/password-test.js":"26","/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/session-stores/cookie-test.js":"27"},{"size":1261,"mtime":1614968222345,"results":"28","hashOfConfig":"29"},{"size":58,"mtime":1614968153726,"results":"30","hashOfConfig":"29"},{"size":58,"mtime":1614968153727,"results":"31","hashOfConfig":"29"},{"size":2748,"mtime":1614968229848,"results":"32","hashOfConfig":"29"},{"size":2958,"mtime":1614968229863,"results":"33","hashOfConfig":"29"},{"size":4392,"mtime":1614968506425,"results":"34","hashOfConfig":"29"},{"size":694,"mtime":1605716837136,"results":"35","hashOfConfig":"29"},{"size":1686,"mtime":1614968189649,"results":"36","hashOfConfig":"29"},{"size":90,"mtime":1605716837137,"results":"37","hashOfConfig":"29"},{"size":495,"mtime":1605716837137,"results":"38","hashOfConfig":"29"},{"size":72,"mtime":1605716837137,"results":"39","hashOfConfig":"29"},{"size":681,"mtime":1614968201726,"results":"40","hashOfConfig":"29"},{"size":388,"mtime":1605716837138,"results":"41","hashOfConfig":"29"},{"size":277,"mtime":1609793139529,"results":"42","hashOfConfig":"29"},{"size":353,"mtime":1605716837138,"results":"43","hashOfConfig":"29"},{"size":240,"mtime":1605716837139,"results":"44","hashOfConfig":"29"},{"size":192,"mtime":1605716837139,"results":"45","hashOfConfig":"29"},{"size":168,"mtime":1605716837139,"results":"46","hashOfConfig":"29"},{"size":1242,"mtime":1605716837140,"results":"47","hashOfConfig":"29"},{"size":314,"mtime":1605716837140,"results":"48","hashOfConfig":"29"},{"size":763,"mtime":1605716837141,"results":"49","hashOfConfig":"29"},{"size":194,"mtime":1605716837141,"results":"50","hashOfConfig":"29"},{"size":100,"mtime":1605716837141,"results":"51","hashOfConfig":"29"},{"size":323,"mtime":1614968153728,"results":"52","hashOfConfig":"29"},{"size":2786,"mtime":1614968230015,"results":"53","hashOfConfig":"29"},{"size":2520,"mtime":1609793139530,"results":"54","hashOfConfig":"29"},{"size":2789,"mtime":1605716837143,"results":"55","hashOfConfig":"29"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2hgbsh",{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"84","messages":"85","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"90","messages":"91","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"92","messages":"93","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"96","messages":"97","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"98","messages":"99","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"102","messages":"103","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"104","messages":"105","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/randallmorey/git/boundary-ui/addons/auth/.eslintrc.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/.prettierrc.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/.template-lintrc.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/addon/authenticators/base.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/addon/authenticators/password.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/addon/session-stores/cookie.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/addon/session-stores/local-storage.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/config/ember-try.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/config/environment.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/ember-cli-build.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/index.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/testem.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/app.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/authenticators/base.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/authenticators/password.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/router.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/session-stores/cookie.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/app/session-stores/local-storage.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/config/environment.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/config/targets.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/config.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/scenarios/default.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/dummy/mirage/serializers/application.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/test-helper.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/authenticators/base-test.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/authenticators/password-test.js",[],"/Users/randallmorey/git/boundary-ui/addons/auth/tests/unit/session-stores/cookie-test.js",[]] \ No newline at end of file diff --git a/addons/auth/.eslintignore b/addons/auth/.eslintignore index 72df37307..922165552 100644 --- a/addons/auth/.eslintignore +++ b/addons/auth/.eslintignore @@ -13,6 +13,7 @@ # misc /coverage/ !.* +.eslintcache # ember-try /.node_modules.ember-try/ diff --git a/addons/auth/.eslintrc.js b/addons/auth/.eslintrc.js index 928585995..49fb14100 100644 --- a/addons/auth/.eslintrc.js +++ b/addons/auth/.eslintrc.js @@ -7,48 +7,54 @@ module.exports = { ecmaVersion: 2018, sourceType: 'module', ecmaFeatures: { - legacyDecorators: true - } + legacyDecorators: true, + }, }, - plugins: [ - 'ember' - ], + plugins: ['ember'], extends: [ 'eslint:recommended', - 'plugin:ember/recommended' + 'plugin:ember/recommended', + 'plugin:prettier/recommended', ], env: { - browser: true + browser: true, + }, + rules: { + 'ember/no-get': 'off', + 'ember/no-get-with-default': 'off', + 'ember/no-computed-properties-in-native-classes': 'off', + 'ember/no-assignment-of-untracked-properties-used-in-tracking-contexts': + 'off', }, - rules: {}, overrides: [ // node files { files: [ '.eslintrc.js', + '.prettierrc.js', '.template-lintrc.js', 'ember-cli-build.js', 'index.js', 'testem.js', 'blueprints/*/index.js', 'config/**/*.js', - 'tests/dummy/config/**/*.js' + 'tests/dummy/config/**/*.js', ], excludedFiles: [ 'addon/**', 'addon-test-support/**', 'app/**', - 'tests/dummy/app/**' + 'tests/dummy/app/**', ], parserOptions: { - sourceType: 'script' + sourceType: 'script', }, env: { browser: false, - node: true + node: true, }, plugins: ['node'], - extends: ['plugin:node/recommended'] - } - ] + extends: ['plugin:node/recommended'], + }, + ], }; diff --git a/addons/auth/.npmignore b/addons/auth/.npmignore index bd09adff9..88818f2c8 100644 --- a/addons/auth/.npmignore +++ b/addons/auth/.npmignore @@ -10,6 +10,7 @@ /.editorconfig /.ember-cli /.env* +/.eslintcache /.eslintignore /.eslintrc.js /.git/ diff --git a/addons/auth/.prettierignore b/addons/auth/.prettierignore new file mode 100644 index 000000000..922165552 --- /dev/null +++ b/addons/auth/.prettierignore @@ -0,0 +1,21 @@ +# unconventional js +/blueprints/*/files/ +/vendor/ + +# compiled output +/dist/ +/tmp/ + +# dependencies +/bower_components/ +/node_modules/ + +# misc +/coverage/ +!.* +.eslintcache + +# ember-try +/.node_modules.ember-try/ +/bower.json.ember-try +/package.json.ember-try diff --git a/addons/auth/.prettierrc.js b/addons/auth/.prettierrc.js new file mode 100644 index 000000000..534e6d35a --- /dev/null +++ b/addons/auth/.prettierrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + singleQuote: true, +}; diff --git a/addons/auth/.template-lintrc.js b/addons/auth/.template-lintrc.js index f38737001..3b0b9af95 100644 --- a/addons/auth/.template-lintrc.js +++ b/addons/auth/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'octane' + extends: 'octane', }; diff --git a/addons/auth/.travis.yml b/addons/auth/.travis.yml new file mode 100644 index 000000000..156fd25fa --- /dev/null +++ b/addons/auth/.travis.yml @@ -0,0 +1,59 @@ +--- +language: node_js +node_js: + # we recommend testing addons with the same minimum supported node version as Ember CLI + # so that your addon works for all apps + - "10" + +dist: xenial + +addons: + chrome: stable + +cache: + directories: + - $HOME/.npm + +env: + global: + # See https://git.io/vdao3 for details. + - JOBS=1 + +branches: + only: + - master + # npm version tags + - /^v\d+\.\d+\.\d+/ + +jobs: + fast_finish: true + allow_failures: + - env: EMBER_TRY_SCENARIO=ember-canary + + include: + # runs linting and tests with current locked deps + - stage: "Tests" + name: "Tests" + script: + - npm run lint + - npm run test:ember + + - stage: "Additional Tests" + name: "Floating Dependencies" + install: + - npm install --no-package-lock + script: + - npm run test:ember + + # we recommend new addons test the current and previous LTS + # as well as latest stable release (bonus points to beta/canary) + - env: EMBER_TRY_SCENARIO=ember-lts-3.16 + - env: EMBER_TRY_SCENARIO=ember-lts-3.20 + - env: EMBER_TRY_SCENARIO=ember-release + - env: EMBER_TRY_SCENARIO=ember-beta + - env: EMBER_TRY_SCENARIO=ember-canary + - env: EMBER_TRY_SCENARIO=ember-default-with-jquery + - env: EMBER_TRY_SCENARIO=ember-classic + +script: + - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/addons/auth/addon/authenticators/base.js b/addons/auth/addon/authenticators/base.js index d0b394d32..641142222 100644 --- a/addons/auth/addon/authenticators/base.js +++ b/addons/auth/addon/authenticators/base.js @@ -15,7 +15,7 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { * @param {string} scopeID * @return {string} */ - buildDeauthEndpointURL(/* { scope: { id: scopeID } } */) { } + buildDeauthEndpointURL(/* { scope: { id: scopeID } } */) {} /** * Generates an auth token validation URL used to check tokens on restoration. @@ -23,7 +23,7 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { * @param {string} tokenID * @return {string} */ - buildTokenValidationEndpointURL(/* tokenID */) { } + buildTokenValidationEndpointURL(/* tokenID */) {} // =methods @@ -34,7 +34,7 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { const tokenValidationURL = this.buildTokenValidationEndpointURL(tokenID); const response = await fetch(tokenValidationURL, { method: 'get', - headers: { 'Authorization': `Bearer ${token}` } + headers: { Authorization: `Bearer ${token}` }, }); // 401 and 404 responses mean the token is invalid, whereas other types of // error responses do not tell us about the validity of the token. @@ -51,8 +51,9 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { */ async restore(data) { if (!data) return reject(); - return this.validateToken(data.token, data.id) - .then(() => this.normalizeData(data)); + return this.validateToken(data.token, data.id).then(() => + this.normalizeData(data) + ); } /** @@ -65,8 +66,8 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { */ normalizeData(data, username) { // Add booleans indicated the scope type - data.isGlobal = (data?.scope?.type === 'global'); - data.isOrg = (data?.scope?.type === 'org'); + data.isGlobal = data?.scope?.type === 'global'; + data.isOrg = data?.scope?.type === 'org'; if (username) data.username = username; return data; } diff --git a/addons/auth/addon/authenticators/password.js b/addons/auth/addon/authenticators/password.js index 6f70946e8..e130a23ee 100644 --- a/addons/auth/addon/authenticators/password.js +++ b/addons/auth/addon/authenticators/password.js @@ -34,7 +34,6 @@ import fetch from 'fetch'; * */ export default class PasswordAuthenticator extends BaseAuthenticator { - // =unimplemented methods /** @@ -48,7 +47,7 @@ export default class PasswordAuthenticator extends BaseAuthenticator { buildAuthEndpointURL(/* { scope: { id: scopeID }, authMethod: { id: authMethodID }, - } */) { } + } */) {} // =methods diff --git a/addons/auth/addon/session-stores/cookie.js b/addons/auth/addon/session-stores/cookie.js index ea0501ad5..a9e0b5120 100644 --- a/addons/auth/addon/session-stores/cookie.js +++ b/addons/auth/addon/session-stores/cookie.js @@ -75,6 +75,9 @@ export default class CookieSessionStore extends BaseSessionStore { * present. If either one is missing, we want to cleanup to be sure they * are both absent. */ + // The base class is a classic Ember class, but the linter doesn't know that. + // That's why this rule is disabled here. + /* eslint-disable-next-line ember/classic-decorator-hooks */ init() { if (!this.sessionExists) this.clear(); } diff --git a/addons/auth/config/ember-try.js b/addons/auth/config/ember-try.js index 9190baee5..f14ac7f50 100644 --- a/addons/auth/config/ember-try.js +++ b/addons/auth/config/ember-try.js @@ -6,14 +6,6 @@ module.exports = async function () { return { useYarn: true, scenarios: [ - { - name: 'ember-lts-3.12', - npm: { - devDependencies: { - 'ember-source': '~3.12.0', - }, - }, - }, { name: 'ember-lts-3.16', npm: { @@ -26,9 +18,9 @@ module.exports = async function () { name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.20.5' - } - } + 'ember-source': '~3.20.5', + }, + }, }, { name: 'ember-release', @@ -63,9 +55,9 @@ module.exports = async function () { }, npm: { devDependencies: { - '@ember/jquery': '^1.1.0' - } - } + '@ember/jquery': '^1.1.0', + }, + }, }, { name: 'ember-classic', diff --git a/addons/auth/package.json b/addons/auth/package.json index 702815140..0746d866d 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -8,53 +8,61 @@ "ember-addon" ], "scripts": { - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", - "lint:js": "eslint .", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", "format": "npm run format:js", "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "ember test", "test:ember-compatibility": "ember try:each", "doc:toc": "doctoc README.md" }, "dependencies": { - "ember-cli-babel": "^7.21.0", - "ember-cli-htmlbars": "^5.2.0", + "ember-cli-babel": "^7.23.0", + "ember-cli-htmlbars": "^5.3.1", "ember-simple-auth": "^3.0.1" }, "devDependencies": { - "core": "*", - "@ember/optional-features": "^1.3.0", - "@glimmer/component": "^1.0.1", - "@glimmer/tracking": "^1.0.0", + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", + "core": "*", "doctoc": "^1.4.0", - "ember-auto-import": "^1.6.0", - "ember-cli": "~3.20.2", + "ember-auto-import": "^1.10.1", + "ember-cli": "~3.24.0", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-uglify": "^3.0.0", + "ember-cli-terser": "^4.0.1", "ember-cli-update": "^0.54.6", "ember-cookies": "^0.5.2", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", - "ember-resolver": "^8.0.0", - "ember-source": "~3.20.2", - "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^2.9.1", + "ember-page-title": "^6.0.3", + "ember-qunit": "^5.1.1", + "ember-resolver": "^8.0.2", + "ember-source": "~3.24.0", + "ember-source-channel-url": "^3.0.0", + "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", - "eslint": "^7.5.0", - "eslint-plugin-ember": "^8.9.1", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.0.5", - "qunit-dom": "^1.2.0" + "prettier": "^2.2.1", + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/addons/auth/tests/dummy/app/templates/application.hbs b/addons/auth/tests/dummy/app/templates/application.hbs index 5230580f8..1001d149e 100644 --- a/addons/auth/tests/dummy/app/templates/application.hbs +++ b/addons/auth/tests/dummy/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Dummy"}} +

Welcome to Ember

{{outlet}} \ No newline at end of file diff --git a/addons/auth/tests/dummy/config/ember-cli-update.json b/addons/auth/tests/dummy/config/ember-cli-update.json index 3c0c55fdb..ed4d5fc2d 100644 --- a/addons/auth/tests/dummy/config/ember-cli-update.json +++ b/addons/auth/tests/dummy/config/ember-cli-update.json @@ -3,7 +3,7 @@ "packages": [ { "name": "ember-cli", - "version": "3.20.2", + "version": "3.24.0", "blueprints": [ { "name": "addon", diff --git a/addons/auth/tests/index.html b/addons/auth/tests/index.html index 5209b8523..3eb848dbd 100644 --- a/addons/auth/tests/index.html +++ b/addons/auth/tests/index.html @@ -21,6 +21,13 @@ {{content-for "body"}} {{content-for "test-body"}} +
+
+
+
+
+
+ diff --git a/addons/auth/tests/test-helper.js b/addons/auth/tests/test-helper.js index 4eae06f81..4efd6e58a 100644 --- a/addons/auth/tests/test-helper.js +++ b/addons/auth/tests/test-helper.js @@ -1,8 +1,12 @@ import Application from 'dummy/app'; import config from 'dummy/config/environment'; +import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; +import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; setApplication(Application.create(config.APP)); +setup(QUnit.assert); + start(); diff --git a/addons/auth/tests/unit/authenticators/base-test.js b/addons/auth/tests/unit/authenticators/base-test.js index 7cb7a3e4b..726e76162 100644 --- a/addons/auth/tests/unit/authenticators/base-test.js +++ b/addons/auth/tests/unit/authenticators/base-test.js @@ -34,10 +34,13 @@ module('Unit | Authenticator | base', function (hooks) { assert.expect(1); const mockData = { id: 'token_123' }; const authenticator = this.owner.lookup('authenticator:base'); - this.server.get(authenticator.buildTokenValidationEndpointURL(mockData.id), () => { - assert.ok(true, 'token validation was requested'); - return new Response(200); - }); + this.server.get( + authenticator.buildTokenValidationEndpointURL(mockData.id), + () => { + assert.ok(true, 'token validation was requested'); + return new Response(200); + } + ); await authenticator.restore(mockData); }); @@ -45,10 +48,13 @@ module('Unit | Authenticator | base', function (hooks) { assert.expect(2); const mockData = { id: 'token_123' }; const authenticator = this.owner.lookup('authenticator:base'); - this.server.get(authenticator.buildTokenValidationEndpointURL(mockData.id), () => { - assert.ok(true, 'token validation was requested'); - return new Response(401); - }); + this.server.get( + authenticator.buildTokenValidationEndpointURL(mockData.id), + () => { + assert.ok(true, 'token validation was requested'); + return new Response(401); + } + ); try { await authenticator.restore(mockData); } catch (e) { @@ -60,10 +66,13 @@ module('Unit | Authenticator | base', function (hooks) { assert.expect(2); const mockData = { id: 'token_123' }; const authenticator = this.owner.lookup('authenticator:base'); - this.server.get(authenticator.buildTokenValidationEndpointURL(mockData.id), () => { - assert.ok(true, 'token validation was requested'); - return new Response(404); - }); + this.server.get( + authenticator.buildTokenValidationEndpointURL(mockData.id), + () => { + assert.ok(true, 'token validation was requested'); + return new Response(404); + } + ); try { await authenticator.restore(mockData); } catch (e) { diff --git a/ui/desktop/.gitignore b/ui/desktop/.gitignore index c40a1b2ab..7e0f7ddce 100644 --- a/ui/desktop/.gitignore +++ b/ui/desktop/.gitignore @@ -12,6 +12,7 @@ /.env* /.pnp* /.sass-cache +/.eslintcache /connect.lock /coverage/ /libpeerconnection.log