Skip to content

Commit 529036d

Browse files
committed
2 parents 4fbc17a + 538cb6e commit 529036d

27 files changed

+13854
-6466
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
root = true
66

7-
87
[*]
98
end_of_line = lf
109
charset = utf-8

.eslintrc.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
'use strict';
2+
13
module.exports = {
24
root: true,
5+
parser: 'babel-eslint',
36
parserOptions: {
4-
ecmaVersion: 2017,
5-
sourceType: 'module'
7+
ecmaVersion: 2018,
8+
sourceType: 'module',
9+
ecmaFeatures: {
10+
legacyDecorators: true
11+
}
612
},
713
plugins: [
814
'ember'
@@ -14,8 +20,7 @@ module.exports = {
1420
env: {
1521
browser: true
1622
},
17-
rules: {
18-
},
23+
rules: {},
1924
overrides: [
2025
// node files
2126
{
@@ -36,17 +41,14 @@ module.exports = {
3641
'tests/dummy/app/**'
3742
],
3843
parserOptions: {
39-
sourceType: 'script',
40-
ecmaVersion: 2015
44+
sourceType: 'script'
4145
},
4246
env: {
4347
browser: false,
4448
node: true
4549
},
4650
plugins: ['node'],
47-
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
48-
// add your custom rules and overrides for node files here
49-
})
51+
extends: ['plugin:node/recommended']
5052
}
5153
]
5254
};

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/.env*
1313
/.eslintignore
1414
/.eslintrc.js
15+
/.git/
1516
/.gitignore
1617
/.template-lintrc.js
1718
/.travis.yml

.template-lintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: 'recommended'
4+
extends: 'octane'
55
};

.travis.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ language: node_js
33
node_js:
44
# we recommend testing addons with the same minimum supported node version as Ember CLI
55
# so that your addon works for all apps
6-
- "6"
6+
- "10"
77

8-
sudo: false
9-
dist: trusty
8+
dist: xenial
109

1110
addons:
1211
chrome: stable
@@ -27,34 +26,34 @@ branches:
2726
- /^v\d+\.\d+\.\d+/
2827

2928
jobs:
30-
fail_fast: true
29+
fast_finish: true
3130
allow_failures:
3231
- env: EMBER_TRY_SCENARIO=ember-canary
3332

3433
include:
3534
# runs linting and tests with current locked deps
36-
3735
- stage: "Tests"
3836
name: "Tests"
3937
script:
40-
- npm run lint:hbs
41-
- npm run lint:js
42-
- npm test
38+
- npm run lint
39+
- npm run test:ember
40+
41+
- stage: "Additional Tests"
42+
name: "Floating Dependencies"
43+
install:
44+
- npm install --no-package-lock
45+
script:
46+
- npm run test:ember
4347

4448
# we recommend new addons test the current and previous LTS
4549
# as well as latest stable release (bonus points to beta/canary)
46-
- stage: "Additional Tests"
47-
env: EMBER_TRY_SCENARIO=ember-lts-2.18
48-
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
50+
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
51+
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
4952
- env: EMBER_TRY_SCENARIO=ember-release
5053
- env: EMBER_TRY_SCENARIO=ember-beta
5154
- env: EMBER_TRY_SCENARIO=ember-canary
5255
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
53-
54-
before_install:
55-
- npm config set spin false
56-
- npm install -g npm@4
57-
- npm --version
56+
- env: EMBER_TRY_SCENARIO=ember-classic
5857

5958
script:
6059
- npm run lint:js

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
* `ember serve`
2424
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
2525

26-
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
26+
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019
3+
Copyright (c) 2020
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ember Master Tab
2+
23
## Synopsis
34

45
This addon provides a `service` that allows you to run code on a single tab of your ember
@@ -7,6 +8,12 @@ does not make sense or it is wasteful/redundant to have it run on every tab that
78
open. For example, you might be continuously pulling some state from your server API that
89
you are saving on `localStorage` which you then use to update your UI through event listeners.
910

11+
## Compatibility
12+
13+
* Ember.js v3.12 or above
14+
* Ember CLI v2.13 or above
15+
* Node.js v10 or above
16+
1017
## Notes
1118

1219
* The service ensures that only one master tab exists at any one time.

addon/initializers/master-tab.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export function initialize(application) {
77
application.register('service:master-tab', masterTab, { instantiate: false });
88
application.deferReadiness();
99
masterTab.setup().then(() => {
10+
masterTab.initialized = true;
1011
application.advanceReadiness();
1112
});
1213
}

config/ember-try.js

Lines changed: 63 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,82 +2,77 @@
22

33
const getChannelURL = require('ember-source-channel-url');
44

5-
module.exports = function() {
6-
return Promise.all([
7-
getChannelURL('release'),
8-
getChannelURL('beta'),
9-
getChannelURL('canary')
10-
]).then((urls) => {
11-
return {
12-
scenarios: [
13-
{
14-
name: 'ember-lts-2.18',
15-
env: {
16-
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true })
17-
},
18-
npm: {
19-
devDependencies: {
20-
'@ember/jquery': '^0.5.1',
21-
'ember-source': '~2.18.0'
22-
}
5+
module.exports = async function() {
6+
return {
7+
scenarios: [
8+
{
9+
name: 'ember-lts-3.12',
10+
npm: {
11+
devDependencies: {
12+
'ember-source': '~3.12.0'
2313
}
24-
},
25-
{
26-
name: 'ember-lts-3.4',
27-
npm: {
28-
devDependencies: {
29-
'ember-source': '~3.4.0'
30-
}
14+
}
15+
},
16+
{
17+
name: 'ember-lts-3.16',
18+
npm: {
19+
devDependencies: {
20+
'ember-source': '~3.16.0'
3121
}
32-
},
33-
{
34-
name: 'ember-release',
35-
npm: {
36-
devDependencies: {
37-
'ember-source': urls[0]
38-
}
22+
}
23+
},
24+
{
25+
name: 'ember-release',
26+
npm: {
27+
devDependencies: {
28+
'ember-source': await getChannelURL('release')
3929
}
40-
},
41-
{
42-
name: 'ember-beta',
43-
npm: {
44-
devDependencies: {
45-
'ember-source': urls[1]
46-
}
30+
}
31+
},
32+
{
33+
name: 'ember-beta',
34+
npm: {
35+
devDependencies: {
36+
'ember-source': await getChannelURL('beta')
4737
}
48-
},
49-
{
50-
name: 'ember-canary',
51-
npm: {
52-
devDependencies: {
53-
'ember-source': urls[2]
54-
}
38+
}
39+
},
40+
{
41+
name: 'ember-canary',
42+
npm: {
43+
devDependencies: {
44+
'ember-source': await getChannelURL('canary')
5545
}
46+
}
47+
},
48+
{
49+
name: 'ember-default-with-jquery',
50+
env: {
51+
EMBER_OPTIONAL_FEATURES: JSON.stringify({
52+
'jquery-integration': true
53+
})
5654
},
57-
// The default `.travis.yml` runs this scenario via `npm test`,
58-
// not via `ember try`. It's still included here so that running
59-
// `ember try:each` manually or from a customized CI config will run it
60-
// along with all the other scenarios.
61-
{
62-
name: 'ember-default',
63-
npm: {
64-
devDependencies: {}
55+
npm: {
56+
devDependencies: {
57+
'@ember/jquery': '^0.5.1'
6558
}
59+
}
60+
},
61+
{
62+
name: 'ember-classic',
63+
env: {
64+
EMBER_OPTIONAL_FEATURES: JSON.stringify({
65+
'application-template-wrapper': true,
66+
'default-async-observers': false,
67+
'template-only-glimmer-components': false
68+
})
6669
},
67-
{
68-
name: 'ember-default-with-jquery',
69-
env: {
70-
EMBER_OPTIONAL_FEATURES: JSON.stringify({
71-
'jquery-integration': true
72-
})
73-
},
74-
npm: {
75-
devDependencies: {
76-
'@ember/jquery': '^0.5.1'
77-
}
70+
npm: {
71+
ember: {
72+
edition: 'classic'
7873
}
7974
}
80-
]
81-
};
82-
});
75+
}
76+
]
77+
};
8378
};

0 commit comments

Comments
 (0)