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

Enable currently available deprecations #19316

Merged
merged 5 commits into from
Dec 18, 2020
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/utils/lib/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function tryInvoke(
until: '4.0.0',
for: 'ember-source',
since: {
available: '3.24.0',
enabled: '3.24.0',
},
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-utils-try-invoke',
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@ember/debug/lib/deprecate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ if (DEBUG) {
until: '4.0.0',
for: 'ember-source',
since: {
available: '3.24.0',
enabled: '3.24.0',
},
});
}
Expand All @@ -226,7 +226,7 @@ if (DEBUG) {
until: '4.0.0',
for: 'ember-source',
since: {
available: '3.24.0',
enabled: '3.24.0',
},
});
}
Expand Down
29 changes: 14 additions & 15 deletions packages/@ember/debug/tests/main_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
assert.ok(true, 'deprecate did not throw');
} catch (e) {
Expand All @@ -86,7 +86,7 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
assert.ok(true, 'deprecate did not throw');
} catch (e) {
Expand All @@ -100,7 +100,7 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
}, /Should throw/);
}
Expand All @@ -122,7 +122,7 @@ moduleFor(
id: 'my-deprecation',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
assert.ok(true, 'Did not throw when level is set by id');
} catch (e) {
Expand All @@ -134,7 +134,7 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
}, /Should throw with no matching id/);

Expand All @@ -143,7 +143,7 @@ moduleFor(
id: 'other-id',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
}, /Should throw with non-matching id/);
}
Expand All @@ -156,23 +156,23 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
})
);
assert.throws(() =>
deprecate('Deprecation is thrown', '', {
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
})
);
assert.throws(() =>
deprecate('Deprecation is thrown', 0, {
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
})
);
}
Expand All @@ -185,7 +185,7 @@ moduleFor(
function () {
assert.ok(false, 'this function should not be invoked');
},
{ id: 'test', until: 'forever', for: 'me', since: { available: '1.0.0' } }
{ id: 'test', until: 'forever', for: 'me', since: { enabled: '1.0.0' } }
);

assert.ok(true, 'deprecations were not thrown');
Expand All @@ -198,19 +198,19 @@ moduleFor(
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
deprecate('Deprecation is thrown', '1', {
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});
deprecate('Deprecation is thrown', 1, {
id: 'test',
until: 'forever',
for: 'me',
since: { available: '1.0.0' },
since: { enabled: '1.0.0' },
});

assert.ok(true, 'deprecations were not thrown');
Expand Down Expand Up @@ -311,8 +311,7 @@ moduleFor(
assert.expect(1);

assert.throws(
() =>
deprecate('foo', false, { until: 'forever', for: 'me', since: { available: '1.0.0' } }),
() => deprecate('foo', false, { until: 'forever', for: 'me', since: { enabled: '1.0.0' } }),
new RegExp(missingOptionsIdDeprecation),
'proper assertion is triggered when options.id is missing'
);
Expand Down
4 changes: 2 additions & 2 deletions packages/@ember/string/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function loc(str: string, formats: any[]): string {
for: 'ember-source',
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-string-loc',
since: {
available: '3.24',
enabled: '3.24',
},
}
);
Expand Down Expand Up @@ -305,7 +305,7 @@ if (ENV.EXTEND_PROTOTYPES.String) {
id: 'ember-string.prototype-extensions',
for: 'ember-source',
since: {
available: '3.24',
enabled: '3.24',
},
until: '4.0.0',
url: 'https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions',
Expand Down