Permalink
Browse files

Upgrade Ember 1.12 -> Ember and Ember CLI 2.6

Thank you @raido for working on a big part of this in #553.
  • Loading branch information...
1 parent 92a8504 commit 08a3cf58957dcf8bd35a6091a431db57693eb6ae @teddyzeenny teddyzeenny committed Apr 29, 2016
Showing with 2,992 additions and 3,741 deletions.
  1. +1 −0 .editorconfig
  2. +2 −0 .eslintrc
  3. +4 −4 .travis.yml
  4. +3 −0 .watchmanconfig
  5. +0 −321 Brocfile.js
  6. +35 −27 app/app.js
  7. +11 −15 app/components/date-property-field.js
  8. +3 −3 app/{controllers/deprecation-source.js → components/deprecation-item-source.js}
  9. +17 −0 app/components/deprecation-item.js
  10. +6 −3 app/components/drag-handle.js
  11. +1 −4 app/components/draggable-column.js
  12. +1 −1 app/components/icon-button.js
  13. +40 −0 app/components/iframe-picker.js
  14. +31 −0 app/components/main-content.js
  15. +26 −21 app/{controllers → components}/mixin-detail.js
  16. +2 −2 app/{controllers → components}/mixin-details.js
  17. +29 −16 app/{controllers → components}/mixin-property.js
  18. +44 −0 app/components/object-inspector.js
  19. +112 −0 app/components/promise-item.js
  20. +14 −5 app/components/property-field.js
  21. +8 −0 app/components/record-filter.js
  22. +6 −9 app/components/record-item.js
  23. +16 −15 app/{controllers → components}/render-item.js
  24. +2 −2 app/components/resizable-column.js
  25. +4 −7 app/components/route-item.js
  26. +1 −3 app/components/send-to-console.js
  27. +21 −12 app/components/view-item.js
  28. +38 −0 app/components/x-app.js
  29. +17 −15 app/{views/list.js → components/x-list-content.js}
  30. +18 −0 app/components/x-list.js
  31. +0 −41 app/computed/custom-filter.js
  32. +5 −4 app/computed/debounce.js
  33. +19 −14 app/controllers/application.js
  34. +4 −3 app/controllers/container-type.js
  35. +0 −24 app/controllers/deprecation-item.js
  36. +29 −4 app/controllers/deprecations.js
  37. +0 −34 app/controllers/iframes.js
  38. +4 −2 app/controllers/info.js
  39. +0 −31 app/controllers/mixin-stack.js
  40. +0 −13 app/controllers/model-type-item.js
  41. +14 −9 app/controllers/model-types.js
  42. +0 −119 app/controllers/promise-item.js
  43. +36 −53 app/controllers/promise-tree.js
  44. +0 −9 app/controllers/record-filter.js
  45. +14 −10 app/controllers/records.js
  46. +2 −3 app/controllers/render-tree.js
  47. +34 −11 app/controllers/route-tree.js
  48. +13 −3 app/controllers/view-tree.js
  49. +2 −2 app/helpers/escape-url.js
  50. +6 −2 app/helpers/ms-to-time.js
  51. +4 −5 app/index.html
  52. +0 −20 app/mixins/fake-table.js
  53. +3 −0 app/resolver.js
  54. +14 −16 app/router.js
  55. +2 −2 app/routes/app-detected.js
  56. +11 −9 app/routes/application.js
  57. +1 −0 app/routes/container-type.js
  58. +1 −20 app/routes/deprecations.js
  59. +1 −1 app/routes/model-types.js
  60. +0 −22 app/routes/promise-tree.js
  61. +0 −21 app/routes/promises/index.js
  62. +1 −1 app/routes/records.js
  63. +1 −22 app/routes/route-tree.js
  64. +0 −24 app/routes/view-tree.js
  65. +1 −9 app/styles/app.scss
  66. +0 −12 app/styles/base.scss
  67. +0 −2 app/styles/dropdown.scss
  68. +0 −141 app/styles/fake_table.scss
  69. +213 −0 app/styles/list.scss
  70. +0 −25 app/styles/list_tree.scss
  71. +0 −26 app/styles/list_view.scss
  72. +0 −3 app/styles/mixin.scss
  73. +0 −2 app/styles/nav.scss
  74. +0 −1 app/styles/send_to_console.scss
  75. +0 −12 app/styles/split.scss
  76. +0 −183 app/styles/table_tree.scss
  77. +0 −73 app/styles/tree.scss
  78. +4 −4 app/templates/{main.hbs → -main.hbs}
  79. +29 −27 app/templates/application.hbs
  80. +1 −0 app/templates/components/deprecation-item-source.hbs
  81. +45 −0 app/templates/components/deprecation-item.hbs
  82. +8 −0 app/templates/components/iframe-picker.hbs
  83. +1 −0 app/templates/components/mixin-detail.hbs
  84. +59 −0 app/templates/components/mixin-details.hbs
  85. +1 −0 app/templates/components/mixin-property.hbs
  86. +3 −3 app/templates/components/not-detected.hbs
  87. +31 −0 app/templates/components/object-inspector.hbs
  88. +42 −0 app/templates/components/promise-item.hbs
  89. +1 −0 app/templates/components/record-filter.hbs
  90. +5 −1 app/templates/components/record-item.hbs
  91. +17 −0 app/templates/components/render-item.hbs
  92. +34 −1 app/templates/components/route-item.hbs
  93. +49 −1 app/templates/components/view-item.hbs
  94. +2 −2 app/templates/container-type-toolbar.hbs
  95. +11 −12 app/templates/container-type.hbs
  96. +4 −4 app/templates/container-types.hbs
  97. 0 app/templates/{ → container-types}/data/index.hbs
  98. +1 −1 app/templates/container-types/index-toolbar.hbs
  99. +2 −2 app/templates/deprecations-toolbar.hbs
  100. +17 −68 app/templates/deprecations.hbs
  101. +0 −4 app/templates/iframes.hbs
  102. +18 −23 app/templates/info.hbs
  103. +0 −7 app/templates/instance-item.hbs
  104. +0 −5 app/templates/list.hbs
  105. +0 −55 app/templates/mixin-details.hbs
  106. +0 −31 app/templates/mixin-stack.hbs
  107. +1 −1 app/templates/model-types-toolbar.hbs
  108. +4 −6 app/templates/model-types.hbs
  109. +1 −1 app/templates/nav.hbs
  110. +2 −2 app/templates/page-refresh.hbs
  111. +0 −46 app/templates/promise-item.hbs
  112. +8 −8 app/templates/promise-tree-toolbar.hbs
  113. +30 −20 app/templates/promise-tree.hbs
  114. +0 −5 app/templates/promises/error.hbs
  115. +0 −9 app/templates/record-item.hbs
  116. +8 −7 app/templates/records-toolbar.hbs
  117. +15 −8 app/templates/records.hbs
  118. +0 −20 app/templates/render-item.hbs
  119. +2 −2 app/templates/render-tree-toolbar.hbs
  120. +16 −19 app/templates/render-tree.hbs
  121. +0 −38 app/templates/route-item.hbs
  122. 0 app/templates/route-list.hbs
  123. +2 −2 app/templates/route-tree-toolbar.hbs
  124. +22 −12 app/templates/route-tree.hbs
  125. +0 −51 app/templates/view-item.hbs
  126. +3 −3 app/templates/view-tree-toolbar.hbs
  127. +24 −13 app/templates/view-tree.hbs
  128. 0 app/views/.gitkeep
  129. +0 −48 app/views/application.js
  130. +0 −4 app/views/container-type.js
  131. +0 −23 app/views/instance-list.js
  132. +0 −15 app/views/list-item.js
  133. +0 −25 app/views/main-content.js
  134. +0 −23 app/views/promise-list.js
  135. +0 −4 app/views/promise-tree.js
  136. +0 −34 app/views/record-list.js
  137. +0 −4 app/views/records.js
  138. +0 −29 app/views/render-list.js
  139. +0 −4 app/views/render-tree.js
  140. +0 −34 app/views/route-list.js
  141. +0 −4 app/views/route-tree.js
  142. +0 −74 app/views/view-list.js
  143. +0 −4 app/views/view-tree.js
  144. +7 −12 bower.json
  145. +11 −0 config/deprecation-workflow.js
  146. +0 −4 config/environment.js
  147. +339 −0 ember-cli-build.js
  148. +15 −11 ember_debug/deprecation-debug.js
  149. +0 −6 ember_debug/libs/promise-assembler.js
  150. +8 −3 ember_debug/libs/source-map.js
  151. +6 −14 ember_debug/promise-debug.js
  152. +34 −105 ember_debug/view-debug.js
  153. +25 −16 package.json
  154. +9 −9 public/crossdomain.xml
  155. +2 −3 public/robots.txt
  156. +13 −0 testem.js
  157. +1 −0 testem.json
  158. +0 −2 tests/.eslintrc
  159. +4 −2 tests/.jshintrc
  160. +28 −21 tests/{integration → acceptance}/container_test.js
  161. +41 −41 tests/{integration/data_test.js → acceptance/data-test.js}
  162. +30 −39 tests/{integration/deprecation_test.js → acceptance/deprecation-test.js}
  163. +8 −8 tests/{integration/info_test.js → acceptance/info-test.js}
  164. +74 −76 tests/{integration/object_inspector_test.js → acceptance/object-inspector-test.js}
  165. +63 −85 tests/{integration/promise_test.js → acceptance/promise-test.js}
  166. +149 −0 tests/acceptance/render-tree-test.js
  167. +208 −0 tests/acceptance/route-tree-test.js
  168. +296 −0 tests/acceptance/view-tree-test.js
  169. 0 tests/ember_debug/{container_debug_test.js → container-debug-test.js}
  170. +6 −1 tests/ember_debug/{deprecation_debug_test.js → deprecation-debug-test.js}
  171. 0 tests/ember_debug/{ember_debug_test.js → ember-debug-test.js}
  172. +19 −17 tests/ember_debug/{object_inspector_test.js → object-inspector-test.js}
  173. 0 tests/ember_debug/{profile_manager_test.js → profile-manager-test.js}
  174. 0 tests/ember_debug/{profile_node_test.js → profile-node-test.js}
  175. +2 −2 tests/ember_debug/{promise_assembler_test.js → promise-assembler-test.js}
  176. +2 −0 tests/ember_debug/{promise_debug_test.js → promise-debug-test.js}
  177. 0 tests/ember_debug/{render_debug_test.js → render-debug-test.js}
  178. +2 −2 tests/ember_debug/{route_debug_test.js → route-debug-test.js}
  179. +53 −99 tests/ember_debug/{view_debug_test.js → view-debug-test.js}
  180. +5 −0 tests/helpers/destroy-app.js
  181. +23 −0 tests/helpers/module-for-acceptance.js
  182. +1 −1 tests/helpers/resolver.js
  183. +5 −38 tests/helpers/start-app.js
  184. +24 −10 tests/index.html
  185. +0 −145 tests/integration/render_tree_test.js
  186. +0 −228 tests/integration/route_tree_test.js
  187. +0 −336 tests/integration/view_tree_test.js
  188. +0 −24 tests/test-helper.js
  189. +8 −0 tests/unit/ms-to-time-test.js
View
@@ -18,6 +18,7 @@ indent_style = space
indent_size = 2
[*.hbs]
+insert_final_newline = false
indent_style = space
indent_size = 2
View
@@ -4,6 +4,8 @@
"es6": true,
},
"rules": {
+ "no-eq-null": 0,
+ "eqeqeq": [2, "allow-null"],
"no-implicit-coercion": 0,
"spaced-comment": 0,
"arrow-spacing": [ 2, { "before": true, "after": true } ],
View
@@ -2,7 +2,7 @@
language: node_js
node_js:
- - "0.12"
+ - "4"
sudo: false
@@ -11,11 +11,11 @@ cache:
- node_modules
before_install:
- - "npm config set spin false"
- - "npm install -g npm@^2"
+ - npm config set spin false
+ - npm install -g bower
+ - npm install phantomjs-prebuilt
install:
- - npm install -g bower
- npm install
- bower install
View
@@ -0,0 +1,3 @@
+{
+ "ignore_dirs": ["tmp", "dist"]
+}
View
@@ -1,321 +0,0 @@
-/* global require, module */
-
-var EmberApp = require('ember-cli/lib/broccoli/ember-app');
-var ES6Modules = require('broccoli-es6modules');
-var mergeTrees = require('broccoli-merge-trees');
-var wrapFiles = require('broccoli-wrap');
-var pickFiles = require('broccoli-static-compiler');
-var concatFiles = require('broccoli-concat');
-var removeFile = require('broccoli-file-remover');
-var path = require('path');
-var jsStringEscape = require('js-string-escape');
-var eslint = require('broccoli-lint-eslint');
-var mv = require('broccoli-stew').mv;
-var writeFile = require('broccoli-file-creator');
-var replace = require('broccoli-replace');
-var esTranspiler = require('broccoli-babel-transpiler');
-var packageJson = require('./package.json');
-
-/*global process */
-
-var options = {
- fingerprint: {
- enabled: false
- },
- babel: {
- // async/await
- optional: ['es7.asyncFunctions']
- },
- eslint: {
- testGenerator: eslintTestGenerator
- }
-};
-
-function renderErrors(errors) {
- if (!errors) { return ''; };
- return errors.map(function(error) {
- return error.line + ':' + error.column + ' ' +
- ' - ' + error.message + ' (' + error.ruleId +')';
- }).join('\n');
-}
-
-function eslintTestGenerator(relativePath, errors) {
- var pass = !errors || errors.length === 0;
- return "import { module, test } from 'qunit';\n" +
- "module('ESLINT - " + path.dirname(relativePath) + "');\n" +
- "test('" + relativePath + " should pass eslint', function(assert) {\n" +
- " assert.ok(" + pass + ", '" + relativePath + " should pass eslint." +
- jsStringEscape("\n" + renderErrors(errors)) + "');\n" +
- "});\n";
-}
-
-// Firefox requires non-minified assets for review :(
-options.minifyJS = { enabled: false };
-options.minifyCSS = { enabled: false };
-
-var app = new EmberApp(options);
-
-var env = process.env.EMBER_ENV;
-
-if (env !== 'production') {
- // To be able to compile htmlbars templates in tests
- app.import('bower_components/ember/ember-template-compiler.js');
-}
-
-app.import('vendor/babel-polyfill.js', { prepend: true });
-
-// Ember Debug
-
-var emberDebug = 'ember_debug';
-
-emberDebug = pickFiles(emberDebug, {
- srcDir: '/',
- files: ['**/*.js'],
- destDir: '/ember-debug'
-});
-
-emberDebug = removeFile(emberDebug, {
- files: [
- 'ember-debug/vendor/source-map.js',
- ]
-});
-
-emberDebug = removeFile(emberDebug, {
- files: [
- 'ember-debug/vendor/startup-wrapper.js',
- 'ember-debug/vendor/loader.js'
- ]
-});
-
-if (env === 'test') {
- var linted = eslint(emberDebug, {
- testGenerator: eslintTestGenerator,
- options: {
- configFile: './ember_debug/.eslintrc',
- rulePaths: ['./']
- }
- });
- emberDebug = mergeTrees([emberDebug, linted]);
-}
-
-emberDebug = new ES6Modules(emberDebug, {
- esperantoOptions: {
- absolutePaths: true,
- strict: true
- }
-});
-emberDebug = esTranspiler(emberDebug);
-
-var previousEmberVersionsSupportedString = '[' + packageJson.previousEmberVersionsSupported.map(function(item) {
- return "'" + item + "'";
-}).join(',') + ']';
-var emberVersionsSupportedString = '[' + packageJson.emberVersionsSupported.map(function(item) {
- return "'" + item + "'";
-}).join(',') + ']';
-
-var startupWrapper = pickFiles('ember_debug', {
- srcDir: '/vendor',
- files: ['startup-wrapper.js'],
- destDir: '/'
-});
-
-startupWrapper = replace(startupWrapper, {
- files: ['startup-wrapper.js'],
- patterns: [{
- match: /{{EMBER_VERSIONS_SUPPORTED}}/,
- replacement: emberVersionsSupportedString
- }]
-});
-
-var sourceMap = pickFiles('ember_debug', {
- srcDir: '/vendor',
- files: ['source-map.js'],
- destDir: '/'
-});
-
-var loader = pickFiles('ember_debug', {
- srcDir: '/vendor',
- files: ['loader.js'],
- destDir: '/'
-});
-
-sourceMap = wrapFiles(sourceMap, {
- wrapper: ["(function() {\n", "\n}());"]
-});
-
-emberDebug = mergeTrees([loader, startupWrapper, sourceMap, emberDebug]);
-
-emberDebug = concatFiles(emberDebug, {
- inputFiles: ['loader.js', '**/*.js'],
- outputFile: '/ember_debug.js',
- wrapInFunction: false
-});
-
-var emberDebugs = [];
-['basic', 'chrome', 'firefox', 'bookmarklet', 'websocket'].forEach(function(dist) {
- emberDebugs[dist] = wrapFiles(emberDebug, {
- wrapper: ["(function(adapter, env) {\n", "\n}('" + dist + "', '" + env + "'));"]
- });
-});
-
-var tree = app.toTree();
-
-var emberInspectorVersionPattern = [{
- match: /{{EMBER_INSPECTOR_VERSION}}/g,
- replacement: packageJson.version
-}];
-
-tree = replace(tree, {
- files: ['**/*.js'],
- patterns: emberInspectorVersionPattern
-});
-
-var minimumVersion = packageJson.emberVersionsSupported[0].replace(/\./g, '-');
-var chromeRoot = 'panes-' + minimumVersion;
-var firefoxRoot = 'data/' + chromeRoot;
-var bookmarkletRoot = chromeRoot;
-
-var firefoxAndChromeExtra = pickFiles('shared', {
- srcDir: '/',
- files: ['in-page-script.js'],
- destDir: '/'
-});
-
-var replacementPattern = [{
- match: /{{env}}/,
- replacement: env === 'development' ? ' [DEV]' : ''
-}, {
- match: /{{PANE_ROOT}}/g,
- replacement: 'panes-' + minimumVersion
-}, {
- match: /{{PREVIOUS_EMBER_VERSIONS_SUPPORTED}}/g,
- replacement: previousEmberVersionsSupportedString
-}, {
- match: /{{EMBER_VERSIONS_SUPPORTED}}/g,
- replacement: emberVersionsSupportedString
-}];
-
-replacementPattern = replacementPattern.concat(emberInspectorVersionPattern);
-
-var skeletonChrome = replace('skeletons/chrome', {
- files: ['*'],
- patterns: replacementPattern
-});
-
-var skeletonFirefox = replace('skeletons/firefox', {
- files: ['*', '*/**'],
- patterns: replacementPattern
-});
-
-var skeletonBookmarklet = replace('skeletons/bookmarklet', {
- files: ['*'],
- patterns: replacementPattern
-});
-
-var firefox = mergeTrees([
- mv(mergeTrees([tree, emberDebugs.firefox]), firefoxRoot),
- skeletonFirefox
-]);
-
-var chrome = mergeTrees([
- mv(mergeTrees([tree, emberDebugs.chrome]), chromeRoot),
- skeletonChrome
-]);
-
-var bookmarklet = mergeTrees([
- mv(mergeTrees([tree, emberDebugs.bookmarklet]), chromeRoot),
- skeletonBookmarklet
-]);
-
-packageJson.previousEmberVersionsSupported.forEach(function(version) {
- version = version.replace(/\./g, '-');
- if (env === 'production') {
- var prevDist = 'dist_prev/' + env;
-
- bookmarklet = mergeTrees([
- mv(prevDist + '/bookmarklet/panes-' + version, 'panes-' + version),
- bookmarklet
- ]);
- firefox = mergeTrees([
- mv(prevDist + '/firefox/panes-' + version, 'data/panes-' + version),
- firefox
- ]);
- chrome = mergeTrees([
- mv(prevDist + '/chrome/panes-' + version, 'panes-' + version),
- chrome
- ]);
- } else {
- var file = writeFile('index.html', "This Ember version is not supported in development environment.");
- var emberDebugFile = writeFile('ember_debug.js', 'void(0);');
- chrome = mergeTrees([mv(file, 'panes-' + version), chrome]);
- firefox = mergeTrees([mv(file, 'data/panes-' + version), mv(emberDebugFile, 'data/panes-' + version), firefox]);
- bookmarklet = mergeTrees([mv(file, 'panes-' + version), mv(emberDebugFile, 'panes-' + version), bookmarklet]);
- }
-});
-
-firefox = mergeTrees([
- mv(firefoxAndChromeExtra, 'data/scripts'),
- firefox
-]);
-
-chrome = mergeTrees([
- mv(firefoxAndChromeExtra, 'scripts'),
- chrome
-]);
-
-// Pass the current dist to the Ember Inspector app.
-// EMBER DIST
-var dists = {
- chrome: chrome,
- firefox: firefox,
- bookmarklet: bookmarklet,
- websocket: mergeTrees([tree, emberDebugs.websocket]),
- basic: mergeTrees([tree, emberDebugs.basic])
-};
-Object.keys(dists).forEach(function(key) {
- dists[key] = replace(dists[key], {
- files: ['**/*.js'],
- patterns: [{
- match: /{{EMBER_DIST}}/g,
- replacement: key
- }]
- });
-});
-
-// Add {{ remote-port }} to the head
-// so that the websocket addon can replace it.
-dists.websocket = replace(dists.websocket, {
- files: ['index.html'],
- patterns: [{
- match: /<head>/,
- replacement: '<head>\n{{ remote-port }}\n'
- }]
-});
-
-var output;
-
-if (env === 'test') {
- // `ember test` expects the index.html file to be in the
- // output directory.
- output = dists.basic;
-} else {
-
- // Change base tag for running tests in development env.
- dists.basic = replace(dists.basic, {
- files: ['tests/index.html'],
- patterns: [{
- match: /<base.*\/>/,
- replacement: '<base href="../" />'
- }]
- });
-
- output = mergeTrees([
- mv(dists.bookmarklet, 'bookmarklet'),
- mv(dists.firefox, 'firefox'),
- mv(dists.chrome, 'chrome'),
- mv(dists.websocket, 'websocket'),
- mv(dists.basic, 'testing')
- ]);
-}
-
-module.exports = output;
Oops, something went wrong.

0 comments on commit 08a3cf5

Please sign in to comment.