Skip to content

Commit

Permalink
Merge pull request emberjs#19637 from emberjs/v4-cleanup
Browse files Browse the repository at this point in the history
Merge v4-cleanup branch into master
  • Loading branch information
rwjblue committed Jul 18, 2021
2 parents b510222 + 82cea4f commit 0158265
Show file tree
Hide file tree
Showing 72 changed files with 104 additions and 492 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -65,7 +65,7 @@ jobs:
run: yarn test

browserstack-test:
name: Browserstack Tests (Safari, Edge, IE11)
name: Browserstack Tests (Safari, Edge)
runs-on: ubuntu-latest
needs: [basic-test, lint]
steps:
Expand Down Expand Up @@ -183,6 +183,7 @@ jobs:
env:
DISABLE_SOURCE_MAPS: true
BROCCOLI_ENV: production
SHOULD_TRANSPILE_FOR_NODE: true
run: yarn ember build -prod
- name: test
run: yarn test:node
Expand Down
3 changes: 1 addition & 2 deletions config/browserlists.js
@@ -1,9 +1,8 @@
const allSupportedBrowsers = [
'last 2 Chrome versions',
'last 2 Firefox versions',
'last 2 Safari versions',
'Safari 12',
'last 2 Edge versions',
'ie 11',
];

const modernBrowsers = [
Expand Down
1 change: 1 addition & 0 deletions config/targets.js
Expand Up @@ -6,4 +6,5 @@ const shouldTranspile = Boolean(process.env.SHOULD_TRANSPILE);

module.exports = {
browsers: isProduction || shouldTranspile ? allSupportedBrowsers : modernBrowsers,
...(process.env.SHOULD_TRANSPILE_FOR_NODE ? { node: 'current' } : undefined),
};
7 changes: 0 additions & 7 deletions lib/index.js
Expand Up @@ -201,7 +201,6 @@ module.exports = {
require.resolve('@babel/plugin-transform-block-scoping'),
{ throwIfClosureRequired: true },
],
[require.resolve('@babel/plugin-transform-object-assign')],
],
}),
};
Expand Down Expand Up @@ -295,12 +294,6 @@ module.exports = {
let targets = (this.project && this.project.targets && this.project.targets.browsers) || [];
let targetNode = (this.project && this.project.targets && this.project.targets.node) || false;

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://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy\n'
);
}

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

if (
Expand Down
4 changes: 1 addition & 3 deletions lib/transforms/inject-babel-helpers.js
Expand Up @@ -21,9 +21,7 @@ function injectBabelHelpersPlugin(isEmberSource) {
return {
pre(file) {
file.set('helperGenerator', function (name) {
if (name === 'extends') {
return addNamed(file.path, 'assign', '@ember/polyfills');
} else if (isEmberSource && name === 'asyncToGenerator') {
if (isEmberSource && name === 'asyncToGenerator') {
// Returning a falsy value will cause the helper to be inlined,
// which is fine for local tests
return false;
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -49,7 +49,6 @@
"dependencies": {
"@babel/helper-module-imports": "^7.8.3",
"@babel/plugin-transform-block-scoping": "^7.8.3",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@ember/edition-utils": "^1.2.0",
"@glimmer/vm-babel-plugins": "0.79.4",
"babel-plugin-debug-macros": "^0.3.3",
Expand Down
10 changes: 0 additions & 10 deletions packages/@ember/-internals/console/index.d.ts

This file was deleted.

201 changes: 0 additions & 201 deletions packages/@ember/-internals/console/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions packages/@ember/-internals/container/lib/container.ts
@@ -1,7 +1,6 @@
import { Factory, LookupOptions, Owner, setOwner } from '@ember/-internals/owner';
import { dictionary, HAS_NATIVE_PROXY, HAS_NATIVE_SYMBOL, symbol } from '@ember/-internals/utils';
import { assert } from '@ember/debug';
import { assign } from '@ember/polyfills';
import { DEBUG } from '@glimmer/env';
import Registry, { DebugRegistry, Injection } from './registry';

Expand Down Expand Up @@ -586,7 +585,7 @@ class FactoryManager<T, C> {
}

if (options !== undefined) {
props = assign({}, props, options);
props = Object.assign({}, props, options);
}

if (DEBUG) {
Expand Down
3 changes: 1 addition & 2 deletions packages/@ember/-internals/container/lib/registry.ts
@@ -1,7 +1,6 @@
import { Factory } from '@ember/-internals/owner';
import { dictionary, intern } from '@ember/-internals/utils';
import { assert } from '@ember/debug';
import { assign } from '@ember/polyfills';
import { DEBUG } from '@glimmer/env';
import Container, { ContainerOptions, LazyInjection } from './container';

Expand Down Expand Up @@ -607,7 +606,7 @@ export default class Registry implements IRegistry {
resolverKnown = this.resolver.knownForType(type);
}

return assign({}, fallbackKnown, localKnown, resolverKnown);
return Object.assign({}, fallbackKnown, localKnown, resolverKnown);
}

isValidFullName(fullName: string): boolean {
Expand Down
3 changes: 1 addition & 2 deletions packages/@ember/-internals/container/tests/container_test.js
@@ -1,5 +1,4 @@
import { getOwner } from '@ember/-internals/owner';
import { assign } from '@ember/polyfills';
import Service from '@ember/service';
import { DEBUG } from '@glimmer/env';
import { Registry } from '..';
Expand Down Expand Up @@ -831,7 +830,7 @@ moduleFor(
class Component {
static create(options) {
let instance = new this();
assign(instance, options);
Object.assign(instance, options);
return instance;
}
}
Expand Down
@@ -1,5 +1,4 @@
import { moduleFor, ApplicationTestCase } from 'internal-test-helpers';
import { assign } from '@ember/polyfills';
import { run } from '@ember/runloop';
import EmberController from '@ember/controller';
import '../index'; // Must be required to export Ember.ContainerDebugAdapter.
Expand All @@ -17,7 +16,7 @@ moduleFor(
}

get applicationOptions() {
return assign(super.applicationOptions, {
return Object.assign(super.applicationOptions, {
autoboot: true,
});
}
Expand Down
Expand Up @@ -4,7 +4,6 @@ import { addChildView, setElementView, setViewElement } from '@ember/-internals/
import { assert, debugFreeze } from '@ember/debug';
import { EMBER_COMPONENT_IS_VISIBLE } from '@ember/deprecated-features';
import { _instrumentStart } from '@ember/instrumentation';
import { assign } from '@ember/polyfills';
import { DEBUG } from '@glimmer/env';
import {
Bounds,
Expand Down Expand Up @@ -219,11 +218,11 @@ export default class CurlyComponentManager
named = {
[positionalParams]: createComputeRef(() => reifyPositional(captured)),
};
assign(named, args.named.capture());
Object.assign(named, args.named.capture());
} else if (Array.isArray(positionalParams) && positionalParams.length > 0) {
const count = Math.min(positionalParams.length, args.positional.length);
named = {};
assign(named, args.named.capture());
Object.assign(named, args.named.capture());

for (let i = 0; i < count; i++) {
// As of TS 3.7, tsc is giving us the following error on this line without the type annotation
Expand Down
Expand Up @@ -4,7 +4,6 @@ import { guidFor } from '@ember/-internals/utils';
import { assert } from '@ember/debug';
import EngineInstance from '@ember/engine/instance';
import { _instrumentStart } from '@ember/instrumentation';
import { assign } from '@ember/polyfills';
import {
CapturedArguments,
CompilableProgram,
Expand Down Expand Up @@ -205,7 +204,7 @@ export class OutletComponentDefinition

export function createRootOutlet(outletView: OutletView): OutletComponentDefinition {
if (ENV._APPLICATION_TEMPLATE_WRAPPER) {
const WRAPPED_CAPABILITIES = assign({}, CAPABILITIES, {
const WRAPPED_CAPABILITIES = Object.assign({}, CAPABILITIES, {
dynamicTag: true,
elementHook: true,
wrapped: true,
Expand Down

0 comments on commit 0158265

Please sign in to comment.