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

Bump Ember, fix inspect issues #837

Merged
merged 2 commits into from
Jul 25, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/

# ember-inspector specific
ember_debug/vendor/startup-wrapper.js
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ module.exports = {
// node files
{
files: [
'testem.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
'Gruntfile.js'
Expand Down
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

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

.DS_Store

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

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log
config/secrets.json

/.mozilla-addon-sdk

# 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
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"repository": "https://github.com/emberjs/ember-inspector",
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js app config lib server tests ember_debug",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test",
"watch": "ember build --watch",
Expand All @@ -29,15 +29,14 @@
"previousEmberVersionsSupported": [
"0.0.0"
],
"dependencies": {},
"devDependencies": {
"@html-next/vertical-collection": "^1.0.0-beta.10",
"amd-name-resolver": "^0.0.5",
"aws-sdk": "^2.3.3",
"babel-eslint": "^8.2.2",
"babel-plugin-transform-es2015-modules-amd": "^6.24.0",
"basiccontext": "^3.5.1",
"broccoli-asset-rev": "^2.4.5",
"broccoli-asset-rev": "^2.7.0",
"broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.0.1",
"broccoli-file-creator": "^1.1.1",
Expand All @@ -46,7 +45,7 @@
"broccoli-stew": "^1.3.2",
"broccoli-string-replace": "^0.1.1",
"ember-async-image": "0.1.1",
"ember-cli": "~3.1.0-beta.1",
"ember-cli": "~3.3.0",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.6.0",
"ember-cli-dependency-checker": "^2.1.0",
Expand All @@ -62,13 +61,13 @@
"ember-cli-uglify": "^2.0.2",
"ember-concurrency": "0.8.15",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-native-dom-helpers": "^0.4.2",
"ember-pikaday": "^2.2.2",
"ember-resolver": "^4.0.0",
"ember-route-action-helper": "^2.0.6",
"ember-source": "~3.0.0",
"ember-source": "~3.3.0",
"ember-source-channel-url": "^1.0.1",
"ember-svg-jar": "^1.1.1",
"ember-truth-helpers": "2.0.0",
Expand All @@ -88,6 +87,6 @@
"yauzl": "^2.4.1"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"node": "6.* || 8.* || >= 10.*"
}
}
11 changes: 6 additions & 5 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ module.exports = {
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900'
].filter(Boolean)
Expand Down
17 changes: 8 additions & 9 deletions tests/ember_debug/object-inspector-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { visit, find } from '@ember/test-helpers';
import Mixin from '@ember/object/mixin';
import Component from '@ember/component';
import { inspect } from '@ember/debug';
import { run } from '@ember/runloop';
import { guidFor } from '@ember/object/internals';
import EmberObject, { computed } from '@ember/object';
Expand Down Expand Up @@ -120,8 +121,7 @@ module('Ember Debug - Object Inspector', function(hooks) {

let nameProperty = secondDetail.properties[1];
assert.equal(nameProperty.name, 'name');
assert.equal(nameProperty.value.inspect, 'My Object');

assert.equal(nameProperty.value.inspect, inspect('My Object'));
});

test('Computed properties are correctly calculated', function(assert) {
Expand Down Expand Up @@ -164,7 +164,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
assert.equal(message.property, 'hi');
assert.equal(message.mixinIndex, 1);
assert.equal(message.value.type, 'type-string');
assert.equal(message.value.inspect, 'Hello');
assert.equal(message.value.inspect, inspect('Hello'));
assert.ok(message.value.computed);

assert.verifySteps([
Expand All @@ -191,8 +191,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
assert.equal(computedProperty.name, 'hi');
assert.ok(computedProperty.value.computed);
assert.equal(computedProperty.value.type, 'type-string');
assert.equal(computedProperty.value.inspect, 'Hello');

assert.equal(computedProperty.value.inspect, inspect('Hello'));
});

test('Properties are correctly bound', function(assert) {
Expand Down Expand Up @@ -230,7 +229,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
assert.equal(message.property, 'name');
assert.equal(message.mixinIndex, 1);
assert.equal(message.value.computed, false);
assert.equal(message.value.inspect, 'Alex');
assert.equal(message.value.inspect, inspect('Alex'));
assert.equal(message.value.type, 'type-string');

// un-cached computed properties are not bound until calculated
Expand All @@ -254,7 +253,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
assert.equal(message.property, 'hi');
assert.equal(message.mixinIndex, 1);
assert.ok(message.value.computed);
assert.equal(message.value.inspect, 'Hello!');
assert.equal(message.value.inspect, inspect('Hello!'));
assert.equal(message.value.type, 'type-string');
});

Expand All @@ -279,7 +278,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
// A property updated message is published
assert.equal(name, 'objectInspector:updateProperty');
assert.equal(message.property, 'name');
assert.equal(message.value.inspect, 'Alex');
assert.equal(message.value.inspect, inspect('Alex'));
assert.equal(message.value.type, 'type-string');
});

Expand Down Expand Up @@ -558,7 +557,7 @@ module('Ember Debug - Object Inspector', function(hooks) {
});
await wait();
assert.equal(name, 'objectInspector:updateProperty');
assert.equal(message.value.inspect, 'bar');
assert.equal(message.value.inspect, inspect('bar'));

// teardown
ignoreErrors = true;
Expand Down
3 changes: 2 additions & 1 deletion tests/ember_debug/view-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { run } from '@ember/runloop';
import Route from '@ember/routing/route';
import EmberObject from '@ember/object';
import Controller from '@ember/controller';
import { inspect } from '@ember/debug';
import { module, test } from 'qunit';
import hbs from 'htmlbars-inline-precompile';
import require from 'require';
Expand Down Expand Up @@ -239,7 +240,7 @@ module('Ember Debug - View', function(hooks) {

await visit('/posts');

assert.equal(message.tree.children[0].value.model.name, 'String as model');
assert.equal(message.tree.children[0].value.model.name, inspect('String as model'));
assert.equal(message.tree.children[0].value.model.type, 'type-string');
});

Expand Down
Loading