Skip to content

Commit 1f420ce

Browse files
author
Mehul Kar
committed
Add for and since options to depreacte() function
This implements the first stage of the Deprecation Staging RFC emberjs/rfcs#649 This commit also: - deprecates the usage of deprecate() function without passing these options - Updates all the usages of deprecate() in the repo to pass these options.
1 parent ec74ab4 commit 1f420ce

File tree

20 files changed

+313
-11
lines changed

20 files changed

+313
-11
lines changed

packages/@ember/-internals/glimmer/lib/component.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,10 @@ const Component = CoreView.extend(
752752
id: 'ember-views.event-dispatcher.mouseenter-leave-move',
753753
until: '4.0.0',
754754
url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move',
755+
for: 'ember-source',
756+
since: {
757+
enabled: '3.13.0-beta.1',
758+
},
755759
}
756760
);
757761
deprecate(
@@ -761,6 +765,10 @@ const Component = CoreView.extend(
761765
id: 'ember-views.event-dispatcher.mouseenter-leave-move',
762766
until: '4.0.0',
763767
url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move',
768+
for: 'ember-source',
769+
since: {
770+
enabled: '3.13.0-beta.1',
771+
},
764772
}
765773
);
766774
deprecate(
@@ -770,6 +778,10 @@ const Component = CoreView.extend(
770778
id: 'ember-views.event-dispatcher.mouseenter-leave-move',
771779
until: '4.0.0',
772780
url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move',
781+
for: 'ember-source',
782+
since: {
783+
enabled: '3.13.0-beta.1',
784+
},
773785
}
774786
);
775787
},

packages/@ember/-internals/glimmer/lib/environment.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ if (DEBUG) {
6464
deprecate(message, false, {
6565
id: 'autotracking.mutation-after-consumption',
6666
until: '4.0.0',
67+
for: 'ember-source',
68+
since: {
69+
enabled: '3.21.0',
70+
},
6771
});
6872
},
6973

packages/@ember/-internals/glimmer/lib/helpers/action.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ function makeClosureAction(
415415
{
416416
until: '3.25.0',
417417
id: 'actions.custom-invoke-invokable',
418+
for: 'ember-source',
419+
since: {
420+
enabled: '3.23.0-beta.1',
421+
},
418422
}
419423
);
420424

packages/@ember/-internals/glimmer/lib/modifiers/action.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ export class ActionState {
156156
{
157157
until: '3.25.0',
158158
id: 'actions.custom-invoke-invokable',
159+
for: 'ember-source',
160+
since: {
161+
enabled: '3.23.0-beta.1',
162+
},
159163
}
160164
);
161165

@@ -226,6 +230,10 @@ export default class ActionModifierManager implements ModifierManager<ActionStat
226230
id: 'ember-views.event-dispatcher.mouseenter-leave-move',
227231
until: '4.0.0',
228232
url: 'https://emberjs.com/deprecations/v3.x#toc_action-mouseenter-leave-move',
233+
for: 'ember-source',
234+
since: {
235+
enabled: '3.13.0-beta.1',
236+
},
229237
}
230238
);
231239

packages/@ember/-internals/glimmer/lib/resolver.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ if (PARTIALS) {
149149
id: 'ember-views.partial',
150150
until: '4.0.0',
151151
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-views-partial',
152+
for: 'ember-source',
153+
since: {
154+
enabled: '3.15.0-beta.1',
155+
},
152156
}
153157
);
154158

packages/@ember/-internals/glimmer/lib/utils/bindings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ if (EMBER_COMPONENT_IS_VISIBLE) {
112112
id: 'ember-component.is-visible',
113113
until: '4.0.0',
114114
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-is-visible',
115+
for: 'ember-source',
116+
since: {
117+
enabled: '3.15.0-beta.1',
118+
},
115119
}
116120
);
117121
}

packages/@ember/-internals/glimmer/lib/utils/managers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ export function setComponentManager(
171171
id: 'deprecate-string-based-component-manager',
172172
until: '4.0.0',
173173
url: 'https://emberjs.com/deprecations/v3.x/#toc_component-manager-string-lookup',
174+
for: 'ember-source',
175+
since: {
176+
enabled: '3.8.0',
177+
},
174178
}
175179
);
176180
factory = function (owner: Owner) {

packages/@ember/-internals/meta/lib/meta.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ export class Meta {
144144
{
145145
id: 'meta-destruction-apis',
146146
until: '3.25.0',
147+
for: 'ember-source',
148+
since: {
149+
enabled: '3.21.0',
150+
},
147151
}
148152
);
149153
}
@@ -155,6 +159,10 @@ export class Meta {
155159
{
156160
id: 'meta-destruction-apis',
157161
until: '3.25.0',
162+
for: 'ember-source',
163+
since: {
164+
enabled: '3.21.0',
165+
},
158166
}
159167
);
160168
}
@@ -166,6 +174,10 @@ export class Meta {
166174
{
167175
id: 'meta-destruction-apis',
168176
until: '3.25.0',
177+
for: 'ember-source',
178+
since: {
179+
enabled: '3.21.0',
180+
},
169181
}
170182
);
171183

@@ -179,6 +191,10 @@ export class Meta {
179191
{
180192
id: 'meta-destruction-apis',
181193
until: '3.25.0',
194+
for: 'ember-source',
195+
since: {
196+
enabled: '3.21.0',
197+
},
182198
}
183199
);
184200

packages/@ember/-internals/metal/lib/chain-tags.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ function getChainTags(
109109
{
110110
until: '3.17.0',
111111
id: 'ember-metal.computed-deep-each',
112+
for: 'ember-source',
113+
since: {
114+
enabled: '3.13.0-beta.3',
115+
},
112116
}
113117
);
114118

packages/@ember/-internals/metal/lib/computed.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ export class ComputedProperty extends ComputedDescriptor {
507507
id: 'computed-property.override',
508508
until: '4.0.0',
509509
url: 'https://emberjs.com/deprecations/v3.x#toc_computed-property-override',
510+
for: 'ember-source',
511+
since: {
512+
enabled: '3.9.0-beta.1',
513+
},
510514
}
511515
);
512516

@@ -715,6 +719,10 @@ class ComputedDecoratorImpl extends Function {
715719
id: 'computed-property.volatile',
716720
until: '4.0.0',
717721
url: 'https://emberjs.com/deprecations/v3.x#toc_computed-property-volatile',
722+
for: 'ember-source',
723+
since: {
724+
enabled: '3.9.0-beta.1',
725+
},
718726
}
719727
);
720728
(descriptorForDecorator(this) as ComputedProperty)._volatile = true;
@@ -786,6 +794,10 @@ class ComputedDecoratorImpl extends Function {
786794
id: 'computed-property.property',
787795
until: '4.0.0',
788796
url: 'https://emberjs.com/deprecations/v3.x#toc_computed-property-property',
797+
for: 'ember-source',
798+
since: {
799+
enabled: '3.9.0-beta.1',
800+
},
789801
}
790802
);
791803
(descriptorForDecorator(this) as ComputedProperty)._property(...keys);

0 commit comments

Comments
 (0)