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

Upgrade ember-cli/ember & include glimmer 2 regression fix from Alex Hancock #52

Merged
merged 7 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
Expand All @@ -13,5 +13,11 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
35 changes: 13 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
---
language: node_js
node_js:
- "4"
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- node_modules
yarn: true

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.17

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

install:
- npm install
- bower install
- yarn install --no-lockfile --non-interactive

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2017

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:

Expand Down
2 changes: 1 addition & 1 deletion addon/components/hot-replacement-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clearCache from 'ember-cli-hot-loader/utils/clear-container-cache';
import clearRequirejs from 'ember-cli-hot-loader/utils/clear-requirejs';

function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); // eslint-disable-line
}

export function matchesPodConvention (componentName, modulePath) {
Expand Down
4 changes: 2 additions & 2 deletions addon/mixins/hot-reload-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function removeOriginalFromParsedName (parsedName) {
}

function shouldIgnoreTemplate (parsedName) {
return parsedName.fullName.match(/template:components\//) && !parsedName.fullName.match(/\-original$/);
return parsedName.fullName.match(/template:components\//) && !parsedName.fullName.match(/\-original$/); // eslint-disable-line
}

export default Ember.Mixin.create({
Expand All @@ -25,7 +25,7 @@ export default Ember.Mixin.create({
if (this._resolveOriginalTemplateForComponent(parsedName)) {
return this._resolveComponent(Ember.Component.extend(), parsedName);
}
if (parsedName.fullName.match(/\-original$/)) {
if (parsedName.fullName.match(/\-original$/)) { // eslint-disable-line
removeOriginalFromParsedName(parsedName);
return this._super(parsedName);
}
Expand Down
5 changes: 4 additions & 1 deletion addon/utils/clear-container-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
const { getOwner } = Ember;

function clearIfHasProperty (obj, propertyName) {
if (Object.hasOwnProperty.call(obj, propertyName)) {
if (obj && Object.hasOwnProperty.call(obj, propertyName)) {
obj[propertyName] = undefined;
}
}
Expand All @@ -16,16 +16,19 @@ function clear (context, owner, name) {
if (owner.__container__) {
clearIfHasProperty(owner.__container__.cache, name);
clearIfHasProperty(owner.__container__.factoryCache, name);
clearIfHasProperty(owner.__container__.factoryManagerCache, name);
clearIfHasProperty(owner.__registry__._resolveCache, name);
clearIfHasProperty(owner.__registry__._failCache, name);

clearIfHasProperty(owner.base.__container__.cache, name);
clearIfHasProperty(owner.base.__container__.factoryCache, name);
clearIfHasProperty(owner.base.__container__.factoryManagerCache, name);
clearIfHasProperty(owner.base.__registry__._resolveCache, name);
clearIfHasProperty(owner.base.__registry__._failCache, name);
} else {
clearIfHasProperty(context.container.cache, name);
clearIfHasProperty(context.container.factoryCache, name);
clearIfHasProperty(context.container.factoryManagerCache, name);
clearIfHasProperty(context.container._registry._resolveCache, name);
clearIfHasProperty(context.container._registry._failCache, name);
// NOTE: the app's __container__ is the same as context.container. Not needed:
Expand Down
8 changes: 0 additions & 8 deletions bower.json

This file was deleted.

42 changes: 14 additions & 28 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
useYarn: true,
scenarios: [
{
name: 'default',
bower: {
dependencies: { }
}
},
{
name: 'ember-1.13',
bower: {
Expand All @@ -19,35 +14,26 @@ module.exports = {
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
{
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
name: 'ember-lts-2.17',
npm: {
devDependencies: {
'ember-source': '~2.17.0'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
9 changes: 5 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
let app = new EmberAddon(defaults, {
// Add options here
});

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */
'use strict';
var fs = require('fs');

Expand Down
59 changes: 29 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,49 @@
"name": "ember-cli-hot-loader",
"version": "0.1.8",
"description": "The default blueprint for ember-cli addons.",
"keywords": [
"ember-addon"
],
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "toranb/ember-cli-hot-loader",
"scripts": {
"build": "ember build",
"start": "ember server",
"start": "ember serve",
"test": "ember try:each"
},
"repository": "toranb/ember-cli-hot-loader",
"engines": {
"node": ">= 4"
"dependencies": {
"ember-cli-babel": "^6.6.0",
"ember-getowner-polyfill": "^1.1.1"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.7.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-qunit": "^2.0.0",
"ember-cli-release": "v1.0.0-beta.2",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.17.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-sinon": "0.6.0",
"ember-sinon-qunit": "1.4.1",
"loader.js": "^4.0.1"
"ember-source": "~2.17.0",
"loader.js": "^4.2.3"
},
"keywords": [
"ember-addon"
],
"dependencies": {
"ember-cli-babel": "^5.1.6",
"ember-getowner-polyfill": "^1.1.1"
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
Loading