Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX Release] fix router test regression for isActive #19789

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
666ae33
Disable non-enabled feature
kategengler May 3, 2021
916e104
Add v3.28.0-beta.1 to CHANGELOG
kategengler May 3, 2021
68fccf9
Release v3.28.0-beta.1
kategengler May 3, 2021
173b804
[BUGFIX release] Ensure ember-testing is loaded lazily
May 11, 2021
713a4c2
[BUGFIX release] 3.27 deprecation metadata
chancancode May 11, 2021
d79f94f
[CLEANUP] Deprecations URL consistency
chancancode May 12, 2021
b3b4e53
Release notes for v3.27.1
chancancode May 13, 2021
87b43a1
[BUGFIX] Makes the (hash) helper lazy
Apr 27, 2021
e50dc6e
[BUGFIX release] Make {{hash}} object properties settables
May 19, 2021
6eb573c
[DOC release] fix passing params to named blocks examples
chrisgame May 5, 2021
3b1d38c
fix computed deprecation import path
knownasilya May 6, 2021
01608b7
[BUGFIX] pass module prefix to initializer test blueprints
anehx May 12, 2021
65a75d0
Use explicit this in helper-test blueprints
bertdeblock May 12, 2021
ec0c86e
[BUGFIX release] Improve class based tranform deprecation message
chancancode May 25, 2021
c70dd51
[BUGFIX release] Refine Ember Global deprecation message
chancancode May 25, 2021
edb4e1d
[BUGFIX release] Improve computed.* and run.* deprecation message
chancancode May 26, 2021
d9a66ae
Downlevel for IE11
chancancode May 26, 2021
c54ed9e
fix: lookup/register and singleton flag behavior
runspired Apr 6, 2021
02b4e2e
fix lint
runspired Apr 6, 2021
df6636a
Add v3.27.2 to CHANGELOG.md.
rwjblue May 27, 2021
c203d79
Add v3.28.0-beta.2 to CHANGELOG.md.
rwjblue May 27, 2021
5f368b0
3.28.0-beta.2
rwjblue May 27, 2021
a4099ea
[BUGFIX lts] Ensures that computed can depend on dynamic hash keys
May 27, 2021
a10b4bc
Extend transition deprecation
btecu May 28, 2021
055b923
Add v3.28.0-beta.3 to CHANGELOG
kategengler Jun 1, 2021
20b4eff
Release v3.28.0-beta.3
kategengler Jun 1, 2021
a920b45
[BUGFIX release] Fix Embroider compatibility with [email protected]+
rwjblue Jun 3, 2021
edbfc03
Add v3.27.3 to CHANGELOG.md.
rwjblue Jun 3, 2021
e31720c
Add v3.28.0-beta.4 to CHANGELOG
kategengler Jun 7, 2021
2f54b0b
Release v3.28.0-beta.4
kategengler Jun 7, 2021
5571a8b
[DOC release] Fix "Dormant" addon warning typo
ctjhoa Jun 9, 2021
2392417
Add CHANGELOG for v3.27.4
chancancode Jun 9, 2021
1736bfe
[BIGFIX release] Fix `<LinkTo>` with nested children
chancancode Jun 10, 2021
428e7a0
Add CHANGELOG for 3.27.5
chancancode Jun 10, 2021
7de1e20
Add v3.28.0-beta.5 to CHANGELOG
kategengler Jun 14, 2021
e261517
Release v3.28.0-beta.5
kategengler Jun 14, 2021
2971607
[BUGFIX lts] Ensure hash objects correctly entangle as dependencies v2
Jun 1, 2021
a01e11d
Add 3.28.0-beta.6 to CHANGELOG
kategengler Jun 21, 2021
cd55255
Release 3.28.0-beta.6
kategengler Jun 21, 2021
0825f8a
[BUGFIX release] Restore previous hash behavior
Jul 26, 2021
21ecd42
[BUGFIX LTS] fix memory leak in RouterService
Jul 30, 2021
8a4e4af
[BUGFIX release] Deprecate htmlSafe via prototype
mixonic Aug 1, 2021
cf4ccb6
Add HAS_NATIVE_PROXY guard to test for deprecation
kategengler Aug 2, 2021
5365a3c
Merge pull request #19694 from emberjs/kg-add-native-proxy-guard
kategengler Aug 2, 2021
f65283d
Add 3.28.0-beta.7 to CHANGELOG
kategengler Aug 2, 2021
a4bfee9
Release 3.28.0-beta.7
kategengler Aug 2, 2021
8cf4f4a
ensure `deserializeQueryParam` is called for lazy routes
brendenpalmer Aug 5, 2021
5029368
Add v3.28.0 to CHANGELOG
kategengler Aug 9, 2021
f243a4f
Release v3.28.0
kategengler Aug 10, 2021
4e097e6
[BUGFIX release] fix router test regression in urlFor and recognize
chriskrycho Aug 26, 2021
c37df4d
Add v3.28.1 to CHANGELOG.md.
rwjblue Aug 30, 2021
5f4ccf9
Update glimmer-vm to allow locals in loose mode
rwjblue Oct 21, 2021
4c0e61b
Add v3.28.2 to CHANGELOG.md.
rwjblue Oct 21, 2021
5fc912b
3.28.2
rwjblue Oct 21, 2021
eb40ee3
Update glimmer-vm to 0.80.2 (fix some inline precompile issues)
rwjblue Oct 22, 2021
845e827
Add v3.28.3 to CHANGELOG.md.
rwjblue Oct 22, 2021
6932490
3.28.3
rwjblue Oct 22, 2021
1402cb4
Don't pass falsy `locals` to glimmer precompile
ef4 Oct 22, 2021
f41c849
Update glimmer-vm to 0.80.3
rwjblue Oct 22, 2021
d5e3540
Add v3.28.4 to CHANGELOG.md.
rwjblue Oct 22, 2021
62976fe
3.28.4
rwjblue Oct 22, 2021
739b62a
[BUGFIX LTS] fix router test regression for all router service
NullVoxPopuli Oct 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 65 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Ember Changelog

## v3.28.4 (October 22, 2021)

- [#19798](https://github.com/emberjs/ember.js/pull/19798) More fixes for errors while precompiling inline templates (introduced in 3.28.2)
- [glimmerjs/[email protected]](https://github.com/glimmerjs/glimmer-vm/releases/tag/v0.80.3) Improve template compilation speed regression

## v3.28.3 (October 22, 2021)

- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)

## v3.28.2 (October 21, 2021)

- [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode

## v3.28.1 (August 30, 2021)

- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized

## v3.28.0 (August 9, 2021)

- [#19697](https://github.com/emberjs/ember.js/pull/19697) [BUGFIX] Ensure `deserializeQueryParam` is called for lazy routes
- [#19681](https://github.com/emberjs/ember.js/pull/19681) [BUGFIX] Restore previous hash behavior
- [#19685](https://github.com/emberjs/ember.js/pull/19685) [BUGFIX] Fix memory leak in RouterService
- [#19690](https://github.com/emberjs/ember.js/pull/19690) [BUGFIX] Deprecates String.prototype.htmlSafe targeting Ember 4.0, as intended by the original deprecation.
- [#19584](https://github.com/emberjs/ember.js/pull/19584) [BUGFIX] Ensure hash objects correctly entangle as dependencies
- [#19491](https://github.com/emberjs/ember.js/pull/19491) [BUGFIX] Fix `owner.lookup` `owner.register` behavior with `singleton: true` option
- [#19472](https://github.com/emberjs/ember.js/pull/19472) [BUGFIX] Prevent transformation of block params called `attrs`

## v3.27.5 (June 10, 2021)

- [#19597](https://github.com/emberjs/ember.js/pull/19597) [BIGFIX] Fix `<LinkTo>` with nested children

## v3.27.4 (June 9, 2021)

- [#19594](https://github.com/emberjs/ember.js/pull/19594) [BUGFIX] Revert lazy hash changes
- [#19596](https://github.com/emberjs/ember.js/pull/19596) [DOC] Fix "Dormant" addon warning typo

## v3.27.3 (June 3, 2021)

- [#19565](https://github.com/emberjs/ember.js/pull/19565) [BUGFIX] Ensures that `computed` can depend on dynamic `(hash` keys
- [#19571](https://github.com/emberjs/ember.js/pull/19571) [BUGFIX] Extend `Route.prototype.transitionTo` deprecation until 5.0.0
- [#19586](https://github.com/emberjs/ember.js/pull/19586) [BUGFIX] Fix Embroider compatibility

### v3.27.2 (May 27, 2021)

- [#19511](https://github.com/emberjs/ember.js/pull/19511) / [#19548](https://github.com/emberjs/ember.js/pull/19548) [BUGFIX] Makes the (hash) helper lazy
- [#19530](https://github.com/emberjs/ember.js/pull/19530) [DOC] fix passing params to named blocks examples
- [#19536](https://github.com/emberjs/ember.js/pull/19536) [BUGFIX] Fix `computed.*` deprecation message to include the correct import path
- [#19544](https://github.com/emberjs/ember.js/pull/19544) [BUGFIX] Use explicit this in helper test blueprints
- [#19555](https://github.com/emberjs/ember.js/pull/19555) [BUGFIX] Improve class based tranform deprecation message
- [#19557](https://github.com/emberjs/ember.js/pull/19557) [BUGFIX] Refine Ember Global deprecation message
- [#19564](https://github.com/emberjs/ember.js/pull/19564) [BUGFIX] Improve computed.* and run.* deprecation message (IE11)

### v3.27.1 (May 13, 2021)

- [#19540](https://github.com/emberjs/ember.js/pull/19540) [BUGFIX] Ensure ember-testing is loaded lazily
- [#19541](https://github.com/emberjs/ember.js/pull/19541) [BUGFIX] Add missing metadata for some deprecations enabled in 3.27.0
- [#19541](https://github.com/emberjs/ember.js/pull/19541) [BUGFIX] Ensure passing `@href` to `<LinkTo>` throws an error
- [#19541](https://github.com/emberjs/ember.js/pull/19541) [CLEANUP] Consistently use https://deprecations.emberjs.com/ in deprecation URLs

### v3.27.0 (May 3, 2021)

- [#19309](https://github.com/emberjs/ember.js/pull/19309) / [#19487](https://github.com/emberjs/ember.js/pull/19487) / [#19474](https://github.com/emberjs/ember.js/pull/19474) [FEATURE] Enable `(helper` and `(modifier` helpers per [RFC #432](https://github.com/emberjs/rfcs/blob/master/text/0432-contextual-helpers.md).
Expand All @@ -10,7 +69,7 @@
- [#19442](https://github.com/emberjs/ember.js/pull/19442) [DEPRECATION] Add deprecation for `Route#render` method per [RFC #418](https://github.com/emberjs/rfcs/blob/master/text/0418-deprecate-route-render-methods.md).
- [#19429](https://github.com/emberjs/ember.js/pull/19429) [DEPRECATION] `registerPlugin` / `unregisterPlugin` and legacy class based AST plugins (private APIs)
- [#19499](https://github.com/emberjs/ember.js/pull/19499) [DEPRECATION] Deprecate `@foo={{helper}}` per [RFC #496](https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#3-no-implicit-invocation-of-argument-less-helpers).
- [#19499](https://github.com/emberjs/ember.js/pull/19499) [BUGFIX] Update rendering engine to `@glimmer/*` 0.78.2 for fixes including:
- [#19499](https://github.com/emberjs/ember.js/pull/19499) [BUGFIX] Update rendering engine to `@glimmer/*` 0.78.2 for fixes including:
- `<:else>` and `<:inverse>` should be aliases (see https://github.com/glimmerjs/glimmer-vm/pull/1296)
- Fix nested calls to helpers in dynamic helpers (see https://github.com/glimmerjs/glimmer-vm/pull/1293)
- [#19477](https://github.com/emberjs/ember.js/pull/19477) [BUGFIX] Allow `<LinkToExternal />` to override internal assertion
Expand Down Expand Up @@ -102,7 +161,7 @@

### v3.24.0 (December 28, 2020)

- [#19224](https://github.com/emberjs/ember.js/pull/19224) [FEATURE] Add `{{page-title}}` helper to route template blueprints to implement [RFC #0654](https://github.com/emberjs/rfcs/blob/master/text/0645-add-ember-page-title-addon.md).
- [#19224](https://github.com/emberjs/ember.js/pull/19224) [FEATURE] Add `{{page-title}}` helper to route template blueprints to implement [RFC #0654](https://github.com/emberjs/rfcs/blob/master/text/0645-add-ember-page-title-addon.md).
- [#19133](https://github.com/emberjs/ember.js/pull/19133) [FEATURE / DEPRECATION] Add new options to `deprecate()` for `for` and `since` and deprecate using `deprecate()` without those options per the [Deprecation Staging RFC](https://github.com/emberjs/rfcs/blob/master/text/0649-deprecation-staging.md).
- [#19211](https://github.com/emberjs/ember.js/pull/19211) [DEPRECATION] Deprecate `Ember.String.loc` and `{{loc}}` per the [Deprecate Ember String RFC](https://github.com/emberjs/rfcs/blob/master/text/0236-deprecation-ember-string.md).
- [#19234](https://github.com/emberjs/ember.js/pull/19234) [DEPRECATION] Deprecate String Prototype extensions per the [Deprecate Ember String RFC](https://github.com/emberjs/rfcs/blob/master/text/0236-deprecation-ember-string.md).
Expand All @@ -126,7 +185,7 @@

- [#19160](https://github.com/emberjs/ember.js/pull/19160) / [#19182](https://github.com/emberjs/ember.js/pull/19182) [FEATURE] Implements the helper manager feature specified in the [Helper Managers RFC](https://github.com/emberjs/rfcs/blob/master/text/0625-helper-managers.md).
- [#19171](https://github.com/emberjs/ember.js/pull/19171) / [#19182](https://github.com/emberjs/ember.js/pull/19182) [FEATURE] Implements `invokeHelper` from the [JavaScript Helper Invocation API RFC](https://github.com/emberjs/rfcs/blob/master/text/0626-invoke-helper.md).
- [#19148](https://github.com/emberjs/ember.js/pull/19148) / [#19119](https://github.com/emberjs/ember.js/pull/19119) Update rendering engine to `@glimmer/*` 0.62.1
- [#19148](https://github.com/emberjs/ember.js/pull/19148) / [#19119](https://github.com/emberjs/ember.js/pull/19119) Update rendering engine to `@glimmer/*` 0.62.1
- [#19122](https://github.com/emberjs/ember.js/pull/19122) [BUGFIX] Prevents dynamic invocations of string values when referenced directly in angle brackets
- [#19136](https://github.com/emberjs/ember.js/pull/19136) [BUGFIX] Update router microlib to improve Transition related debugging
- [#19173](https://github.com/emberjs/ember.js/pull/19173) [BUGFIX] Enforce usage of `capabilities` generation.
Expand Down Expand Up @@ -155,7 +214,7 @@
- [#19062](https://github.com/emberjs/ember.js/pull/19062) / [#19068](https://github.com/emberjs/ember.js/pull/19068) [FEATURE] Add @ember/destroyable feature from the [Destroyables RFC](https://github.com/emberjs/rfcs/blob/master/text/0580-destroyables.md).
- [#18984](https://github.com/emberjs/ember.js/pull/18984) / [#19067](https://github.com/emberjs/ember.js/pull/19067) [FEATURE] Add low-level Cache API per [Autotracking Memoization RFC](https://github.com/emberjs/rfcs/blob/master/text/0615-autotracking-memoization.md)
- [#19086](https://github.com/emberjs/ember.js/pull/19086) [FEATURE] Pass transition object to activate/deactivate hooks and events
- [#19094](https://github.com/emberjs/ember.js/pull/19094) [BUGFIX] Fix RouterService#isActive() to work with tracking
- [#19094](https://github.com/emberjs/ember.js/pull/19094) [BUGFIX] Fix RouterService#isActive() to work with tracking
- [#19163](https://github.com/emberjs/ember.js/pull/19163) [BUGFIX] Use args proxy for modifier managers.
- [#19170](https://github.com/emberjs/ember.js/pull/19170) [BUGFIX] Make modifier manager 3.22 accept the resolved value directly.
- [#19124](https://github.com/emberjs/ember.js/pull/19124) [BUGFIX] Fix rendering engine usage within a `fastboot` sandbox
Expand All @@ -178,7 +237,7 @@

- [#18993](https://github.com/emberjs/ember.js/pull/18993) [DEPRECATION] Deprecate `getWithDefault` per [RFC #554](https://github.com/emberjs/rfcs/blob/master/text/0554-deprecate-getwithdefault.md).
- [#19087](https://github.com/emberjs/ember.js/pull/19087) [BUGFIX] Generated initializer tests no longer causes a deprecation warning
- [#17571](https://github.com/emberjs/ember.js/pull/17571) [BUGFIX] Avoid tampering `queryParam` argument in RouterService#isActive
- [#17571](https://github.com/emberjs/ember.js/pull/17571) [BUGFIX] Avoid tampering `queryParam` argument in RouterService#isActive

### v3.20.6 (November 11, 2020)

Expand Down Expand Up @@ -236,7 +295,7 @@
- Fix: Rerender an `{{#each`s block only when the specific item has changed
- [#18958](https://github.com/emberjs/ember.js/pull/18958) [BUGFIX] Ensure AST transforms using `in-element` work properly.
- [#18960](https://github.com/emberjs/ember.js/pull/18960) [BUGFIX] More assertions for Application lifecycle methods
- [#18919](https://github.com/emberjs/ember.js/pull/18919) [BUGFIX] Add error for modifier manager without capabilities.
- [#18919](https://github.com/emberjs/ember.js/pull/18919) [BUGFIX] Add error for modifier manager without capabilities.
- [#18828](https://github.com/emberjs/ember.js/pull/18828) [BUGFIX] Prepend 'TODO: ' to 'Replace this with your real tests' comments in generated tests
- [#18353](https://github.com/emberjs/ember.js/pull/18353) [BUGFIX] Improve `fn` & `on` undefined callback message
- [#18824](https://github.com/emberjs/ember.js/pull/18824) [CLEANUP] Remove deprecated private `window.ENV`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('<%= friendlyTestName %>', function() {
// `);
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describeComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleNam
// `);
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<%= friendlyTestName %>', function() {
it('renders', async function() {
this.set('inputValue', '1234');

await render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.element.textContent.trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleNa
test('it renders', function(assert) {
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.equal(this.$().text().trim(), '1234');
});<% } else if (testType == 'unit') { %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module('<%= friendlyTestName %>', function(hooks) {
test('it renders', async function(assert) {
this.set('inputValue', '1234');

await render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.dom(this.element).hasText('1234');
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import Application from '@ember/application';

import config from '<%= modulePrefix %>/config/environment';
import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = class TestApplication extends Application {}
module('<%= friendlyTestName %>', function (hooks) {
hooks.beforeEach(function () {
this.TestApplication = class TestApplication extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
};
this.TestApplication.initializer({
name: 'initializer under test',
initialize
initialize,
});

this.application = this.TestApplication.create({ autoboot: false, Resolver });
this.application = this.TestApplication.create({ autoboot: false });
});

hooks.afterEach(function() {
hooks.afterEach(function () {
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
});

// TODO: Replace this with your real tests.
test('it works', async function(assert) {
test('it works', async function (assert) {
await this.application.boot();

assert.ok(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import Application from '@ember/application';

import config from '<%= modulePrefix %>/config/environment';
import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = class TestApplication extends Application {}
module('<%= friendlyTestName %>', function (hooks) {
hooks.beforeEach(function () {
this.TestApplication = class TestApplication extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
};
this.TestApplication.instanceInitializer({
name: 'initializer under test',
initialize
initialize,
});
this.application = this.TestApplication.create({ autoboot: false, Resolver });
this.application = this.TestApplication.create({ autoboot: false });
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
hooks.afterEach(function () {
<% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
});

// TODO: Replace this with your real tests.
test('it works', async function(assert) {
test('it works', async function (assert) {
await this.instance.boot();

assert.ok(true);
Expand Down
25 changes: 22 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const buildStripClassCallcheckPlugin = require('./build-strip-class-callcheck-pl
const injectBabelHelpers = require('./transforms/inject-babel-helpers').injectBabelHelpers;
const debugTree = require('broccoli-debug').buildDebugCallback('ember-source:addon');
const vmBabelPlugins = require('@glimmer/vm-babel-plugins');
const Overrides = require('./overrides');

const PRE_BUILT_TARGETS = [
'last 1 Chrome versions',
Expand Down Expand Up @@ -65,10 +66,21 @@ module.exports = {
paths,
absolutePaths,
_jqueryIntegrationEnabled: true,
_overrideTree: undefined,

included() {
this._super.included.apply(this, arguments);

let overrides = Overrides.for(this.project);

if (overrides.hasOverrides) {
this._overrideTree = overrides.toTree();
}

if (overrides.hasBuildTimeWarning) {
this.ui.writeWarnLine('[DEPRECATION] ' + overrides.buildTimeWarning);
}

const { has } = require('@ember/edition-utils');

let optionalFeatures = this.project.addons.find((a) => a.name === '@ember/optional-features');
Expand Down Expand Up @@ -209,6 +221,10 @@ module.exports = {
},

buildEmberBundles(tree, isProduction) {
if (this._overrideTree) {
tree = new MergeTrees([tree, this._overrideTree], { overwrite: true });
}

let packages = this.transpileTree(new Funnel(tree, { srcDir: 'packages' }), isProduction);

let dependencies = this.transpileTree(
Expand Down Expand Up @@ -244,7 +260,7 @@ module.exports = {
return new MergeTrees([
concatBundle(emberFiles, {
outputFile: 'ember.js',
footer: "require('@ember/-internals/bootstrap');",
footer: `require('@ember/-internals/bootstrap')`,
}),

concatBundle(emberTestingFiles, {
Expand Down Expand Up @@ -281,18 +297,21 @@ module.exports = {

if (targets.includes('ie 11')) {
this.ui.writeWarnLine(
'Internet Explorer 11 is listed in your compilation targets, but it will no longer be supported in the next major version of Ember. Please update your targets to remove IE 11 and include new targets that are within the updated support policy. For details on the new browser support policy, see:\n\n - The official documentation: http://emberjs.com/browser-support\n - the deprecation guide: https://emberjs.com/deprecations/v3.x#toc_3-0-browser-support-policy\n'
'Internet Explorer 11 is listed in your compilation targets, but it will no longer be supported in the next major version of Ember. Please update your targets to remove IE 11 and include new targets that are within the updated support policy. For details on the new browser support policy, see:\n\n - The official documentation: http://emberjs.com/browser-support\n - the deprecation guide: https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy\n'
);
}

const isProduction = process.env.EMBER_ENV === 'production';

if (
!isProduction &&
// do the running applications targets match our prebuilt assets targets?
PRE_BUILT_TARGETS.every((target) => targets.includes(target)) &&
targets.length === PRE_BUILT_TARGETS.length &&
// if node is defined in targets we can't reliably use the prebuilt bundles
!targetNode
!targetNode &&
// if we have a custom override (e.g. for globals deprecations) we can't use the prebuilt bundles
!this._overrideTree
) {
ember = new Funnel(tree, {
destDir: 'ember',
Expand Down
Loading