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

Add failing test around moduleName mutation #14196

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
1298ee6
Strip all non-enabled features.
rwjblue Jul 25, 2016
c5ccb88
Allow tags to be build in CI.
rwjblue Jul 25, 2016
1234110
Add 2.8.0-beta.1 to CHANGELOG.md.
rwjblue Jul 25, 2016
2d3ccd9
Fix import from ember-htmlbars using ember-glimmer.
rwjblue Jul 25, 2016
09b411b
Release v2.8.0-beta.1.
rwjblue Jul 26, 2016
0f0e3c0
[CLEANUP] Unify glimmer behavior with htmlbars and remove unsed code
krisselden Jul 26, 2016
9e19860
Remove `View#createElement`.
Jul 25, 2016
72cc2fa
Remove `View#destroyElement` method.
Jul 25, 2016
2414d71
Migrate `isVisible` tests to ember-glimmer package.
Jul 25, 2016
c68e8c7
Expose `Ember.ApplicationInstance.setupRegistry` for tooling.
Jul 30, 2016
9460f44
[BUGFIX beta] Fix ember-metal/cache
Jul 29, 2016
cebdf72
[BUGFIX release] Add more info to the `Ember.Binding` deprecation.
Jul 27, 2016
d89d3f3
Disallow paths beginning with @ in templates
courajs Jul 27, 2016
5375f39
[BUGFIX beta] Avoid using `.env` property on components.
Jul 26, 2016
939109a
[BUGFIX] Fix template meta lookup
asakusuma Jul 26, 2016
75fce1b
Fix bower-auto-build description
mike-north Jul 26, 2016
7b5186c
Add v2.8.0-beta.2 to CHANGELOG.md.
rwjblue Aug 1, 2016
377bef2
Release v2.8.0-beta.2.
rwjblue Aug 1, 2016
aec1fa6
[BUGFIX beta] attributeBindings not working with `role`
cibernox Aug 2, 2016
014260a
[DOC release] Use dash for partial naming
wagenet Aug 4, 2016
73973a2
[BUGFIX beta] Add tests for visit() with shouldRender set to false
Aug 4, 2016
6dff557
[BUGFIX beta] Pass environment options forward to Engines
Aug 4, 2016
af0a422
[DOC release] Improve Ember.deprecate documentation
wagenet Aug 4, 2016
0531c18
[BUGFIX beta] `fillIn` only sets value to first match.
Serabe Aug 5, 2016
f4a8896
[DOC release] Add documentation for click 2nd argument
Aug 1, 2016
d3dd7cd
[DOC release] Boolean `attributeBindings` documentation updated
Serabe Aug 6, 2016
66541cb
[DOC release] Fix `setEach` documentation
Serabe Aug 6, 2016
bcf4da0
[DOC release] Fix documentation of Route queryParamsDidChange.
GUI Jul 30, 2016
bda1a02
Restructure code to avoid awkward compilation
chancancode Aug 8, 2016
c93e31f
`POST_INIT` do not take arguments
chancancode Aug 8, 2016
d4d620f
[CLEANUP] Remove `init` arguments checking
chancancode Aug 8, 2016
b4ed1a3
[BUGFIX beta] Bump router.js so that getHandlers is invoked lazily
Aug 8, 2016
5a01efc
Remove dead code
mitchlloyd Aug 10, 2016
0d67c55
[DOC] Fix code blocks for includes
Aug 10, 2016
c1c5c28
[BUGFIX beta] Ensure substates properly work with resetNamespace
Aug 11, 2016
eb23747
[BUGFIX release] Update route-recognizer to v0.2.1.
Aug 12, 2016
5fefce9
[BUGFIX beta] Update router.js to fix Phantom 1.9 issues.
rwjblue Aug 13, 2016
69a1a0b
[BUGFIX beta] Update router.js to fix Phantom 1.9 issues.
simonihmig Aug 15, 2016
d6e8401
Failing test for #14010
alisdair Aug 15, 2016
7987f8a
Default queryParams in link-to must have values
alisdair Aug 15, 2016
58bba0b
[DOC relase] Improve `mut` documentation
Serabe Aug 14, 2016
b991b31
Add 2.7.1 to the CHANGELOG.md.
Aug 16, 2016
30ad514
Add v2.8.0-beta.3 to CHANGELOG.md.
Aug 16, 2016
10f3507
Release v2.8.0-beta.3.
Aug 16, 2016
cf71482
[BUGFIX beta] Update route-recognizer.
nathanhammond Aug 16, 2016
30c1ce5
[BUGFIX beta] Prevent issues with revalidation during teardown.
rwjblue Aug 22, 2016
53ceb4c
[DOC beta] Improve `Route#render` documentation
Serabe Aug 9, 2016
ab7af97
[BUGFIX beta] Check that handler exists before triggering event
Aug 18, 2016
75be1a7
[BUGFIX beta] Avoid assertion when `id=` is provided to tagless compo…
rwjblue Aug 21, 2016
df66e3a
[BUGFIX beta] Call ArrayProxy's content change hooks
mmun Aug 23, 2016
5b38d5f
[BUGFIX beta] Avoid rerendering outlet state during router destruction.
Aug 24, 2016
19d5f6c
[BUGFIX beta] Clone additional parent dependencies into engine instan…
dgeb Aug 22, 2016
8a6dcf1
[BUGFIX beta] Ensure engines are destroyed before top-level views.
asakusuma Aug 17, 2016
941e400
[BUGFIX beta] Ensure injections happen in engine instances.
Aug 27, 2016
09a0432
[GLIMMER] Ensure all components have injections.
Aug 27, 2016
f516c6f
Use a dictionary for the view registry
chancancode Aug 25, 2016
c50cf75
Add 2.8.0-beta.4 to CHANGELOG.md.
Aug 30, 2016
a681d8b
Fix issue with cherry-picked test cleanup.
Aug 30, 2016
dd60011
Release v2.8.0-beta.4.
Aug 30, 2016
5aa5875
[BUGFIX beta] Fix cleanup
krisselden Aug 30, 2016
08803e3
Fix issue with document.contains on IE.
Aug 30, 2016
2dbde63
Merge pull request #14159 from emberjs/fix-child-views-leak
rwjblue Aug 30, 2016
cfbf965
Add 2.8.0-beta.5 to CHANGELOG.md.
Aug 31, 2016
9423fc6
Release v2.8.0-beta.5.
Aug 31, 2016
56f350a
Add failing test around moduleName mutation
asakusuma Sep 2, 2016
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
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dist: trusty

node_js:
- "5"

cache:
directories:
- node_modules
Expand All @@ -23,12 +23,6 @@ install:
after_success:
- "./bin/publish_builds"

branches:
only:
- master
- beta
- stable

env:
global:
- SAUCE_USERNAME=ember-ci
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# Ember Changelog

### 2.8.0-beta.5 (August 30, 2016)

- [#14159](https://github.com/emberjs/ember.js/pull/14159) [BUGFIX] Fix rendering system cleanup.

### 2.8.0-beta.4 (August 29, 2016)

- [#14123](https://github.com/emberjs/ember.js/pull/14123) [BUGFIX] Avoid rerendering outlet state during router destruction.
- [#14077](https://github.com/emberjs/ember.js/pull/14077) [BUGFIX] Update route-recognizer.
- [#14087](https://github.com/emberjs/ember.js/pull/14087) [BUGFIX] Check that route handler exists before triggering actions.
- [#14106](https://github.com/emberjs/ember.js/pull/14106) [BUGFIX] Avoid assertion when `id=` is provided to tagless components.
- [#14110](https://github.com/emberjs/ember.js/pull/14110) [BUGFIX] Fix issues with revalidation during teardown.
- [#14117](https://github.com/emberjs/ember.js/pull/14117) [BUGFIX] Call ArrayProxy's content change hooks
- [#14135](https://github.com/emberjs/ember.js/pull/14135) [BUGFIX] Fix issues around Engine setup and teardown.
- [#14140](https://github.com/emberjs/ember.js/pull/14140) [BUGFIX] Ensure component injections happen in engine instances.


### 2.8.0-beta.3 (August 15, 2016)

- [#14009](https://github.com/emberjs/ember.js/pull/14009) [BUGFIX] Fix usage of `role` when used in `attributeBindings`.
- [#14044](https://github.com/emberjs/ember.js/pull/14044) / [#14062](https://github.com/emberjs/ember.js/pull/14062) / [#14066](https://github.com/emberjs/ember.js/pull/14066) [BUGFIX] Update `router.js` so that `getHandlers` is invoked lazily.
- [#14054](https://github.com/emberjs/ember.js/pull/14054) [BUGFIX] Ensure substates properly work with `resetNamespace`.
- [#14033](https://github.com/emberjs/ember.js/pull/14033) [BUGFIX] Ensure `fillIn` acceptance test helper only sets value to first matched element.
- [#14058](https://github.com/emberjs/ember.js/pull/14058) [BUGFIX] Fix issues related to `Ember.Router.map` changes in 2.7.0.
- [#14068](https://github.com/emberjs/ember.js/pull/14068) [BUGFIX] Prevent errors when clicking a `{{link-to}}` during an existing transition.


### 2.8.0-beta.2 (August 1, 2016)

- [#13887](https://github.com/emberjs/ember.js/pull/13887) [BUGFIX] Add assertions for illegal component invocations.
- [#13892](https://github.com/emberjs/ember.js/pull/13892) [CLEANUP] Remove `View#createElement` / `View#destroyElement`.
- [#13895](https://github.com/emberjs/ember.js/pull/13895) [BUGFIX] Fix template meta lookup for nested tagless and blockless components.
- [#13911](https://github.com/emberjs/ember.js/pull/13911) [BUGFIX] Avoid using clobbering `.env` property on components.
- [#13913](https://github.com/emberjs/ember.js/pull/13913) [BUGFIX] Disallow paths beginning with @ in templates.
- [#13920](https://github.com/emberjs/ember.js/pull/13920) [BUGFIX] Add more info to the `Ember.Binding` deprecation.

### 2.8.0-beta.1 (July 25, 2016)

- [#13757](https://github.com/emberjs/ember.js/pull/13757) / [#13773](https://github.com/emberjs/ember.js/pull/13773) [CLEANUP] Remove legacy view layer features.
- [#13819](https://github.com/emberjs/ember.js/pull/13819) [DOC] Add documentation for container (getOwner, etc.)
- [#13855](https://github.com/emberjs/ember.js/pull/13855) [FEATURE ember-string-ishtmlsafe] Enable by defaut.
- [#13855](https://github.com/emberjs/ember.js/pull/13855) [FEATURE ember-application-engines] Enable by default.
- [#13855](https://github.com/emberjs/ember.js/pull/13855) [FEATURE ember-runtime-enumerable-includes] Enable by default.
- [#13855](https://github.com/emberjs/ember.js/pull/13855) [FEATURE ember-testing-check-waiters] Enable by default.

### 2.7.1 (August 15, 2016)

- [#13920](https://github.com/emberjs/ember.js/pull/13920) [BUGFIX] Add more info to the `Ember.Binding` deprecation.
- [#14058](https://github.com/emberjs/ember.js/pull/14058) [BUGFIX] Fix issues related to `Ember.Router.map` changes in 2.7.0.
- [#14068](https://github.com/emberjs/ember.js/pull/14068) [BUGFIX] Prevent errors when clicking a `{{link-to}}` during an existing transition.

### 2.7.0 (July 25, 2016)

- [#13764](https://github.com/emberjs/ember.js/pull/13764) [BUGFIX] Keep rest positional parameters when nesting contextual components if needed.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0+canary
2.8.0-beta.5
2 changes: 1 addition & 1 deletion bin/bower_ember_build
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ git remote rm origin
# Sending output to /dev/null to prevent GH_TOKEN leak on error.
git remote add origin https://${USER}:${GH_TOKEN}@github.com/${COMPONENTS_EMBER_REPO_SLUG}.git &> /dev/null
git add -A
git commit -m "Ember Bower Auto build for https://github.com/emberjs/ember.js/commits/${TRAVIS_COMMIT}."
git commit -m "Ember Bower Auto build for https://github.com/emberjs/ember.js/commit/${TRAVIS_COMMIT}."

# Sending output to /dev/null to prevent GH_TOKEN leak on error.
git push -fq origin ${CHANNEL} &> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"backburner": "https://github.com/ebryn/backburner.js.git#b893c979cb38f9819f65561725907add1aed7b21",
"rsvp": "https://github.com/tildeio/rsvp.js.git#3.0.20",
"router.js": "https://github.com/tildeio/router.js.git#7f2f7c16540570ad2c720f9bd9a7a55e4bcdc95c",
"router.js": "https://github.com/tildeio/router.js.git#55d8b781bd8c137d1f258ee51d8493d7342e9631",
"dag-map": "https://github.com/krisselden/dag-map.git#1.0.2",
"ember-dev": "https://github.com/emberjs/ember-dev.git#eace5340485bdb5e4223ab67fecf4aff31c1940c"
}
Expand Down
12 changes: 6 additions & 6 deletions features.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"features": {
"features-stripped-test": null,
"ember-routing-route-configured-query-params": null,
"ember-libraries-isregistered": null,
"features-stripped-test": false,
"ember-routing-route-configured-query-params": false,
"ember-libraries-isregistered": false,
"ember-application-engines": true,
"ember-glimmer": null,
"ember-glimmer": false,
"ember-runtime-computed-uniq-by": true,
"ember-improved-instrumentation": null,
"ember-improved-instrumentation": false,
"ember-runtime-enumerable-includes": true,
"ember-string-ishtmlsafe": true,
"ember-testing-check-waiters": true,
"ember-metal-weakmap": null
"ember-metal-weakmap": false
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember",
"license": "MIT",
"version": "2.7.0-canary",
"version": "2.8.0-beta.5",
"keywords": [
"ember-addon"
],
Expand Down Expand Up @@ -43,7 +43,7 @@
"mocha": "^2.4.5",
"qunit-extras": "^1.5.0",
"qunitjs": "^1.22.0",
"route-recognizer": "0.2.0",
"route-recognizer": "^0.2.2",
"rsvp": "~3.2.1",
"serve-static": "^1.10.0",
"simple-dom": "^0.3.0",
Expand Down
32 changes: 17 additions & 15 deletions packages/ember-application/lib/system/application-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,7 @@ const ApplicationInstance = EngineInstance.extend({
},

setupRegistry(options) {
let registry = this.__registry__;

registry.register('-environment:main', options.toEnvironment(), { instantiate: false });
registry.injection('view', '_environment', '-environment:main');
registry.injection('route', '_environment', '-environment:main');

registry.register('service:-document', options.document, { instantiate: false });

if (options.isInteractive) {
registry.injection('view', 'renderer', 'renderer:-dom');
registry.injection('component', 'renderer', 'renderer:-dom');
} else {
registry.injection('view', 'renderer', 'renderer:-inert');
registry.injection('component', 'renderer', 'renderer:-inert');
}
this.constructor.setupRegistry(this.__registry__, options);
},

router: computed(function() {
Expand Down Expand Up @@ -288,6 +274,21 @@ const ApplicationInstance = EngineInstance.extend({
}
});

ApplicationInstance.reopenClass({
/**
@private
@method setupRegistry
@param {Registry} registry
@param {BootOptions} options
*/
setupRegistry(registry, options = new BootOptions()) {
registry.register('-environment:main', options.toEnvironment(), { instantiate: false });
registry.register('service:-document', options.document, { instantiate: false });

this._super(registry, options);
}
});

/**
A list of boot-time configuration options for customizing the behavior of
an `Ember.ApplicationInstance`.
Expand Down Expand Up @@ -474,6 +475,7 @@ BootOptions.prototype.toEnvironment = function() {
let env = assign({}, environment);
// For compatibility with existing code
env.hasDOM = this.isBrowser;
env.isInteractive = this.isInteractive;
env.options = this;
return env;
};
Expand Down
3 changes: 2 additions & 1 deletion packages/ember-application/lib/system/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import { ENV } from 'ember-environment';
import { assert, debug } from 'ember-metal/debug';
import dictionary from 'ember-metal/dictionary';
import libraries from 'ember-metal/libraries';
import { isTesting } from 'ember-metal/testing';
import { get } from 'ember-metal/property_get';
Expand Down Expand Up @@ -1031,7 +1032,7 @@ Application.reopenClass({
});

function commonSetupRegistry(registry) {
registry.register('-view-registry:main', { create() { return {}; } });
registry.register('-view-registry:main', { create() { return dictionary(null); } });

registry.register('route:basic', Route);
registry.register('event_dispatcher:main', EventDispatcher);
Expand Down
57 changes: 51 additions & 6 deletions packages/ember-application/lib/system/engine-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const EngineInstance = EmberObject.extend(RegistryProxy, ContainerProxy, {
@param options {Object}
@return {Promise<Ember.EngineInstance,Error>}
*/
boot(options = {}) {
boot(options) {
if (this._bootPromise) { return this._bootPromise; }

this._bootPromise = new RSVP.Promise(resolve => resolve(this._bootSync(options)));
Expand Down Expand Up @@ -102,13 +102,19 @@ const EngineInstance = EmberObject.extend(RegistryProxy, ContainerProxy, {
this.cloneParentDependencies();
}

this.setupRegistry(options);

this.base.runInstanceInitializers(this);

this._booted = true;

return this;
},

setupRegistry(options = this.__container__.lookup('-environment:main')) {
this.constructor.setupRegistry(this.__registry__, options);
},

/**
Unregister a factory.

Expand All @@ -133,6 +139,30 @@ const EngineInstance = EmberObject.extend(RegistryProxy, ContainerProxy, {
}
});

EngineInstance.reopenClass({
/**
@private
@method setupRegistry
@param {Registry} registry
@param {BootOptions} options
*/
setupRegistry(registry, options) {
// when no options/environment is present, do nothing
if (!options) { return; }

registry.injection('view', '_environment', '-environment:main');
registry.injection('route', '_environment', '-environment:main');

if (options.isInteractive) {
registry.injection('view', 'renderer', 'renderer:-dom');
registry.injection('component', 'renderer', 'renderer:-dom');
} else {
registry.injection('view', 'renderer', 'renderer:-inert');
registry.injection('component', 'renderer', 'renderer:-inert');
}
}
});

if (isEnabled('ember-application-engines')) {
EngineInstance.reopen({
/**
Expand Down Expand Up @@ -170,17 +200,32 @@ if (isEnabled('ember-application-engines')) {
cloneParentDependencies() {
let parent = getEngineParent(this);

[
let registrations = [
'route:basic',
'event_dispatcher:main',
'service:-routing'
].forEach(key => this.register(key, parent.resolveRegistration(key)));
];

if (isEnabled('ember-glimmer')) {
registrations.push('service:-glimmer-environment');
}

registrations.forEach(key => this.register(key, parent.resolveRegistration(key)));

[
let env = parent.lookup('-environment:main');
this.register('-environment:main', env, { instantiate: false });

let singletons = [
'router:main',
P`-bucket-cache:main`,
'-view-registry:main'
].forEach(key => this.register(key, parent.lookup(key), { instantiate: false }));
'-view-registry:main',
`renderer:-${env.isInteractive ? 'dom' : 'inert'}`
];

singletons.forEach(key => this.register(key, parent.lookup(key), { instantiate: false }));

this.inject('view', '_environment', '-environment:main');
this.inject('route', '_environment', '-environment:main');
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import jQuery from 'ember-views/system/jquery';
import factory from 'container/tests/test-helpers/factory';
import isEnabled from 'ember-metal/features';
import { privatize as P } from 'container/registry';
import EmberObject from 'ember-runtime/system/object';

let application, appInstance;

Expand Down Expand Up @@ -140,7 +141,7 @@ QUnit.test('unregistering a factory clears all cached instances of that factory'

if (isEnabled('ember-application-engines')) {
QUnit.test('can build and boot a registered engine', function(assert) {
assert.expect(7);
assert.expect(isEnabled('ember-glimmer') ? 10 : 9);

let ChatEngine = Engine.extend();
let chatEngineInstance;
Expand All @@ -149,34 +150,59 @@ if (isEnabled('ember-application-engines')) {

run(() => {
appInstance = ApplicationInstance.create({ application });
appInstance.setupRegistry();
chatEngineInstance = appInstance.buildChildEngineInstance('chat');
});

return chatEngineInstance.boot()
.then(() => {
assert.ok(true, 'boot successful');

[
let registrations = [
'route:basic',
'event_dispatcher:main',
'service:-routing'
].forEach(key => {
];

if (isEnabled('ember-glimmer')) {
registrations.push('service:-glimmer-environment');
}

registrations.forEach(key => {
assert.strictEqual(
chatEngineInstance.resolveRegistration(key),
appInstance.resolveRegistration(key),
`Engine and parent app share registrations for '${key}'`);
});

[
let singletons = [
'router:main',
P`-bucket-cache:main`,
'-view-registry:main'
].forEach(key => {
'-view-registry:main',
'-environment:main'
];

let env = appInstance.lookup('-environment:main');
singletons.push(env.isInteractive ? 'renderer:-dom' : 'renderer:-inert');

singletons.forEach(key => {
assert.strictEqual(
chatEngineInstance.lookup(key),
appInstance.lookup(key),
`Engine and parent app share singleton '${key}'`);
});
});
});

QUnit.test('can build a registry via Ember.ApplicationInstance.setupRegistry() -- simulates ember-test-helpers', function(assert) {
let namespace = EmberObject.create({
Resolver: { create: function() { } }
});

let registry = Application.buildRegistry(namespace);

ApplicationInstance.setupRegistry(registry);

assert.equal(registry.resolve('service:-document'), document);
});
}
Loading