From 627294101a2fcf7ec7d94c77f90dd6ca4bbff42b Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 11:17:33 -0400 Subject: [PATCH 01/12] Re-enable embroider testing #34, #33, #72 --- config/ember-try.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/ember-try.js b/config/ember-try.js index 8100d59..30bb746 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -1,7 +1,7 @@ 'use strict'; const getChannelURL = require('ember-source-channel-url'); -// const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = async function () { return { @@ -47,8 +47,8 @@ module.exports = async function () { }, }, }, - // embroiderSafe(), // FIXME: https://github.com/GavinJoyce/ember-headlessui/issues/34 - // embroiderOptimized(), + embroiderSafe(), + embroiderOptimized(), ], }; }; From 364fc93d56739e4fd44fb36da56b66182d6f5a74 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 11:27:51 -0400 Subject: [PATCH 02/12] Add embroider scenarios to ci config --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8938dd3..ce53411 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,6 +83,8 @@ jobs: - ember-release - ember-beta - ember-canary + - embroider-safe + - embroider-optimized steps: - uses: actions/checkout@v2 From cc77472189bcfe8a39908da52193aa0223869c65 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 12:59:31 -0400 Subject: [PATCH 03/12] Update ci.yml#on --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce53411..3f03cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,8 @@ on: branches: - main - master + schedule: + - cron: '0 3 * * 0' # every Sunday at 3am jobs: lint: From f42abb1515ff22fd4a61de9143143b88704571b9 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 13:30:33 -0400 Subject: [PATCH 04/12] Polyfill testdouble support --- tests/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/index.html b/tests/index.html index 3eb848d..a73e775 100644 --- a/tests/index.html +++ b/tests/index.html @@ -16,6 +16,13 @@ {{content-for "head-footer"}} {{content-for "test-head-footer"}} + + {{content-for "body"}} From a579e89e8c9b6fffff66e877eddb5b7ce53db212 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 13:51:53 -0400 Subject: [PATCH 05/12] Set max timeout minutes to 10 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f03cdb..fc1bf7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,7 @@ jobs: test: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v2 @@ -77,6 +78,7 @@ jobs: ember-try: runs-on: ubuntu-latest needs: ['lint', 'test'] + timeout-minutes: 10 strategy: matrix: ember-try-scenario: From 4664a96a28a3844c68881b5d35b93fe731c15cfb Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 14:02:29 -0400 Subject: [PATCH 06/12] Add custom packageRule for inline-component defined in tests --- ember-cli-build.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ember-cli-build.js b/ember-cli-build.js index 279cc9e..8552b0d 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -31,5 +31,14 @@ module.exports = function (defaults) { const { maybeEmbroider } = require('@embroider/test-setup'); - return maybeEmbroider(app); + return maybeEmbroider(app, { + packageRules: [ + { + package: 'dummy', + components: { + '{{debug}}': { safeToIgnore: true }, + }, + }, + ], + }); }; From 718f6156acb13f3d4a607fb549ca37d31e415ee4 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 14:22:12 -0400 Subject: [PATCH 07/12] Add custom packageRule for inline-component defined in tests --- ember-cli-build.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ember-cli-build.js b/ember-cli-build.js index 8552b0d..c051795 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -37,6 +37,7 @@ module.exports = function (defaults) { package: 'dummy', components: { '{{debug}}': { safeToIgnore: true }, + '{{link-to}}': { safeToIgnore: true }, }, }, ], From a8729778ff122c97bac95c7a67dff417a53de1e2 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 15:19:15 -0400 Subject: [PATCH 08/12] Temporarily remove ember-cli-deprecation-workflow so that we can see what else could be needed --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 402bd46..31f673e 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "dotenv-cli": "^4.0.0", "ember-cli": "~3.28.4", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-deprecation-workflow": "^2.0.0", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-postcss": "^7.0.2", "ember-cli-sri": "^2.1.1", From 944fdd1a65f0a8fce34f61b208189447ced06901 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Oct 2021 15:35:57 -0400 Subject: [PATCH 09/12] Try re-adding ember-test-selectors and try out secret option to disable the code that broke under embroider --- ember-cli-build.js | 9 ++------- yarn.lock | 18 ++++-------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/ember-cli-build.js b/ember-cli-build.js index c051795..01b714d 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -4,13 +4,8 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function (defaults) { let app = new EmberAddon(defaults, { - autoImport: { - webpack: { - node: { - // Required to import `testdouble` in tests - global: true, - }, - }, + 'ember-test-selectors': { + patchClassicComponent: false, }, postcssOptions: { diff --git a/yarn.lock b/yarn.lock index 2155b83..8a93448 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3038,7 +3038,7 @@ babel-plugin-filter-imports@^4.0.0: "@babel/types" "^7.7.2" lodash "^4.17.15" -babel-plugin-htmlbars-inline-precompile@^5.0.0, babel-plugin-htmlbars-inline-precompile@^5.2.1, babel-plugin-htmlbars-inline-precompile@^5.3.0: +babel-plugin-htmlbars-inline-precompile@^5.2.1, babel-plugin-htmlbars-inline-precompile@^5.3.0: version "5.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-5.3.1.tgz#5ba272e2e4b6221522401f5f1d98a73b1de38787" integrity sha512-QWjjFgSKtSRIcsBhJmEwS2laIdrA6na8HAlc/pEAhjHgQsah/gMiBFRZvbQTy//hWxR4BMwV7/Mya7q5H8uHeA== @@ -3708,7 +3708,7 @@ broccoli-plugin@^2.1.0: rimraf "^2.3.4" symlink-or-copy "^1.1.8" -broccoli-plugin@^4.0.0, broccoli-plugin@^4.0.2, broccoli-plugin@^4.0.3, broccoli-plugin@^4.0.5, broccoli-plugin@^4.0.7: +broccoli-plugin@^4.0.0, broccoli-plugin@^4.0.2, broccoli-plugin@^4.0.3, broccoli-plugin@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-4.0.7.tgz#dd176a85efe915ed557d913744b181abe05047db" integrity sha512-a4zUsWtA1uns1K7p9rExYVYG99rdKeGRymW0qOCNkvDPHQxVi3yVyJHhQbM3EZwdt2E0mnhr5e0c/bPpJ7p3Wg== @@ -5344,22 +5344,12 @@ ember-cli-dependency-checker@^3.2.0: resolve "^1.5.0" semver "^5.3.0" -ember-cli-deprecation-workflow@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ember-cli-deprecation-workflow/-/ember-cli-deprecation-workflow-2.1.0.tgz#f0d38ece7ac0ab7b3f83790a3a092e3472f58cff" - integrity sha512-Ay9P9iKMJdY4Gq5XPowh3HqqeAzLfwBRj1oB1ZKkDW1fryZQWBN4pZuRnjnB+3VWZjBnZif5e7Pacc7YNW9hWg== - dependencies: - broccoli-funnel "^3.0.3" - broccoli-merge-trees "^4.2.0" - broccoli-plugin "^4.0.5" - ember-cli-htmlbars "^5.3.2" - ember-cli-get-component-path-option@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ember-cli-get-component-path-option/-/ember-cli-get-component-path-option-1.0.0.tgz#0d7b595559e2f9050abed804f1d8eff1b08bc771" integrity sha1-DXtZVVni+QUKvtgE8djv8bCLx3E= -ember-cli-htmlbars@^5.1.0, ember-cli-htmlbars@^5.3.1, ember-cli-htmlbars@^5.3.2, ember-cli-htmlbars@^5.7.1: +ember-cli-htmlbars@^5.1.0, ember-cli-htmlbars@^5.3.1, ember-cli-htmlbars@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-5.7.1.tgz#eb5b88c7d9083bc27665fb5447a9b7503b32ce4f" integrity sha512-9laCgL4tSy48orNoQgQKEHp93MaqAs9ZOl7or5q+8iyGGJHW6sVXIYrVv5/5O9HfV6Ts8/pW1rSoaeKyLUE+oA== @@ -5938,7 +5928,7 @@ ember-template-recast@^5.0.3: ember-test-selectors@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/ember-test-selectors/-/ember-test-selectors-6.0.0.tgz#ba9bb19550d9dec6e4037d86d2b13c2cfd329341" + resolved "https://registry.npmjs.org/ember-test-selectors/-/ember-test-selectors-6.0.0.tgz#ba9bb19550d9dec6e4037d86d2b13c2cfd329341" integrity sha512-PgYcI9PeNvtKaF0QncxfbS68olMYM1idwuI8v/WxsjOGqUx5bmsu6V17vy/d9hX4mwmjgsBhEghrVasGSuaIgw== dependencies: calculate-cache-key-for-tree "^2.0.0" From e0790ae103572d5904edf4465db81ab420ce6783 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 12 Dec 2021 12:03:19 -0500 Subject: [PATCH 10/12] Remove ember-cli-dependency-checker --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 31f673e..7de75f6 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "broccoli-asset-rev": "^3.0.0", "dotenv-cli": "^4.0.0", "ember-cli": "~3.28.4", - "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-postcss": "^7.0.2", "ember-cli-sri": "^2.1.1", From dab4a2def45529e22c80560effbb5cb1c9b2be03 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 12 Dec 2021 15:11:42 -0500 Subject: [PATCH 11/12] Upgrade some deps --- package.json | 2 +- yarn.lock | 43 ++++++++++++------------------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 7de75f6..6a8ae35 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "testdouble": "^3.16.1", "testdouble-qunit": "^3.0.0", "typescript": "^4.4.3", - "webpack": "^5.64.1" + "webpack": "^5.65.0" }, "resolutions": { "@embroider/core": "^0.43.5", diff --git a/yarn.lock b/yarn.lock index 8a93448..aca8212 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3038,7 +3038,7 @@ babel-plugin-filter-imports@^4.0.0: "@babel/types" "^7.7.2" lodash "^4.17.15" -babel-plugin-htmlbars-inline-precompile@^5.2.1, babel-plugin-htmlbars-inline-precompile@^5.3.0: +babel-plugin-htmlbars-inline-precompile@^5.0.0, babel-plugin-htmlbars-inline-precompile@^5.2.1, babel-plugin-htmlbars-inline-precompile@^5.3.0: version "5.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-5.3.1.tgz#5ba272e2e4b6221522401f5f1d98a73b1de38787" integrity sha512-QWjjFgSKtSRIcsBhJmEwS2laIdrA6na8HAlc/pEAhjHgQsah/gMiBFRZvbQTy//hWxR4BMwV7/Mya7q5H8uHeA== @@ -4159,7 +4159,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -5333,17 +5333,6 @@ ember-cli-babel@^7.0.0, ember-cli-babel@^7.1.0, ember-cli-babel@^7.10.0, ember-c rimraf "^3.0.1" semver "^5.5.0" -ember-cli-dependency-checker@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ember-cli-dependency-checker/-/ember-cli-dependency-checker-3.2.0.tgz#9202ad9e14d6fda33cffc22a11c343c2a8885330" - integrity sha512-dkSmcJ/jY/2ms/S6ph2jXSfOW5VfOpLfg5DFEbra0SaMNgYkNDFF1o0U4OdTsG37L5h/AXWNuVtnOa4TMabz9Q== - dependencies: - chalk "^2.3.0" - find-yarn-workspace-root "^1.1.0" - is-git-url "^1.0.0" - resolve "^1.5.0" - semver "^5.3.0" - ember-cli-get-component-path-option@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ember-cli-get-component-path-option/-/ember-cli-get-component-path-option-1.0.0.tgz#0d7b595559e2f9050abed804f1d8eff1b08bc771" @@ -6896,14 +6885,6 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-yarn-workspace-root@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" - integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== - dependencies: - fs-extra "^4.0.3" - micromatch "^3.1.4" - find-yarn-workspace-root@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" @@ -7077,7 +7058,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^4.0.2, fs-extra@^4.0.3: +fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== @@ -13285,10 +13266,10 @@ watchpack@^1.7.4: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" -watchpack@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce" - integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA== +watchpack@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" + integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -13357,10 +13338,10 @@ webpack@^4.43.0: watchpack "^1.7.4" webpack-sources "^1.4.1" -webpack@^5.64.1: - version "5.64.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.1.tgz#fd59840c16f04fe315f2b2598a85026f12dfa1bb" - integrity sha512-b4FHmRgaaAjP+aVOVz41a9Qa5SmkUPQ+u8FntTQ1roPHahSComB6rXnLwc976VhUY4CqTaLu5mCswuHiNhOfVw== +webpack@^5.65.0: + version "5.65.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz#ed2891d9145ba1f0d318e4ea4f89c3fa18e6f9be" + integrity sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -13384,7 +13365,7 @@ webpack@^5.64.1: schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.2.0" + watchpack "^2.3.1" webpack-sources "^3.2.2" websocket-driver@>=0.5.1: From 8f11cc1c453415a6a944f942238f59681fe6d7aa Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 12 Dec 2021 22:23:28 -0500 Subject: [PATCH 12/12] Testdouble does not have a default export --- tests/assertions/testdouble.js | 2 +- tests/integration/components/transition-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/assertions/testdouble.js b/tests/assertions/testdouble.js index 38f84c2..c6db175 100644 --- a/tests/assertions/testdouble.js +++ b/tests/assertions/testdouble.js @@ -1,6 +1,6 @@ import * as QUnit from 'qunit'; -import td from 'testdouble'; +import * as td from 'testdouble'; import installVerifyAssertion from 'testdouble-qunit'; installVerifyAssertion(QUnit, td); diff --git a/tests/integration/components/transition-test.js b/tests/integration/components/transition-test.js index 998e040..ce5bef3 100644 --- a/tests/integration/components/transition-test.js +++ b/tests/integration/components/transition-test.js @@ -5,7 +5,7 @@ import { setupRenderingTest } from 'ember-qunit'; import { ARG_SHOW_MISSING_ERROR_MESSAGE } from 'ember-headlessui/components/transition'; import { PARENT_MISSING_ERROR_MESSAGE } from 'ember-headlessui/components/transition/child'; -import td from 'testdouble'; +import * as td from 'testdouble'; module('Integration | Component | transition', function (hooks) { setupRenderingTest(hooks);