language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | emberjs | ember.js | f8d551721102c6b430a884bc256cf77c9edcff36.json | fix jshint warnings
A recent version of jshint has begun finding problems that were missed by earlier versions. This cleans them up. | packages/ember-runtime/tests/ext/rsvp_test.js | @@ -1,4 +1,3 @@
-/* global Promise:true */
import Ember from 'ember-metal/core';
import run from 'ember-metal/run_loop';
import RSVP from 'ember-runtime/ext/rsvp';
@@ -22,7 +21,6 @@ QUnit.test('Ensure that errors thrown from within a promise are sent to the cons
var asyncStarted = 0;
var asyncEnded = 0;
-var Pro... | true |
Other | emberjs | ember.js | 325e9e3c7a6253654a68a8ac9d85305465827907.json | Update HTMLBars to 0.14.13. | package.json | @@ -33,7 +33,7 @@
"finalhandler": "^0.4.0",
"github": "^0.2.3",
"glob": "~4.3.2",
- "htmlbars": "0.14.12",
+ "htmlbars": "0.14.13",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"route-recognizer": "0.1.5", | false |
Other | emberjs | ember.js | 7c5a5ce8ac34bd4bdecf2c33858b09e56ee61937.json | Improve tests for thrown errors | packages/container/tests/registry_test.js | @@ -74,7 +74,7 @@ QUnit.test('Throw exception when trying to inject `type:thing` on all type(s)',
throws(function() {
registry.typeInjection('controller', 'injected', 'controller:post');
- }, 'Cannot inject a `controller:post` on other controller(s).');
+ }, /Cannot inject a `controller:post` on other contr... | false |
Other | emberjs | ember.js | c76b09221a320835ff45d462f1b38d29ea124b26.json | Add a test for falsy value from resolvers | packages/container/tests/registry_test.js | @@ -43,6 +43,19 @@ QUnit.test('The registered value returned from resolve is the same value each ti
strictEqual(registry.resolve('falsy:value'), registry.resolve('falsy:value'), 'The return of resolve is always the same');
});
+QUnit.test('The value returned from resolver is the same value as the original value e... | false |
Other | emberjs | ember.js | 6d35451afc677d9452c7b50f798fbc6e73e351e6.json | Use strictEqual for rigid comparison | packages/container/tests/container_test.js | @@ -269,7 +269,7 @@ QUnit.test('Injecting a falsy value does not raise an error', function() {
registry.register('user:current', null, { instantiate: false });
registry.injection('controller:application', 'currentUser', 'user:current');
- deepEqual(container.lookup('controller:application').currentUser, null);... | true |
Other | emberjs | ember.js | 6d35451afc677d9452c7b50f798fbc6e73e351e6.json | Use strictEqual for rigid comparison | packages/container/tests/registry_test.js | @@ -40,7 +40,7 @@ QUnit.test('The registered value returned from resolve is the same value each ti
registry.register('falsy:value', null, { instantiate: false });
- deepEqual(registry.resolve('falsy:value'), registry.resolve('falsy:value'), 'The return of resolve is always the same');
+ strictEqual(registry.re... | true |
Other | emberjs | ember.js | c5492eab98599172af1529e2da29075f8632722c.json | Add 2.2.0-beta.3 to CHANGELOG.md. | CHANGELOG.md | @@ -1,5 +1,18 @@
# Ember Changelog
+### v2.3.0-beta.3 (December 19, 2015)
+
+- [#12659](https://github.com/emberjs/ember.js/pull/12659) [BUGFIX] Update HTMLBars to 0.14.7.
+- [#12666](https://github.com/emberjs/ember.js/pull/12666) [BUGFIX] Prevent triggering V8 memory leak bug through registry / resolver access.
+-... | false |
Other | emberjs | ember.js | 1f8c70bd0af18afbfb20517b76c8752625872e3f.json | [BUGFIX beta] MandatorySetter: Restore properties correctly
* no longer rely on meta to store the value until next set after uninstalling MandatorySetter
* no longer incorrectly re-set on set to enumerable (enumerability should remain constant)
* test both enumerable / non-enumerable variants | packages/ember-metal/lib/watch_key.js | @@ -38,6 +38,9 @@ export function watchKey(obj, keyName, meta) {
if (isEnabled('mandatory-setter')) {
+ // Future traveler, although this code looks scary. It merely exists in
+ // development to aid in development asertions. Production builds of
+ // ember strip this entire block out
handleMandatorySetter =... | true |
Other | emberjs | ember.js | 1f8c70bd0af18afbfb20517b76c8752625872e3f.json | [BUGFIX beta] MandatorySetter: Restore properties correctly
* no longer rely on meta to store the value until next set after uninstalling MandatorySetter
* no longer incorrectly re-set on set to enumerable (enumerability should remain constant)
* test both enumerable / non-enumerable variants | packages/ember-metal/tests/accessors/mandatory_setters_test.js | @@ -7,6 +7,14 @@ import { meta as metaFor } from 'ember-metal/meta';
QUnit.module('mandatory-setters');
function hasMandatorySetter(object, property) {
+ try {
+ return Object.getOwnPropertyDescriptor(object, property).set.isMandatorySetter === true;
+ } catch(e) {
+ return false;
+ }
+}
+
+function hasMet... | true |
Other | emberjs | ember.js | 8eefbe471053d0ce76e7d65fda8fa4d7825a6bca.json | Remove extra `getOwner` invocations.
Calling `getOwner(route)` here is pretty fast, but it still seems silly
to do it so many times. | packages/ember-routing/lib/system/route.js | @@ -2101,6 +2101,7 @@ function buildRenderOptions(route, namePassed, isDefaultRender, name, options) {
var LOG_VIEW_LOOKUPS = get(route.router, 'namespace.LOG_VIEW_LOOKUPS');
var into = options && options.into && options.into.replace(/\//g, '.');
var outlet = (options && options.outlet) || 'main';
+ let owner... | false |
Other | emberjs | ember.js | 3a9fef7984666f8d913a7e215099d816153cf946.json | Update emberjs-build to v0.5.4.
Includes updated broccoli-merge-trees that drammatically reduces
rebuild time (from 2.5s to .5s for simple change operations). | package.json | @@ -28,7 +28,7 @@
"ember-cli-sauce": "^1.4.2",
"ember-cli-yuidoc": "0.7.0",
"ember-publisher": "0.0.7",
- "emberjs-build": "0.5.3",
+ "emberjs-build": "0.5.4",
"express": "^4.5.0",
"finalhandler": "^0.4.0",
"github": "^0.2.3", | false |
Other | emberjs | ember.js | 8c8fe83d45d08ae38ad0a73dc5576455abb31030.json | Use EmptyObject for `dictionary(null)`.
A huge number of usages of `ember-metal/dictionary` are using `null` as
the parent. Creating a `new EmptyObject()` is quite a bit faster than
`Object.create(null)` (see comments in `ember-metal/empty_object` for
details).
Note: we are working around an issue with QUnit due to u... | packages/ember-application/tests/system/dependency_injection/default_resolver_test.js | @@ -282,10 +282,14 @@ QUnit.test('knownForType returns each item for a given type found', function() {
let found = registry.resolver.knownForType('helper');
- deepEqual(found, {
- 'helper:foo-bar': true,
- 'helper:baz-qux': true
- });
+ // using `Object.keys` and manually confirming values over using `d... | true |
Other | emberjs | ember.js | 8c8fe83d45d08ae38ad0a73dc5576455abb31030.json | Use EmptyObject for `dictionary(null)`.
A huge number of usages of `ember-metal/dictionary` are using `null` as
the parent. Creating a `new EmptyObject()` is quite a bit faster than
`Object.create(null)` (see comments in `ember-metal/empty_object` for
details).
Note: we are working around an issue with QUnit due to u... | packages/ember-metal/lib/dictionary.js | @@ -1,11 +1,17 @@
+import EmptyObject from './empty_object';
// the delete is meant to hint at runtimes that this object should remain in
// dictionary mode. This is clearly a runtime specific hack, but currently it
// appears worthwhile in some usecases. Please note, these deletes do increase
// the cost of crea... | true |
Other | emberjs | ember.js | 200c3b7b5846e22cb230842fc6fe475531f9eaa3.json | Add tests with multiple re-throw stratiegies.
This provides insurance that handled errors aren't swallowed | packages/ember/tests/routing/substates_test.js | @@ -449,6 +449,148 @@ QUnit.test('Error events that aren\'t bubbled don\t throw application assertions
bootApplication('/grandma/mom/sally');
});
+QUnit.test('Non-bubbled errors that re-throw aren\'t swallowed', function() {
+ expect(2);
+
+ templates['grandma'] = 'GRANDMA {{outlet}}';
+
+ Router.map(function(... | false |
Other | emberjs | ember.js | bbb81bb5bc2d0fdc27eec536c7ea04049355d90c.json | Change param to parameter | packages/ember-htmlbars/lib/helpers/each.js | @@ -11,7 +11,7 @@ import decodeEachKey from 'ember-htmlbars/utils/decode-each-key';
of the base Handlebars `{{#each}}` helper.
The default behavior of `{{#each}}` is to yield its inner block once for every
- item in an array passing the item as the first param to the block.
+ item in an array passing the item... | false |
Other | emberjs | ember.js | 254fdf1514020b19ece60d96305e87f2e00ee4f2.json | Fix deprecation link for Ember.String.fmt | packages/ember-runtime/lib/system/string.js | @@ -99,7 +99,7 @@ function fmt(str, formats) {
deprecate(
'Ember.String.fmt is deprecated, use ES6 template strings instead.',
false,
- { id: 'ember-string-utils.fmt', until: '3.0.0', url: 'https://babeljs.io/docs/learn-es6/#template-strings' }
+ { id: 'ember-string-utils.fmt', until: '3.0.0', url: '... | false |
Other | emberjs | ember.js | 18041f892dfd9db87b90d8770469df8a2b2b951b.json | Update CHANGELOG to include v2.3.0-beta.2. | CHANGELOG.md | @@ -1,5 +1,16 @@
# Ember Changelog
+### v2.3.0-beta.2 (November 29, 2015)
+
+- [#12626](https://github.com/emberjs/ember.js/pull/12626) [BUGFIX] Fix "rest" style positional params in contextual components when using dot syntax.
+- [#12627](https://github.com/emberjs/ember.js/pull/12627) [CLEANUP] Remove unused `ENV`... | false |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-metal/lib/core.js | @@ -1,5 +1,7 @@
/*globals Ember:true,ENV,EmberENV */
+import require from 'require';
+
/**
@module ember
@submodule ember-metal
@@ -47,7 +49,7 @@ Ember.toString = function() { return 'Ember'; };
// The debug functions are exported to globals with `require` to
// prevent babel-plugin-filter-imports from removi... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-metal/lib/index.js | @@ -4,6 +4,7 @@
*/
// BEGIN IMPORTS
+import require, { has } from 'require';
import Ember from 'ember-metal/core';
import { deprecateFunc } from 'ember-metal/debug';
import isEnabled, { FEATURES } from 'ember-metal/features';
@@ -358,8 +359,8 @@ Ember.onerror = null;
// do this for side-effects of updating Embe... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-runtime/lib/ext/rsvp.js | @@ -1,6 +1,7 @@
/* globals RSVP:true */
import Ember from 'ember-metal/core';
+import require, { has } from 'require';
import { assert } from 'ember-metal/debug';
import Logger from 'ember-metal/logger';
import run from 'ember-metal/run_loop';
@@ -57,8 +58,8 @@ export function onerrorDefault(reason) {
if (err... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-template-compiler/lib/compat/precompile.js | @@ -2,14 +2,14 @@
@module ember
@submodule ember-template-compiler
*/
-import Ember from 'ember-metal/core';
+import require, { has } from 'require';
import compileOptions from 'ember-template-compiler/system/compile_options';
var compile, compileSpec;
export default function(string) {
- if ((!compile || !co... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-template-compiler/lib/system/compile.js | @@ -3,7 +3,7 @@
@submodule ember-template-compiler
*/
-import Ember from 'ember-metal/core';
+import require, { has } from 'require';
import compileOptions from 'ember-template-compiler/system/compile_options';
import template from 'ember-template-compiler/system/template';
@@ -20,8 +20,8 @@ var compile;
@pa... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember-template-compiler/lib/system/precompile.js | @@ -2,7 +2,7 @@
@module ember
@submodule ember-template-compiler
*/
-import Ember from 'ember-metal/core';
+import require, { has } from 'require';
import compileOptions from 'ember-template-compiler/system/compile_options';
var compileSpec;
@@ -18,8 +18,8 @@ var compileSpec;
@param {String} templateString Th... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/ember/lib/index.js | @@ -10,17 +10,17 @@ import 'ember-htmlbars';
import 'ember-routing-htmlbars';
import 'ember-routing-views';
-import Ember from 'ember-metal/core';
+import require, { has } from 'require';
import { runLoadHooks } from 'ember-runtime/system/lazy_load';
-if (Ember.__loader.registry['ember-template-compiler/index'])... | true |
Other | emberjs | ember.js | 89f0516c78af31fbd2ef3c9e7a6b84b497be6105.json | Remove internal usage of `Ember.__loader`. | packages/loader/lib/index.js | @@ -32,8 +32,14 @@ var mainContext = this;
requirejs = require = requireModule = function(name) {
return internalRequire(name, null);
}
+
+ // setup `require` module
require['default'] = require;
+ require.has = function registryHas(moduleName) {
+ return !!registry[moduleName] || !!r... | true |
Other | emberjs | ember.js | 80270f186a7863ea3c946ee2d14ca6118dd7e3a8.json | Add fallback for `${moduleName}/index`.
This follows suit with changes made in ember-cli/loader.js@v3.5.0. | packages/ember-metal/lib/index.js | @@ -358,7 +358,7 @@ Ember.onerror = null;
// do this for side-effects of updating Ember.assert, warn, etc when
// ember-debug is present
// This needs to be called before any deprecateFunc
-if (Ember.__loader.registry['ember-debug']) {
+if (Ember.__loader.registry['ember-debug/index']) {
requireModule('ember-debu... | true |
Other | emberjs | ember.js | 80270f186a7863ea3c946ee2d14ca6118dd7e3a8.json | Add fallback for `${moduleName}/index`.
This follows suit with changes made in ember-cli/loader.js@v3.5.0. | packages/ember/lib/index.js | @@ -13,13 +13,13 @@ import 'ember-routing-views';
import Ember from 'ember-metal/core';
import { runLoadHooks } from 'ember-runtime/system/lazy_load';
-if (Ember.__loader.registry['ember-template-compiler']) {
+if (Ember.__loader.registry['ember-template-compiler/index']) {
requireModule('ember-template-compiler... | true |
Other | emberjs | ember.js | 80270f186a7863ea3c946ee2d14ca6118dd7e3a8.json | Add fallback for `${moduleName}/index`.
This follows suit with changes made in ember-cli/loader.js@v3.5.0. | packages/loader/lib/index.js | @@ -42,7 +42,15 @@ var mainContext = this;
}
}
- function internalRequire(name, referrerName) {
+ function internalRequire(_name, referrerName) {
+ var name = _name;
+ var mod = registry[name];
+
+ if (!mod) {
+ name = name + '/index';
+ mod = registry[name];
+ }
+
... | true |
Other | emberjs | ember.js | d25e0d7760903b6f65f68d674ccc8decda180704.json | Update version info and npm-shrinkwrap.json. | VERSION | @@ -1 +1 @@
-2.3.0-beta.1+canary
+2.4.0+canary | true |
Other | emberjs | ember.js | d25e0d7760903b6f65f68d674ccc8decda180704.json | Update version info and npm-shrinkwrap.json. | npm-shrinkwrap.json | @@ -1,6 +1,6 @@
{
"name": "ember",
- "version": "2.3.0-canary",
+ "version": "2.4.0-canary",
"dependencies": {
"abbrev": {
"version": "1.0.7",
@@ -1616,7 +1616,8 @@
},
"lodash": {
"version": "2.4.2",
- "from": "lodash@>=2.4.1 <2.5.0"
+ ... | true |
Other | emberjs | ember.js | d25e0d7760903b6f65f68d674ccc8decda180704.json | Update version info and npm-shrinkwrap.json. | package.json | @@ -1,7 +1,7 @@
{
"name": "ember",
"license": "MIT",
- "version": "2.3.0-canary",
+ "version": "2.4.0-canary",
"scripts": {
"build": "ember build --environment production",
"postinstall": "bower install", | true |
Other | emberjs | ember.js | 3b0baff261c778c8b30f3a5b1b286a090663ba80.json | Add example and clear up wording for CP get/set | packages/ember-metal/lib/computed.js | @@ -537,22 +537,20 @@ ComputedPropertyPrototype.teardown = function(obj, keyName) {
computed property function. You can use this helper to define properties
with mixins or via `Ember.defineProperty()`.
- If you pass function as argument - it will be used as getter.
- You can pass hash with two functions - ins... | false |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember-application/lib/system/resolver.js | @@ -3,7 +3,6 @@
@submodule ember-application
*/
-import Ember from 'ember-metal/core';
import { assert, info } from 'ember-metal/debug';
import { get } from 'ember-metal/property_get';
import {
@@ -17,6 +16,9 @@ import Namespace from 'ember-runtime/system/namespace';
import helpers from 'ember-htmlbars/helpers'... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember-htmlbars/lib/main.js | @@ -128,6 +128,10 @@ import hashHelper from 'ember-htmlbars/helpers/hash';
import DOMHelper from 'ember-htmlbars/system/dom-helper';
import Helper, { helper as makeHelper } from 'ember-htmlbars/helper';
import GlimmerComponent from 'ember-htmlbars/glimmer-component';
+import {
+ getTemplates,
+ setTemplates
+} fro... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember-htmlbars/lib/system/bootstrap.js | @@ -5,13 +5,16 @@
@submodule ember-htmlbars
*/
-import Ember from 'ember-metal/core';
import ComponentLookup from 'ember-views/component_lookup';
import jQuery from 'ember-views/system/jquery';
import EmberError from 'ember-metal/error';
import { onLoad } from 'ember-runtime/system/lazy_load';
import htmlbarsC... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember-htmlbars/lib/template_registry.js | @@ -0,0 +1,26 @@
+// STATE within a module is frowned apon, this exists
+// to support Ember.TEMPLATES but shield ember internals from this legacy
+// global API
+let TEMPLATES = {};
+
+export function setTemplates(templates) {
+ TEMPLATES = templates;
+}
+
+export function getTemplates() {
+ return TEMPLATES;
+}
+
+... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember-views/lib/views/view.js | @@ -23,7 +23,6 @@ import VisibilitySupport from 'ember-views/mixins/visibility_support';
import CompatAttrsProxy from 'ember-views/compat/attrs-proxy';
import ViewMixin from 'ember-views/mixins/view_support';
import { deprecateProperty } from 'ember-metal/deprecate_property';
-
/**
@module ember
@submodule ember-... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember/tests/component_registration_test.js | @@ -24,24 +24,26 @@ function prepare() {
function cleanup() {
run(function() {
- if (App) {
- App.destroy();
- }
- App = appInstance = null;
- Ember.TEMPLATES = {};
+ try {
+ if (App) {
+ App.destroy();
+ }
+ App = appInstance = null;
+ } finally {
+ Ember.TEMPLAT... | true |
Other | emberjs | ember.js | 1713085b45f43e3b8fbac4f15059695d2160fc66.json | isolate internals from Ember.TEMPLATES global | packages/ember/tests/routing/query_params_test.js | @@ -96,12 +96,14 @@ function sharedSetup() {
}
function sharedTeardown() {
- run(function() {
- App.destroy();
- App = null;
-
+ try {
+ run(function() {
+ App.destroy();
+ App = null;
+ });
+ } finally {
Ember.TEMPLATES = {};
- });
+ }
}
QUnit.module('Routing with Query Params',... | true |
Other | emberjs | ember.js | a3facf02d55d2ec3ff2e5941ca392af2ea429e03.json | use imported references rather then from Ember.* | packages/ember-runtime/lib/system/core_object.js | @@ -9,7 +9,6 @@
// using ember-metal/lib/main here to ensure that ember-debug is setup
// if present
-import Ember from 'ember-metal';
import { assert, runInDebug } from 'ember-metal/debug';
import isEnabled from 'ember-metal/features';
import assign from 'ember-metal/assign';
@@ -945,8 +944,8 @@ ClassMixin.appl... | false |
Other | emberjs | ember.js | 3309e21d01ec1e1d06104659b973636c8074f24f.json | prefer module over global for isEmpty | packages/ember-routing/lib/system/route.js | @@ -30,7 +30,7 @@ import {
calculateCacheKey
} from 'ember-routing/utils';
import { getOwner } from 'container/owner';
-
+import isEmpty from 'ember-metal/is_empty';
var slice = Array.prototype.slice;
function K() { return this; }
@@ -1944,7 +1944,7 @@ var Route = EmberObject.extend(ActionHandler, Evented, {
... | false |
Other | emberjs | ember.js | efb8487d23f3d7c65fbe7d3bb7e2cf62cceecff2.json | Fix typo in helpers_test.js | packages/ember-testing/tests/helpers_test.js | @@ -615,14 +615,14 @@ QUnit.test('`fillIn` fires `input` and `change` events in the proper order', fun
oninputHandler(e) {
events.push(e.type);
},
- onchangeHanlders(e) {
+ onchangeHandler(e) {
events.push(e.type);
}
}
});
App.IndexView = EmberView.extend({
... | false |
Other | emberjs | ember.js | 96f80d27be74cead08e8a21d8ccadd162e05c111.json | fix potential deopt while reading arguments | packages/container/lib/container.js | @@ -187,17 +187,17 @@ function areInjectionsDynamic(injections) {
return !!injections._dynamic;
}
-function buildInjections(container) {
+function buildInjections(/* container, ...injections */) {
var hash = {};
if (arguments.length > 1) {
- var injectionArgs = Array.prototype.slice.call(arguments, 1);... | false |
Other | emberjs | ember.js | 38450198a89f70a19a3a75fc920b710311bfc534.json | Add documentation for closure component | packages/ember-htmlbars/lib/keywords/component.js | @@ -49,6 +49,29 @@ import isEnabled from 'ember-metal/features';
{{live-updating-chart}}
```
+ ## Nested Usage
+
+ The `component` helper can be used to package a component path with initial attrs.
+ The included attrs can then be merged during the final invocation.
+
+ For example, given a `person-form` co... | false |
Other | emberjs | ember.js | 04e0251493099503a3602303c66ff23543ca213c.json | Add test for overriding attr value in init. | packages/ember-htmlbars/tests/integration/component_invocation_test.js | @@ -120,6 +120,27 @@ QUnit.test('non-block with properties on attrs and component class', function()
equal(jQuery('#qunit-fixture').text(), 'In layout - someProp: something here');
});
+QUnit.test('non-block with properties on overridden in init', function() {
+ owner.register('component:non-block', Component.ex... | false |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | .jscsrc | @@ -2,6 +2,7 @@
"esnext": true,
"excludeFiles": ["ember-runtime/ext/rsvp.js"],
"additionalRules": [ "lib/jscs-rules/*.js" ],
+ "disallowConstOutsideModuleScope": true,
"disallowSpacesInsideArrayBrackets": "all",
"disallowMultipleVarDeclWithAssignment": true,
"disallowPaddingNewlinesInBlocks": true, | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | lib/jscs-rules/disallow-const-outside-module-scope.js | @@ -0,0 +1,38 @@
+var assert = require('assert');
+
+module.exports = function() { };
+
+module.exports.prototype = {
+ configure: function(option) {
+ assert(option === true, this.getOptionName() + ' requires a true value');
+ },
+
+ getOptionName: function() {
+ return 'disallowConstOutsideModuleScope';
+ }... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/container/tests/container_test.js | @@ -537,11 +537,11 @@ if (isEnabled('ember-container-inject-owner')) {
});
} else {
QUnit.test('A `container` property is appended to every instantiated object', function() {
- const registry = new Registry();
- const container = registry.container();
- const PostController = factory();
+ let registr... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/container/tests/test-helpers/build-owner.js | @@ -7,9 +7,10 @@ export default function buildOwner(props) {
let Owner = EmberObject.extend(RegistryProxy, ContainerProxy, {
init() {
this._super(...arguments);
- const registry = this.__registry__ = new Registry();
+ let registry = this.__registry__ = new Registry();
this.__container__ ... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/hooks/has-helper.js | @@ -5,7 +5,7 @@ export default function hasHelperHook(env, scope, helperName) {
return true;
}
- const owner = env.owner;
+ let owner = env.owner;
if (validateLazyHelperName(helperName, owner, env.hooks.keywords)) {
var registrationName = 'helper:' + helperName;
if (owner.hasRegistration(regist... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/keywords/closure-component.js | @@ -64,7 +64,7 @@ function createClosureComponentCell(env, originalComponentPath, params, hash, la
}
function isValidComponentPath(env, path) {
- const result = lookupComponent(env.owner, path);
+ let result = lookupComponent(env.owner, path);
return !!(result.component || result.layout);
} | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/keywords/get.js | @@ -15,8 +15,8 @@ import {
} from 'ember-metal/observer';
function labelFor(source, key) {
- const sourceLabel = source.label ? source.label : '';
- const keyLabel = key.label ? key.label : '';
+ let sourceLabel = source.label ? source.label : '';
+ let keyLabel = key.label ? key.label : '';
return `(get ${s... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/node-managers/component-node-manager.js | @@ -236,7 +236,7 @@ export function createComponent(_component, isAngleBracket, props, renderNode, e
props.renderer = props.parentView ? props.parentView.renderer : env.owner.lookup('renderer:-dom');
props._viewRegistry = props.parentView ? props.parentView._viewRegistry : env.owner.lookup('-view-registry:main');... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/node-managers/view-node-manager.js | @@ -182,7 +182,7 @@ export function createOrUpdateComponent(component, options, createOptions, rende
mergeBindings(props, snapshot);
- const owner = options.parentView ? getOwner(options.parentView) : env.owner;
+ let owner = options.parentView ? getOwner(options.parentView) : env.owner;
setOwner(... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/system/lookup-helper.js | @@ -36,7 +36,7 @@ export function findHelper(name, view, env) {
var helper = env.helpers[name];
if (!helper) {
- const owner = env.owner;
+ let owner = env.owner;
if (validateLazyHelperName(name, owner, env.hooks.keywords)) {
var helperName = 'helper:' + name;
if (owner.hasRegistration(... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/utils/extract-positional-params.js | @@ -11,7 +11,7 @@ export default function extractPositionalParams(renderNode, component, params, a
}
export function processPositionalParams(renderNode, positionalParams, params, attrs) {
- const isNamed = typeof positionalParams === 'string';
+ let isNamed = typeof positionalParams === 'string';
if (isNamed... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/lib/utils/is-component.js | @@ -15,7 +15,7 @@ import { isStream } from 'ember-metal/streams/utils';
name was found in the container.
*/
export default function isComponent(env, scope, path) {
- const owner = env.owner;
+ let owner = env.owner;
if (!owner) { return false; }
if (typeof path === 'string') {
if (CONTAINS_DOT_CACHE.ge... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/tests/compat/view_helper_test.js | @@ -36,7 +36,7 @@ QUnit.module('ember-htmlbars: compat - view helper', {
});
QUnit.test('using the view helper fails assertion', function(assert) {
- const ViewClass = EmberView.extend({
+ let ViewClass = EmberView.extend({
template: compile('fooView')
});
owner.register('view:foo', ViewClass);
@@ -67,... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/tests/glimmer-component/render-test.js | @@ -48,7 +48,7 @@ function renderComponent(tag, component) {
.map(key => `${key}=${hash[key]}`)
.join(' ');
- const owner = buildOwner();
+ let owner = buildOwner();
owner.register('component-lookup:main', ComponentLookup);
owner.register(`component:${tag}`, implementation);
| true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/tests/integration/component_invocation_test.js | @@ -32,7 +32,7 @@ function commonTeardown() {
}
function appendViewFor(template, hash={}) {
- const view = EmberView.extend({
+ let view = EmberView.extend({
[OWNER]: owner,
template: compile(template)
}).create(hash); | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/tests/system/lookup-helper_test.js | @@ -14,7 +14,7 @@ function generateEnv(helpers, owner) {
}
function generateOwner() {
- const owner = buildOwner();
+ let owner = buildOwner();
owner.register('component-lookup:main', ComponentLookup);
@@ -58,7 +58,7 @@ QUnit.test('does not lookup in the container if the name does not contain a dash
});
... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-htmlbars/tests/utils.js | @@ -6,7 +6,7 @@ function registerAstPlugin(plugin) {
}
function removeAstPlugin(plugin) {
- const index = plugins['ast'].indexOf(plugin);
+ let index = plugins['ast'].indexOf(plugin);
plugins['ast'].splice(index, 1);
}
| true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-metal/lib/injected_property.js | @@ -25,7 +25,7 @@ function InjectedProperty(type, name) {
function injectedPropertyGet(keyName) {
var desc = this[keyName];
- const owner = getOwner(this);
+ let owner = getOwner(this);
assert(`InjectedProperties should be defined with the Ember.inject computed property macros.`, desc && desc.isDescriptor ... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing-htmlbars/tests/helpers/closure_action_test.js | @@ -120,10 +120,10 @@ QUnit.test('action should be called on the correct scope', function(assert) {
QUnit.test('arguments to action are passed, curry', function(assert) {
assert.expect(4);
- const first = 'mitch';
- const second = 'martin';
- const third = 'matt';
- const fourth = 'wacky wycats';
+ let firs... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing-htmlbars/tests/helpers/render_test.js | @@ -170,7 +170,7 @@ QUnit.test('{{render}} helper with a supplied model should not fire observers on
var post = {
title: 'Rails is omakase'
};
- const controller = EmberController.create({
+ let controller = EmberController.create({
[OWNER]: appInstance,
post: post
});
@@ -197,9 +197,9 @@ QUni... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing-htmlbars/tests/utils.js | @@ -42,14 +42,14 @@ function resolverFor(namespace) {
function buildAppInstance() {
let registry;
- const App = EmberObject.extend(RegistryProxy, ContainerProxy, {
+ let App = EmberObject.extend(RegistryProxy, ContainerProxy, {
init() {
this._super(...arguments);
registry = this.__registry__ ... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing/lib/system/route.js | @@ -2134,7 +2134,7 @@ function buildRenderOptions(route, namePassed, isDefaultRender, name, options) {
controller.set('model', options.model);
}
- const owner = getOwner(route);
+ let owner = getOwner(route);
viewName = options && options.view || namePassed && name || route.viewName || name;
ViewClass... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing/lib/system/router.js | @@ -247,7 +247,7 @@ var EmberRouter = EmberObject.extend(Evented, {
defaultParentState = ownState;
}
if (!this._toplevelView) {
- const owner = getOwner(this);
+ let owner = getOwner(this);
var OutletView = owner._lookupFactory('view:-outlet');
this._toplevelView = OutletView.cr... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing/tests/location/auto_location_test.js | @@ -36,13 +36,13 @@ function mockBrowserHistory(overrides) {
}
function createLocation(location, history) {
- const owner = buildOwner();
+ let owner = buildOwner();
owner.register('location:history', HistoryLocation);
owner.register('location:hash', HashLocation);
owner.register('location:none', NoneL... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing/tests/system/controller_for_test.js | @@ -12,7 +12,7 @@ import {
import buildOwner from 'container/tests/test-helpers/build-owner';
var buildInstance = function(namespace) {
- const owner = buildOwner();
+ let owner = buildOwner();
owner.__registry__.resolver = resolverFor(namespace);
owner.registerOptionsForType('view', { singleton: false })... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-routing/tests/system/route_test.js | @@ -55,7 +55,7 @@ QUnit.test('\'store\' can be injected by data persistence frameworks', function(
expect(8);
runDestroy(route);
- const owner = buildOwner();
+ let owner = buildOwner();
var post = {
id: 1
@@ -85,7 +85,7 @@ QUnit.test('assert if \'store.find\' method is not found', function() {
e... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-runtime/lib/computed/reduce_computed_macros.js | @@ -14,7 +14,7 @@ import { A as emberA } from 'ember-runtime/system/native_array';
function reduceMacro(dependentKey, callback, initialValue) {
return computed(`${dependentKey}.[]`, function() {
- const arr = get(this, dependentKey);
+ let arr = get(this, dependentKey);
if (arr === null || typeof arr... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-runtime/tests/computed/reduce_computed_macros_test.js | @@ -431,7 +431,7 @@ QUnit.test('properties values can be replaced', function() {
['uniq', uniq],
['union', union]
].forEach((tuple) => {
- const [name, macro] = tuple;
+ let [name, macro] = tuple;
QUnit.module(`computed.${name}`, {
setup() { | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-runtime/tests/controllers/controller_test.js | @@ -155,7 +155,7 @@ QUnit.module('Controller injected properties');
if (!EmberDev.runningProdBuild) {
QUnit.test('defining a controller on a non-controller should fail assertion', function() {
expectAssertion(function() {
- const owner = buildOwner();
+ let owner = buildOwner();
var AnObject... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-runtime/tests/inject_test.js | @@ -26,7 +26,7 @@ if (!EmberDev.runningProdBuild) {
ok(true, 'should call validation method');
});
- const owner = buildOwner();
+ let owner = buildOwner();
var AnObject = Object.extend({
bar: inject.foo(),
@@ -39,7 +39,7 @@ if (!EmberDev.runningProdBuild) {
}
QUnit.test('attemptin... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js | @@ -56,7 +56,7 @@ function assertPath(moduleName, node, path) {
`Using \`{{${path && path.type === 'PathExpression' && path.parts[0]}}}\` or any path based on it ${calculateLocationDisplay(moduleName, node.loc)}has been removed in Ember 2.0`, () => {
let noAssertion = true;
- const viewKeyword = path... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-template-compiler/lib/plugins/assert-no-view-helper.js | @@ -30,7 +30,7 @@ AssertNoViewHelper.prototype.transform = function AssertNoViewHelper_transform(a
};
function assertHelper(moduleName, node) {
- const paramValue = node.params.length && node.params[0].value;
+ let paramValue = node.params.length && node.params[0].value;
if (!paramValue) {
return; | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-template-compiler/lib/plugins/transform-input-on-to-onEvent.js | @@ -36,10 +36,10 @@ function TransformInputOnToOnEvent(options) {
@param {AST} ast The AST to be transformed.
*/
TransformInputOnToOnEvent.prototype.transform = function TransformInputOnToOnEvent_transform(ast) {
- const pluginContext = this;
- const b = pluginContext.syntax.builders;
- const walker = new plugi... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/lib/mixins/view_child_views_support.js | @@ -86,7 +86,7 @@ export default Mixin.create({
throw new TypeError('createChildViews first argument must exist');
}
- const owner = getOwner(this);
+ let owner = getOwner(this);
if (maybeViewClass.isView && maybeViewClass.parentView === this && getOwner(maybeViewClass) === owner) {
re... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/lib/mixins/view_support.js | @@ -118,7 +118,7 @@ export default Mixin.create({
if (!name) { return; }
assert('templateNames are not allowed to contain periods: ' + name, name.indexOf('.') === -1);
- const owner = getOwner(this);
+ let owner = getOwner(this);
if (!owner) {
throw new EmberError('Container was not foun... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/lib/system/event_dispatcher.js | @@ -190,8 +190,8 @@ export default EmberObject.extend({
setupHandler(rootElement, event, eventName) {
var self = this;
- const owner = getOwner(this);
- const viewRegistry = owner && owner.lookup('-view-registry:main') || View.views;
+ let owner = getOwner(this);
+ let viewRegistry = owner && owne... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/tests/views/component_test.js | @@ -231,7 +231,7 @@ QUnit.test('Calling sendAction on a component with multiple parameters', functio
QUnit.module('Ember.Component - injected properties');
QUnit.test('services can be injected into components', function() {
- const owner = buildOwner();
+ let owner = buildOwner();
owner.register('component:a... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/tests/views/container_view_test.js | @@ -32,7 +32,7 @@ QUnit.module('Ember.ContainerView', {
});
QUnit.test('should be able to insert views after the DOM representation is created', function() {
- const owner = buildOwner();
+ let owner = buildOwner();
container = ContainerView.create({
[OWNER]: owner,
@@ -87,7 +87,7 @@ QUnit.test('should ... | true |
Other | emberjs | ember.js | 41e4e57aa63ea9c1e75aeac475a15f068731e2e8.json | Enforce const usage in module scope only.
Good:
```js
const FOO = 'FOO';
```
Bad:
```js
function derp() {
const FOO = 'FOO';
}
if (false) {
const BLAH = 'BLAH';
}
``` | packages/ember-views/tests/views/view/inject_test.js | @@ -6,7 +6,7 @@ import buildOwner from 'container/tests/test-helpers/build-owner';
QUnit.module('EmberView - injected properties');
QUnit.test('services can be injected into views', function() {
- const owner = buildOwner();
+ let owner = buildOwner();
owner.register('view:application', View.extend({
pr... | true |
Other | emberjs | ember.js | 5fc8d4064ff72c393719b677b541b89428d274e4.json | Test white space in `Ember.isEmpty`
Most of the examples for `Ember.isEmpty` are similar to that from `Ember.isBlank` (https://github.com/emberjs/ember.js/blob/v2.1.0/packages/ember-metal/lib/is_blank.js#L3). Examples for white space are missing. | packages/ember-metal/lib/is_empty.js | @@ -17,6 +17,8 @@ import isNone from 'ember-metal/is_none';
Ember.isEmpty({}); // false
Ember.isEmpty('Adam Hawkins'); // false
Ember.isEmpty([0,1,2]); // false
+ Ember.isEmpty('\n\t'); // false
+ Ember.isEmpty(' '); // false
```
@method isEmpty | true |
Other | emberjs | ember.js | 5fc8d4064ff72c393719b677b541b89428d274e4.json | Test white space in `Ember.isEmpty`
Most of the examples for `Ember.isEmpty` are similar to that from `Ember.isBlank` (https://github.com/emberjs/ember.js/blob/v2.1.0/packages/ember-metal/lib/is_blank.js#L3). Examples for white space are missing. | packages/ember-metal/tests/is_empty_test.js | @@ -14,6 +14,8 @@ QUnit.test('Ember.isEmpty', function() {
equal(true, isEmpty(null), 'for null');
equal(true, isEmpty(undefined), 'for undefined');
equal(true, isEmpty(''), 'for an empty String');
+ equal(false, isEmpty(' '), 'for a whitespace String');
+ equal(false, isEmpty('\n\t'), 'for another whitespa... | true |
Other | emberjs | ember.js | 1b18f8c7730fc6285c2a07389e74655c0e4ce08f.json | remove extra comma | packages/ember-metal/lib/property_events.js | @@ -1,5 +1,5 @@
import {
- guidFor,
+ guidFor
} from 'ember-metal/utils';
import {
peekMeta | false |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | bin/run-node-tests.js | @@ -1,6 +1,6 @@
#!/usr/bin/env node
-require('qunitjs');
+global.QUnit = require('qunitjs');
// adds test reporting
var qe = require('qunit-extras'); | true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | package.json | @@ -34,8 +34,8 @@
"github": "^0.2.3",
"glob": "~4.3.2",
"htmlbars": "0.14.6",
- "qunit-extras": "^1.3.0",
- "qunitjs": "^1.16.0",
+ "qunit-extras": "^1.4.0",
+ "qunitjs": "^1.19.0",
"route-recognizer": "0.1.5",
"rsvp": "~3.0.6",
"serve-static": "^1.10.0", | true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | tests/node/app-boot-test.js | @@ -1,4 +1,5 @@
/*jshint multistr:true*/
+var QUnit = require('qunitjs');
var appModule = require('./helpers/app-module');
function assertHTMLMatches(assert, actualHTML, expectedHTML) {
@@ -87,40 +88,40 @@ if (appModule.canRunTests) {
});
QUnit.test("lifecycle hooks disabled", function(assert) {
- expec... | true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | tests/node/component-rendering-test.js | @@ -1,5 +1,6 @@
/*globals global,__dirname*/
+var QUnit = require('qunitjs');
var SimpleDOM = require('simple-dom');
var path = require('path');
| true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | tests/node/helpers/app-module.js | @@ -2,6 +2,8 @@
/*globals global,__dirname*/
var path = require('path');
+var QUnit = require('qunitjs');
+
var distPath = path.join(__dirname, '../../../dist');
var emberPath = path.join(distPath, 'ember.debug.cjs');
var templateCompilerPath = path.join(distPath, 'ember-template-compiler'); | true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | tests/node/runtime-test.js | @@ -1,22 +1,19 @@
/*globals __dirname*/
var path = require('path');
-
-var module = QUnit.module;
-var ok = QUnit.ok;
-var equal = QUnit.equal;
+var QUnit = require('qunitjs');
var distPath = path.join(__dirname, '../../dist');
-module('ember-runtime.js');
+QUnit.module('ember-runtime.js');
-test('can be req... | true |
Other | emberjs | ember.js | 05e5feb585233e4b27ed4a96df6e36d8d57ef2be.json | Fix node tests.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).
This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions. | tests/node/template-compiler-test.js | @@ -1,12 +1,12 @@
/*globals __dirname*/
var path = require('path');
+var QUnit = require('qunitjs');
+
var distPath = path.join(__dirname, '../../dist');
var templateCompilerPath = path.join(distPath, 'ember-template-compiler');
var module = QUnit.module;
-var ok = QUnit.ok;
-var equal = QUnit.equal;
var test... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/chains.js | @@ -1,6 +1,6 @@
import { warn } from 'ember-metal/debug';
import { get, normalizeTuple } from 'ember-metal/property_get';
-import { meta as metaFor } from 'ember-metal/meta';
+import { meta as metaFor, peekMeta } from 'ember-metal/meta';
import { watchKey, unwatchKey } from 'ember-metal/watch_key';
import EmptyObje... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/computed.js | @@ -1,7 +1,7 @@
import { assert } from 'ember-metal/debug';
import { set } from 'ember-metal/property_set';
import { inspect } from 'ember-metal/utils';
-import { meta as metaFor } from 'ember-metal/meta';
+import { meta as metaFor, peekMeta } from 'ember-metal/meta';
import expandProperties from 'ember-metal/expan... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/events.js | @@ -11,7 +11,7 @@ import {
apply,
applyStr
} from 'ember-metal/utils';
-import { meta as metaFor } from 'ember-metal/meta';
+import { meta as metaFor, peekMeta } from 'ember-metal/meta';
import { ONCE, SUSPENDED } from 'ember-metal/meta_listeners';
@@ -49,7 +49,7 @@ function indexOf(array, target, method) {... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/meta.js | @@ -312,10 +312,6 @@ let setMeta = function(obj, meta) {
obj[META_FIELD] = meta;
};
-export let peekMeta = function(obj) {
- return obj[META_FIELD];
-};
-
/**
Retrieves the meta hash for an object. If `writable` is true ensures the
hash is writable for this object as well.
@@ -354,3 +350,10 @@ export func... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/mixin.js | @@ -19,7 +19,7 @@ import {
wrap,
makeArray
} from 'ember-metal/utils';
-import { meta as metaFor } from 'ember-metal/meta';
+import { meta as metaFor, peekMeta } from 'ember-metal/meta';
import expandProperties from 'ember-metal/expand_properties';
import {
Descriptor,
@@ -604,7 +604,7 @@ function _detect(c... | true |
Other | emberjs | ember.js | e46e056f1d5ed3136efbdf2136febebacd0461c6.json | use peekMeta + deleteMeta is isolate the code-base. | packages/ember-metal/lib/property_events.js | @@ -1,6 +1,9 @@
import {
- guidFor
+ guidFor,
} from 'ember-metal/utils';
+import {
+ peekMeta
+} from 'ember-metal/meta';
import {
sendEvent,
accumulateListeners
@@ -35,7 +38,7 @@ var deferred = 0;
@private
*/
function propertyWillChange(obj, keyName) {
- var m = obj['__ember_meta__'];
+ var m = pee... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.