From 60b0d9bab1188799ca6359ff969970218b60d9db Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 6 Oct 2020 10:39:35 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20upgrade=20auth=20addon?= =?UTF-8?q?=20to=20ember=20lts=203.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/auth/.eslintrc.js | 8 +-- addons/auth/.travis.yml | 66 ------------------- addons/auth/config/ember-try.js | 24 ++++--- addons/auth/package.json | 31 ++++----- addons/auth/tests/dummy/app/app.js | 2 +- addons/auth/tests/dummy/app/router.js | 2 +- .../tests/dummy/config/ember-cli-update.json | 20 ++++++ addons/auth/tests/dummy/config/targets.js | 2 +- addons/auth/tests/test-helper.js | 4 +- 9 files changed, 54 insertions(+), 105 deletions(-) delete mode 100644 addons/auth/.travis.yml create mode 100644 addons/auth/tests/dummy/config/ember-cli-update.json diff --git a/addons/auth/.eslintrc.js b/addons/auth/.eslintrc.js index 85a190092..928585995 100644 --- a/addons/auth/.eslintrc.js +++ b/addons/auth/.eslintrc.js @@ -20,9 +20,7 @@ module.exports = { env: { browser: true }, - rules: { - 'ember/no-jquery': 'error' - }, + rules: {}, overrides: [ // node files { @@ -50,9 +48,7 @@ module.exports = { node: true }, plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - }) + extends: ['plugin:node/recommended'] } ] }; diff --git a/addons/auth/.travis.yml b/addons/auth/.travis.yml deleted file mode 100644 index f5df21049..000000000 --- a/addons/auth/.travis.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -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: trusty - -addons: - chrome: stable - -cache: - yarn: true - -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: - - yarn lint:hbs - - yarn lint:js - - yarn test - - - stage: "Additional Tests" - name: "Floating Dependencies" - install: - - yarn install --no-lockfile --non-interactive - script: - - yarn test - - # 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.12 - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - - 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 - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --non-interactive - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/addons/auth/config/ember-try.js b/addons/auth/config/ember-try.js index eaf3d3914..9190baee5 100644 --- a/addons/auth/config/ember-try.js +++ b/addons/auth/config/ember-try.js @@ -22,6 +22,14 @@ module.exports = async function () { }, }, }, + { + name: 'ember-lts-3.20', + npm: { + devDependencies: { + 'ember-source': '~3.20.5' + } + } + }, { name: 'ember-release', npm: { @@ -46,16 +54,6 @@ module.exports = async function () { }, }, }, - // The default `.travis.yml` runs this scenario via `yarn test`, - // not via `ember try`. It's still included here so that running - // `ember try:each` manually or from a customized CI config will run it - // along with all the other scenarios. - { - name: 'ember-default', - npm: { - devDependencies: {}, - }, - }, { name: 'ember-default-with-jquery', env: { @@ -65,9 +63,9 @@ module.exports = async function () { }, npm: { devDependencies: { - '@ember/jquery': '^0.5.1', - }, - }, + '@ember/jquery': '^1.1.0' + } + } }, { name: 'ember-classic', diff --git a/addons/auth/package.json b/addons/auth/package.json index 4d59f9770..7e6d5bfb5 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -8,34 +8,32 @@ "ember-addon" ], "scripts": { - "lint": "yarn lint:js", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:js": "eslint .", "format": "npm run format:js", "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", "start": "ember serve", "test": "ember test", - "test:all": "ember try:each", + "test:ember-compatibility": "ember try:each", "doc:toc": "doctoc README.md" }, "dependencies": { - "ember-cli-babel": "^7.17.2", - "ember-cli-htmlbars": "^4.2.2" + "ember-cli-babel": "^7.21.0", + "ember-cli-htmlbars": "^5.2.0" }, "devDependencies": { "@ember/optional-features": "^1.3.0", - "@glimmer/component": "^1.0.0", + "@glimmer/component": "^1.0.1", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "doctoc": "^1.4.0", - "ember-auto-import": "^1.5.3", - "ember-cli": "~3.16.1", + "ember-auto-import": "^1.6.0", + "ember-cli": "~3.20.2", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-mirage": "^1.1.7", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-cli-update": "^0.54.6", "ember-cookies": "^0.5.2", @@ -46,16 +44,19 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^7.0.0", + "ember-resolver": "^8.0.0", "ember-simple-auth": "^3.0.0", - "ember-source": "~3.16.0", + "ember-source": "~3.20.2", "ember-source-channel-url": "^2.0.1", + "ember-template-lint": "^2.9.1", "ember-try": "^1.4.0", - "eslint-plugin-ember": "^7.7.2", - "eslint-plugin-node": "^11.0.0", + "eslint": "^7.5.0", + "eslint-plugin-ember": "^8.9.1", + "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "prettier": "^2.0.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.2.0" }, "engines": { "node": "10.* || >= 12" diff --git a/addons/auth/tests/dummy/app/app.js b/addons/auth/tests/dummy/app/app.js index d8e2088b6..523bad60c 100644 --- a/addons/auth/tests/dummy/app/app.js +++ b/addons/auth/tests/dummy/app/app.js @@ -1,7 +1,7 @@ import Application from '@ember/application'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; -import config from './config/environment'; +import config from 'dummy/config/environment'; export default class App extends Application { modulePrefix = config.modulePrefix; diff --git a/addons/auth/tests/dummy/app/router.js b/addons/auth/tests/dummy/app/router.js index 818c8d496..64e543ab2 100644 --- a/addons/auth/tests/dummy/app/router.js +++ b/addons/auth/tests/dummy/app/router.js @@ -1,5 +1,5 @@ import EmberRouter from '@ember/routing/router'; -import config from './config/environment'; +import config from 'dummy/config/environment'; export default class Router extends EmberRouter { location = config.locationType; diff --git a/addons/auth/tests/dummy/config/ember-cli-update.json b/addons/auth/tests/dummy/config/ember-cli-update.json new file mode 100644 index 000000000..3c0c55fdb --- /dev/null +++ b/addons/auth/tests/dummy/config/ember-cli-update.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "3.20.2", + "blueprints": [ + { + "name": "addon", + "outputRepo": "https://github.com/ember-cli/ember-addon-output", + "codemodsSource": "ember-addon-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--no-welcome" + ] + } + ] + } + ] +} diff --git a/addons/auth/tests/dummy/config/targets.js b/addons/auth/tests/dummy/config/targets.js index cc5539285..4b33327e8 100644 --- a/addons/auth/tests/dummy/config/targets.js +++ b/addons/auth/tests/dummy/config/targets.js @@ -6,7 +6,7 @@ const browsers = [ 'last 1 Safari versions', ]; -const isCI = !!process.env.CI; +const isCI = Boolean(process.env.CI); const isProduction = process.env.EMBER_ENV === 'production'; if (isCI || isProduction) { diff --git a/addons/auth/tests/test-helper.js b/addons/auth/tests/test-helper.js index 0382a848d..4eae06f81 100644 --- a/addons/auth/tests/test-helper.js +++ b/addons/auth/tests/test-helper.js @@ -1,5 +1,5 @@ -import Application from '../app'; -import config from '../config/environment'; +import Application from 'dummy/app'; +import config from 'dummy/config/environment'; import { setApplication } from '@ember/test-helpers'; import { start } from 'ember-qunit';