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

[CLEANUP beta] Drop export of built-ins, remove legacy components #19806

Merged
merged 1 commit into from Nov 10, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/@ember/-internals/glimmer/index.ts
Expand Up @@ -295,11 +295,8 @@
export { templateFactory as template, templateCacheCounters } from '@glimmer/opcode-compiler';

export { default as RootTemplate } from './lib/templates/root';
export { default as Checkbox } from './lib/components/checkbox';
export { default as TextField } from './lib/components/text-field';
export { default as TextArea } from './lib/components/-textarea';
export { default as LinkComponent } from './lib/components/-link-to';
export { default as Input } from './lib/components/input';
export { default as LinkTo } from './lib/components/link-to';
mixonic marked this conversation as resolved.
Show resolved Hide resolved
export { default as Textarea } from './lib/components/textarea';
export { default as Component } from './lib/component';
export { default as Helper, helper } from './lib/helper';
Expand Down
72 changes: 2 additions & 70 deletions packages/@ember/-internals/glimmer/lib/component.ts
@@ -1,6 +1,6 @@
import { get, PROPERTY_DID_CHANGE } from '@ember/-internals/metal';
import { getOwner } from '@ember/-internals/owner';
import { CoreObject, TargetActionSupport } from '@ember/-internals/runtime';
import { TargetActionSupport } from '@ember/-internals/runtime';
import {
ActionSupport,
ChildViewsSupport,
Expand All @@ -11,8 +11,7 @@ import {
ViewMixin,
ViewStateSupport,
} from '@ember/-internals/views';
import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { assert, deprecate } from '@ember/debug';
import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { Environment } from '@glimmer/interfaces';
import { setInternalComponentManager } from '@glimmer/manager';
Expand Down Expand Up @@ -1044,71 +1043,4 @@ Component.reopenClass({

setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);

if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
Object.defineProperty(Component, '_wasReopened', {
configurable: true,
enumerable: false,
writable: true,
value: false,
});

Object.defineProperty(Component, 'reopen', {
configurable: true,
enumerable: false,
writable: true,
value: function reopen(this: typeof Component, ...args: unknown[]): unknown {
if (this === Component) {
deprecate(
'Reopening the Ember.Component super class itself is deprecated. ' +
'Consider alternatives such as installing event listeners on ' +
'the document or add the customizations to specific subclasses.',
false,
{
id: 'ember.component.reopen',
for: 'ember-source',
since: {
enabled: '3.27.0',
},
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
until: '4.0.0',
}
);

Component._wasReopened = true;
}

return CoreObject.reopen.call(this, ...args);
},
});

Object.defineProperty(Component, 'reopenClass', {
configurable: true,
enumerable: false,
writable: true,
value: function reopenClass(this: typeof Component, ...args: unknown[]): unknown {
if (this === Component) {
deprecate(
'Reopening the Ember.Component super class itself is deprecated. ' +
'Consider alternatives such as installing event listeners on ' +
'the document or add the customizations to specific subclasses.',
false,
{
id: 'ember.component.reopen',
for: 'ember-source',
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
since: {
enabled: '3.27.0',
},
until: '4.0.0',
}
);

Component._wasReopened = true;
}

return CoreObject.reopenClass.call(this, ...args);
},
});
}

export default Component;