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
22e1612ad07249fddb6a1e0bb2344eba638fab46.json
Remove remnants of HTMLBars.
packages/ember/tests/component_registration_test.js
@@ -7,15 +7,6 @@ import { compile } from 'ember-template-compiler'; import Component from 'ember-templates/component'; import jQuery from 'ember-views/system/jquery'; import { setTemplates, set as setTemplate } from 'ember-templates/template_registry'; -import isEnabled from 'ember-metal/features'; -import require from 'require'; - -let OutletView; -if (isEnabled('ember-glimmer')) { - OutletView = require('ember-glimmer/views/outlet').default; -} else { - OutletView = require('ember-htmlbars/views/outlet').OutletView; -} let App, appInstance; @@ -362,30 +353,3 @@ QUnit.test('Components trigger actions in the components context when called fro jQuery('#fizzbuzz', '#wrapper').click(); }); - -if (!isEnabled('ember-glimmer')) { - QUnit.test('Components receive the top-level view as their ownerView', function(assert) { - setTemplate('application', compile('{{outlet}}')); - setTemplate('index', compile('{{my-component}}')); - setTemplate('components/my-component', compile('<div></div>')); - - let component; - - boot(() => { - appInstance.register('component:my-component', Component.extend({ - init() { - this._super(); - component = this; - } - })); - }); - - // Theses tests are intended to catch a regression where the owner view was - // not configured properly. Future refactors may break these tests, which - // should not be considered a breaking change to public APIs. - let ownerView = component.ownerView; - assert.ok(ownerView, 'owner view was set'); - assert.ok(ownerView instanceof OutletView, 'owner view has no parent view'); - assert.notStrictEqual(component, ownerView, 'owner view is not itself'); - }); -}
true
Other
emberjs
ember.js
22e1612ad07249fddb6a1e0bb2344eba638fab46.json
Remove remnants of HTMLBars.
yuidoc.json
@@ -9,7 +9,7 @@ "packages/ember-metal/lib", "packages/ember-runtime/lib", "packages/ember-views/lib", - "packages/ember-htmlbars/lib", + "packages/ember-glimmer/lib", "packages/ember-routing/lib", "packages/ember-routing-views/lib", "packages/ember-application/lib",
true
Other
emberjs
ember.js
d43a86326b35fb493737bca48ccd5dc8e64547d7.json
Add 2.8.0-beta.5 to CHANGELOG.md. [ci skip]
CHANGELOG.md
@@ -1,5 +1,9 @@ # Ember Changelog +### 2.8.0-beta.5 (August 30, 2016) + +- [#14159](https://github.com/emberjs/ember.js/pull/14159) [BUGFIX] Fix rendering system cleanup. + ### 2.8.0-beta.4 (August 29, 2016) - [#14123](https://github.com/emberjs/ember.js/pull/14123) [BUGFIX] Avoid rerendering outlet state during router destruction.
false
Other
emberjs
ember.js
6591d689689e3c1203fc3dc94d1ba234433328a1.json
Implement platform specific protocolForURL.
packages/ember-glimmer/lib/environment.js
@@ -46,6 +46,8 @@ import { default as normalizeClassHelper } from './helpers/-normalize-class'; import { default as htmlSafeHelper } from './helpers/-html-safe'; import { OWNER } from 'container'; +import installPlatformSpecificProtocolForURL from './protocol-for-url'; + const builtInComponents = { textarea: '-text-area' }; @@ -134,7 +136,7 @@ export default class Environment extends GlimmerEnvironment { super(...arguments); this.owner = owner; - this.uselessAnchor = this.getAppendOperations().createElement('a'); + installPlatformSpecificProtocolForURL(this); this._definitionCache = new Cache(2000, ({ name, source, owner }) => { let { component: ComponentClass, layout } = lookupComponent(owner, name, { source }); @@ -164,11 +166,6 @@ export default class Environment extends GlimmerEnvironment { }; } - protocolForURL(url) { - this.uselessAnchor.href = url; - return this.uselessAnchor.protocol; - } - // Hello future traveler, welcome to the world of syntax refinement. // The method below is called by Glimmer's runtime compiler to allow // us to take generic statement syntax and refine it to more meaniful
true
Other
emberjs
ember.js
6591d689689e3c1203fc3dc94d1ba234433328a1.json
Implement platform specific protocolForURL.
packages/ember-glimmer/lib/protocol-for-url.js
@@ -0,0 +1,51 @@ +/* globals module, URL */ + +import { environment as emberEnvironment } from 'ember-environment'; + +let nodeURL; +let parsingNode; + +export default function installProtocolForURL(environment) { + let protocol; + + if (emberEnvironment.hasDOM) { + protocol = browserProtocolForURL.call(environment, 'foobar:baz'); + } + + // Test to see if our DOM implementation parses + // and normalizes URLs. + if (protocol === 'foobar:') { + // Swap in the method that doesn't do this test now that + // we know it works. + environment.protocolForURL = browserProtocolForURL; + } else if (typeof URL === 'object') { + // URL globally provided, likely from FastBoot's sandbox + nodeURL = URL; + environment.protocolForURL = nodeProtocolForURL; + } else if (typeof module === 'object' && typeof module.require === 'function') { + // Otherwise, we need to fall back to our own URL parsing. + // Global `require` is shadowed by Ember's loader so we have to use the fully + // qualified `module.require`. + nodeURL = module.require('url'); + environment.protocolForURL = nodeProtocolForURL; + } else { + throw new Error("Could not find valid URL parsing mechanism for URL Sanitization"); + } +} + +function browserProtocolForURL(url) { + if (!parsingNode) { + parsingNode = document.createElement('a'); + } + + parsingNode.href = url; + return parsingNode.protocol; +} + +function nodeProtocolForURL(url) { + let protocol = null; + if (typeof url === 'string') { + protocol = nodeURL.parse(url).protocol; + } + return (protocol === null) ? ':' : protocol; +}
true
Other
emberjs
ember.js
518669ed061f2809737e359f86458447a1c55b13.json
Add 2.8.0-beta.4 to CHANGELOG.md. [ci skip] (cherry picked from commit c50cf7569fda3ac9f1135c10e9686747b47b52cf)
CHANGELOG.md
@@ -1,5 +1,17 @@ # Ember Changelog +### 2.8.0-beta.4 (August 29, 2016) + +- [#14123](https://github.com/emberjs/ember.js/pull/14123) [BUGFIX] Avoid rerendering outlet state during router destruction. +- [#14077](https://github.com/emberjs/ember.js/pull/14077) [BUGFIX] Update route-recognizer. +- [#14087](https://github.com/emberjs/ember.js/pull/14087) [BUGFIX] Check that route handler exists before triggering actions. +- [#14106](https://github.com/emberjs/ember.js/pull/14106) [BUGFIX] Avoid assertion when `id=` is provided to tagless components. +- [#14110](https://github.com/emberjs/ember.js/pull/14110) [BUGFIX] Fix issues with revalidation during teardown. +- [#14117](https://github.com/emberjs/ember.js/pull/14117) [BUGFIX] Call ArrayProxy's content change hooks +- [#14135](https://github.com/emberjs/ember.js/pull/14135) [BUGFIX] Fix issues around Engine setup and teardown. +- [#14140](https://github.com/emberjs/ember.js/pull/14140) [BUGFIX] Ensure component injections happen in engine instances. + + ### 2.8.0-beta.3 (August 15, 2016) - [#14009](https://github.com/emberjs/ember.js/pull/14009) [BUGFIX] Fix usage of `role` when used in `attributeBindings`.
false
Other
emberjs
ember.js
cbd680c42fba2fff7fed581ed33511a11b6eb8ab.json
Use relative imports in ember-testing.
packages/ember-testing/lib/adapters/qunit.js
@@ -1,4 +1,4 @@ -import Adapter from 'ember-testing/adapters/adapter'; +import Adapter from './adapter'; import { inspect } from 'ember-metal/utils'; /**
true
Other
emberjs
ember.js
cbd680c42fba2fff7fed581ed33511a11b6eb8ab.json
Use relative imports in ember-testing.
packages/ember-testing/lib/index.js
@@ -1,14 +1,14 @@ import Ember from 'ember-metal/core'; // reexports -import Test from 'ember-testing/test'; -import Adapter from 'ember-testing/adapters/adapter'; -import setupForTesting from 'ember-testing/setup_for_testing'; +import Test from './test'; +import Adapter from './adapters/adapter'; +import setupForTesting from './setup_for_testing'; import require from 'require'; -import 'ember-testing/support'; // to handle various edge cases -import 'ember-testing/ext/application'; -import 'ember-testing/ext/rsvp'; -import 'ember-testing/helpers'; // adds helpers to helpers object in Test -import 'ember-testing/initializers'; // to setup initializer +import './support'; // to handle various edge cases +import './ext/application'; +import './ext/rsvp'; +import './helpers'; // adds helpers to helpers object in Test +import './initializers'; // to setup initializer /** @module ember
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/env.js
@@ -4,37 +4,37 @@ import { hooks } from 'htmlbars-runtime'; import assign from 'ember-metal/assign'; import isEnabled from 'ember-metal/features'; -import subexpr from 'ember-htmlbars/hooks/subexpr'; -import concat from 'ember-htmlbars/hooks/concat'; -import linkRenderNode from 'ember-htmlbars/hooks/link-render-node'; -import createFreshScope, { createChildScope } from 'ember-htmlbars/hooks/create-fresh-scope'; -import bindShadowScope from 'ember-htmlbars/hooks/bind-shadow-scope'; -import bindSelf from 'ember-htmlbars/hooks/bind-self'; -import bindScope from 'ember-htmlbars/hooks/bind-scope'; -import bindLocal from 'ember-htmlbars/hooks/bind-local'; -import bindBlock from 'ember-htmlbars/hooks/bind-block'; -import updateSelf from 'ember-htmlbars/hooks/update-self'; -import getRoot from 'ember-htmlbars/hooks/get-root'; -import getChild from 'ember-htmlbars/hooks/get-child'; -import getBlock from 'ember-htmlbars/hooks/get-block'; -import getValue from 'ember-htmlbars/hooks/get-value'; -import getCellOrValue from 'ember-htmlbars/hooks/get-cell-or-value'; -import cleanupRenderNode from 'ember-htmlbars/hooks/cleanup-render-node'; -import destroyRenderNode from 'ember-htmlbars/hooks/destroy-render-node'; -import didRenderNode from 'ember-htmlbars/hooks/did-render-node'; -import willCleanupTree from 'ember-htmlbars/hooks/will-cleanup-tree'; -import didCleanupTree from 'ember-htmlbars/hooks/did-cleanup-tree'; -import classify from 'ember-htmlbars/hooks/classify'; -import component from 'ember-htmlbars/hooks/component'; -import lookupHelper from 'ember-htmlbars/hooks/lookup-helper'; -import hasHelper from 'ember-htmlbars/hooks/has-helper'; -import invokeHelper from 'ember-htmlbars/hooks/invoke-helper'; -import element from 'ember-htmlbars/hooks/element'; +import subexpr from './hooks/subexpr'; +import concat from './hooks/concat'; +import linkRenderNode from './hooks/link-render-node'; +import createFreshScope, { createChildScope } from './hooks/create-fresh-scope'; +import bindShadowScope from './hooks/bind-shadow-scope'; +import bindSelf from './hooks/bind-self'; +import bindScope from './hooks/bind-scope'; +import bindLocal from './hooks/bind-local'; +import bindBlock from './hooks/bind-block'; +import updateSelf from './hooks/update-self'; +import getRoot from './hooks/get-root'; +import getChild from './hooks/get-child'; +import getBlock from './hooks/get-block'; +import getValue from './hooks/get-value'; +import getCellOrValue from './hooks/get-cell-or-value'; +import cleanupRenderNode from './hooks/cleanup-render-node'; +import destroyRenderNode from './hooks/destroy-render-node'; +import didRenderNode from './hooks/did-render-node'; +import willCleanupTree from './hooks/will-cleanup-tree'; +import didCleanupTree from './hooks/did-cleanup-tree'; +import classify from './hooks/classify'; +import component from './hooks/component'; +import lookupHelper from './hooks/lookup-helper'; +import hasHelper from './hooks/has-helper'; +import invokeHelper from './hooks/invoke-helper'; +import element from './hooks/element'; -import helpers from 'ember-htmlbars/helpers'; -import keywords, { registerKeyword } from 'ember-htmlbars/keywords'; +import helpers from './helpers'; +import keywords, { registerKeyword } from './keywords'; -import DOMHelper from 'ember-htmlbars/system/dom-helper'; +import DOMHelper from './system/dom-helper'; const emberHooks = assign({}, hooks); emberHooks.keywords = keywords; @@ -69,23 +69,23 @@ assign(emberHooks, { element }); -import debuggerKeyword from 'ember-htmlbars/keywords/debugger'; -import withKeyword from 'ember-htmlbars/keywords/with'; -import outlet from 'ember-htmlbars/keywords/outlet'; -import unbound from 'ember-htmlbars/keywords/unbound'; -import componentKeyword from 'ember-htmlbars/keywords/component'; -import elementComponent from 'ember-htmlbars/keywords/element-component'; -import mount from 'ember-htmlbars/keywords/mount'; -import partial from 'ember-htmlbars/keywords/partial'; -import input from 'ember-htmlbars/keywords/input'; -import textarea from 'ember-htmlbars/keywords/textarea'; -import yieldKeyword from 'ember-htmlbars/keywords/yield'; -import mut, { privateMut } from 'ember-htmlbars/keywords/mut'; -import readonly from 'ember-htmlbars/keywords/readonly'; -import getKeyword from 'ember-htmlbars/keywords/get'; -import actionKeyword from 'ember-htmlbars/keywords/action'; -import renderKeyword from 'ember-htmlbars/keywords/render'; -import elementActionKeyword from 'ember-htmlbars/keywords/element-action'; +import debuggerKeyword from './keywords/debugger'; +import withKeyword from './keywords/with'; +import outlet from './keywords/outlet'; +import unbound from './keywords/unbound'; +import componentKeyword from './keywords/component'; +import elementComponent from './keywords/element-component'; +import mount from './keywords/mount'; +import partial from './keywords/partial'; +import input from './keywords/input'; +import textarea from './keywords/textarea'; +import yieldKeyword from './keywords/yield'; +import mut, { privateMut } from './keywords/mut'; +import readonly from './keywords/readonly'; +import getKeyword from './keywords/get'; +import actionKeyword from './keywords/action'; +import renderKeyword from './keywords/render'; +import elementActionKeyword from './keywords/element-action'; registerKeyword('debugger', debuggerKeyword); registerKeyword('with', withKeyword);
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/helpers/each.js
@@ -4,7 +4,7 @@ */ import shouldDisplay from '../streams/should_display'; -import decodeEachKey from 'ember-htmlbars/utils/decode-each-key'; +import decodeEachKey from '../utils/decode-each-key'; /** The `{{#each}}` helper loops over elements in a collection. It is an extension
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/classify.js
@@ -3,7 +3,7 @@ @submodule ember-htmlbars */ -import isComponent from 'ember-htmlbars/utils/is-component'; +import isComponent from '../utils/is-component'; export default function classify(env, scope, path) { if (isComponent(env, scope, path)) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/component.js
@@ -1,20 +1,20 @@ import { assert } from 'ember-metal/debug'; -import ComponentNodeManager from 'ember-htmlbars/node-managers/component-node-manager'; +import ComponentNodeManager from '../node-managers/component-node-manager'; import lookupComponent from 'ember-views/utils/lookup-component'; import assign from 'ember-metal/assign'; import EmptyObject from 'ember-metal/empty_object'; import { CONTAINS_DOT_CACHE -} from 'ember-htmlbars/system/lookup-helper'; -import extractPositionalParams from 'ember-htmlbars/utils/extract-positional-params'; +} from '../system/lookup-helper'; +import extractPositionalParams from '../utils/extract-positional-params'; import { COMPONENT_HASH, COMPONENT_PATH, COMPONENT_POSITIONAL_PARAMS, isComponentCell, mergeInNewHash, processPositionalParamsFromCell, -} from 'ember-htmlbars/keywords/closure-component'; +} from '../keywords/closure-component'; export default function componentHook(renderNode, env, scope, _tagName, params, _attrs, templates, visitor) { let state = renderNode.getState();
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/element.js
@@ -3,9 +3,9 @@ @submodule ember-htmlbars */ -import { findHelper } from 'ember-htmlbars/system/lookup-helper'; +import { findHelper } from '../system/lookup-helper'; import { handleRedirect } from 'htmlbars-runtime/hooks'; -import { buildHelperStream } from 'ember-htmlbars/system/invoke-helper'; +import { buildHelperStream } from '../system/invoke-helper'; export default function emberElement(morph, env, scope, path, params, hash, visitor) { if (handleRedirect(morph, env, scope, path, params, hash, null, null, visitor)) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/get-cell-or-value.js
@@ -1,5 +1,5 @@ import { read } from '../streams/utils'; -import { MUTABLE_REFERENCE } from 'ember-htmlbars/keywords/mut'; +import { MUTABLE_REFERENCE } from '../keywords/mut'; export default function getCellOrValue(ref) { if (ref && ref[MUTABLE_REFERENCE]) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/has-helper.js
@@ -1,4 +1,4 @@ -import { validateLazyHelperName } from 'ember-htmlbars/system/lookup-helper'; +import { validateLazyHelperName } from '../system/lookup-helper'; export default function hasHelperHook(env, scope, helperName) { if (env.helpers[helperName]) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/invoke-helper.js
@@ -1,5 +1,5 @@ -import { buildHelperStream } from 'ember-htmlbars/system/invoke-helper'; -import subscribe from 'ember-htmlbars/utils/subscribe'; +import { buildHelperStream } from '../system/invoke-helper'; +import subscribe from '../utils/subscribe'; export default function invokeHelper(morph, env, scope, visitor, params, hash, helper, templates, context) { let helperStream = buildHelperStream(helper, params, hash, templates, env, scope);
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/link-render-node.js
@@ -3,15 +3,15 @@ @submodule ember-htmlbars */ -import subscribe from 'ember-htmlbars/utils/subscribe'; +import subscribe from '../utils/subscribe'; import { isArray } from 'ember-runtime/utils'; import { chain, read, isStream, addDependency } from '../streams/utils'; -import { CONTAINS_DOT_CACHE } from 'ember-htmlbars/system/lookup-helper'; +import { CONTAINS_DOT_CACHE } from '../system/lookup-helper'; import { COMPONENT_HASH, isComponentCell, mergeInNewHash -} from 'ember-htmlbars/keywords/closure-component'; +} from '../keywords/closure-component'; export default function linkRenderNode(renderNode, env, scope, path, params, hash) { if (renderNode.streamUnsubscribers) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/lookup-helper.js
@@ -1,4 +1,4 @@ -import lookupHelper from 'ember-htmlbars/system/lookup-helper'; +import lookupHelper from '../system/lookup-helper'; export default function lookupHelperHook(env, scope, helperName) { return lookupHelper(helperName, scope.getSelf(), env);
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/hooks/subexpr.js
@@ -3,13 +3,13 @@ @submodule ember-htmlbars */ -import lookupHelper from 'ember-htmlbars/system/lookup-helper'; -import { buildHelperStream } from 'ember-htmlbars/system/invoke-helper'; +import lookupHelper from '../system/lookup-helper'; +import { buildHelperStream } from '../system/invoke-helper'; import { labelsFor, labelFor } from '../streams/utils'; -import { linkParamsFor } from 'ember-htmlbars/hooks/link-render-node'; +import { linkParamsFor } from './link-render-node'; export default function subexpr(env, scope, helperName, params, hash) { // TODO: Keywords and helper invocation should be integrated into
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/index.js
@@ -98,23 +98,23 @@ import Ember from 'ember-metal/core'; // exposing Ember.HTMLBars import { registerHelper -} from 'ember-htmlbars/helpers'; +} from './helpers'; import { ifHelper, unlessHelper -} from 'ember-htmlbars/helpers/if_unless'; -import withHelper from 'ember-htmlbars/helpers/with'; -import locHelper from 'ember-htmlbars/helpers/loc'; -import logHelper from 'ember-htmlbars/helpers/log'; -import eachHelper from 'ember-htmlbars/helpers/each'; -import eachInHelper from 'ember-htmlbars/helpers/each-in'; -import normalizeClassHelper from 'ember-htmlbars/helpers/-normalize-class'; -import concatHelper from 'ember-htmlbars/helpers/concat'; -import joinClassesHelper from 'ember-htmlbars/helpers/-join-classes'; -import htmlSafeHelper from 'ember-htmlbars/helpers/-html-safe'; -import hashHelper from 'ember-htmlbars/helpers/hash'; -import queryParamsHelper from 'ember-htmlbars/helpers/query-params'; -import DOMHelper from 'ember-htmlbars/system/dom-helper'; +} from './helpers/if_unless'; +import withHelper from './helpers/with'; +import locHelper from './helpers/loc'; +import logHelper from './helpers/log'; +import eachHelper from './helpers/each'; +import eachInHelper from './helpers/each-in'; +import normalizeClassHelper from './helpers/-normalize-class'; +import concatHelper from './helpers/concat'; +import joinClassesHelper from './helpers/-join-classes'; +import htmlSafeHelper from './helpers/-html-safe'; +import hashHelper from './helpers/hash'; +import queryParamsHelper from './helpers/query-params'; +import DOMHelper from './system/dom-helper'; export { default as template } from './system/template';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/action.js
@@ -4,7 +4,7 @@ */ import { keyword } from 'htmlbars-runtime/hooks'; -import closureAction from 'ember-htmlbars/keywords/closure-action'; +import closureAction from './closure-action'; /** The `{{action}}` helper provides a way to pass triggers for behavior (usually
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/closure-action.js
@@ -1,12 +1,12 @@ -import { Stream } from 'ember-htmlbars/streams/stream'; +import { Stream } from '../streams/stream'; import { read, readArray, labelFor -} from 'ember-htmlbars/streams/utils'; +} from '../streams/utils'; import symbol from 'ember-metal/symbol'; import { get } from 'ember-metal/property_get'; -import { labelForSubexpr } from 'ember-htmlbars/hooks/subexpr'; +import { labelForSubexpr } from '../hooks/subexpr'; import EmberError from 'ember-metal/error'; import run from 'ember-metal/run_loop'; import { flaggedInstrument } from 'ember-metal/instrumentation';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/closure-component.js
@@ -10,9 +10,9 @@ import symbol from 'ember-metal/symbol'; import BasicStream from '../streams/stream'; import EmptyObject from 'ember-metal/empty_object'; import { read } from '../streams/utils'; -import { labelForSubexpr } from 'ember-htmlbars/hooks/subexpr'; +import { labelForSubexpr } from '../hooks/subexpr'; import assign from 'ember-metal/assign'; -import { isRestPositionalParams, processPositionalParams } from 'ember-htmlbars/utils/extract-positional-params'; +import { isRestPositionalParams, processPositionalParams } from '../utils/extract-positional-params'; import lookupComponent from 'ember-views/utils/lookup-component'; export const COMPONENT_REFERENCE = symbol('COMPONENT_REFERENCE');
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/component.js
@@ -4,7 +4,7 @@ @public */ import { keyword } from 'htmlbars-runtime/hooks'; -import closureComponent from 'ember-htmlbars/keywords/closure-component'; +import closureComponent from './closure-component'; import EmptyObject from 'ember-metal/empty_object'; import assign from 'ember-metal/assign';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/element-action.js
@@ -1,8 +1,8 @@ import { assert } from 'ember-metal/debug'; import { uuid } from 'ember-metal/utils'; -import { labelFor, read } from 'ember-htmlbars/streams/utils'; +import { labelFor, read } from '../streams/utils'; import run from 'ember-metal/run_loop'; -import { readUnwrappedModel } from 'ember-htmlbars/streams/utils'; +import { readUnwrappedModel } from '../streams/utils'; import { isSimpleClick } from 'ember-views/system/utils'; import ActionManager from 'ember-views/system/action_manager'; import { flaggedInstrument } from 'ember-metal/instrumentation';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/element-component.js
@@ -8,7 +8,7 @@ import { processPositionalParamsFromCell, } from './closure-component'; import lookupComponent from 'ember-views/utils/lookup-component'; -import extractPositionalParams from 'ember-htmlbars/utils/extract-positional-params'; +import extractPositionalParams from '../utils/extract-positional-params'; export default { setupState(lastState, env, scope, params, hash) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/get.js
@@ -6,7 +6,7 @@ import { assert } from 'ember-metal/debug'; import BasicStream from '../streams/stream'; import { isStream } from '../streams/utils'; -import subscribe from 'ember-htmlbars/utils/subscribe'; +import subscribe from '../utils/subscribe'; import { get } from 'ember-metal/property_get'; import { set } from 'ember-metal/property_set'; import {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/mount.js
@@ -3,8 +3,8 @@ @submodule ember-templates */ -import ViewNodeManager from 'ember-htmlbars/node-managers/view-node-manager'; -import RenderEnv from 'ember-htmlbars/system/render-env'; +import ViewNodeManager from '../node-managers/view-node-manager'; +import RenderEnv from '../system/render-env'; import { assert } from 'ember-metal/debug'; import { getOwner, setOwner } from 'container/owner'; import { isOutletStable } from './outlet';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/mut.js
@@ -9,7 +9,7 @@ import ProxyStream from '../streams/proxy-stream'; import BasicStream from '../streams/stream'; import { isStream } from '../streams/utils'; import { MUTABLE_CELL } from 'ember-views/compat/attrs-proxy'; -import { INVOKE, ACTION } from 'ember-htmlbars/keywords/closure-action'; +import { INVOKE, ACTION } from './closure-action'; export let MUTABLE_REFERENCE = symbol('MUTABLE_REFERENCE');
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/outlet.js
@@ -3,8 +3,8 @@ @submodule ember-templates */ -import ViewNodeManager from 'ember-htmlbars/node-managers/view-node-manager'; -import topLevelViewTemplate from 'ember-htmlbars/templates/top-level-view'; +import ViewNodeManager from '../node-managers/view-node-manager'; +import topLevelViewTemplate from '../templates/top-level-view'; import isEnabled from 'ember-metal/features'; import VERSION from 'ember/version';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/readonly.js
@@ -3,7 +3,7 @@ @submodule ember-templates */ -import { MUTABLE_REFERENCE } from 'ember-htmlbars/keywords/mut'; +import { MUTABLE_REFERENCE } from './mut'; export default function readonly(morph, env, scope, originalParams, hash, template, inverse) { // If `morph` is `null` the keyword is being invoked as a subexpression.
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/keywords/render.js
@@ -6,10 +6,10 @@ import { assert } from 'ember-metal/debug'; import EmptyObject from 'ember-metal/empty_object'; import EmberError from 'ember-metal/error'; -import { isStream, read } from 'ember-htmlbars/streams/utils'; +import { isStream, read } from '../streams/utils'; import generateController from 'ember-routing/system/generate_controller'; import { generateControllerFactory } from 'ember-routing/system/generate_controller'; -import ViewNodeManager from 'ember-htmlbars/node-managers/view-node-manager'; +import ViewNodeManager from '../node-managers/view-node-manager'; /** Calling ``{{render}}`` from within a template will insert another
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/node-managers/component-node-manager.js
@@ -1,18 +1,18 @@ import { assert, warn } from 'ember-metal/debug'; -import buildComponentTemplate from 'ember-htmlbars/system/build-component-template'; -import getCellOrValue from 'ember-htmlbars/hooks/get-cell-or-value'; +import buildComponentTemplate from '../system/build-component-template'; +import getCellOrValue from '../hooks/get-cell-or-value'; import { get } from 'ember-metal/property_get'; import { MUTABLE_CELL } from 'ember-views/compat/attrs-proxy'; -import { instrument } from 'ember-htmlbars/system/instrumentation-support'; -import EmberComponent, { HAS_BLOCK } from 'ember-htmlbars/component'; -import extractPositionalParams from 'ember-htmlbars/utils/extract-positional-params'; +import { instrument } from '../system/instrumentation-support'; +import EmberComponent, { HAS_BLOCK } from '../component'; +import extractPositionalParams from '../utils/extract-positional-params'; import { setOwner, getOwner } from 'container/owner'; // In theory this should come through the env, but it should // be safe to import this until we make the hook system public // and it gets actively used in addons or other downstream // libraries. -import getValue from 'ember-htmlbars/hooks/get-value'; +import getValue from '../hooks/get-value'; export default function ComponentNodeManager(component, scope, renderNode, attrs, block, expectElement) { this.component = component;
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/node-managers/view-node-manager.js
@@ -1,19 +1,19 @@ import assign from 'ember-metal/assign'; import { assert, warn } from 'ember-metal/debug'; -import buildComponentTemplate from 'ember-htmlbars/system/build-component-template'; +import buildComponentTemplate from '../system/build-component-template'; import { get } from 'ember-metal/property_get'; import setProperties from 'ember-metal/set_properties'; import { MUTABLE_CELL } from 'ember-views/compat/attrs-proxy'; -import getCellOrValue from 'ember-htmlbars/hooks/get-cell-or-value'; -import { instrument } from 'ember-htmlbars/system/instrumentation-support'; -import { takeLegacySnapshot } from 'ember-htmlbars/node-managers/component-node-manager'; +import getCellOrValue from '../hooks/get-cell-or-value'; +import { instrument } from '../system/instrumentation-support'; +import { takeLegacySnapshot } from './component-node-manager'; import { setOwner } from 'container/owner'; // In theory this should come through the env, but it should // be safe to import this until we make the hook system public // and it gets actively used in addons or other downstream // libraries. -import getValue from 'ember-htmlbars/hooks/get-value'; +import getValue from '../hooks/get-value'; export default function ViewNodeManager(component, scope, renderNode, block, expectElement) { this.component = component;
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/renderer.js
@@ -3,10 +3,10 @@ import { get } from 'ember-metal/property_get'; import { set } from 'ember-metal/property_set'; import assign from 'ember-metal/assign'; import setProperties from 'ember-metal/set_properties'; -import buildComponentTemplate from 'ember-htmlbars/system/build-component-template'; +import buildComponentTemplate from './system/build-component-template'; import { environment } from 'ember-environment'; import { internal } from 'htmlbars-runtime'; -import { renderHTMLBarsBlock } from 'ember-htmlbars/system/render-view'; +import { renderHTMLBarsBlock } from './system/render-view'; import fallbackViewRegistry from 'ember-views/compat/fallback-view-registry'; import { getViewId } from 'ember-views/system/utils'; import { assert } from 'ember-metal/debug';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/setup-registry.js
@@ -1,14 +1,14 @@ import { privatize as P } from 'container/registry'; -import { InteractiveRenderer, InertRenderer } from 'ember-htmlbars/renderer'; -import HTMLBarsDOMHelper from 'ember-htmlbars/system/dom-helper'; -import topLevelViewTemplate from 'ember-htmlbars/templates/top-level-view'; -import { OutletView as HTMLBarsOutletView } from 'ember-htmlbars/views/outlet'; +import { InteractiveRenderer, InertRenderer } from './renderer'; +import HTMLBarsDOMHelper from './system/dom-helper'; +import topLevelViewTemplate from './templates/top-level-view'; +import { OutletView as HTMLBarsOutletView } from './views/outlet'; import EmberView from 'ember-views/views/view'; -import Component from 'ember-htmlbars/component'; -import TextField from 'ember-htmlbars/components/text_field'; -import TextArea from 'ember-htmlbars/components/text_area'; -import Checkbox from 'ember-htmlbars/components/checkbox'; -import LinkToComponent from 'ember-htmlbars/components/link-to'; +import Component from './component'; +import TextField from './components/text_field'; +import TextArea from './components/text_area'; +import Checkbox from './components/checkbox'; +import LinkToComponent from './components/link-to'; import TemplateSupport from 'ember-views/mixins/template_support'; export function setupApplicationRegistry(registry) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/streams/utils.js
@@ -1,4 +1,4 @@ -import getValue from 'ember-htmlbars/hooks/get-value'; +import getValue from '../hooks/get-value'; import { assert } from 'ember-metal/debug'; import { Stream, IS_STREAM } from './stream'; import { get } from 'ember-metal/property_get';
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/system/build-component-template.js
@@ -2,7 +2,7 @@ import { assert } from 'ember-metal/debug'; import { get } from 'ember-metal/property_get'; import { internal, render } from 'htmlbars-runtime'; import { buildStatement } from 'htmlbars-util/template-utils'; -import getValue from 'ember-htmlbars/hooks/get-value'; +import getValue from '../hooks/get-value'; import { isStream } from '../streams/utils'; export default function buildComponentTemplate({ component, tagName, layout, outerAttrs }, attrs, content) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/system/dom-helper.js
@@ -1,6 +1,6 @@ import DOMHelper from 'dom-helper'; -import EmberMorph from 'ember-htmlbars/morphs/morph'; -import EmberAttrMorph from 'ember-htmlbars/morphs/attr-morph'; +import EmberMorph from '../morphs/morph'; +import EmberAttrMorph from '../morphs/attr-morph'; export default function EmberDOMHelper(_document) { DOMHelper.call(this, _document);
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/system/invoke-helper.js
@@ -1,7 +1,7 @@ import { assert } from 'ember-metal/debug'; -import HelperInstanceStream from 'ember-htmlbars/streams/helper-instance'; -import HelperFactoryStream from 'ember-htmlbars/streams/helper-factory'; -import BuiltInHelperStream from 'ember-htmlbars/streams/built-in-helper'; +import HelperInstanceStream from '../streams/helper-instance'; +import HelperFactoryStream from '../streams/helper-factory'; +import BuiltInHelperStream from '../streams/built-in-helper'; export function buildHelperStream(helper, params, hash, templates, env, scope, label) { let isAnyKindOfHelper = helper.isHelperInstance || helper.isHelperFactory;
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/system/render-env.js
@@ -1,5 +1,5 @@ -import defaultEnv from 'ember-htmlbars/env'; -import { MorphSet } from 'ember-htmlbars/renderer'; +import defaultEnv from '../env'; +import { MorphSet } from '../renderer'; import { getOwner } from 'container/owner'; export default function RenderEnv(options) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/system/render-view.js
@@ -1,5 +1,5 @@ -import ViewNodeManager, { createOrUpdateComponent } from 'ember-htmlbars/node-managers/view-node-manager'; -import RenderEnv from 'ember-htmlbars/system/render-env'; +import ViewNodeManager, { createOrUpdateComponent } from '../node-managers/view-node-manager'; +import RenderEnv from './render-env'; // This function only gets called once per render of a "root view" (`appendTo`). Otherwise, // HTMLBars propagates the existing env and renders templates for a given render node.
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/utils/is-component.js
@@ -6,8 +6,8 @@ import { CONTAINS_DASH_CACHE, CONTAINS_DOT_CACHE -} from 'ember-htmlbars/system/lookup-helper'; -import { isComponentCell } from 'ember-htmlbars/keywords/closure-component'; +} from '../system/lookup-helper'; +import { isComponentCell } from '../keywords/closure-component'; import { isStream } from '../streams/utils'; function hasComponentOrTemplate(owner, path, options) {
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/utils/new-stream.js
@@ -1,5 +1,5 @@ import ProxyStream from '../streams/proxy-stream'; -import subscribe from 'ember-htmlbars/utils/subscribe'; +import subscribe from './subscribe'; export default function newStream(scope, key, newValue, renderNode, isSelf) { let stream = new ProxyStream(newValue, isSelf ? '' : key);
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/utils/update-scope.js
@@ -1,5 +1,5 @@ import ProxyStream from '../streams/proxy-stream'; -import subscribe from 'ember-htmlbars/utils/subscribe'; +import subscribe from './subscribe'; export default function updateScope(scope, key, newValue, renderNode, isSelf) { let existing = scope[key];
true
Other
emberjs
ember.js
94d379d95f992c395ffae407d7df92589c7cc0a5.json
Use relative imports in ember-htmlbars.
packages/ember-htmlbars/lib/views/outlet.js
@@ -4,7 +4,7 @@ */ import View from 'ember-views/views/view'; -import topLevelViewTemplate from 'ember-htmlbars/templates/top-level-view'; +import topLevelViewTemplate from '../templates/top-level-view'; import TemplateSupport from 'ember-views/mixins/template_support'; export let CoreOutletView = View.extend(TemplateSupport, {
true
Other
emberjs
ember.js
e7d3881aeb56c443609aead95c48083721107d13.json
Use relative imports in ember-extension-support.
packages/ember-extension-support/lib/index.js
@@ -4,8 +4,8 @@ */ import Ember from 'ember-metal/core'; // reexports -import DataAdapter from 'ember-extension-support/data_adapter'; -import ContainerDebugAdapter from 'ember-extension-support/container_debug_adapter'; +import DataAdapter from './data_adapter'; +import ContainerDebugAdapter from './container_debug_adapter'; Ember.DataAdapter = DataAdapter; Ember.ContainerDebugAdapter = ContainerDebugAdapter;
false
Other
emberjs
ember.js
890db01442b8a1f7753947399d13e3a7fe0933d0.json
Use relative imports in ember-debug.
packages/ember-debug/lib/deprecate.js
@@ -5,7 +5,7 @@ import Logger from 'ember-console'; import { ENV } from 'ember-environment'; -import { registerHandler as genericRegisterHandler, invoke } from 'ember-debug/handlers'; +import { registerHandler as genericRegisterHandler, invoke } from './handlers'; export function registerHandler(handler) { genericRegisterHandler('deprecate', handler);
true
Other
emberjs
ember.js
890db01442b8a1f7753947399d13e3a7fe0933d0.json
Use relative imports in ember-debug.
packages/ember-debug/lib/index.js
@@ -14,10 +14,10 @@ import Logger from 'ember-console'; import { environment } from 'ember-environment'; import _deprecate, { registerHandler as registerDeprecationHandler -} from 'ember-debug/deprecate'; +} from './deprecate'; import _warn, { registerHandler as registerWarnHandler -} from 'ember-debug/warn'; +} from './warn'; /** @module ember
true
Other
emberjs
ember.js
890db01442b8a1f7753947399d13e3a7fe0933d0.json
Use relative imports in ember-debug.
packages/ember-debug/lib/warn.js
@@ -1,6 +1,6 @@ import Logger from 'ember-console'; import { deprecate } from 'ember-metal/debug'; -import { registerHandler as genericRegisterHandler, invoke } from 'ember-debug/handlers'; +import { registerHandler as genericRegisterHandler, invoke } from './handlers'; export function registerHandler(handler) { genericRegisterHandler('warn', handler);
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/index.js
@@ -5,21 +5,21 @@ // BEGIN IMPORTS import Ember from 'ember-runtime'; -import jQuery from 'ember-views/system/jquery'; +import jQuery from './system/jquery'; import { isSimpleClick, getViewBounds, getViewClientRects, getViewBoundingClientRect, getRootViews, getChildViews -} from 'ember-views/system/utils'; -import 'ember-views/system/ext'; // for the side effect of extending Ember.run.queues +} from './system/utils'; +import './system/ext'; // for the side effect of extending Ember.run.queues -import EventDispatcher from 'ember-views/system/event_dispatcher'; -import ViewTargetActionSupport from 'ember-views/mixins/view_target_action_support'; -import ComponentLookup from 'ember-views/component_lookup'; -import TextSupport from 'ember-views/mixins/text_support'; +import EventDispatcher from './system/event_dispatcher'; +import ViewTargetActionSupport from './mixins/view_target_action_support'; +import ComponentLookup from './component_lookup'; +import TextSupport from './mixins/text_support'; // END IMPORTS
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/mixins/action_support.js
@@ -2,7 +2,7 @@ import { Mixin } from 'ember-metal/mixin'; import { get } from 'ember-metal/property_get'; import isNone from 'ember-metal/is_none'; import { assert } from 'ember-metal/debug'; -import { MUTABLE_CELL } from 'ember-views/compat/attrs-proxy'; +import { MUTABLE_CELL } from '../compat/attrs-proxy'; import { inspect } from 'ember-metal/utils'; function validateAction(component, actionName) {
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/mixins/view_support.js
@@ -5,11 +5,11 @@ import { Mixin } from 'ember-metal/mixin'; import { POST_INIT } from 'ember-runtime/system/core_object'; import symbol from 'ember-metal/symbol'; import { environment } from 'ember-environment'; -import { matches } from 'ember-views/system/utils'; +import { matches } from '../system/utils'; const INIT_WAS_CALLED = symbol('INIT_WAS_CALLED'); -import jQuery from 'ember-views/system/jquery'; +import jQuery from '../system/jquery'; function K() { return this; }
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/system/event_dispatcher.js
@@ -9,12 +9,12 @@ import { set } from 'ember-metal/property_set'; import isNone from 'ember-metal/is_none'; import run from 'ember-metal/run_loop'; import EmberObject from 'ember-runtime/system/object'; -import jQuery from 'ember-views/system/jquery'; -import ActionManager from 'ember-views/system/action_manager'; +import jQuery from './jquery'; +import ActionManager from './action_manager'; import assign from 'ember-metal/assign'; import { getOwner } from 'container/owner'; import { environment } from 'ember-environment'; -import fallbackViewRegistry from 'ember-views/compat/fallback-view-registry'; +import fallbackViewRegistry from '../compat/fallback-view-registry'; const ROOT_ELEMENT_CLASS = 'ember-application'; const ROOT_ELEMENT_SELECTOR = '.' + ROOT_ELEMENT_CLASS;
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/core_view.js
@@ -5,7 +5,7 @@ import Evented from 'ember-runtime/mixins/evented'; import ActionHandler, { deprecateUnderscoreActions } from 'ember-runtime/mixins/action_handler'; import { typeOf } from 'ember-runtime/utils'; -import { cloneStates, states } from 'ember-views/views/states'; +import { cloneStates, states } from './states'; import require from 'require'; // Normally, the renderer is injected by the container when the view is looked
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states.js
@@ -1,9 +1,9 @@ import assign from 'ember-metal/assign'; -import _default from 'ember-views/views/states/default'; -import preRender from 'ember-views/views/states/pre_render'; -import hasElement from 'ember-views/views/states/has_element'; -import inDOM from 'ember-views/views/states/in_dom'; -import destroying from 'ember-views/views/states/destroying'; +import _default from './states/default'; +import preRender from './states/pre_render'; +import hasElement from './states/has_element'; +import inDOM from './states/in_dom'; +import destroying from './states/destroying'; export function cloneStates(from) { let into = {};
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states/default.js
@@ -1,6 +1,6 @@ import EmberError from 'ember-metal/error'; import { get } from 'ember-metal/property_get'; -import { MUTABLE_CELL } from 'ember-views/compat/attrs-proxy'; +import { MUTABLE_CELL } from '../../compat/attrs-proxy'; /** @module ember
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states/destroying.js
@@ -1,5 +1,5 @@ import assign from 'ember-metal/assign'; -import _default from 'ember-views/views/states/default'; +import _default from './default'; import EmberError from 'ember-metal/error'; /** @module ember
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states/has_element.js
@@ -1,6 +1,6 @@ -import _default from 'ember-views/views/states/default'; +import _default from './default'; import assign from 'ember-metal/assign'; -import jQuery from 'ember-views/system/jquery'; +import jQuery from '../../system/jquery'; import run from 'ember-metal/run_loop'; import { flaggedInstrument } from 'ember-metal/instrumentation';
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states/in_dom.js
@@ -3,7 +3,7 @@ import assign from 'ember-metal/assign'; import EmberError from 'ember-metal/error'; import { _addBeforeObserver } from 'ember-metal/observer'; -import hasElement from 'ember-views/views/states/has_element'; +import hasElement from './has_element'; /** @module ember @submodule ember-views
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/states/pre_render.js
@@ -1,4 +1,4 @@ -import _default from 'ember-views/views/states/default'; +import _default from './default'; import assign from 'ember-metal/assign'; /**
true
Other
emberjs
ember.js
7dab3b1fbb19d27f088cbe347a5202c2ab281112.json
Use relative imports in ember-views.
packages/ember-views/lib/views/view.js
@@ -1,14 +1,14 @@ -import 'ember-views/system/ext'; // for the side effect of extending Ember.run.queues - -import CoreView from 'ember-views/views/core_view'; -import ViewChildViewsSupport from 'ember-views/mixins/child_views_support'; -import ViewStateSupport from 'ember-views/mixins/view_state_support'; -import ClassNamesSupport from 'ember-views/mixins/class_names_support'; -import InstrumentationSupport from 'ember-views/mixins/instrumentation_support'; -import AriaRoleSupport from 'ember-views/mixins/aria_role_support'; -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 '../system/ext'; // for the side effect of extending Ember.run.queues + +import CoreView from './core_view'; +import ViewChildViewsSupport from '../mixins/child_views_support'; +import ViewStateSupport from '../mixins/view_state_support'; +import ClassNamesSupport from '../mixins/class_names_support'; +import InstrumentationSupport from '../mixins/instrumentation_support'; +import AriaRoleSupport from '../mixins/aria_role_support'; +import VisibilitySupport from '../mixins/visibility_support'; +import CompatAttrsProxy from '../compat/attrs-proxy'; +import ViewMixin from '../mixins/view_support'; /** @module ember @submodule ember-views
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js
@@ -1,5 +1,5 @@ import { assert } from 'ember-metal/debug'; -import calculateLocationDisplay from 'ember-template-compiler/system/calculate-location-display'; +import calculateLocationDisplay from '../system/calculate-location-display'; export default function AssertReservedNamedArguments(options) { this.syntax = null;
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/plugins/deprecate-render-model.js
@@ -1,6 +1,6 @@ import { deprecate } from 'ember-metal/debug'; import calculateLocationDisplay from - 'ember-template-compiler/system/calculate-location-display'; + '../system/calculate-location-display'; export default function DeprecateRenderModel(options) { this.syntax = null;
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/plugins/index.js
@@ -1,12 +1,12 @@ -import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax'; -import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class'; -import TransformAngleBracketComponents from 'ember-template-compiler/plugins/transform-angle-bracket-components'; -import TransformInputOnToOnEvent from 'ember-template-compiler/plugins/transform-input-on-to-onEvent'; -import TransformTopLevelComponents from 'ember-template-compiler/plugins/transform-top-level-components'; -import TransformInlineLinkTo from 'ember-template-compiler/plugins/transform-inline-link-to'; -import TransformOldClassBindingSyntax from 'ember-template-compiler/plugins/transform-old-class-binding-syntax'; -import DeprecateRenderModel from 'ember-template-compiler/plugins/deprecate-render-model'; -import AssertReservedNamedArguments from 'ember-template-compiler/plugins/assert-reserved-named-arguments'; +import TransformOldBindingSyntax from './transform-old-binding-syntax'; +import TransformItemClass from './transform-item-class'; +import TransformAngleBracketComponents from './transform-angle-bracket-components'; +import TransformInputOnToOnEvent from './transform-input-on-to-onEvent'; +import TransformTopLevelComponents from './transform-top-level-components'; +import TransformInlineLinkTo from './transform-inline-link-to'; +import TransformOldClassBindingSyntax from './transform-old-class-binding-syntax'; +import DeprecateRenderModel from './deprecate-render-model'; +import AssertReservedNamedArguments from './assert-reserved-named-arguments'; export default Object.freeze([ TransformOldBindingSyntax,
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/plugins/transform-input-on-to-onEvent.js
@@ -1,5 +1,5 @@ import { deprecate } from 'ember-metal/debug'; -import calculateLocationDisplay from 'ember-template-compiler/system/calculate-location-display'; +import calculateLocationDisplay from '../system/calculate-location-display'; /** @module ember
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js
@@ -1,5 +1,5 @@ import { assert, deprecate } from 'ember-metal/debug'; -import calculateLocationDisplay from 'ember-template-compiler/system/calculate-location-display'; +import calculateLocationDisplay from '../system/calculate-location-display'; export default function TransformOldBindingSyntax(options) { this.syntax = null;
true
Other
emberjs
ember.js
c56e2152b4d01b38a4c4e227e8e4ca295fb46da0.json
Use relative imports in ember-template-compiler.
packages/ember-template-compiler/lib/system/bootstrap.js
@@ -4,7 +4,7 @@ */ import EmberError from 'ember-metal/error'; -import { compile } from 'ember-template-compiler'; +import { compile } from '../index'; import { has as hasTemplate, set as registerTemplate
true
Other
emberjs
ember.js
7f6cf8cfa3752d41956bd9ff086f8ee1469cef42.json
Use relative imports for ember-application.
packages/ember-application/lib/index.js
@@ -7,11 +7,11 @@ import { runLoadHooks } from 'ember-runtime/system/lazy_load'; @submodule ember-application */ -import DefaultResolver from 'ember-application/system/resolver'; -import Application from 'ember-application/system/application'; -import ApplicationInstance from 'ember-application/system/application-instance'; -import Engine from 'ember-application/system/engine'; -import EngineInstance from 'ember-application/system/engine-instance'; +import DefaultResolver from './system/resolver'; +import Application from './system/application'; +import ApplicationInstance from './system/application-instance'; +import Engine from './system/engine'; +import EngineInstance from './system/engine-instance'; Ember.Application = Application; Ember.DefaultResolver = Ember.Resolver = DefaultResolver;
true
Other
emberjs
ember.js
7f6cf8cfa3752d41956bd9ff086f8ee1469cef42.json
Use relative imports for ember-application.
packages/ember-application/lib/system/application.js
@@ -22,7 +22,7 @@ import HistoryLocation from 'ember-routing/location/history_location'; import AutoLocation from 'ember-routing/location/auto_location'; import NoneLocation from 'ember-routing/location/none_location'; import BucketCache from 'ember-routing/system/cache'; -import ApplicationInstance from 'ember-application/system/application-instance'; +import ApplicationInstance from './application-instance'; import { _loaded } from 'ember-runtime/system/lazy_load'; import { buildFakeRegistryWithDeprecations } from 'ember-runtime/mixins/registry_proxy'; import { privatize as P } from 'container/registry';
true
Other
emberjs
ember.js
7f6cf8cfa3752d41956bd9ff086f8ee1469cef42.json
Use relative imports for ember-application.
packages/ember-application/lib/system/engine-instance.js
@@ -9,7 +9,7 @@ import Registry from 'container/registry'; import ContainerProxy from 'ember-runtime/mixins/container_proxy'; import RegistryProxy from 'ember-runtime/mixins/registry_proxy'; import { privatize as P } from 'container/registry'; -import { getEngineParent, setEngineParent } from 'ember-application/system/engine-parent'; +import { getEngineParent, setEngineParent } from './engine-parent'; import { assert } from 'ember-metal/debug'; import run from 'ember-metal/run_loop'; import RSVP from 'ember-runtime/ext/rsvp';
true
Other
emberjs
ember.js
7f6cf8cfa3752d41956bd9ff086f8ee1469cef42.json
Use relative imports for ember-application.
packages/ember-application/lib/system/engine.js
@@ -12,7 +12,7 @@ import { set } from 'ember-metal/property_set'; import { assert, deprecate } from 'ember-metal/debug'; import { canInvoke } from 'ember-metal/utils'; import EmptyObject from 'ember-metal/empty_object'; -import DefaultResolver from 'ember-application/system/resolver'; +import DefaultResolver from './resolver'; import EngineInstance from './engine-instance'; import isEnabled from 'ember-metal/features'; import symbol from 'ember-metal/symbol';
true
Other
emberjs
ember.js
7f6cf8cfa3752d41956bd9ff086f8ee1469cef42.json
Use relative imports for ember-application.
packages/ember-application/lib/system/resolver.js
@@ -13,7 +13,7 @@ import { } from 'ember-runtime/system/string'; import EmberObject from 'ember-runtime/system/object'; import Namespace from 'ember-runtime/system/namespace'; -import validateType from 'ember-application/utils/validate-type'; +import validateType from '../utils/validate-type'; import dictionary from 'ember-metal/dictionary'; import { get as getTemplate
true
Other
emberjs
ember.js
6aa70081f55feefc106b2c2cfaae369ab8d74d60.json
Use relative imports for container.
packages/container/lib/index.js
@@ -5,8 +5,8 @@ The public API, specified on the application namespace should be considered the @private */ -import Registry from 'container/registry'; -import Container from 'container/container'; -import { getOwner, setOwner } from 'container/owner'; +import Registry from './registry'; +import Container from './container'; +import { getOwner, setOwner } from './owner'; export { Registry, Container, getOwner, setOwner };
false
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/index.js
@@ -6,23 +6,23 @@ import Ember from 'ember-metal/core'; // reexports // ES6TODO: Cleanup modules with side-effects below -import 'ember-routing/ext/run_loop'; -import 'ember-routing/ext/controller'; +import './ext/run_loop'; +import './ext/controller'; -import EmberLocation from 'ember-routing/location/api'; -import NoneLocation from 'ember-routing/location/none_location'; -import HashLocation from 'ember-routing/location/hash_location'; -import HistoryLocation from 'ember-routing/location/history_location'; -import AutoLocation from 'ember-routing/location/auto_location'; +import EmberLocation from './location/api'; +import NoneLocation from './location/none_location'; +import HashLocation from './location/hash_location'; +import HistoryLocation from './location/history_location'; +import AutoLocation from './location/auto_location'; -import generateController from 'ember-routing/system/generate_controller'; +import generateController from './system/generate_controller'; import { generateControllerFactory -} from 'ember-routing/system/generate_controller'; -import controllerFor from 'ember-routing/system/controller_for'; -import RouterDSL from 'ember-routing/system/dsl'; -import Router from 'ember-routing/system/router'; -import Route from 'ember-routing/system/route'; +} from './system/generate_controller'; +import controllerFor from './system/controller_for'; +import RouterDSL from './system/dsl'; +import Router from './system/router'; +import Route from './system/route'; Ember.Location = EmberLocation; Ember.AutoLocation = AutoLocation;
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/location/api.js
@@ -1,6 +1,6 @@ import { assert } from 'ember-metal/debug'; import { environment } from 'ember-environment'; -import { getHash } from 'ember-routing/location/util'; +import { getHash } from './util'; /** @module ember
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/location/auto_location.js
@@ -15,7 +15,7 @@ import { getQuery, getFullPath, replacePath -} from 'ember-routing/location/util'; +} from './util'; /** @module ember
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/location/hash_location.js
@@ -3,7 +3,7 @@ import { set } from 'ember-metal/property_set'; import run from 'ember-metal/run_loop'; import EmberObject from 'ember-runtime/system/object'; -import EmberLocation from 'ember-routing/location/api'; +import EmberLocation from './api'; /** @module ember
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/location/history_location.js
@@ -2,7 +2,7 @@ import { get } from 'ember-metal/property_get'; import { set } from 'ember-metal/property_set'; import EmberObject from 'ember-runtime/system/object'; -import EmberLocation from 'ember-routing/location/api'; +import EmberLocation from './api'; /** @module ember
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/services/routing.js
@@ -7,7 +7,7 @@ import Service from 'ember-runtime/system/service'; import { get } from 'ember-metal/property_get'; import { readOnly } from 'ember-runtime/computed/computed_macros'; -import { routeArgs } from 'ember-routing/utils'; +import { routeArgs } from '../utils'; import assign from 'ember-metal/assign'; /**
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/system/route.js
@@ -20,15 +20,15 @@ import EmberObject from 'ember-runtime/system/object'; import { A as emberA } from 'ember-runtime/system/native_array'; import Evented from 'ember-runtime/mixins/evented'; import ActionHandler, { deprecateUnderscoreActions } from 'ember-runtime/mixins/action_handler'; -import generateController from 'ember-routing/system/generate_controller'; +import generateController from './generate_controller'; import { generateControllerFactory -} from 'ember-routing/system/generate_controller'; +} from './generate_controller'; import { stashParamNames, normalizeControllerQueryParams, calculateCacheKey -} from 'ember-routing/utils'; +} from '../utils'; import { getOwner } from 'container/owner'; import isEmpty from 'ember-metal/is_empty'; import symbol from 'ember-metal/symbol';
true
Other
emberjs
ember.js
9a28659e5c0b029d3d0dbdc3fddb5cd116c484d5.json
Use relative imports for ember-routing.
packages/ember-routing/lib/system/router.js
@@ -11,15 +11,15 @@ import assign from 'ember-metal/assign'; import run from 'ember-metal/run_loop'; import EmberObject from 'ember-runtime/system/object'; import Evented from 'ember-runtime/mixins/evented'; -import { defaultSerialize, hasDefaultSerialize } from 'ember-routing/system/route'; -import EmberRouterDSL from 'ember-routing/system/dsl'; -import EmberLocation from 'ember-routing/location/api'; +import { defaultSerialize, hasDefaultSerialize } from './route'; +import EmberRouterDSL from './dsl'; +import EmberLocation from '../location/api'; import { routeArgs, getActiveTargetName, stashParamNames, calculateCacheKey -} from 'ember-routing/utils'; +} from '../utils'; import { guidFor } from 'ember-metal/utils'; import RouterState from './router_state'; import { getOwner } from 'container/owner';
true
Other
emberjs
ember.js
dfbb59fa85cce50cba299b5fdbb85b89a28e07fa.json
Expose `getViewBounds` on `ViewUtils`
packages/ember-views/lib/index.js
@@ -8,6 +8,7 @@ import Ember from 'ember-runtime'; import jQuery from 'ember-views/system/jquery'; import { isSimpleClick, + getViewBounds, getViewClientRects, getViewBoundingClientRect, getRootViews, @@ -37,6 +38,7 @@ Ember.ViewTargetActionSupport = ViewTargetActionSupport; const ViewUtils = Ember.ViewUtils = {}; ViewUtils.isSimpleClick = isSimpleClick; +ViewUtils.getViewBounds = getViewBounds; ViewUtils.getViewClientRects = getViewClientRects; ViewUtils.getViewBoundingClientRect = getViewBoundingClientRect; ViewUtils.getRootViews = getRootViews;
false
Other
emberjs
ember.js
48e52b3d267d62e1c28d192a4679f25d669eb7d7.json
Introduce a way to make ES5 getters from `Mixin`s
packages/ember-metal/lib/descriptor.js
@@ -0,0 +1,27 @@ +import { Descriptor as EmberDescriptor } from 'ember-metal/properties'; + +export default function descriptor(desc) { + return new Descriptor(desc); +} + +/** + A wrapper for a native ES5 descriptor. In an ideal world, we wouldn't need + this at all, however, the way we currently flatten/merge our mixins require + a special value to denote a descriptor. + + @class Descriptor + @private +*/ +class Descriptor extends EmberDescriptor { + constructor(desc) { + super(); + this.desc = desc; + } + + setup(obj, key) { + Object.defineProperty(obj, key, this.desc); + } + + teardown(obj, key) { + } +}
true
Other
emberjs
ember.js
48e52b3d267d62e1c28d192a4679f25d669eb7d7.json
Introduce a way to make ES5 getters from `Mixin`s
packages/ember-metal/tests/descriptor_test.js
@@ -0,0 +1,352 @@ +import EmberObject from 'ember-runtime/system/object'; +import { Mixin } from 'ember-metal/mixin'; +import { defineProperty } from 'ember-metal/properties'; +import descriptor from 'ember-metal/descriptor'; + +class DescriptorTest { + + /* abstract static module(title: string); */ + + static test(title, callback) { + QUnit.test(title, assert => { + callback(assert, new this(assert)); + }); + } + + constructor(assert) { + this.assert = assert; + } + + /* abstract install(key: string, desc: Descriptor); */ + + /* abstract set(key: string, value: any); */ + + /* abstract finalize(): Object; */ +} + +let classes = [ + + class extends DescriptorTest { + static module(title) { + QUnit.module(`${title}: using defineProperty on an object directly`); + } + + constructor(assert) { + super(assert); + this.object = {}; + } + + install(key, desc) { + let { object, assert } = this; + + defineProperty(object, key, desc); + + assert.ok(object.hasOwnProperty(key)); + } + + set(key, value) { + this.object[key] = value; + } + + finalize() { + return this.object; + } + + source() { + return this.object; + } + }, + + class extends DescriptorTest { + static module(title) { + QUnit.module(`${title}: using defineProperty on a prototype`); + } + + constructor(assert) { + super(assert); + this.proto = {}; + } + + install(key, desc) { + let { proto, assert } = this; + + defineProperty(proto, key, desc); + + assert.ok(proto.hasOwnProperty(key)); + } + + set(key, value) { + this.proto[key] = value; + } + + finalize() { + return Object.create(this.proto); + } + + source() { + return this.proto; + } + }, + + class extends DescriptorTest { + static module(title) { + QUnit.module(`${title}: in EmberObject.extend()`); + } + + constructor(assert) { + super(assert); + this.klass = null; + this.props = {}; + } + + install(key, desc) { + this.props[key] = desc; + } + + set(key, value) { + this.props[key] = value; + } + + finalize() { + this.klass = EmberObject.extend(this.props); + return this.klass.create(); + } + + source() { + return this.klass.prototype; + } + }, + + class extends DescriptorTest { + static module(title) { + QUnit.module(`${title}: in EmberObject.extend() through a mixin`); + } + + constructor(assert) { + super(assert); + this.klass = null; + this.props = {}; + } + + install(key, desc) { + this.props[key] = desc; + } + + set(key, value) { + this.props[key] = value; + } + + finalize() { + this.klass = EmberObject.extend(Mixin.create(this.props)); + return this.klass.create(); + } + + source() { + return this.klass.prototype; + } + }, + + class extends DescriptorTest { + static module(title) { + QUnit.module(`${title}: inherited from another EmberObject super class`); + } + + constructor(assert) { + super(assert); + this.superklass = null; + this.props = {}; + } + + install(key, desc) { + this.props[key] = desc; + } + + set(key, value) { + this.props[key] = value; + } + + finalize() { + this.superklass = EmberObject.extend(this.props); + return this.superklass.extend().create(); + } + + source() { + return this.superklass.prototype; + } + } + +]; + +classes.forEach(TestClass => { + TestClass.module('ember-metal/descriptor'); + + TestClass.test('defining a configurable property', function(assert, factory) { + factory.install('foo', descriptor({ configurable: true, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + delete source.foo; + + assert.strictEqual(obj.foo, undefined); + + Object.defineProperty(source, 'foo', { configurable: true, value: 'baz' }); + + assert.equal(obj.foo, 'baz'); + }); + + TestClass.test('defining a non-configurable property', function(assert, factory) { + factory.install('foo', descriptor({ configurable: false, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + assert.throws(() => delete source.foo, TypeError); + + assert.throws(() => Object.defineProperty(source, 'foo', { configurable: true, value: 'baz' }), TypeError); + }); + + TestClass.test('defining an enumerable property', function(assert, factory) { + factory.install('foo', descriptor({ enumerable: true, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + assert.ok(Object.keys(source).indexOf('foo') !== -1); + }); + + TestClass.test('defining a non-enumerable property', function(assert, factory) { + factory.install('foo', descriptor({ enumerable: false, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + assert.ok(Object.keys(source).indexOf('foo') === -1); + }); + + TestClass.test('defining a writable property', function(assert, factory) { + factory.install('foo', descriptor({ writable: true, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + source.foo = 'baz'; + + assert.equal(obj.foo, 'baz'); + + obj.foo = 'bat'; + + assert.equal(obj.foo, 'bat'); + }); + + TestClass.test('defining a non-writable property', function(assert, factory) { + factory.install('foo', descriptor({ writable: false, value: 'bar' })); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + let source = factory.source(); + + assert.throws(() => source.foo = 'baz', TypeError); + + assert.throws(() => obj.foo = 'baz', TypeError); + }); + + TestClass.test('defining a getter', function(assert, factory) { + factory.install('foo', descriptor({ + get: function() { + return this.__foo__; + } + })); + + factory.set('__foo__', 'bar'); + + let obj = factory.finalize(); + + assert.equal(obj.foo, 'bar'); + + obj.__foo__ = 'baz'; + + assert.equal(obj.foo, 'baz'); + }); + + TestClass.test('defining a setter', function(assert, factory) { + factory.install('foo', descriptor({ + set: function(value) { + this.__foo__ = value; + } + })); + + factory.set('__foo__', 'bar'); + + let obj = factory.finalize(); + + assert.equal(obj.__foo__, 'bar'); + + obj.foo = 'baz'; + + assert.equal(obj.__foo__, 'baz'); + }); + + TestClass.test('combining multiple setter and getters', function(assert, factory) { + factory.install('foo', descriptor({ + get: function() { + return this.__foo__; + }, + + set: function(value) { + this.__foo__ = value; + } + })); + + factory.set('__foo__', 'foo'); + + factory.install('bar', descriptor({ + get: function() { + return this.__bar__; + }, + + set: function(value) { + this.__bar__ = value; + } + })); + + factory.set('__bar__', 'bar'); + + factory.install('fooBar', descriptor({ + get: function() { + return this.foo + '-' + this.bar; + } + })); + + let obj = factory.finalize(); + + assert.equal(obj.fooBar, 'foo-bar'); + + obj.foo = 'FOO'; + + assert.equal(obj.fooBar, 'FOO-bar'); + + obj.__bar__ = 'BAR'; + + assert.equal(obj.fooBar, 'FOO-BAR'); + + assert.throws(() => obj.fooBar = 'foobar', TypeError); + }); +});
true
Other
emberjs
ember.js
d78c0dd1415ed6b49ab97b966ef650e8d5be3b35.json
Use a dictionary for the view registry
packages/ember-application/lib/system/application.js
@@ -4,6 +4,7 @@ */ import { ENV } from 'ember-environment'; import { assert, debug } from 'ember-metal/debug'; +import dictionary from 'ember-metal/dictionary'; import libraries from 'ember-metal/libraries'; import { isTesting } from 'ember-metal/testing'; import { get } from 'ember-metal/property_get'; @@ -1037,7 +1038,7 @@ Application.reopenClass({ }); function commonSetupRegistry(registry) { - registry.register('-view-registry:main', { create() { return {}; } }); + registry.register('-view-registry:main', { create() { return dictionary(null); } }); registry.register('route:basic', Route); registry.register('event_dispatcher:main', EventDispatcher);
true
Other
emberjs
ember.js
d78c0dd1415ed6b49ab97b966ef650e8d5be3b35.json
Use a dictionary for the view registry
packages/ember-glimmer/tests/utils/helpers.js
@@ -18,6 +18,7 @@ export { DOMChanges } from 'glimmer-runtime'; export { InteractiveRenderer, InertRenderer } from 'ember-glimmer/renderer'; export { default as makeBoundHelper } from 'ember-glimmer/make-bound-helper'; export { htmlSafe, SafeString } from 'ember-glimmer/utils/string'; +import dictionary from 'ember-metal/dictionary'; export function buildOwner(options) { let owner = _buildOwner(options); @@ -37,7 +38,7 @@ export function buildOwner(options) { owner.inject('component', 'renderer', 'renderer:-dom'); owner.inject('template', 'env', 'service:-glimmer-environment'); - owner.register('-view-registry:main', { create() { return {}; } }); + owner.register('-view-registry:main', { create() { return dictionary(null); } }); owner.inject('renderer', '_viewRegistry', '-view-registry:main'); owner.register('template:-root', RootTemplate);
true
Other
emberjs
ember.js
d78c0dd1415ed6b49ab97b966ef650e8d5be3b35.json
Use a dictionary for the view registry
packages/ember-htmlbars/tests/utils/helpers.js
@@ -18,6 +18,7 @@ export { default as LinkTo } from 'ember-htmlbars/components/link-to'; export { InteractiveRenderer, InertRenderer } from 'ember-htmlbars/renderer'; export { default as makeBoundHelper } from 'ember-glimmer/make-bound-helper'; export { htmlSafe, SafeString } from 'ember-htmlbars/utils/string'; +import dictionary from 'ember-metal/dictionary'; export function buildOwner(options) { let owner = _buildOwner(options); @@ -27,7 +28,7 @@ export function buildOwner(options) { owner.inject('service:-htmlbars-environment', 'dom', 'service:-dom-helper'); owner.register('service:-document', document, { instantiate: false }); - owner.register('-view-registry:main', { create() { return {}; } }); + owner.register('-view-registry:main', { create() { return dictionary(null); } }); owner.inject('renderer', '_viewRegistry', '-view-registry:main'); owner.inject('renderer', 'dom', 'service:-dom-helper'); owner.inject('component', 'renderer', 'renderer:-dom');
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-application/lib/system/engine-instance.js
@@ -13,6 +13,7 @@ import { getEngineParent, setEngineParent } from 'ember-application/system/engin import { assert } from 'ember-metal/debug'; import run from 'ember-metal/run_loop'; import RSVP from 'ember-runtime/ext/rsvp'; +import { guidFor } from 'ember-metal/utils'; import isEnabled from 'ember-metal/features'; /** @@ -39,6 +40,8 @@ const EngineInstance = EmberObject.extend(RegistryProxy, ContainerProxy, { init() { this._super(...arguments); + guidFor(this); + let base = this.base; if (!base) {
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/lib/environment.js
@@ -1,3 +1,4 @@ +import { guidFor } from 'ember-metal/utils'; import lookupPartial, { hasPartial } from 'ember-views/system/lookup_partial'; import { Environment as GlimmerEnvironment, @@ -140,12 +141,15 @@ export default class Environment extends GlimmerEnvironment { return new CurlyComponentDefinition(name, ComponentClass, layout); } }, ({ name, source, owner }) => { - return source && owner._resolveLocalLookupName(name, source) || name; + let expandedName = source && owner._resolveLocalLookupName(name, source) || name; + let ownerGuid = guidFor(owner); + + return ownerGuid + '|' + expandedName; }); - this._templateCache = new Cache(1000, Template => { - return Template.create({ env: this }); - }, template => template.id); + this._templateCache = new Cache(1000, ({ Template, owner }) => { + return Template.create({ env: this, [OWNER]: owner }); + }, ({ Template, owner }) => guidFor(owner) + '|' + Template.id); this._compilerCache = new Cache(10, Compiler => { return new Cache(2000, template => { @@ -276,14 +280,14 @@ export default class Environment extends GlimmerEnvironment { // normally templates should be exported at the proper module name // and cached in the container, but this cache supports templates // that have been set directly on the component's layout property - getTemplate(Template) { - return this._templateCache.get(Template); + getTemplate(Template, owner) { + return this._templateCache.get({ Template, owner }); } // a Compiler can wrap the template so it needs its own cache - getCompiledBlock(Compiler, template) { + getCompiledBlock(Compiler, template, owner) { let compilerCache = this._compilerCache.get(Compiler); - return compilerCache.get(template); + return compilerCache.get(template, owner); } hasPartial(name) {
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/lib/syntax/curly-component.js
@@ -9,6 +9,7 @@ import get from 'ember-metal/property_get'; import { _instrumentStart } from 'ember-metal/instrumentation'; import { ComponentDefinition } from 'glimmer-runtime'; import Component from '../component'; +import { OWNER } from 'container/owner'; const DEFAULT_LAYOUT = P`template:components/-default`; @@ -230,10 +231,10 @@ class CurlyComponentManager { templateFor(component, env) { let Template = component.layout; + let owner = component[OWNER]; if (Template) { - return env.getTemplate(Template); + return env.getTemplate(Template, owner); } - let { owner } = env; let layoutName = get(component, 'layoutName'); if (layoutName) { let template = owner.lookup('template:' + layoutName);
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/lib/template.js
@@ -1,8 +1,8 @@ import { Template } from 'glimmer-runtime'; +import { OWNER } from 'container/owner'; class Wrapper { - constructor(id, env, spec) { - let { owner } = env; + constructor(id, env, owner, spec) { if (spec.meta) { spec.meta.owner = owner; } else { @@ -39,8 +39,11 @@ export default function template(json) { let id = ++templateId; return { id, - create({ env }) { - return new Wrapper(id, env, JSON.parse(json)); + create(options) { + let env = options.env; + let owner = options[OWNER]; + + return new Wrapper(id, env, owner, JSON.parse(json)); } }; }
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/tests/integration/application/engine-test.js
@@ -0,0 +1,60 @@ +import packageName from '../../utils/package-name'; +import { moduleFor, ApplicationTest } from '../../utils/test-case'; +import { strip } from '../../utils/abstract-test-case'; +import { compile } from '../../utils/helpers'; +import Controller from 'ember-runtime/controllers/controller'; +import Engine from 'ember-application/system/engine'; +import isEnabled from 'ember-metal/features'; + +// only run these tests for ember-glimmer when the feature is enabled, or for +// ember-htmlbars when the feature is not enabled +const shouldRun = isEnabled('ember-application-engines') && ( + ( + (isEnabled('ember-glimmer') && packageName === 'glimmer') || + (!isEnabled('ember-glimmer') && packageName === 'htmlbars') + ) +); + +if (shouldRun) { + moduleFor('Application test: engine rendering', class extends ApplicationTest { + ['@test sharing a template between engine and application has separate refinements']() { + this.assert.expect(1); + + let sharedTemplate = compile(strip` + <h1>{{contextType}}</h1> + {{ambiguous-curlies}} + + {{outlet}} + `); + + this.application.register('template:application', sharedTemplate); + this.registerController('application', Controller.extend({ + contextType: 'Application', + 'ambiguous-curlies': 'Controller Data!' + })); + + this.router.map(function() { + this.mount('blog'); + }); + this.application.register('route-map:blog', function() { }); + + this.registerEngine('blog', Engine.extend({ + init() { + this._super(...arguments); + + this.register('controller:application', Controller.extend({ + contextType: 'Engine' + })); + this.register('template:application', sharedTemplate); + this.register('template:components/ambiguous-curlies', compile(strip` + <p>Component!</p> + `)); + } + })); + + return this.visit('/blog').then(() => { + this.assertText('ApplicationController Data!EngineComponent!'); + }); + } + }); +}
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/tests/unit/layout-cache-test.js
@@ -51,7 +51,7 @@ moduleFor('Layout cache test', class extends RenderingTest { templateFor(content) { let Factory = this.compile(content); - return this.env.getTemplate(Factory); + return this.env.getTemplate(Factory, this.owner); } ['@test each template is only compiled once'](assert) {
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/tests/unit/template-factory-test.js
@@ -28,12 +28,12 @@ moduleFor('Template factory test', class extends RenderingTest { assert.equal(env._templateCache.misses, 0, 'misses 0'); assert.equal(env._templateCache.hits, 0, 'hits 0'); - let precompiled = env.getTemplate(Precompiled); + let precompiled = env.getTemplate(Precompiled, env.owner); assert.equal(env._templateCache.misses, 1, 'misses 1'); assert.equal(env._templateCache.hits, 0, 'hits 0'); - let compiled = env.getTemplate(Compiled); + let compiled = env.getTemplate(Compiled, env.owner); assert.equal(env._templateCache.misses, 2, 'misses 2'); assert.equal(env._templateCache.hits, 0, 'hits 0');
true
Other
emberjs
ember.js
02814c2da26a1558fb06eb527ef83e829dae7016.json
Use the correct owner for each template lookup. Ensure that the owner being used is not the environments default `Owner`, but it is the owner that the template is being looked up by. For late bound templates this means the components owner, and for normal templates (looked up from registry) it is passed to the factories `.create` method by the container itself.
packages/ember-glimmer/tests/utils/abstract-test-case.js
@@ -307,6 +307,10 @@ export class AbstractApplicationTest extends TestCase { registerController(name, controller) { this.application.register(`controller:${name}`, controller); } + + registerEngine(name, engine) { + this.application.register(`engine:${name}`, engine); + } } export class AbstractRenderingTest extends TestCase {
true
Other
emberjs
ember.js
ca443d01d22409da0c1001557e0852017654045e.json
Update Glimmer to 0.11.0. * Threads `SymbolTable` throughout the system instead of `blockMeta`. * Change a few argument signatures for Glimmer syntax's (moving from options hash to positional, etc).
package.json
@@ -39,7 +39,7 @@ "git-repo-info": "^1.1.4", "git-repo-version": "^0.3.1", "github": "^0.2.3", - "glimmer-engine": "0.10.2", + "glimmer-engine": "0.11.0", "glob": "^5.0.13", "htmlbars": "0.14.24", "mocha": "^2.4.5",
true
Other
emberjs
ember.js
ca443d01d22409da0c1001557e0852017654045e.json
Update Glimmer to 0.11.0. * Threads `SymbolTable` throughout the system instead of `blockMeta`. * Change a few argument signatures for Glimmer syntax's (moving from options hash to positional, etc).
packages/ember-glimmer/lib/environment.js
@@ -193,7 +193,7 @@ export default class Environment extends GlimmerEnvironment { // isn't going to return any syntax and the Glimmer engine knows how to handle // this case. - refineStatement(statement, blockMeta) { + refineStatement(statement, symbolTable) { // 1. resolve any native syntax – if, unless, with, each, and partial let nativeSyntax = super.refineStatement(statement); @@ -219,7 +219,7 @@ export default class Environment extends GlimmerEnvironment { // 2. built-in syntax if (key === 'component') { - return DynamicComponentSyntax.create({ args, templates, blockMeta }); + return DynamicComponentSyntax.create({ args, templates, symbolTable }); } else if (key === 'render') { return new RenderSyntax({ args }); } else if (key === 'outlet') { @@ -230,9 +230,9 @@ export default class Environment extends GlimmerEnvironment { let definition = null; if (internalKey) { - definition = this.getComponentDefinition([internalKey], blockMeta); + definition = this.getComponentDefinition([internalKey], symbolTable); } else if (key.indexOf('-') >= 0) { - definition = this.getComponentDefinition(path, blockMeta); + definition = this.getComponentDefinition(path, symbolTable); } if (definition) { @@ -241,32 +241,32 @@ export default class Environment extends GlimmerEnvironment { let generateBuiltInSyntax = builtInDynamicComponents[key]; if (generateBuiltInSyntax) { - return generateBuiltInSyntax(statement, (path) => this.getComponentDefinition([path], blockMeta)); + return generateBuiltInSyntax(statement, (path) => this.getComponentDefinition([path], symbolTable)); } - assert(`A helper named "${key}" could not be found`, !isBlock || this.hasHelper(key, blockMeta)); + assert(`A helper named "${key}" could not be found`, !isBlock || this.hasHelper(key, symbolTable)); } if ((!isSimple && appendType === 'unknown') || appendType === 'self-get') { return statement.original.deopt(); } if (!isSimple && path) { - return DynamicComponentSyntax.fromPath({ path, args, templates, blockMeta }); + return DynamicComponentSyntax.fromPath({ path, args, templates, symbolTable }); } - assert(`Helpers may not be used in the block form, for example {{#${key}}}{{/${key}}}. Please use a component, or alternatively use the helper in combination with a built-in Ember helper, for example {{#if (${key})}}{{/if}}.`, !isBlock || !this.hasHelper(key, blockMeta)); + assert(`Helpers may not be used in the block form, for example {{#${key}}}{{/${key}}}. Please use a component, or alternatively use the helper in combination with a built-in Ember helper, for example {{#if (${key})}}{{/if}}.`, !isBlock || !this.hasHelper(key, symbolTable)); - assert(`Helpers may not be used in the element form.`, !nativeSyntax && key && this.hasHelper(key, blockMeta) ? !isModifier : true); + assert(`Helpers may not be used in the element form.`, !nativeSyntax && key && this.hasHelper(key, symbolTable) ? !isModifier : true); } hasComponentDefinition() { return false; } - getComponentDefinition(path, blockMeta) { + getComponentDefinition(path, symbolTable) { let name = path[0]; - let source = blockMeta && `template:${blockMeta.moduleName}`; + let source = symbolTable && `template:${symbolTable.getMeta().moduleName}`; return this._definitionCache.get({ name, source }); } @@ -299,15 +299,15 @@ export default class Environment extends GlimmerEnvironment { } } - hasHelper(name, blockMeta) { - let options = blockMeta && { source: `template:${blockMeta.moduleName}` } || {}; + hasHelper(name, symbolTable) { + let options = symbolTable && { source: `template:${symbolTable.getMeta().moduleName}` } || {}; return !!builtInHelpers[name[0]] || this.owner.hasRegistration(`helper:${name}`, options) || this.owner.hasRegistration(`helper:${name}`); } - lookupHelper(name, blockMeta) { - let options = blockMeta && { source: `template:${blockMeta.moduleName}` } || {}; + lookupHelper(name, symbolTable) { + let options = symbolTable && { source: `template:${symbolTable.getMeta().moduleName}` } || {}; let helper = builtInHelpers[name[0]] || this.owner.lookup(`helper:${name}`, options) || this.owner.lookup(`helper:${name}`);
true
Other
emberjs
ember.js
ca443d01d22409da0c1001557e0852017654045e.json
Update Glimmer to 0.11.0. * Threads `SymbolTable` throughout the system instead of `blockMeta`. * Change a few argument signatures for Glimmer syntax's (moving from options hash to positional, etc).
packages/ember-glimmer/lib/helpers/component.js
@@ -5,16 +5,16 @@ import { assert } from 'ember-metal/debug'; import assign from 'ember-metal/assign'; export class ClosureComponentReference extends CachedReference { - static create(args, blockMeta, env) { - return new ClosureComponentReference(args, blockMeta, env); + static create(args, symbolTable, env) { + return new ClosureComponentReference(args, symbolTable, env); } - constructor(args, blockMeta, env) { + constructor(args, symbolTable, env) { super(); this.defRef = args.positional.at(0); this.env = env; this.tag = args.positional.at(0).tag; - this.blockMeta = blockMeta; + this.symbolTable = symbolTable; this.args = args; this.lastDefinition = undefined; this.lastName = undefined; @@ -24,7 +24,7 @@ export class ClosureComponentReference extends CachedReference { // TODO: Figure out how to extract this because it's nearly identical to // DynamicComponentReference::compute(). The only differences besides // currying are in the assertion messages. - let { args, defRef, env, blockMeta, lastDefinition, lastName } = this; + let { args, defRef, env, symbolTable, lastDefinition, lastName } = this; let nameOrDef = defRef.value(); let definition = null; @@ -35,7 +35,7 @@ export class ClosureComponentReference extends CachedReference { this.lastName = nameOrDef; if (typeof nameOrDef === 'string') { - definition = env.getComponentDefinition([nameOrDef], blockMeta); + definition = env.getComponentDefinition([nameOrDef], symbolTable); assert(`The component helper cannot be used without a valid component name. You used "${nameOrDef}" via (component "${nameOrDef}")`, definition); } else if (isComponentDefinition(nameOrDef)) { definition = nameOrDef; @@ -127,7 +127,7 @@ export default { isInternalHelper: true, toReference(args, env) { - // TODO: Need to figure out what to do about blockMeta here. + // TODO: Need to figure out what to do about symbolTable here. return ClosureComponentReference.create(args, null, env); } };
true
Other
emberjs
ember.js
ca443d01d22409da0c1001557e0852017654045e.json
Update Glimmer to 0.11.0. * Threads `SymbolTable` throughout the system instead of `blockMeta`. * Change a few argument signatures for Glimmer syntax's (moving from options hash to positional, etc).
packages/ember-glimmer/lib/syntax/curly-component.js
@@ -104,16 +104,17 @@ function applyAttributeBindings(element, attributeBindings, component, operation } export class CurlyComponentSyntax extends StatementSyntax { - constructor({ args, definition, templates }) { + constructor({ args, definition, templates, symbolTable }) { super(); this.args = args; this.definition = definition; this.templates = templates; + this.symbolTable = symbolTable; this.shadow = null; } compile(builder) { - builder.component.static(this); + builder.component.static(this.definition, this.args, this.templates, this.symbolTable, this.shadow); } }
true