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

ci: adds no deprecations workflow #1290

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
- ember-canary
- embroider-safe
- embroider-optimized
- no-deprecations
- ember-release-no-deprecations

steps:
- uses: actions/checkout@v4
Expand Down
17 changes: 17 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ module.exports = async function () {
},
embroiderSafe(),
embroiderOptimized(),
{
name: 'no-deprecations',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this should be added to the github action workflow (probably in the allowed to fail section 😂) so we actually run it with CI

Also I tend to also add an ember-release-no-deprecations one too that lets us know if we're getting new deprecations that we would need to deal with https://github.com/mansona/ember-cli-notifications/blob/main/test-app/config/ember-try.js#L133-L141 but that's probably getting ahead of ourselves 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added 👍

npm: {
devDependencies: {
'ember-deprecation-error': '*',
},
},
},
{
name: 'ember-release-no-deprecations',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
'ember-deprecation-error': '*',
},
},
},
],
};
};
13 changes: 8 additions & 5 deletions tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
/* eslint-disable ember/no-actions-hash, prettier/prettier */
/* eslint-disable ember/no-actions-hash */
import { equal } from '@ember/object/computed';
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';

export default Controller.extend({
router: service(),

actions: {
toggleExpandedItem(value, ev) {
if (this.expandedItem === value) {
value = null;
}
this.set('expandedItem', value);
ev.stopPropagation();
}
},
},

expandedItem: computed('currentRouteName', function() {
if (this.currentRouteName.substr(0, 6) === 'layout') {
expandedItem: computed('router.currentRouteName', function () {
if (this.router.currentRouteName.substr(0, 6) === 'layout') {
return 'layout';
} else {
return 'demos';
}
}),

demosExpanded: equal('expandedItem', 'demos'),
layoutExpanded: equal('expandedItem', 'layout')
layoutExpanded: equal('expandedItem', 'layout'),
});
68 changes: 34 additions & 34 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,54 @@
<PaperContent>

<PaperList>
<MenuItem @active={{is-active "index" this.currentRouteName}} @href={{href-to "index"}}>Introduction</MenuItem>
<MenuItem @active={{is-active "index" this.router.currentRouteName}} @href={{href-to "index"}}>Introduction</MenuItem>

<MenuItem @onClick={{action "toggleExpandedItem" "demos"}} @expanded={{this.demosExpanded}} @canExpand={{true}}>Components</MenuItem>

<div class="submenu">
{{#liquid-if this.demosExpanded}}
<SubmenuItem @active={{is-active "demo.autocomplete" this.currentRouteName}} @href={{href-to "demo.autocomplete"}}>Autocomplete</SubmenuItem>
<SubmenuItem @active={{is-active "demo.button" this.currentRouteName}} @href={{href-to "demo.button"}}>Button</SubmenuItem>
<SubmenuItem @active={{is-active "demo.card" this.currentRouteName}} @href={{href-to "demo.card"}}>Card</SubmenuItem>
<SubmenuItem @active={{is-active "demo.checkbox" this.currentRouteName}} @href={{href-to "demo.checkbox"}}>Checkbox</SubmenuItem>
<SubmenuItem @active={{is-active "demo.chips" this.currentRouteName}} @href={{href-to "demo.chips"}}>Chips</SubmenuItem>
<SubmenuItem @active={{is-active "demo.dialog" this.currentRouteName}} @href={{href-to "demo.dialog"}}>Dialog</SubmenuItem>
<SubmenuItem @active={{is-active "demo.divider" this.currentRouteName}} @href={{href-to "demo.divider"}}>Divider</SubmenuItem>
<SubmenuItem @active={{is-active "demo.grid-list" this.currentRouteName}} @href={{href-to "demo.grid-list"}}>Grid List</SubmenuItem>
<SubmenuItem @active={{is-active "demo.icons" this.currentRouteName}} @href={{href-to "demo.icons"}}>Icons</SubmenuItem>
<SubmenuItem @active={{is-active "demo.input" this.currentRouteName}} @href={{href-to "demo.input"}}>Input</SubmenuItem>
<SubmenuItem @active={{is-active "demo.list" this.currentRouteName}} @href={{href-to "demo.list"}}>List</SubmenuItem>
<SubmenuItem @active={{is-active "demo.menu" this.currentRouteName}} @href={{href-to "demo.menu"}}>Menu</SubmenuItem>
<SubmenuItem @active={{is-active "demo.progress-circular" this.currentRouteName}} @href={{href-to "demo.progress-circular"}}>Progress Circular</SubmenuItem>
<SubmenuItem @active={{is-active "demo.progress-linear" this.currentRouteName}} @href={{href-to "demo.progress-linear"}}>Progress Linear</SubmenuItem>
<SubmenuItem @active={{is-active "demo.radio" this.currentRouteName}} @href={{href-to "demo.radio"}}>Radio</SubmenuItem>
<SubmenuItem @active={{is-active "demo.select" this.currentRouteName}} @href={{href-to "demo.select"}}>Select</SubmenuItem>
<SubmenuItem @active={{is-active "demo.sidenav" this.currentRouteName}} @href={{href-to "demo.sidenav"}}>Sidenav</SubmenuItem>
<SubmenuItem @active={{is-active "demo.slider" this.currentRouteName}} @href={{href-to "demo.slider"}}>Slider</SubmenuItem>
<SubmenuItem @active={{is-active "demo.speed-dial" this.currentRouteName}} @href={{href-to "demo.speed-dial"}}>Speed Dial</SubmenuItem>
<SubmenuItem @active={{is-active "demo.switch" this.currentRouteName}} @href={{href-to "demo.switch"}}>Switch</SubmenuItem>
<SubmenuItem @active={{is-active "demo.tabs.index" this.currentRouteName}} @href={{href-to "demo.tabs"}}>Tabs</SubmenuItem>
<SubmenuItem @active={{is-active "demo.toast" this.currentRouteName}} @href={{href-to "demo.toast"}}>Toast</SubmenuItem>
<SubmenuItem @active={{is-active "demo.toolbar" this.currentRouteName}} @href={{href-to "demo.toolbar"}}>Toolbar</SubmenuItem>
<SubmenuItem @active={{is-active "demo.tooltip" this.currentRouteName}} @href={{href-to "demo.tooltip"}}>Tooltip</SubmenuItem>
<SubmenuItem @active={{is-active "demo.autocomplete" this.router.currentRouteName}} @href={{href-to "demo.autocomplete"}}>Autocomplete</SubmenuItem>
<SubmenuItem @active={{is-active "demo.button" this.router.currentRouteName}} @href={{href-to "demo.button"}}>Button</SubmenuItem>
<SubmenuItem @active={{is-active "demo.card" this.router.currentRouteName}} @href={{href-to "demo.card"}}>Card</SubmenuItem>
<SubmenuItem @active={{is-active "demo.checkbox" this.router.currentRouteName}} @href={{href-to "demo.checkbox"}}>Checkbox</SubmenuItem>
<SubmenuItem @active={{is-active "demo.chips" this.router.currentRouteName}} @href={{href-to "demo.chips"}}>Chips</SubmenuItem>
<SubmenuItem @active={{is-active "demo.dialog" this.router.currentRouteName}} @href={{href-to "demo.dialog"}}>Dialog</SubmenuItem>
<SubmenuItem @active={{is-active "demo.divider" this.router.currentRouteName}} @href={{href-to "demo.divider"}}>Divider</SubmenuItem>
<SubmenuItem @active={{is-active "demo.grid-list" this.router.currentRouteName}} @href={{href-to "demo.grid-list"}}>Grid List</SubmenuItem>
<SubmenuItem @active={{is-active "demo.icons" this.router.currentRouteName}} @href={{href-to "demo.icons"}}>Icons</SubmenuItem>
<SubmenuItem @active={{is-active "demo.input" this.router.currentRouteName}} @href={{href-to "demo.input"}}>Input</SubmenuItem>
<SubmenuItem @active={{is-active "demo.list" this.router.currentRouteName}} @href={{href-to "demo.list"}}>List</SubmenuItem>
<SubmenuItem @active={{is-active "demo.menu" this.router.currentRouteName}} @href={{href-to "demo.menu"}}>Menu</SubmenuItem>
<SubmenuItem @active={{is-active "demo.progress-circular" this.router.currentRouteName}} @href={{href-to "demo.progress-circular"}}>Progress Circular</SubmenuItem>
<SubmenuItem @active={{is-active "demo.progress-linear" this.router.currentRouteName}} @href={{href-to "demo.progress-linear"}}>Progress Linear</SubmenuItem>
<SubmenuItem @active={{is-active "demo.radio" this.router.currentRouteName}} @href={{href-to "demo.radio"}}>Radio</SubmenuItem>
<SubmenuItem @active={{is-active "demo.select" this.router.currentRouteName}} @href={{href-to "demo.select"}}>Select</SubmenuItem>
<SubmenuItem @active={{is-active "demo.sidenav" this.router.currentRouteName}} @href={{href-to "demo.sidenav"}}>Sidenav</SubmenuItem>
<SubmenuItem @active={{is-active "demo.slider" this.router.currentRouteName}} @href={{href-to "demo.slider"}}>Slider</SubmenuItem>
<SubmenuItem @active={{is-active "demo.speed-dial" this.router.currentRouteName}} @href={{href-to "demo.speed-dial"}}>Speed Dial</SubmenuItem>
<SubmenuItem @active={{is-active "demo.switch" this.router.currentRouteName}} @href={{href-to "demo.switch"}}>Switch</SubmenuItem>
<SubmenuItem @active={{is-active "demo.tabs.index" this.router.currentRouteName}} @href={{href-to "demo.tabs"}}>Tabs</SubmenuItem>
<SubmenuItem @active={{is-active "demo.toast" this.router.currentRouteName}} @href={{href-to "demo.toast"}}>Toast</SubmenuItem>
<SubmenuItem @active={{is-active "demo.toolbar" this.router.currentRouteName}} @href={{href-to "demo.toolbar"}}>Toolbar</SubmenuItem>
<SubmenuItem @active={{is-active "demo.tooltip" this.router.currentRouteName}} @href={{href-to "demo.tooltip"}}>Tooltip</SubmenuItem>
{{/liquid-if}}
</div>
<MenuItem @active={{is-active "forms" this.currentRouteName}} @href={{href-to "forms"}}>Forms</MenuItem>
<MenuItem @active={{is-active "typography" this.currentRouteName}} @href={{href-to "typography"}}>Typography</MenuItem>
<MenuItem @active={{is-active "theme" this.currentRouteName}} @href={{href-to "theme"}}>Color & Theme</MenuItem>
<MenuItem @active={{is-active "forms" this.router.currentRouteName}} @href={{href-to "forms"}}>Forms</MenuItem>
<MenuItem @active={{is-active "typography" this.router.currentRouteName}} @href={{href-to "typography"}}>Typography</MenuItem>
<MenuItem @active={{is-active "theme" this.router.currentRouteName}} @href={{href-to "theme"}}>Color & Theme</MenuItem>

<MenuItem @onClick={{action "toggleExpandedItem" "layout"}} @expanded={{this.layoutExpanded}} @canExpand={{true}}>Layout</MenuItem>
<div class="submenu">
{{#liquid-if this.layoutExpanded}}
<SubmenuItem @active={{is-active "layout.introduction" this.currentRouteName}} @href={{href-to "layout.introduction"}}>Introduction</SubmenuItem>
<SubmenuItem @active={{is-active "layout.layout-containers" this.currentRouteName}} @href={{href-to "layout.layout-containers"}}>Layout Containers</SubmenuItem>
<SubmenuItem @active={{is-active "layout.layout-children" this.currentRouteName}} @href={{href-to "layout.layout-children"}}>Layout Children</SubmenuItem>
<SubmenuItem @active={{is-active "layout.child-alignment" this.currentRouteName}} @href={{href-to "layout.child-alignment"}}>Child Alignment</SubmenuItem>
<SubmenuItem @active={{is-active "layout.introduction" this.router.currentRouteName}} @href={{href-to "layout.introduction"}}>Introduction</SubmenuItem>
<SubmenuItem @active={{is-active "layout.layout-containers" this.router.currentRouteName}} @href={{href-to "layout.layout-containers"}}>Layout Containers</SubmenuItem>
<SubmenuItem @active={{is-active "layout.layout-children" this.router.currentRouteName}} @href={{href-to "layout.layout-children"}}>Layout Children</SubmenuItem>
<SubmenuItem @active={{is-active "layout.child-alignment" this.router.currentRouteName}} @href={{href-to "layout.child-alignment"}}>Child Alignment</SubmenuItem>
{{/liquid-if}}
</div>

<MenuItem @active={{is-active "cookbook" this.currentRouteName}} @href={{href-to "cookbook"}}>Cookbook</MenuItem>
<MenuItem @active={{is-active "addons" this.currentRouteName}} @href={{href-to "addons"}}>Addons</MenuItem>
<MenuItem @active={{is-active "cookbook" this.router.currentRouteName}} @href={{href-to "cookbook"}}>Cookbook</MenuItem>
<MenuItem @active={{is-active "addons" this.router.currentRouteName}} @href={{href-to "addons"}}>Addons</MenuItem>
</PaperList>

</PaperContent>
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/demo/tabs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<div class="doc-content-example">
<PaperContent>
{{! BEGIN-SNIPPET routable-usage}}
<PaperTabs @selected={{this.currentRouteName}} @borderBottom={{true}} @onChange={{action "noop"}} as |tabs|>
<PaperTabs @selected={{this.router.currentRouteName}} @borderBottom={{true}} @onChange={{action "noop"}} as |tabs|>
<tabs.tab @value="demo.tabs.index" @href={{href-to "demo.tabs.index"}}>
Index
</tabs.tab>
Expand Down
Loading