Skip to content

Commit

Permalink
Merge pull request #124 from yapplabs/update-stuff
Browse files Browse the repository at this point in the history
Update build and test dependencies. Test with Octane and Classic.
  • Loading branch information
krisselden authored Oct 29, 2020
2 parents 6f93f45 + 2ac3c68 commit 408a571
Show file tree
Hide file tree
Showing 49 changed files with 7,420 additions and 4,786 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
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
58 changes: 54 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,63 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
'ember/no-jquery': 'off',
'ember/no-get': 'off',
'ember/no-global-jquery': 'off',
'ember/no-observers': 'off',
'ember/no-on-calls-in-components': 'off',
'ember/require-computed-property-dependencies': 'off'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script'
},
env: {
es6: 2018,
browser: false,
node: true,
mocha: true
},
plugins: ['node'],
extends: ['plugin:node/recommended']
}
]
};
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
47 changes: 29 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
8 changes: 8 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
'no-unbound': false
}
};
65 changes: 37 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,59 @@
---
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
- "10"

sudo: false
dist: trusty
dist: xenial

addons:
chrome: stable

cache:
yarn: true
directories:
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=2.6
- EMBER_TRY_SCENARIO=2.7
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default
- EMBER_TRY_SCENARIO=fastboot-tests

matrix:

branches:
only:
- master
# npm version tags
- /^v\d+\.\d+\.\d+/

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

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
include:
# runs linting and tests with current locked deps
- stage: "Tests"
name: "Tests"
script:
- yarn run lint
- yarn run test:ember

- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- yarn install --no-lockfile --non-interactive
script:
- yarn run test:ember

install:
- yarn install --no-lockfile --non-interactive
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- 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

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone <repository-url>`
* `cd ember-wormhole`
* `yarn install`

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `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/).
8 changes: 4 additions & 4 deletions addon/components/ember-wormhole.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { alias } from '@ember/object/computed';
import Component from '@ember/component';
import { observer, computed } from '@ember/object';
import { run } from '@ember/runloop';
import { schedule } from '@ember/runloop';
import layout from '../templates/components/ember-wormhole';
import {
getActiveElement,
Expand Down Expand Up @@ -56,7 +56,7 @@ export default Component.extend({
* init to be run after render. Importantly, we want to run
* appendToDestination after the child nodes have rendered.
*/
run.schedule('afterRender', () => {
schedule('afterRender', () => {
if (this.isDestroyed) { return; }
this._element = this._wormholeHeadNode.parentNode;
if (!this._element) {
Expand All @@ -70,15 +70,15 @@ export default Component.extend({
// not called in fastboot
this._super(...arguments);
let { _wormholeHeadNode, _wormholeTailNode } = this;
run.schedule('render', () => {
schedule('render', () => {
this._removeRange(_wormholeHeadNode, _wormholeTailNode);
});
},

_destinationDidChange: observer('_destination', function() {
var destinationElement = this.get('_destination');
if (destinationElement !== this._wormholeHeadNode.parentNode) {
run.schedule('render', this, '_appendToDestination');
schedule('render', this, '_appendToDestination');
}
}),

Expand Down
4 changes: 2 additions & 2 deletions addon/templates/components/ember-wormhole.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{unbound _wormholeHeadNode ~}}
{{unbound this._wormholeHeadNode ~}}
{{yield ~}}
{{unbound _wormholeTailNode ~}}
{{unbound this._wormholeTailNode ~}}
Loading

0 comments on commit 408a571

Please sign in to comment.