From c2896be3f79de847fc0646d0296aaa5c4ffc3a4c Mon Sep 17 00:00:00 2001
From: Rajesh-KG <77315676+Rajesh-KG@users.noreply.github.com>
Date: Mon, 28 Nov 2022 15:38:24 +0530
Subject: [PATCH] refactor: update ember-cli 3.28 (#288)
---
.eslintignore | 2 +
.eslintrc.js | 7 +-
.gitignore | 1 +
.npmignore | 4 +
.travis.yml | 5 +-
README.md | 6 +-
.../components/accessibility-result.hbs | 2 +-
.../components/accessibility-tester.hbs | 6 +-
addon/templates/components/toggle-result.hbs | 10 +-
package.json | 70 +-
...aint-text.js => elements-without-label.js} | 2 +-
tests/dummy/app/templates/application.hbs | 8 +-
.../components/elements-without-label.hbs | 4 +
.../app/templates/components/faint-text.hbs | 1 -
tests/dummy/config/optional-features.json | 5 +-
tests/index.html | 43 +-
yarn.lock | 9918 +++++++++--------
17 files changed, 5556 insertions(+), 4538 deletions(-)
rename tests/dummy/app/components/{faint-text.js => elements-without-label.js} (56%)
create mode 100644 tests/dummy/app/templates/components/elements-without-label.hbs
delete mode 100644 tests/dummy/app/templates/components/faint-text.hbs
diff --git a/.eslintignore b/.eslintignore
index 72df373..701947e 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -13,6 +13,8 @@
# misc
/coverage/
!.*
+.*/
+.eslintcache
# ember-try
/.node_modules.ember-try/
diff --git a/.eslintrc.js b/.eslintrc.js
index 6745071..d44ac03 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,8 +1,13 @@
+'use strict';
+
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2018,
- sourceType: 'module'
+ sourceType: 'module',
+ ecmaFeatures: {
+ legacyDecorators: true
+ }
},
plugins: [
'ember',
diff --git a/.gitignore b/.gitignore
index 439bc4a..45ea3f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
+/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
diff --git a/.npmignore b/.npmignore
index 663df11..7c599f1 100644
--- a/.npmignore
+++ b/.npmignore
@@ -10,9 +10,12 @@
/.editorconfig
/.ember-cli
/.env*
+/.eslintcache
/.eslintignore
/.eslintrc.js
/.gitignore
+/.prettierignore
+/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
@@ -22,6 +25,7 @@
/ember-cli-build.js
/testem.js
/tests/
+/yarn-error.log
/yarn.lock
.gitkeep
docs/
diff --git a/.travis.yml b/.travis.yml
index 916d2d0..72d7039 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ 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
- - "8"
+ - "12"
sudo: false
dist: trusty
@@ -27,13 +27,12 @@ branches:
- /^v\d+\.\d+\.\d+/
jobs:
- fail_fast: true
+ 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:
diff --git a/README.md b/README.md
index 14378bb..7b4f80d 100644
--- a/README.md
+++ b/README.md
@@ -13,9 +13,9 @@ to audit your apps.
Compatibility
------------------------------------------------------------------------------
-* Ember.js v2.18 or above
-* Ember CLI v2.13 or above
-* Node.js v8 or above
+* Ember.js v3.24 or above
+* Ember CLI v3.24 or above
+* Node.js v12 or above
Installation
diff --git a/addon/templates/components/accessibility-result.hbs b/addon/templates/components/accessibility-result.hbs
index 195b973..4fb8f80 100644
--- a/addon/templates/components/accessibility-result.hbs
+++ b/addon/templates/components/accessibility-result.hbs
@@ -13,7 +13,7 @@
{{violation.component}}
{{/if}}
- {{violation.description}}. Read More
+ {{violation.description}}. Read More
diff --git a/addon/templates/components/accessibility-tester.hbs b/addon/templates/components/accessibility-tester.hbs
index 5464c18..421c6c5 100644
--- a/addon/templates/components/accessibility-tester.hbs
+++ b/addon/templates/components/accessibility-tester.hbs
@@ -1,8 +1,8 @@
+ @preventToggle={{this.preventToggle}}
+ style={{this.position}} />
-{{#each accessibilityTest.violations as |violation|}}
+{{#each this.accessibilityTest.violations as |violation|}}
{{/each}}
diff --git a/addon/templates/components/toggle-result.hbs b/addon/templates/components/toggle-result.hbs
index 82b997a..ee5f659 100644
--- a/addon/templates/components/toggle-result.hbs
+++ b/addon/templates/components/toggle-result.hbs
@@ -1,11 +1,11 @@
-{{#if isAuditing}}
+{{#if this.isAuditing}}
{{/if}}
-{{#if accessibilityTest.violations}}
- {{accessibilityTest.violations.length}}
+{{#if this.accessibilityTest.violations}}
+ {{this.accessibilityTest.violations.length}}
{{/if}}
diff --git a/package.json b/package.json
index c8d57c7..bea8ba0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@coyote-labs/ember-accessibility",
- "version": "2.0.0",
+ "version": "3.0.0",
"description": "An EmberJS addon to help identify accessibility violations",
"keywords": [
"ember-addon"
@@ -17,12 +17,17 @@
"test": "tests"
},
"scripts": {
- "build": "ember build",
+ "build": "ember build --environment=production",
+ "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": "ember-template-lint .",
- "lint:js": "eslint .",
+ "lint:hbs:fix": "ember-template-lint . --fix",
+ "lint:js": "eslint . --cache",
+ "lint:js:fix": "eslint . --fix",
"start": "ember serve",
- "test": "ember test",
- "test:all": "ember try:each"
+ "test": "npm-run-all lint test:*",
+ "test:ember": "ember test",
+ "test:ember-compatibility": "ember try:each"
},
"husky": {
"hooks": {
@@ -35,41 +40,54 @@
"broccoli-merge-trees": "^3.0.2",
"ember-angle-bracket-invocation-polyfill": "^2.0.1",
"ember-auto-import": "^1.3.0",
- "ember-cli-babel": "^7.7.3",
- "ember-cli-htmlbars": "^4.0.5",
+ "ember-cli-babel": "^7.26.10",
+ "ember-cli-htmlbars": "^5.7.2",
"ember-get-config": "^2.1.1"
},
"devDependencies": {
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
- "@ember/optional-features": "^1.0.0",
+ "@ember/optional-features": "^2.0.0",
+ "@ember/test-helpers": "^2.6.0",
+ "@embroider/test-setup": "^0.48.1",
+ "@glimmer/component": "^1.0.4",
+ "@glimmer/tracking": "^1.0.4",
"broccoli-asset-rev": "^3.0.0",
- "ember-cli": "~3.13.1",
- "ember-cli-dependency-checker": "^3.1.0",
- "ember-cli-eslint": "^5.1.0",
- "ember-cli-htmlbars-inline-precompile": "^3.0.0",
- "ember-cli-inject-live-reload": "^2.0.1",
+ "ember-auto-import": "^1.12.0",
+ "ember-cli": "~3.28.6",
+ "ember-cli-dependency-checker": "^3.2.0",
+ "ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
- "ember-cli-template-lint": "^1.0.0-beta.1",
- "ember-cli-uglify": "^3.0.0",
+ "ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
- "ember-export-application-global": "^2.0.0",
- "ember-load-initializers": "^2.0.0",
+ "ember-export-application-global": "^2.0.1",
+ "ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
- "ember-qunit": "^4.4.1",
- "ember-resolver": "^5.0.1",
- "ember-source": "~3.13.2",
- "ember-source-channel-url": "^2.0.1",
- "ember-try": "^1.0.0",
- "eslint-plugin-ember": "^7.0.0",
+ "ember-page-title": "^6.2.2",
+ "ember-qunit": "^5.1.5",
+ "ember-resolver": "^8.0.3",
+ "ember-source": "~3.28.8",
+ "ember-source-channel-url": "^3.0.0",
+ "ember-template-lint": "^3.15.0",
+ "ember-try": "^1.4.0",
+ "eslint": "^7.32.0",
+ "eslint-config-prettier": "^8.3.0",
+ "eslint-plugin-ember": "^10.5.8",
"eslint-plugin-ember-suave": "^2.0.0-beta.1",
- "eslint-plugin-node": "^10.0.0",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-prettier": "^3.4.1",
+ "eslint-plugin-qunit": "^6.2.0",
"husky": "^3.0.0",
"loader.js": "^4.7.0",
- "qunit-dom": "^0.9.0"
+ "npm-run-all": "^4.1.5",
+ "qunit": "^2.17.2",
+ "qunit-dom": "^1.6.0"
},
"engines": {
- "node": "8.* || >= 10.*"
+ "node": "12.* || 14.* || >= 16"
+ },
+ "ember": {
+ "edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config",
diff --git a/tests/dummy/app/components/faint-text.js b/tests/dummy/app/components/elements-without-label.js
similarity index 56%
rename from tests/dummy/app/components/faint-text.js
rename to tests/dummy/app/components/elements-without-label.js
index 3162dc3..eee63d6 100644
--- a/tests/dummy/app/components/faint-text.js
+++ b/tests/dummy/app/components/elements-without-label.js
@@ -1,5 +1,5 @@
import Component from '@ember/component';
-import layout from '../templates/components/faint-text';
+import layout from '../templates/components/elements-without-label';
export default Component.extend({
layout
diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs
index 318a8e7..03e5545 100644
--- a/tests/dummy/app/templates/application.hbs
+++ b/tests/dummy/app/templates/application.hbs
@@ -4,11 +4,11 @@
-
+
-
- {{#if canShowComponent}}
-
+
+ {{#if this.canShowComponent}}
+
{{/if}}
diff --git a/tests/dummy/app/templates/components/elements-without-label.hbs b/tests/dummy/app/templates/components/elements-without-label.hbs
new file mode 100644
index 0000000..7faf283
--- /dev/null
+++ b/tests/dummy/app/templates/components/elements-without-label.hbs
@@ -0,0 +1,4 @@
+
diff --git a/tests/dummy/app/templates/components/faint-text.hbs b/tests/dummy/app/templates/components/faint-text.hbs
deleted file mode 100644
index d2c2e9d..0000000
--- a/tests/dummy/app/templates/components/faint-text.hbs
+++ /dev/null
@@ -1 +0,0 @@
-Too faint to read
diff --git a/tests/dummy/config/optional-features.json b/tests/dummy/config/optional-features.json
index b190262..b26286e 100644
--- a/tests/dummy/config/optional-features.json
+++ b/tests/dummy/config/optional-features.json
@@ -1,3 +1,6 @@
{
- "jquery-integration": false
+ "application-template-wrapper": false,
+ "default-async-observers": true,
+ "jquery-integration": false,
+ "template-only-glimmer-components": true
}
diff --git a/tests/index.html b/tests/index.html
index 5209b85..a064892 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -7,27 +7,52 @@
- {{content-for "head"}}
- {{content-for "test-head"}}
+ {{content-for 'head'}}
+ {{content-for 'test-head'}}
- {{content-for "head-footer"}}
- {{content-for "test-head-footer"}}
+
+
+ {{content-for 'head-footer'}}
+ {{content-for 'test-head-footer'}}
- {{content-for "body"}}
- {{content-for "test-body"}}
+ {{content-for 'body'}}
+ {{content-for 'test-body'}}
+
+
+
-
+
+
- {{content-for "body-footer"}}
- {{content-for "test-body-footer"}}
+ {{content-for 'body-footer'}}
+ {{content-for 'test-body-footer'}}