Skip to content

Commit 9bbc456

Browse files
Bump some deps, update Ember to 3.28 (#923)
* Bump some deps * ember-cli 3.28 * Bump some deps * Bump ember-modal-dialog * Fix lint * Fix various things * Remove debugger * Fix some tests and deprecations * Fix some computeds * Fix some testing issues * Back to params * Use fork of render modifiers * Use modal dialog fork * Add macros * Add embroider utils * Remove embroider testing
1 parent 5ec2d98 commit 9bbc456

File tree

51 files changed

+872
-1460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+872
-1460
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.*/
1617
.eslintcache
1718

1819
# ember-try

.eslintrc.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,18 @@ module.exports = {
4545
// node files
4646
{
4747
files: [
48-
'.eslintrc.js',
49-
'.prettierrc.js',
50-
'.template-lintrc.js',
51-
'ember-cli-build.js',
52-
'addon/styles/tailwind.js',
53-
'index.js',
54-
'testem.js',
55-
'blueprints/*/index.js',
56-
'config/**/*.js',
57-
'lib/**/*.js',
58-
'tests/dummy/config/**/*.js',
59-
'tests-node/**/*.js',
60-
],
61-
excludedFiles: [
62-
'addon/**',
63-
'addon-test-support/**',
64-
'app/**',
65-
'tests/dummy/app/**',
48+
'./.eslintrc.js',
49+
'./.prettierrc.js',
50+
'./.template-lintrc.js',
51+
'./ember-cli-build.js',
52+
'./index.js',
53+
'./testem.js',
54+
'./addon/styles/tailwind.js',
55+
'./blueprints/*/index.js',
56+
'./config/**/*.js',
57+
'./lib/**/*.js',
58+
'./tests/dummy/config/**/*.js',
59+
'./tests-node/**/*.js',
6660
],
6761
parserOptions: {
6862
sourceType: 'script',
@@ -74,7 +68,6 @@ module.exports = {
7468
plugins: ['node'],
7569
extends: ['plugin:node/recommended'],
7670
},
77-
7871
// node test files
7972
{
8073
globals: {
@@ -88,5 +81,10 @@ module.exports = {
8881
'node/no-unpublished-require': 'off',
8982
},
9083
},
84+
{
85+
// Test files:
86+
files: ['tests/**/*-test.{js,ts}'],
87+
extends: ['plugin:qunit/recommended'],
88+
},
9189
],
9290
};

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,15 @@ jobs:
123123
fail-fast: true
124124
matrix:
125125
scenario:
126-
- 'ember-lts-3.16'
127126
- 'ember-lts-3.20'
127+
- 'ember-lts-3.24'
128128
- 'ember-release'
129129
- 'ember-beta'
130130
- 'ember-canary'
131131
- 'ember-default-with-jquery'
132132
- 'ember-classic'
133-
- 'ember-concurrency-2.x'
133+
# - 'embroider-safe'
134+
# - 'embroider-optimized'
134135
timeout-minutes: 7
135136
steps:
136137
- name: Check out a copy of the repo

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
/ember-cli-build.js
2626
/testem.js
2727
/tests/
28+
/yarn-error.log
2829
/yarn.lock
2930
.gitkeep
3031

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@
22

33
module.exports = {
44
singleQuote: true,
5+
overrides: [
6+
{
7+
files: '**/*.hbs',
8+
options: {
9+
parser: 'glimmer',
10+
singleQuote: false,
11+
},
12+
},
13+
],
514
};

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ember-cli-addon-docs
99
Compatibility
1010
------------------------------------------------------------------------------
1111

12-
* Ember.js v3.16 or above
13-
* Ember CLI v2.13 or above
14-
* Node.js v10 or above
12+
* Ember.js v3.20 or above
13+
* Ember CLI v3.20 or above
14+
* Node.js v12 or above
1515

1616
**2/28/20 Update: AddonDocs is in Maintenace Mode.**
1717

addon/components/api/x-component/template.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Show
1010
</panel.header>
1111

12-
{{#if hasToggles}}
12+
{{#if this.hasToggles}}
1313
<Api::XToggles @toggles={{hash
1414
inherited=(if @component.hasInherited this.showInherited)
1515
internal=(if @component.hasInternal this.showInternal)
@@ -22,7 +22,7 @@
2222
{{/if}}
2323

2424

25-
{{#if hasContents}}
25+
{{#if this.hasContents}}
2626
<Api::XSections @sections={{hash
2727
constructors=this.constructors
2828
yields=this.yields

addon/components/api/x-import-path/component.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export default Component.extend({
88
<pre class="docs-md__code docs-whitespace-no-wrap">
99
<span class="hljs-keyword">import</span>
1010
11-
{{#if (eq item.exportType "default")}}
12-
{{item.name}}
11+
{{#if (eq @item.exportType "default")}}
12+
{{@item.name}}
1313
{{else}}
14-
{ {{item.name}} }
14+
{ {{@item.name}} }
1515
{{/if}}
1616
1717
<span class="hljs-keyword">from</span>
18-
<span class="hljs-string">'{{item.file}}'</span>;
18+
<span class="hljs-string">'{{@item.file}}'</span>;
1919
</pre>
2020
</div>
2121
`,

addon/components/api/x-section/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</span>
1212
{{/if}}
1313

14-
{{#if (or @item.isClass item.isComponent)}}
14+
{{#if (or @item.isClass @item.isComponent)}}
1515
<LinkTo @route="docs.api.item" @model={{concat "modules/" @item.id}} class="hover:underline">
1616
<strong>{{@item.name}}</strong>
1717
</LinkTo>

addon/components/api/x-sections/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Component from '@ember/component';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
{{#each-in sections as |sectionName items|}}
7+
{{#each-in @sections as |sectionName items|}}
88
{{#if items}}
99
<section data-test-api-section class="item-section">
1010
<h2 data-test-section-header={{sectionName}} class="docs-h2">

addon/components/docs-code-highlight/component.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import classic from 'ember-classic-decorator';
21
import {
32
classNameBindings,
43
tagName,
@@ -33,7 +32,6 @@ hljs.registerLanguage('sh', shell);
3332
hljs.registerLanguage('typescript', typescript);
3433
hljs.registerLanguage('ts', typescript);
3534

36-
@classic
3735
@tagName('pre')
3836
@classNameBindings('language')
3937
@templateLayout(layout)

addon/components/docs-demo/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import classic from 'ember-classic-decorator';
21
import { tagName, layout as templateLayout } from '@ember-decorators/component';
32
import { action, computed } from '@ember/object';
43
import { A } from '@ember/array';
@@ -29,10 +28,11 @@ import layout from './template';
2928
@yield {Component} demo.snippet
3029
@yield {Component} demo.liveExample
3130
*/
32-
@classic
31+
3332
@templateLayout(layout)
3433
@tagName('')
3534
export default class DocsDemo extends Component {
35+
// eslint-disable-next-line ember/classic-decorator-hooks
3636
init() {
3737
super.init(...arguments);
3838

addon/components/docs-demo/x-example/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import classic from 'ember-classic-decorator';
21
import {
32
classNames,
43
layout as templateLayout,
54
} from '@ember-decorators/component';
65
import Component from '@ember/component';
76
import layout from './template';
87

9-
@classic
108
@templateLayout(layout)
119
@classNames('docs-p-4')
1210
export default class XExample extends Component {
11+
// eslint-disable-next-line ember/classic-decorator-hooks
1312
init() {
1413
super.init(...arguments);
1514
this.set('elementId', 'example-' + this.name);
Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
<div {{on "click" this.onClick}} {{on "mouseenter" this.onMouseEnter}}>
2-
{{#link-to
3-
params=this.linkArgs
4-
class=(concat
5-
"docs-block docs-py-2 docs-px-3 docs-text-black docs-no-underline hover:docs-bg-grey-lighter "
6-
(if @selected "docs-bg-grey-lighter")
7-
)
8-
}}
9-
<div class="docs-flex docs-items-center">
10-
{{svg-jar this.icon height=28 width=28 class="docs-mr-2 docs-flex-no-shrink"}}
11-
<span class="docs-truncate">
1+
{{! template-lint-disable no-unknown-arguments-for-builtin-components }}
2+
<div {{on 'click' this.onClick}} {{on 'mouseenter' this.onMouseEnter}}>
3+
<LinkTo
4+
class={{
5+
concat
6+
'docs-block docs-py-2 docs-px-3 docs-text-black docs-no-underline hover:docs-bg-grey-lighter '
7+
(if @selected 'docs-bg-grey-lighter')
8+
}}
9+
@params={{this.linkArgs}}
10+
>
11+
<div class='docs-flex docs-items-center'>
12+
{{svg-jar
13+
this.icon
14+
height=28
15+
width=28
16+
class='docs-mr-2 docs-flex-no-shrink'
17+
}}
18+
<span class='docs-truncate'>
1219
{{#if this.titleMatchesQuery}}
1320
{{{this.highlightedTitle}}}
1421
{{else}}
@@ -18,9 +25,9 @@
1825
</div>
1926

2027
{{#if (not this.titleMatchesQuery)}}
21-
<small class="docs-text-grey-dark docs-inline-block">
28+
<small class='docs-text-grey-dark docs-inline-block'>
2229
{{{this.bestMatch}}}
2330
</small>
2431
{{/if}}
25-
{{/link-to}}
26-
</div>
32+
</LinkTo>
33+
</div>

addon/components/docs-header/version-selector/component.js

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,27 @@ import Component from '@ember/component';
22
import { inject as service } from '@ember/service';
33
import layout from './template';
44
import { reads } from '@ember/object/computed';
5-
// import config from 'ember-get-config';
65
import { computed } from '@ember/object';
76
import { A } from '@ember/array';
87
import { getOwner } from '@ember/application';
98

109
// const { latestVersionName, primaryBranch } = config['ember-cli-addon-docs'];
1110
//
1211
export default Component.extend({
13-
layout,
14-
15-
latestVersionName: computed(function () {
16-
let config =
17-
getOwner(this).resolveRegistration('config:environment')[
18-
'ember-cli-addon-docs'
19-
];
12+
projectVersion: service(),
2013

21-
return config.latestVersionName;
22-
}),
14+
layout,
2315

24-
primaryBranch: computed(function () {
25-
let config =
16+
init() {
17+
this._super(...arguments);
18+
const config =
2619
getOwner(this).resolveRegistration('config:environment')[
2720
'ember-cli-addon-docs'
2821
];
22+
this.set('latestVersionName', config.latestVersionName);
23+
this.set('primaryBranch', config.primaryBranch);
24+
},
2925

30-
return config.primaryBranch;
31-
}),
32-
33-
projectVersion: service(),
3426
'on-close'() {},
3527

3628
currentVersion: reads('projectVersion.currentVersion'),
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import classic from 'ember-classic-decorator';
21
import { classNames } from '@ember-decorators/component';
32
import LinkComponent from '@ember/routing/link-component';
43

54
/**
65
Just a styled subclass of LinkComponent. Comes in handy when rending links in Markdown templates:
76
87
```md
9-
Here I am, telling you about {{docs-link 'another page' 'docs.x-foo'}}
8+
Here I am, telling you about <DocsLink @route="docs.x-foo">another page</DocsLink>
109
```
1110
1211
@class DocsLink
1312
@public
1413
*/
15-
@classic
1614
@classNames('docs-md__a')
1715
export default class DocsLink extends LinkComponent {}

addon/components/docs-logo/component.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import classic from 'ember-classic-decorator';
21
import { tagName, layout as templateLayout } from '@ember-decorators/component';
32
import { equal } from '@ember/object/computed';
43
import { assert } from '@ember/debug';
@@ -11,7 +10,7 @@ import layout from './template';
1110
@class DocsLogo
1211
@public
1312
*/
14-
@classic
13+
1514
@templateLayout(layout)
1615
@tagName('')
1716
export default class DocsLogo extends Component {
@@ -29,6 +28,15 @@ export default class DocsLogo extends Component {
2928
*/
3029
logo = 'ember';
3130

31+
@equal('logo', 'ember')
32+
showEmber;
33+
34+
@equal('logo', 'ember-cli')
35+
showEmberCli;
36+
37+
@equal('logo', 'ember-data')
38+
showEmberData;
39+
3240
didReceiveAttrs() {
3341
super.didReceiveAttrs(...arguments);
3442

@@ -39,13 +47,4 @@ export default class DocsLogo extends Component {
3947
validLogos.includes(logo)
4048
);
4149
}
42-
43-
@equal('logo', 'ember')
44-
showEmber;
45-
46-
@equal('logo', 'ember-cli')
47-
showEmberCli;
48-
49-
@equal('logo', 'ember-data')
50-
showEmberData;
5150
}

addon/components/docs-snippet/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import classic from 'ember-classic-decorator';
21
import { tagName, layout as templateLayout } from '@ember-decorators/component';
32
import Component from '@ember/component';
43
import layout from './template';
@@ -13,7 +12,7 @@ import layout from './template';
1312
@class DocsSnippet
1413
@public
1514
*/
16-
@classic
15+
1716
@tagName('')
1817
@templateLayout(layout)
1918
export default class DocsSnippet extends Component {

addon/components/docs-snippet/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
</CopyButton>
3131
{{/if}}
3232

33-
<DocsCodeHighlight @language={{language}}>{{snippet.source}}</DocsCodeHighlight>
33+
<DocsCodeHighlight @language={{@language}}>{{snippet.source}}</DocsCodeHighlight>
3434
{{/let}}
3535
</div>

0 commit comments

Comments
 (0)