Skip to content

Commit

Permalink
the deprecation app only supports dasherized lowercase URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed May 6, 2024
1 parent 70d0ca8 commit 703a25b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/@ember/-internals/deprecations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { DeprecationOptions } from '@ember/debug/lib/deprecate';
import { ENV } from '@ember/-internals/environment';
import { VERSION } from '@ember/version';
import { deprecate, assert } from '@ember/debug';
import { dasherize } from '../string/index';

function isEnabled(options: DeprecationOptions) {
return Object.hasOwnProperty.call(options.since, 'enabled') || ENV._ALL_DEPRECATIONS_ENABLED;
Expand Down Expand Up @@ -92,11 +93,13 @@ function deprecation(options: DeprecationOptions) {
export const DEPRECATIONS = {
DEPRECATE_IMPORT_EMBER(importName: string) {
return deprecation({
id: `deprecate-import-${importName}-from-ember`,
id: `deprecate-import-${dasherize(importName).toLowerCase()}-from-ember`,
for: 'ember-source',
since: { available: '5.9.0' },
until: '6.0.0',
url: `https://deprecations.emberjs.com/id/import-${importName}-from-ember`,
url: `https://deprecations.emberjs.com/id/import-${dasherize(
importName
).toLowerCase()}-from-ember`,
});
},
DEPRECATE_IMPLICIT_ROUTE_MODEL: deprecation({
Expand Down

0 comments on commit 703a25b

Please sign in to comment.