From 32bca78e4ed7473403f3ffe135b20ae3fe5ff097 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Thu, 5 Dec 2024 14:18:53 +0100 Subject: [PATCH 1/4] fix watch dependencies with BROCCOLI_ENABLED_MEMOIZE=true --- packages/ember-auto-import/ts/inserter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ember-auto-import/ts/inserter.ts b/packages/ember-auto-import/ts/inserter.ts index 4e350a8f..6ba95097 100644 --- a/packages/ember-auto-import/ts/inserter.ts +++ b/packages/ember-auto-import/ts/inserter.ts @@ -33,7 +33,7 @@ export class Inserter extends Plugin { private config: BundleConfig, private options: InserterOptions ) { - super([allApp], { + super([allApp, bundler], { annotation: 'ember-auto-import-inserter', persistentOutput: true, }); From 3156cb5c4f01507bf573a20bc2a33d6ed2d5b9bb Mon Sep 17 00:00:00 2001 From: patrickpircher Date: Fri, 6 Dec 2024 09:29:02 +0100 Subject: [PATCH 2/4] fix unit tests --- .../ember-auto-import/ts/tests/inserter-test.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/ember-auto-import/ts/tests/inserter-test.ts b/packages/ember-auto-import/ts/tests/inserter-test.ts index 38efcc1e..cdd61fb2 100644 --- a/packages/ember-auto-import/ts/tests/inserter-test.ts +++ b/packages/ember-auto-import/ts/tests/inserter-test.ts @@ -14,8 +14,22 @@ import { join } from 'path'; import { Inserter } from '../inserter'; import BundleConfig from '../bundle-config'; import { BuildResult, Bundler } from '../bundler'; +import Plugin from 'broccoli-plugin'; + const { module: Qmodule, test } = QUnit; +class NoopPlugin extends Plugin { + build(): Promise | void { + // noop + } +} + +function asInputNode(obj: any) { + const plugin = new NoopPlugin([]); + Object.assign(plugin, obj); + return plugin as Bundler; +} + Qmodule('inserter', function (hooks) { let builder: Builder; let upstream: string; @@ -28,7 +42,7 @@ Qmodule('inserter', function (hooks) { async function build() { let inserter = new Inserter( new UnwatchedDir(upstream), - { buildResult } as Bundler, + asInputNode({ buildResult }), bundleConfig, { publicAssetURL, From 9ee1d02b6bd042662fe76ce37debe90fd5e8a063 Mon Sep 17 00:00:00 2001 From: patrickpircher Date: Fri, 6 Dec 2024 11:41:15 +0100 Subject: [PATCH 3/4] fix test --- test-scenarios/customized-vendor-test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-scenarios/customized-vendor-test.ts b/test-scenarios/customized-vendor-test.ts index d93ec861..9ecaaf8d 100644 --- a/test-scenarios/customized-vendor-test.ts +++ b/test-scenarios/customized-vendor-test.ts @@ -124,10 +124,10 @@ function customVendorTest(project: Project, vendorPath: string) { } appScenarios - // ember-cli 2.18 has bugs that don't let it actually work with customized - // vendor paths. When we bump the lts scenario to something newer we can - // drop this check. - .skip('lts') + // ember-cli 6 has removed custom `outputPaths` + .skip('canary') + .skip('beta') + .skip('release') .expand({ 'customized-vendor-nested': project => customVendorTest(project, '/js/vendor.js'), 'customized-vendor-top': project => customVendorTest(project, '/top-level-vendor.js'), From 7c0bd005a3aaec2b456214d6caa993f480c6bbcf Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Fri, 6 Dec 2024 12:31:35 +0100 Subject: [PATCH 4/4] only lts --- test-scenarios/customized-vendor-test.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test-scenarios/customized-vendor-test.ts b/test-scenarios/customized-vendor-test.ts index 9ecaaf8d..beebb512 100644 --- a/test-scenarios/customized-vendor-test.ts +++ b/test-scenarios/customized-vendor-test.ts @@ -125,9 +125,7 @@ function customVendorTest(project: Project, vendorPath: string) { appScenarios // ember-cli 6 has removed custom `outputPaths` - .skip('canary') - .skip('beta') - .skip('release') + .only('lts') .expand({ 'customized-vendor-nested': project => customVendorTest(project, '/js/vendor.js'), 'customized-vendor-top': project => customVendorTest(project, '/top-level-vendor.js'), @@ -146,10 +144,8 @@ appScenarios }); appScenarios - // ember-cli 2.18 has bugs that don't let it actually work with customized - // vendor paths. When we bump the lts scenario to something newer we can - // drop this check. - .skip('lts') + // ember-cli 6 has removed custom `outputPaths` + .only('lts') .map('customized-vendor-fastboot', project => { customVendorTest(project, '/js/vendor.js'); })