From 5bbf256ae53fb1c088bcafa3cb2d33aa28e30bea Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Wed, 8 Sep 2021 21:03:07 -0600 Subject: [PATCH 1/5] enable currently remaining ember-try scenarios --- .github/workflows/ci-build.yml | 8 ++++---- package.json | 9 +++++---- yarn.lock | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 7bf6379f..16de25ba 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -75,12 +75,12 @@ jobs: - ember-lts-3.20 - ember-lts-3.24 - ember-release - # - ember-beta - # - ember-canary + - ember-beta + - ember-canary - ember-classic - ember-default-with-jquery - # - embroider-safe - # - embroider-optimized + - embroider-safe + - embroider-optimized steps: - uses: actions/checkout@v2 diff --git a/package.json b/package.json index f059e53b..945b2ef6 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@ember/test-helpers": "^2.2.5", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1", "ember-cli": "~3.27.0", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", @@ -55,20 +56,20 @@ "ember-qunit": "^5.1.4", "ember-source": "3.27.2", "ember-source-channel-url": "^3.0.0", + "ember-template-lint": "^3.4.2", "ember-try": "^1.4.0", "eslint": "^7.32.0", - "ember-template-lint": "^3.4.2", "eslint-plugin-ember": "^7.8.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.3.0", + "qunit": "^2.17.1", "qunit-dom": "^1.6.0", "release-it": "^14.10.1", - "release-it-lerna-changelog": "^3.1.0", - "prettier": "^2.3.0", - "qunit": "^2.15.0" + "release-it-lerna-changelog": "^3.1.0" }, "engines": { "node": ">= 10.*" diff --git a/yarn.lock b/yarn.lock index da580732..933d0307 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4301,7 +4301,7 @@ elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -ember-auto-import@^1.10.1: +ember-auto-import@^1, ember-auto-import@^1.10.1: version "1.12.0" resolved "https://registry.yarnpkg.com/ember-auto-import/-/ember-auto-import-1.12.0.tgz#52246b04891090e2608244e65c4c6af7710df12b" integrity sha512-fzMGnyHGfUNFHchpLbJ98Vs/c5H2wZBMR9r/XwW+WOWPisZDGLUPPyhJQsSREPoUQ+o8GvyLaD/rkrKqW8bmgw== @@ -9395,10 +9395,10 @@ qunit-dom@^1.6.0: ember-cli-babel "^7.23.0" ember-cli-version-checker "^5.1.1" -qunit@^2.15.0: - version "2.17.0" - resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.17.0.tgz#4c2dd5a4ee91cd8f8462708a37e710a3e622c321" - integrity sha512-3zXO4T3KT8liCXYDqu68SmK6D7JgI80R6gUPGjzxXwh9rjwdmmx09YZhGLfT466PC/XlORr8xvxlNx3i3S72Rw== +qunit@^2.17.1: + version "2.17.1" + resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.17.1.tgz#1969efe4c9b776b4b8cd4fc2fb9634e8f762e177" + integrity sha512-Gx1tpSfYbjRe4TRKCVBLlnCaVThF5Pdnmbbv/zLFfgWKddeQHV/eNi1BG392hw4gEDh2sflMj8kmPJlT7+kVMA== dependencies: commander "7.1.0" node-watch "0.7.1" From be0d5bbf2e0952ad06d4404a429b1a4a24231198 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 9 Sep 2021 09:37:42 -0600 Subject: [PATCH 2/5] @ember/polyfills's merge is deprecated infavor of assign --- tests/unit/resolvers/classic/basic-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/resolvers/classic/basic-test.js b/tests/unit/resolvers/classic/basic-test.js index 1b93d4bc..d67ddabc 100644 --- a/tests/unit/resolvers/classic/basic-test.js +++ b/tests/unit/resolvers/classic/basic-test.js @@ -3,7 +3,7 @@ /* eslint-disable no-console */ import Ember from 'ember'; -import { merge } from '@ember/polyfills'; +import { assign } from '@ember/polyfills'; import { module, test } from 'qunit'; import Resolver from 'ember-resolver/resolvers/classic'; @@ -18,12 +18,12 @@ function setupResolver(options = {}) { function resetRegistry() { requirejs.clear(); - merge(requirejs.entries, originalRegistryEntries); + assign(requirejs.entries, originalRegistryEntries); } module('ember-resolver/resolvers/classic', { beforeEach() { - originalRegistryEntries = merge({}, requirejs.entries); + originalRegistryEntries = assign({}, requirejs.entries); originalConsoleInfo = console ? console.info : null; setupResolver(); From 53795a1e4eb16b6b140d78d759a87c4993a39546 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 9 Sep 2021 10:23:00 -0600 Subject: [PATCH 3/5] app.inject has be deprecated in-favor of lazy injections --- addon/resolvers/classic/container-debug-adapter.js | 2 ++ app/initializers/container-debug-adapter.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addon/resolvers/classic/container-debug-adapter.js b/addon/resolvers/classic/container-debug-adapter.js index dd170b4c..dd3e99ad 100644 --- a/addon/resolvers/classic/container-debug-adapter.js +++ b/addon/resolvers/classic/container-debug-adapter.js @@ -1,6 +1,7 @@ import { A } from '@ember/array'; import ContainerDebugAdapter from '@ember/debug/container-debug-adapter'; import { ModuleRegistry } from './index'; +import { getOwner } from '@ember/application'; function getPod(type, key, prefix) { let match = key.match(new RegExp('^/?' + prefix + '/(.+)/' + type + '$')); @@ -19,6 +20,7 @@ export default ContainerDebugAdapter.extend({ init() { this._super(...arguments); + this.namespace = getOwner(this).lookup('application:main'); if (!this._moduleRegistry) { this._moduleRegistry = new ModuleRegistry(); diff --git a/app/initializers/container-debug-adapter.js b/app/initializers/container-debug-adapter.js index b6e3d104..4f6794d6 100644 --- a/app/initializers/container-debug-adapter.js +++ b/app/initializers/container-debug-adapter.js @@ -7,6 +7,5 @@ export default { let app = arguments[1] || arguments[0]; app.register('container-debug-adapter:main', ContainerDebugAdapter); - app.inject('container-debug-adapter:main', 'namespace', 'application:main'); } }; From 8be5cb2c809690a811f976c360b8fe52835147d8 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 9 Sep 2021 10:36:44 -0600 Subject: [PATCH 4/5] Deprecation message needs since + for --- addon/resolvers/classic/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addon/resolvers/classic/index.js b/addon/resolvers/classic/index.js index 7643470b..bde2d435 100644 --- a/addon/resolvers/classic/index.js +++ b/addon/resolvers/classic/index.js @@ -364,7 +364,12 @@ const Resolver = EmberObject.extend({ 'Attempted to lookup "'+moduleName+'" which ' + 'was not found. Please rename "'+partializedModuleName+'" '+ 'to "'+moduleName+'" instead.', false, - { id: 'ember-resolver.underscored-modules', until: '3.0.0' }); + { + id: 'ember-resolver.underscored-modules', + until: '3.0.0', + for: 'ember-resolver', + since: '0.1.0' + }); return partializedModuleName; } From 16223d5c065df47c00a213ea8b40e125400ab5f8 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 9 Sep 2021 10:37:31 -0600 Subject: [PATCH 5/5] Disable embroider scenarios for the moment, so we can land the already increased scenario set --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 16de25ba..d20f7faa 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -79,8 +79,8 @@ jobs: - ember-canary - ember-classic - ember-default-with-jquery - - embroider-safe - - embroider-optimized + # - embroider-safe + # - embroider-optimized steps: - uses: actions/checkout@v2