Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-resolver

ember-cli592.4kMIT13.1.0TypeScript support: included

The default modules based resolver for Ember CLI.

readme

Ember Resolver CI Build

The Ember Resolver is the mechanism responsible for looking up code in your application and converting its naming conventions into the actual classes, functions, and templates that Ember needs to resolve its dependencies, for example, what template to render for a given route. It is a system that helps the app resolve the lookup of JavaScript modules agnostic of what kind of module system is used, which can be AMD, CommonJS or just plain globals. It is used to lookup routes, models, components, templates, or anything that is used in your Ember app.

This project provides the Ember resolver used by ember-cli

Installation

ember-resolver is an ember-cli addon, and should be installed with ember install:

ember install ember-resolver

Configuration

To customize pluralization provide a pluralizedTypes object to your applications resolver:

// app/app.js
import Resolver from 'ember-resolver';

export default class AppResolver extends Resolver {
  pluralizedTypes = {
    ...this.pluralizedTypes,
    'sheep': 'sheep',
    'strategy': 'strategies'
  }
}

// ...snip...
export default class App extends Application {
  // ...snip...
  Resolver = AppResolver;
}

// ...snip...

Addon Development

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

changelog

v13.1.0 (2024-11-19)

:rocket: Enhancement

  • #986 Extending withModules module to support dynamically added modules (@ef4)

Committers: 1

  • Edward Faulkner (@ef4)

v13.0.2 (2024-09-24)

:bug: Bug Fix

  • #985 Fix static-this type error (@ef4)

Committers: 1

  • Edward Faulkner (@ef4)

v13.0.1 (2024-09-16)

:bug: Bug Fix

:house: Internal

Committers: 2

v13.0.0 (2024-09-11)

:boom: Breaking Change

  • #977 Convert to plain library and drop deprecated behaviors (@ef4)

:rocket: Enhancement

:bug: Bug Fix

  • #978 hide global require from webpack (@ef4)

Committers: 1

  • Edward Faulkner (@ef4)

v12.0.1 (2024-06-11)

:bug: Bug Fix

Committers: 1

v12.0.0 (2024-06-07)

:boom: Breaking Change

:house: Internal

Committers: 1

v11.0.1 (2023-08-15)

:bug: Bug Fix

Committers: 1

v11.0.0 (2023-07-25)

:boom: Breaking Change

  • #906 Simplify repository structure (remove addon/resolvers/classic) (@rwjblue)
  • #904 Remove container-debug-adapter initializer (@rwjblue)

:bug: Bug Fix

  • #916 Loosen peer dependency on ember-source to support ember-source >= v5.0 (@NullVoxPopuli)

:rocket: Enhancement

  • #933 Embed @ember/string utils and drop peer dependency on @ember/string (@lifeart)

:house: Internal

Committers: 4

v10.1.0 (2023-05-02)

:rocket: Enhancement

Committers: 1

v10.0.0 (2023-01-11)

:boom: Breaking Change :bug: Bug Fix

  • #862 Add @ember/string as a peerDep to indicate the package is required to avoid deprecations in ember-source 4.10 (@kategengler)

:house: Internal

Committers: 2

v9.0.1 (2022-12-21)

This was an accidental republication of v9.0.0. 🤦🏼‍♂️ Nothing to see here.

v8.1.0 (2022-12-20)

Back-ports built-in TypeScript support from 9.0.0 (see below) to decouple that from the Ember 4.x upgrade.

:rocket: Enhancement

Committers: 1

v9.0.0 (2022-12-19)

TL;DR: drop some old versions, and ship TypeScript type definitions.

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 3

v8.0.3 (2021-09-09)

:bug: Bug Fix

:house: Internal

Committers: 2

v8.0.2 (2020-08-08)

:bug: Bug Fix

  • #590 Revert "Ensure app/foo/index.js can be looked up with foo:main" (@rwjblue)

Committers: 1

v8.0.1 (2020-08-07)

:bug: Bug Fix

  • #588 Ensure app/foo/index.js can be looked up with foo:main (@snewcomer)

Committers: 1

v8.0.0 (2020-04-11)

:boom: Breaking Change

:bug: Bug Fix

Committers: 2

v7.0.0 (2019-12-18)

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

Committers: 2

v6.0.2 (2019-12-18)

  • Re-release v6.0.0, to avoid SemVer issue with removal of module unification support within 6.x.

v6.0.1 (2019-12-18)

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

Committers: 2

v6.0.0 (2019-11-19)

:boom: Breaking Change

Committers: 1

v5.2.1 (2019-08-09)

:bug: Bug Fix

  • #396 Component and their templates should be normalized the same. (@rwjblue)

Committers: 1

v5.2.0 (2019-08-01)

:bug: Bug Fix

:memo: Documentation

Committers: 3

v5.1.3 (2019-02-22)

:bug: Bug Fix

  • #338 Fix MU GlimmerResolver.normalize when fullName is not present (@ppcano)

Committers: 1

v5.1.2 (2019-02-21)

:bug: Bug Fix

  • #336 Update modifiers and router-map in MU resolver configuration. (@rwjblue)

Committers: 2

v5.1.1 (2019-02-15)

:bug: Bug Fix

  • #313 fix(glimmer-wrapper): move debug normalize in .extend() block (@buschtoens)

Committers: 1

v5.1.0 (2019-02-15)

:rocket: Enhancement

:bug: Bug Fix

  • #330 Support engine resolution in scoped packages (@dfreeman)
  • #300 fix(glimmer-wrapper): add normalize method for Registry#has (@buschtoens)
  • #247 Fix MU for deeply nested classic components (@simonihmig)
  • #301 Add component-manager and modifier-manager to default module unification configuration (@NullVoxPopuli)

:memo: Documentation

:house: Internal

Committers: 8

v5.0.0 (2018-07-23)

Full Changelog

Breaking Changes

  • Dropped support for Node v4
  • ember-resolver will no longer fall back to the globals resolver #243

v4.5.6 (2018-06-13)

Full Changelog

Closed issues:

  • An error occurred in the constructor for ember-resolver #234
  • emberResolverFeatureFlags() calls project.config() without an environment name #233
  • ember-cli-react/resolver not found #231
  • Add ember-cli-eslint #200

Merged pull requests:

v4.5.5 (2018-03-23)

Full Changelog

Closed issues:

  • [4.5.3] Build error #227
  • Support for RFC 297 - Deprecation of Ember.Logger #223

Merged pull requests:

  • [RFC 297] Updated to conditionally use console rather than using Ember.Logger #232 (lupestro)
  • Update module unification spec link #230 (josemarluedke)
  • Use build-time project.isModuleUnification\(\) instead of feature flag. #228 (cibernox)

v4.5.4 (2018-03-09)

Full Changelog

v4.5.3 (2018-03-09)

Full Changelog

Closed issues:

Merged pull requests:

  • Update MU trees: template-options is now template-compiler #226 (cibernox)

v4.5.2 (2018-03-05)

Full Changelog

v4.5.1 (2018-03-05)

Full Changelog

Closed issues:

  • Use shorthands & recursive lookup for component paths called from template #217
  • Implement a fallback resolver #188
  • default podModulePrefix value #74

Merged pull requests:

  • Source and Namespace via Local Lookup #225 (mixonic)
  • Normalize specifiers before passing to fallback #224 (iezer)
  • [DOCS] Adds example about pluralizedTypes usage #222 (SergeAstapov)
  • Fix Main Service Lookup #221 (iezer)
  • Glimmer Resolver gets target namespace as third argument #220 (iezer)
  • Upgrade to Ember CLI 2.18, Re-enable beta testing #219 (mixonic)
  • Add support to glimmer-wrapper for MU namespaces #218 (iezer)

v4.5.0 (2017-08-29)

Full Changelog

Merged pull requests:

  • Ensure internal layoutFor lookups for namespaced templates works. #213 (rwjblue)

v4.4.0 (2017-08-16)

Full Changelog

Merged pull requests:

v4.3.1 (2017-08-15)

Full Changelog

Closed issues:

  • Adding files to the resolver #209

Merged pull requests:

  • Update ember-cli-version-checker #212 (ef4)

v4.3.0 (2017-07-11)

Full Changelog

Closed issues:

  • MU: camelCased lookups #195

Merged pull requests:

v4.2.4 (2017-07-08)

Full Changelog

Merged pull requests:

  • Normalize dots to slashes where appropriate #207 (mixonic)

v4.2.3 (2017-07-08)

Full Changelog

Merged pull requests:

v4.2.2 (2017-07-08)

Full Changelog

Closed issues:

  • Component helper usage should warn #203

Merged pull requests:

v4.2.1 (2017-07-02)

Full Changelog

Merged pull requests:

v4.2.0 (2017-07-02)

Full Changelog

Implemented enhancements:

  • Port on top of @glimmer/di #171

Closed issues:

  • Local lookup #191
  • GlimmerWrapper: Resolve modules without a default export #189
  • 4.1.0 produces html-formatted "...@glimmer/resolver was not found..."-error on npm install on jenkins #187

Merged pull requests:

v4.1.0 (2017-03-28)

Full Changelog

Merged pull requests:

v4.0.0 (2017-03-25)

Full Changelog

Merged pull requests:

v3.0.1 (2017-03-24)

Full Changelog

Closed issues:

  • 3 version break ember-inspector. #175
  • ContainerDebugAdapter.catalogEntriesByType returns objects of wrong type #120

Merged pull requests:

v3.0.0 (2017-03-11)

Full Changelog

Closed issues:

  • Remove old / dead code #131
  • Re-register failing on App.reset\(\) #130
  • confirm @ember as npm scope works #114

Merged pull requests:

v2.1.1 (2016-12-30)

Full Changelog

Merged pull requests:

v2.1.2 (2016-10-17)

Full Changelog

Merged pull requests:

  • Update ember-cli to 2.8.0. Closes #152. #156 (btecu)

v2.1.0 (2016-09-03)

Full Changelog

Fixed bugs:

Closed issues:

  • Use Ember Inflector for pluralization? #147
  • Fix broken/hanging TravisCI builds #137
  • ember-data and pod format #128
  • Deprecation warning in Ember 2.2 #124
  • How to transpile index.js with broccoli-babel-transpiler #121
  • Bower: Unable to find a suitable version for ember-resolver #119
  • Make moduleNameLookupPatterns a DAG for extensibility. #118

Merged pull requests:

v2.0.3 (2015-08-31)

Full Changelog

Implemented enhancements:

  • Move to node #79

Closed issues:

  • Don't Rely On Globals #106
  • This doesn't seem to be published on npm #102

Merged pull requests:

  • Add backwards compatibility with 0.1.x exported modules. #115 (rwjblue)
  • Make an ember-cli addon. #113 (rwjblue)

v2.0.2 (2015-08-31)

Full Changelog

v2.0.1 (2015-08-31)

Full Changelog

v1.0.1 (2015-08-30)

Full Changelog

v0.1.21 (2015-08-28)

Full Changelog

Merged pull requests:

v0.1.20 (2015-08-24)

Full Changelog

Closed issues:

  • When variable and helper shares the same name, the helper always wins #108

Merged pull requests:

v0.1.19 (2015-08-20)

Full Changelog

Closed issues:

  • Problem with loading templates. #103

Merged pull requests:

v0.1.18 (2015-06-25)

Full Changelog

Closed issues:

  • Change usages of Ember.create and Ember.keys to Object.create and Object.keys #97
  • Deprecated Computed Syntax #93
  • Nested pods & Adapters #91
  • Colocating the model with templates, controllers, partials and routes in a pod directory structure #81

Merged pull requests:

v0.1.17 (2015-06-12)

Full Changelog

Merged pull requests:

  • Fix shouldWrapInClassFactory issue from knownForType refactor. #96 (rwjblue)

v0.1.16 (2015-06-12)

Full Changelog

Closed issues:

  • Error with lookup process #94
  • may the initializers.js be modularized? #67

Merged pull requests:

v0.1.15 (2015-03-20)

Full Changelog

Merged pull requests:

v0.1.14 (2015-03-15)

Full Changelog

Merged pull requests:

  • Do not throw an error if this.namespace is undefined on init. #89 (rwjblue)

v0.1.13 (2015-03-15)

Full Changelog

Closed issues:

  • Release new version #86

Merged pull requests:

  • Add podModulePrefix deprecation warning. #88 (trabus)
  • Refactor chooseModuleName to not be an anonymous function #87 (alexspeller)

v0.1.12 (2015-02-22)

Full Changelog

Closed issues:

  • How are the needs supposed to be specified for a controller with nested routes? #85
  • AMD support #78
  • ember-dev is pointing to master branch instead of ruby in Gemfile #71

Merged pull requests:

v0.1.11 (2014-12-21)

Full Changelog

Closed issues:

  • extra unneeded closures exist in dist builds. #2

Merged pull requests:

v0.1.10 (2014-10-16)

Full Changelog

Merged pull requests:

v0.1.9 (2014-10-10)

Full Changelog

Merged pull requests:

v0.1.8 (2014-10-09)

Full Changelog

Closed issues:

  • namespace resolver breaks resolving apps #69
  • ember-resolver v0.1.7 pulls down v0.1.6 #66
  • .detect and .nearestOfType broken #62
  • It cannot resolve nested route on the namespace (App.TestListRoute) #57
  • including 3rd party ember's library with precompiled templates doesn't work because of normalize method #55
  • templateName does not resolve when in pod structure #45
  • Controller (with no corresponding Route) in sub directory cannot be found #37
  • resolveTemplate should try both dasherized and underscores #34
  • Models in POD structure #28

Merged pull requests:

  • Allow pluralization to be configurable. #68 (rwjblue)
  • Updated the bower.json name attr to be ember-resolver #64 (toranb)
  • Resolves IE8 bug #63 (jdjkelly)

v0.1.7 (2014-07-24)

Full Changelog

v0.1.6 (2014-07-24)

Full Changelog

Closed issues:

  • Object.create not available on IE 8 #60

Merged pull requests:

  • Allow components to be grouped together in a single subdirectory. #61 (rwjblue)
  • Bump version in bower.json #59 (xtian)

v0.1.5 (2014-07-18)

Full Changelog

v0.1.4 (2014-07-18)

Full Changelog

v0.1.3 (2014-07-18)

Full Changelog

Closed issues:

  • Loading templates doesn't work #52
  • Components with templates in pod structure #30

Merged pull requests:

0.1.2 (2014-06-03)

Full Changelog

Closed issues:

  • Should resolver be optionally independent of the Application namespace? #41

Merged pull requests:

0.1.1 (2014-06-03)

Full Changelog

Merged pull requests:

  • Do not parse the name if it was already parsed. #48 (rwjblue)

0.1.0 (2014-06-03)

Full Changelog

Closed issues:

  • Change name to michael-bay-resolver #46
  • templateName convention and RangeError: invalid array length #43
  • Single word handlebars helpers do not resolve #40
  • proposal for a new folder for adapters, serializers and transformers #38
  • Resolver breaks when logging long names #35
  • Bower install breaks after the last commit #33
  • Incorrect Assertion due to camelCasing of Ember Data Model #24
  • Partial resolution is ambiguous #22
  • Folder structure tweak #21
  • Loading template issue #13
  • Configure for default controller and route in application, by default it's a generated by Ember #11
  • Create real tests of resolver. #1

Merged pull requests:

0.0.1 (2013-10-31)