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

adjust assertion to allow for either undefined or null values #16485

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d52652b
Disable all features not enabled by default.
rwjblue Feb 14, 2018
6e665ba
Disable alpha publishing on beta CI.
rwjblue Feb 14, 2018
f1f4e9f
Add v3.1.0-beta.1 to CHANGELOG.md.
rwjblue Feb 14, 2018
c0b88bc
Release v3.1.0-beta.1.
rwjblue Feb 14, 2018
5164bbd
[DOC release] Fix issue with invalid YUIDoc parsing.
rwjblue Feb 14, 2018
b4f3a2c
[BUGFIX lts] Ensure errors in deferred component hooks can be recovered.
rwjblue Feb 14, 2018
fde6924
Update published build type for beta.
rwjblue Feb 15, 2018
fb00366
[BUGFIX beta] computed.sort should not sort if sortProperties is empty
mmun Feb 15, 2018
c2cc96f
[BUGFIX beta] Fix issue with `Ember.trySet` on destroyed objects.
rwjblue Apr 18, 2016
0f8e2f4
Add v3.1.0-beta.2 to CHANGELOG
kategengler Feb 19, 2018
d09d63e
Release v3.1.0-beta.2
kategengler Feb 19, 2018
aeecf0c
[BUGFIX] Don't use destroyApp if new API is being used
Serabe Feb 9, 2018
6097f38
[BUGFIX beta] Fix ChainNode unchaining
mmun Feb 23, 2018
ee675dc
[DOC release] Fix expandProperties documentation
kturney Feb 14, 2018
42ba729
[BUGFIX beta] Ensure accessing a "proxy" itself does not error.
rwjblue Feb 23, 2018
b9831fe
[BUGFIX beta] Fix nested ObserverSet flushes
mmun Feb 24, 2018
b997d55
[BUGFIX beta] Fix version with many special chars.
rwjblue Feb 25, 2018
bb2aea3
[BUGFIX beta] Update to glimmer-vm@0.32.1.
rwjblue Feb 25, 2018
9def0b0
Fix merge conflict in cherry-pick.
rwjblue Feb 25, 2018
549e06f
[BUGFIX release] Update to router_js@2.0.0-beta.2.
rwjblue Feb 25, 2018
ab20e22
[BUGFIX beta] Ensure all "internal symbols" avoid the proxy assertion.
rwjblue Feb 25, 2018
7662c8a
Add v3.1.0-beta.3 to CHANGELOG
kategengler Feb 26, 2018
1fb9cb6
Release v3.1.0-beta.3
kategengler Feb 26, 2018
45d0730
[BUGFIX beta] Fix input macro params handling
Serabe Feb 26, 2018
2fe9283
[BUGFIX beta] Revert "Update to backburner.js@2.2.0."
rwjblue Feb 27, 2018
7111411
[BUGFIX beta] Lock backburner.js to 2.1.0.
rwjblue Feb 27, 2018
7dbdf8d
[BUGFIX beta] Revert "[CLEANUP] Remove ':change' suffix on change eve…
mmun Feb 27, 2018
2717b1a
[BUGFIX beta] Ensure proper .toString() of default components.
rwjblue Mar 1, 2018
3be23a2
Add v3.1.0-beta.4 to CHANGELOG
kategengler Mar 5, 2018
2054cca
Release v3.1.0-beta.4
kategengler Mar 5, 2018
c96b801
[DOCS beta] debug functions are removed from prod build in apps
chancancode Mar 6, 2018
c2419f1
Merge pull request #16330 from emberjs/assert-docs
rwjblue Mar 7, 2018
ce28451
[DOC] Fix transitionToRoute documentation
Mar 6, 2018
00f95bd
[BUGFIX beta] Ensure Mixin.prototype.toString does not return constru…
meslater1030 Aug 25, 2017
7b62cda
[BUGFIX beta] - expanded syntax error for if handlebars helper to inc…
AlexTraher Mar 8, 2018
821a34e
[BUGFIX] Fix initialiters tests blueprints
Serabe Mar 9, 2018
d60b301
[BUGFIX beta] Bring RSVP.cast back from the dead
Serabe Mar 9, 2018
daeb631
[BUGFIX release] Adds toJSON to list of descriptorTrap assertion exce…
mani-mishra Mar 9, 2018
b822e6b
[BUGFIX release] Fold all trap methods together
mani-mishra Mar 12, 2018
8f395f0
Add v3.1.0-beta.5 to CHANGELOG
kategengler Mar 12, 2018
ac55699
Release v3.1.0-beta.5
kategengler Mar 12, 2018
7169066
[BUGFIX beta] revert jquery-less pendingRequest event handling
rondale-sc Apr 4, 2018
eef7288
clarify documentation for makeArray
eflanagan0 Apr 2, 2018
76746ab
[DOCS Beta] Tweaked the url for the Ember Inspector
acorncom Mar 23, 2018
efb0511
Add failing tests for -addon blueprints with --pod
jamescdavis Feb 26, 2018
90d484c
[BUGFIX release] Ignore --pod for -addon blueprints
jamescdavis Feb 26, 2018
96ed878
[DOC release] Fix Router Service copypasta mistake
gjastrab Mar 23, 2018
ad09111
Rename private property Route#router to Router#_router
cibernox Mar 2, 2018
2a19b7b
Add v3.1.0 to CHANGELOG
kategengler Apr 10, 2018
9a81db7
Release v3.1.0
kategengler Apr 10, 2018
811638f
[BUGFIX release] adjust assertion to allow for either undefined or nu…
Dhaulagiri Apr 11, 2018
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
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ branches:
only:
- master
- beta
- stable
- release
# npm version tags
- /^v\d+\.\d+\.\d+/

Expand All @@ -63,11 +63,10 @@ env:
- secure: e0yxVfwVW61d3Mi/QBOsY6Rfd1mZd3VXUd9xNRoz/fkvQJRuVwDe7oG3NOuJ4LZzvMw7BJ+zpDV9D8nKhAyPEEOgpkkMHUB7Ds83pHG4qSMzm4EAwBCadDLXCQirldz8dzN5FAqgGucXoj5fj/p2SKOkO6qWIZveGr8pdBJEG1E=
matrix:
- TEST_SUITE=browserstack
- TEST_SUITE=each-package-tests BUILD_TYPE=canary PUBLISH=true
- TEST_SUITE=each-package-tests BUILD_TYPE=release PUBLISH=true
- TEST_SUITE=built-tests EMBER_ENV=production
- TEST_SUITE=old-jquery-and-extend-prototypes
- TEST_SUITE=node
- TEST_SUITE=blueprints
- TEST_SUITE=travis-browsers
- TEST_SUITE=each-package-tests BUILD_TYPE=alpha PUBLISH=true
- TEST_SUITE=code-quality
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Ember Changelog

### v3.1.0 (April 10, 2018)
- [#16293](https://github.com/emberjs/ember.js/pull/16293) [BUGFIX] Ignore --pod for -addon blueprints: helper, initializer, and instance-initializer
- [#16312](https://github.com/emberjs/ember.js/pull/16312) [DEPRECATION] Deprecate `Route.prototype.router` in favor of `Route.prototype._router`
- [#16326](https://github.com/emberjs/ember.js/pull/16326) [BUGFIX] Expanded syntax error for if handlebars helper to include source of error
- [#16350](https://github.com/emberjs/ember.js/pull/16350) [BUGFIX] Fix initializers tests blueprints
- [#16294](https://github.com/emberjs/ember.js/pull/16294) [BUGFIX] Fix input macro params handling
- [#16307](https://github.com/emberjs/ember.js/pull/16307) [BUGFIX] Ensure proper .toString() of default components.
- [#16287](https://github.com/emberjs/ember.js/pull/16287) [BUGFIX] Update to router_js@2.0.0-beta.2.
- [#16245](https://github.com/emberjs/ember.js/pull/16245) [BUGFIX] Ensure errors in deferred component hooks can be recovered.
- [#16246](https://github.com/emberjs/ember.js/pull/16246) [BUGFIX] computed.sort should not sort if sortProperties is empty
- [emberjs/rfcs#276](https://github.com/emberjs/rfcs/blob/master/text/0276-named-args.md) [FEATURE named-args] enabled by default.
- [emberjs/rfcs#278](https://github.com/emberjs/rfcs/blob/master/text/0278-template-only-components.md) [FEATURE template-only-glimmer-components] Enable-able via `@ember/optional-features` addon.
- [emberjs/rfcs#280](https://github.com/emberjs/rfcs/blob/master/text/0280-remove-application-wrapper.md) [FEATURE application-template-wrapper] Enable-able via `@ember/optional-features` addon.
- [emberjs/rfcs#281](https://github.com/emberjs/rfcs/blob/master/text/0281-es5-getters.md) [FEATURE native-es5-getters] Enabled by default.
- [#15828](https://github.com/emberjs/ember.js/pull/15828) Upgrade glimmer-vm to latest version.

### v3.0.0 (February 13, 2018)

- [#16218](https://github.com/emberjs/ember.js/pull/16218) [BUGFIX beta] Prevent errors when using const `(get arr 1)`.
Expand Down
10 changes: 0 additions & 10 deletions blueprints/-addon-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ module.exports = {
fileMapTokens: function() {
return {
__name__: function(options) {
if (options.pod && options.hasPathToken) {
return options.locals.blueprintName;
}
return options.dasherizedModuleName;
},
__path__: function(options) {
if (options.pod && options.hasPathToken) {
return path.join(options.podPath, options.dasherizedModuleName);
}
return inflector.pluralize(options.locals.blueprintName);
},
__root__: function(options) {
Expand All @@ -42,10 +36,6 @@ module.exports = {
modulePathSegments = [addonName, inflector.pluralize(blueprintName), fileName];
}

if (options.pod) {
modulePathSegments = [addonName, fileName, blueprintName];
}

return {
modulePath: modulePathSegments.join('/'),
blueprintName: blueprintName
Expand Down
2 changes: 1 addition & 1 deletion blueprints/acceptance-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = useTestFrameworkDetector({
return {
testFolderRoot: testFolderRoot,
friendlyTestName,
destroyAppExists: destroyAppExists
destroyAppExists
};
}
});
5 changes: 4 additions & 1 deletion blueprints/initializer-test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const path = require('path');
const stringUtils = require('ember-cli-string-utils');
const existsSync = require('exists-sync');

const useTestFrameworkDetector = require('../test-framework-detector');

Expand All @@ -9,7 +11,8 @@ module.exports = useTestFrameworkDetector({
locals: function(options) {
return {
friendlyTestName: ['Unit', 'Initializer', options.entity.name].join(' | '),
dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix),
destroyAppExists: existsSync(path.join(this.project.root, '/tests/helpers/destroy-app.js'))
};
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { run } from '@ember/runloop';

import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop'; <% } %>

module('<%= friendlyTestName %>', {
beforeEach() {
Expand All @@ -13,7 +13,7 @@ module('<%= friendlyTestName %>', {
});
},
afterEach() {
destroyApp(this.application);
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Application from '@ember/application';
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import destroyApp from '../../helpers/destroy-app';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
setupTest(hooks);
Expand All @@ -19,7 +19,7 @@ module('<%= friendlyTestName %>', function(hooks) {
});

hooks.afterEach(function() {
destroyApp(this.application);
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
});

// Replace this with your real tests.
Expand Down
5 changes: 4 additions & 1 deletion blueprints/instance-initializer-test/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

const path = require('path');
const existsSync = require('exists-sync');
const stringUtils = require('ember-cli-string-utils');

const useTestFrameworkDetector = require('../test-framework-detector');
Expand All @@ -9,7 +11,8 @@ module.exports = useTestFrameworkDetector({
locals: function(options) {
return {
friendlyTestName: ['Unit', 'Instance Initializer', options.entity.name].join(' | '),
dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix),
destroyAppExists: existsSync(path.join(this.project.root, '/tests/helpers/destroy-app.js'))
};
}
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Application from '@ember/application';
import { run } from '@ember/runloop';
import { initialize } from '<%= dasherizedModulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';
import { module, test } from 'qunit';<% if (destroyAppExists) { %>
import destroyApp from '../../helpers/destroy-app';<% } %>

module('<%= friendlyTestName %>', {
beforeEach() {
Expand All @@ -13,7 +13,7 @@ module('<%= friendlyTestName %>', {
},
afterEach() {
run(this.appInstance, 'destroy');
destroyApp(this.application);
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Application from '@ember/application';
import { initialize } from '<%= dasherizedModulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import destroyApp from '../../helpers/destroy-app';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
setupTest(hooks);
Expand All @@ -18,8 +18,8 @@ module('<%= friendlyTestName %>', function(hooks) {
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
destroyApp(this.application);
destroyApp(this.instance);
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
<% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
});

// Replace this with your real tests.
Expand Down
2 changes: 1 addition & 1 deletion broccoli/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports.VERSION = (() => {
let sha = info.sha || '';
let suffix = process.env.BUILD_TYPE || info.branch;
// * remove illegal non-alphanumeric characters from branch name.
suffix = suffix && suffix.replace(/[^a-zA-Z\d\s-]/, '-');
suffix = suffix && suffix.replace(/[^a-zA-Z\d\s-]/g, '-');
let metadata = sha.slice(0, 8);

return `${packageVersion}${suffix ? '-' + suffix : ''}+${metadata}`;
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-libraries-isregistered": null,
"ember-improved-instrumentation": null,
"features-stripped-test": false,
"ember-libraries-isregistered": false,
"ember-improved-instrumentation": false,
"ember-glimmer-named-arguments": true,
"ember-metal-es5-getters": true,
"ember-routing-router-service": true,
"ember-engines-mount-params": true,
"ember-module-unification": null,
"glimmer-custom-component-manager": null,
"ember-template-block-let-helper": null
"ember-module-unification": false,
"glimmer-custom-component-manager": false,
"ember-template-block-let-helper": false
},
"deprecations": {
"container-lookupFactory": "2.12.0",
Expand Down
7 changes: 7 additions & 0 deletions node-tests/blueprints/helper-addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@ describe('Blueprint: helper-addon', function() {
.to.equal(fixture('helper-addon.js'));
});
});

it('helper-addon foo/bar-baz --pod', function() {
return emberGenerateDestroy(['helper-addon', 'foo/bar-baz', '--pod'], _file => {
expect(_file('app/helpers/foo/bar-baz.js'))
.to.equal(fixture('helper-addon.js'));
});
});
});
});
7 changes: 7 additions & 0 deletions node-tests/blueprints/initializer-addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ describe('Blueprint: initializer-addon', function() {
.to.contain("export { default, initialize } from 'my-addon/initializers/foo';");
});
});

it('initializer-addon foo --pod', function() {
return emberGenerateDestroy(['initializer-addon', 'foo', '--pod'], _file => {
expect(_file('app/initializers/foo.js'))
.to.contain("export { default, initialize } from 'my-addon/initializers/foo';");
});
});
});
});
7 changes: 7 additions & 0 deletions node-tests/blueprints/instance-initializer-addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ describe('Blueprint: instance-initializer-addon', function() {
.to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';");
});
});

it('instance-initializer-addon foo --pod', function() {
return emberGenerateDestroy(['instance-initializer-addon', 'foo', '--pod'], _file => {
expect(_file('app/instance-initializers/foo.js'))
.to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';");
});
});
});
});
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
"resolve": "^1.5.0"
},
"devDependencies": {
"@glimmer/compiler": "^0.32.0",
"@glimmer/interfaces": "^0.32.0",
"@glimmer/node": "^0.32.0",
"@glimmer/opcode-compiler": "^0.32.0",
"@glimmer/program": "^0.32.0",
"@glimmer/reference": "^0.32.0",
"@glimmer/runtime": "^0.32.0",
"@glimmer/compiler": "^0.32.1",
"@glimmer/interfaces": "^0.32.1",
"@glimmer/node": "^0.32.1",
"@glimmer/opcode-compiler": "^0.32.1",
"@glimmer/program": "^0.32.1",
"@glimmer/reference": "^0.32.1",
"@glimmer/runtime": "^0.32.1",
"@types/rsvp": "^4.0.1",
"auto-dist-tag": "^0.1.5",
"aws-sdk": "^2.46.0",
Expand All @@ -85,7 +85,7 @@
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
"babel-plugin-transform-proto-to-assign": "^6.26.0",
"babel-template": "^6.26.0",
"backburner.js": "^2.2.0",
"backburner.js": "2.1.0",
"broccoli-babel-transpiler": "^6.1.2",
"broccoli-concat": "^3.2.2",
"broccoli-debug": "^0.6.4",
Expand Down Expand Up @@ -120,8 +120,8 @@
"puppeteer": "^0.13.0",
"qunit": "^2.5.0",
"route-recognizer": "^0.3.3",
"router_js": "^2.0.0-beta.1",
"rsvp": "^4.8.0",
"router_js": "^2.0.0-beta.2",
"rsvp": "^4.8.2",
"semver": "^5.5.0",
"serve-static": "^1.12.2",
"simple-dom": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-application/lib/system/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function commonSetupRegistry(registry) {
registry.injection('router', '_bucketCache', P`-bucket-cache:main`);
registry.injection('route', '_bucketCache', P`-bucket-cache:main`);

registry.injection('route', 'router', 'router:main');
registry.injection('route', '_router', 'router:main');

// Register the routing service...
registry.register('service:-routing', RoutingService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ moduleFor('Application', class extends ApplicationTestCase {
verifyInjection(assert, application, 'router', '_bucketCache', P`-bucket-cache:main`);
verifyInjection(assert, application, 'route', '_bucketCache', P`-bucket-cache:main`);

verifyInjection(assert, application, 'route', 'router', 'router:main');
verifyInjection(assert, application, 'route', '_router', 'router:main');

verifyRegistration(assert, application, 'component:-text-field');
verifyRegistration(assert, application, 'component:-text-area');
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-application/tests/system/engine_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ moduleFor('Engine', class extends TestCase {
verifyInjection(assert, engine, 'router', '_bucketCache', P`-bucket-cache:main`);
verifyInjection(assert, engine, 'route', '_bucketCache', P`-bucket-cache:main`);

verifyInjection(assert, engine, 'route', 'router', 'router:main');
verifyInjection(assert, engine, 'route', '_router', 'router:main');

verifyRegistration(assert, engine, 'component:-text-field');
verifyRegistration(assert, engine, 'component:-text-area');
Expand Down
Loading