Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix watch dependencies with BROCCOLI_ENABLED_MEMOIZE=true #652

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ember-auto-import/ts/inserter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
16 changes: 15 additions & 1 deletion packages/ember-auto-import/ts/tests/inserter-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> | 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;
Expand All @@ -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,
Expand Down
12 changes: 4 additions & 8 deletions test-scenarios/customized-vendor-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,8 @@ 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`
.only('lts')
.expand({
'customized-vendor-nested': project => customVendorTest(project, '/js/vendor.js'),
'customized-vendor-top': project => customVendorTest(project, '/top-level-vendor.js'),
Expand All @@ -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');
})
Expand Down