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

Pre-build-reform cleanups #20688

Merged
merged 3 commits into from
Apr 30, 2024
Merged
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/-internals/container/lib/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class Registry {
readonly _resolveCache: Record<string, InternalFactory<object> | object>;
readonly _typeOptions: Record<string, RegisterOptions>;

set?: typeof set;
declare set?: typeof set;

constructor(options: RegistryOptions = {}) {
this.fallback = options.fallback || null;
Expand Down
10 changes: 2 additions & 8 deletions packages/@ember/-internals/glimmer/lib/utils/managers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import type { InternalOwner } from '@ember/-internals/owner';
import type { ComponentManager } from '@glimmer/interfaces';
import {
componentCapabilities as glimmerComponentCapabilities,
modifierCapabilities as glimmerModifierCapabilities,
setComponentManager as glimmerSetComponentManager,
} from '@glimmer/manager';
import { setComponentManager as glimmerSetComponentManager } from '@glimmer/manager';
export { modifierCapabilities, componentCapabilities } from '@glimmer/manager';

/**
Associate a class with a component manager (an object that is responsible for
Expand All @@ -23,6 +20,3 @@ export function setComponentManager<T extends object>(
): T {
return glimmerSetComponentManager(manager, obj);
}

export let componentCapabilities = glimmerComponentCapabilities;
export let modifierCapabilities = glimmerModifierCapabilities;
Original file line number Diff line number Diff line change
Expand Up @@ -2537,7 +2537,7 @@ moduleFor(
template: '<div id="inner-value">{{this.wrapper.content}}</div>',
});

let expectedBacktrackingMessage = backtrackingMessageFor('content', 'Wrapper', {
let expectedBacktrackingMessage = backtrackingMessageFor('content', Wrapper.name, {
renderTree: ['x-outer', 'this.wrapper.content'],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class ModifierManagerTest extends RenderingTestCase {
}
);

let expectedMessage = backtrackingMessageFor('name', 'Person', {
let expectedMessage = backtrackingMessageFor('name', Person.name, {
renderTree: ['\\(instance of a `foo-bar` modifier\\)'],
includeTopLevel: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,18 +364,21 @@ moduleFor(
}

['@test gives helpful assertion when a tracked property is mutated after access in with an autotracking transaction']() {
class EmberObject {
class MyObject {
@tracked value;
toString() {
return 'MyObject';
}
}

let obj = new EmberObject();
let obj = new MyObject();

expectAssertion(() => {
track(() => {
obj.value;
obj.value = 123;
});
}, /You attempted to update `value` on `EmberObject`, but it had already been used previously in the same computation/);
}, /You attempted to update `value` on `MyObject`, but it had already been used previously in the same computation/);
}

['@test get() does not entangle in the autotracking stack until after retrieving the value'](
Expand Down
Loading