Skip to content

Commit

Permalink
Merge pull request #20688 from emberjs/tidy
Browse files Browse the repository at this point in the history
Pre-build-reform cleanups
  • Loading branch information
ef4 committed Apr 30, 2024
2 parents 5c8df04 + 50f06a7 commit 12f617e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/@ember/-internals/container/lib/registry.ts
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
@@ -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;
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
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
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

0 comments on commit 12f617e

Please sign in to comment.