Skip to content

Commit

Permalink
fix: Ember Update v3.9.0...v3.21.2
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop Node < 10
BREAKING CHANGE: Drop Ember < 3.16
  • Loading branch information
knownasilya committed Oct 4, 2020
1 parent d1089f3 commit ed9dd6d
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 169 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
19 changes: 10 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
Expand All @@ -15,8 +20,7 @@ module.exports = {
env: {
browser: true
},
rules: {
},
rules: {},
overrides: [
// node files
{
Expand All @@ -37,17 +41,14 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
extends: ['plugin:node/recommended']
}
]
};
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
Expand Down
5 changes: 1 addition & 4 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
quotes: 'single'
}
extends: 'octane',
};
32 changes: 18 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "8"
- '10'

sudo: false
dist: trusty
dist: xenial

addons:
chrome: stable
Expand All @@ -27,33 +26,38 @@ branches:
- /^v\d+\.\d+\.\d+/

jobs:
fail_fast: true
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

include:
# runs linting and tests with current locked deps
- stage: 'Tests'
name: 'Tests'
script:
- yarn lint
- yarn test:ember

- stage: "Tests"
name: "Tests"
- stage: 'Additional Tests'
name: 'Floating Dependencies'
install:
- yarn install --no-lockfile --non-interactive
script:
- npm run lint:hbs
- npm run lint:js
- npm test
- yarn test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
- env: EMBER_TRY_SCENARIO=ember-3.10
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
45 changes: 16 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ember-shadow-dom
================
# ember-shadow-dom

Write templates for your components inside of a Shadow DOM root.
Allows encapsulating styles (CSS) and markup (HTML) but using templates like
Expand All @@ -14,27 +13,23 @@ Not sure what Shadow DOM is? Check out this [MDN article](https://developer.mozi
> Compatibility: Not all browsers support Shadow DOM (v1) yet, see [CanIUse](https://caniuse.com/#feat=shadowdomv1)
> to see if your target browsers support this new feature.
[![npm version][npm-badge]][npm-badge-url]
[![npm version][npm-badge]][npm-badge-url]

[Try it in a CodeSandbox](https://codesandbox.io/s/kx0x7xr8mv)

## Compatibility

Compatibility
------------------------------------------------------------------------------
- Ember.js v3.16 or above (Decorators and [more][see-why])
- Ember CLI v2.13 or above
- Node.js v10 or above

* Ember.js v3.10.0 or above (Decorators and [more][see-why])
* Ember CLI v2.13 or above


Installation
------------
## Installation

```sh
ember install ember-shadow-dom
```

Usage
-----
## Usage

This addon provides a component called `ShadowDom` (or `shadow-dom` if not using angle brackets)

Expand All @@ -52,22 +47,18 @@ This addon provides a component called `ShadowDom` (or `shadow-dom` if not using

This mode makes the encapsulating component's children a shadow root.



API
---
## API

### `ShadowDom` (`shadow-dom`)

#### Arguments

- `@mode` (string) - The mode of the Shadow Root, defaults to `'open'`. Can be `'open'` or `'closed'`.
Note that `'closed'` mode prevents you from querying into the DOM of your components in tests.
Note that `'closed'` mode prevents you from querying into the DOM of your components in tests.
- `@tagName` (string) - This defaults to `'div'`, but can be any valid element tag name used in HTML.
Setting this argument changes the top level element that the shadow root is attached to.
Setting this argument changes the top level element that the shadow root is attached to.

Testing
-------
## Testing

Components with a open shadowroot can be tested using qunit-dom like so:

Expand All @@ -84,23 +75,19 @@ Where the template looks like:
</ShadowDom>
```

Contributing
------------
## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.


Attribution
-----------
## Attribution

Thanks to [@rwjblue](https://github.com/rwjblue) for realizing that `{{-in-element}}` can be used for the shadow root!


License
-------
## License

This project is licensed under the [MIT License](LICENSE.md).

[npm-badge]: https://badge.fury.io/js/ember-shadow-dom.svg
[npm-badge-url]: http://badge.fury.io/js/ember-shadow-dom

[see-why]: https://github.com/tildeio/ember-element-helper/issues/6#issuecomment-519349886]]
128 changes: 68 additions & 60 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,78 @@

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

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
scenarios: [
{
name: 'ember-3.10',
npm: {
devDependencies: {
'ember-source': '~3.10.0'
}
}
module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
},
},
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
}),
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
npm: {
devDependencies: {}
}
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
},
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
npm: {
ember: {
edition: 'classic',
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
]
};
});
},
},
],
};
};

0 comments on commit ed9dd6d

Please sign in to comment.