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

[CLEANUP] Remove deprecated @ember/error package #20379

Merged
merged 3 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ function templateCompilerBundle(emberPackages, transpileTree) {
'@ember/canary-features/**',
'@ember/debug/**',
'@ember/deprecated-features/**',
'@ember/error/**',
'ember/version.js',
'ember-babel.js',
'ember-template-compiler/**',
Expand Down
57 changes: 0 additions & 57 deletions packages/@ember/error/index.ts

This file was deleted.

50 changes: 0 additions & 50 deletions packages/@ember/error/tests/index_test.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/@ember/error/type-tests/index.test.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ember/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import VERSION from './version';
import * as views from '@ember/-internals/views';
import ContainerDebugAdapter from '@ember/debug/container-debug-adapter';
import DataAdapter from '@ember/debug/data-adapter';
import EmberError from '@ember/error';
import { run } from '@ember/runloop';
import { getOnerror, setOnerror } from '@ember/-internals/error-handling';
import EmberArray, { A, NativeArray, isArray, makeArray } from '@ember/array';
Expand Down Expand Up @@ -279,9 +278,6 @@ const PartialEmber = {
// ****@ember/enumerable/mutable****
MutableEnumerable,

// ****@ember/error****
Error: EmberError,

// ****@ember/instrumentation****
instrument: instrumentation.instrument,
subscribe: instrumentation.subscribe,
Expand Down
3 changes: 0 additions & 3 deletions packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ let allExports = [
// @ember/enumerable
['Enumerable', '@ember/enumerable', 'default'],

// @ember/error
['Error', '@ember/error', 'default'],

// @ember/instrumentation
['instrument', '@ember/instrumentation', 'instrument'],
['subscribe', '@ember/instrumentation', 'subscribe'],
Expand Down
3 changes: 3 additions & 0 deletions smoke-tests/ember-test-app/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
2 changes: 1 addition & 1 deletion smoke-tests/ember-test-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
},
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
6 changes: 6 additions & 0 deletions smoke-tests/ember-test-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ yarn.lock
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
4 changes: 4 additions & 0 deletions smoke-tests/ember-test-app/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
3 changes: 3 additions & 0 deletions smoke-tests/ember-test-app/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
1 change: 0 additions & 1 deletion smoke-tests/ember-test-app/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EmberTestApp</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/ember-test-app/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.28.4",
"version": "4.8.0",
"blueprints": [
{
"name": "app",
Expand Down
8 changes: 2 additions & 6 deletions smoke-tests/ember-test-app/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
'use strict';

module.exports = function (environment) {
let ENV = {
const ENV = {
modulePrefix: 'ember-test-app',
environment,
rootURL: '/',
locationType: 'auto',
locationType: 'history',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},

APP: {
Expand Down
15 changes: 0 additions & 15 deletions smoke-tests/ember-test-app/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ const browsers = [
'last 1 Safari versions',
];

// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers,
};
2 changes: 1 addition & 1 deletion smoke-tests/ember-test-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
let app = new EmberApp(defaults, {
const app = new EmberApp(defaults, {
// Add options here
});

Expand Down
55 changes: 27 additions & 28 deletions smoke-tests/ember-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,53 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint": "npm-run-all --print-name --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --print-name --aggregate-output --continue-on-error --parallel \"lint:*:fix\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test": "npm-run-all --print-name \"lint\" \"test:*\"",
"test:ember": "ember test"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.4.2",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@ember/test-helpers": "^2.8.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^2.2.4",
"ember-cli": "~3.28.4",
"ember-auto-import": "^2.4.3",
"ember-cli": "~4.8.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.6",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-babel": "^7.26.11",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-htmlbars": "^6.1.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "~3.28.0",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.1",
"ember-data": "~4.11.0",
"ember-fetch": "^8.1.2",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.28.0",
"ember-template-lint": "^3.6.0",
"ember-welcome-page": "^4.0.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^6.0.0",
"ember-resolver": "^8.0.3",
"ember-source": "~4.8.0",
"ember-template-lint": "^4.16.1",
"ember-welcome-page": "^6.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-ember": "^11.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.1",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^1.6.0",
"webpack": "^5.65.0"
"prettier": "^2.7.1",
"qunit": "^2.19.2",
"qunit-dom": "^2.0.0",
"webpack": "^5.74.0"
},
"engines": {
"node": "14.* || 16.* || >= 18"
Expand Down
Empty file.
42 changes: 42 additions & 0 deletions smoke-tests/ember-test-app/tests/helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
setupApplicationTest as upstreamSetupApplicationTest,
setupRenderingTest as upstreamSetupRenderingTest,
setupTest as upstreamSetupTest,
} from 'ember-qunit';

// This file exists to provide wrappers around ember-qunit's / ember-mocha's
// test setup functions. This way, you can easily extend the setup that is
// needed per test type.

function setupApplicationTest(hooks, options) {
upstreamSetupApplicationTest(hooks, options);

// Additional setup for application tests can be done here.
//
// For example, if you need an authenticated session for each
// application test, you could do:
//
// hooks.beforeEach(async function () {
// await authenticateSession(); // ember-simple-auth
// });
//
// This is also a good place to call test setup functions coming
// from other addons:
//
// setupIntl(hooks); // ember-intl
// setupMirage(hooks); // ember-cli-mirage
}

function setupRenderingTest(hooks, options) {
upstreamSetupRenderingTest(hooks, options);

// Additional setup for rendering tests can be done here.
}

function setupTest(hooks, options) {
upstreamSetupTest(hooks, options);

// Additional setup for unit tests can be done here.
}

export { setupApplicationTest, setupRenderingTest, setupTest };
1 change: 0 additions & 1 deletion smoke-tests/ember-test-app/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EmberTestApp Tests</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
Loading