Skip to content

Commit 7eedf46

Browse files
committed
Fix ember linting/type issues
1 parent e224a41 commit 7eedf46

File tree

6 files changed

+36
-12
lines changed

6 files changed

+36
-12
lines changed

packages/ember/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
"build:extras": "yarn build",
2222
"build:npm": "ember ts:precompile && npm pack && ember ts:clean",
2323
"clean": "yarn rimraf sentry-ember-*.tgz",
24-
"lint": "npm-run-all --print-name --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
24+
"lint": "run-s lint:js lint:hbs lint:ts",
2525
"lint:hbs": "ember-template-lint .",
2626
"lint:js": "eslint . --cache --cache-location '../../eslintcache/'",
27+
"lint:ts": "tsc",
2728
"start": "ember serve",
2829
"test:ember": "ember test",
2930
"test:ember-all": "ember try:each",
3031
"test": "npm-run-all --print-name \"lint\" \"test:*\"",
31-
"test:all": "node ./scripts/run-CI-tests.js"
32+
"test:all": "node ./scripts/run-CI-tests.js",
33+
"prepack": "ember ts:precompile",
34+
"postpack": "ember ts:clean"
3235
},
3336
"dependencies": {
3437
"@embroider/macros": "^1.9.0",
@@ -39,7 +42,7 @@
3942
"ember-auto-import": "^1.12.1 || ^2.4.3",
4043
"ember-cli-babel": "^7.26.11",
4144
"ember-cli-htmlbars": "^6.1.1",
42-
"ember-cli-typescript": "^4.2.1"
45+
"ember-cli-typescript": "^5.1.1"
4346
},
4447
"devDependencies": {
4548
"@ember/optional-features": "~1.3.0",
@@ -78,6 +81,7 @@
7881
"loader.js": "~4.7.0",
7982
"qunit": "~2.19.2",
8083
"qunit-dom": "~2.0.0",
84+
"typescript": "~4.5.2",
8185
"webpack": "~5.74.0"
8286
},
8387
"engines": {

packages/ember/tests/acceptance/sentry-errors-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
3939
setupSentryTest(hooks);
4040

4141
test('Check "Throw Generic Javascript Error"', async function (assert) {
42+
assert.expect(3);
43+
4244
await visit('/');
4345
const button = find('[data-test-button="Throw Generic Javascript Error"]');
4446

@@ -49,6 +51,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
4951
});
5052

5153
test('Check "Throw EmberError"', async function (assert) {
54+
assert.expect(3);
55+
5256
await visit('/');
5357
const button = find('[data-test-button="Throw EmberError"]');
5458

@@ -59,6 +63,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
5963
});
6064

6165
test('Check "Caught Thrown EmberError"', async function (assert) {
66+
assert.expect(1);
67+
6268
await visit('/');
6369
const button = find('[data-test-button="Caught Thrown EmberError"]');
6470

@@ -68,6 +74,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
6874
});
6975

7076
test('Check "Error From Fetch"', async function (assert) {
77+
assert.expect(3);
78+
7179
this.fetchStub.onFirstCall().callsFake((...args) => {
7280
return this.fetchStub.callsThrough(args);
7381
});
@@ -86,6 +94,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
8694
});
8795

8896
test('Check "Error in AfterRender"', async function (assert) {
97+
assert.expect(4);
98+
8999
await visit('/');
90100
const button = find('[data-test-button="Error in AfterRender"]');
91101

@@ -97,6 +107,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
97107
});
98108

99109
test('Check "RSVP Rejection"', async function (assert) {
110+
assert.expect(4);
111+
100112
await visit('/');
101113
const button = find('[data-test-button="RSVP Rejection"]');
102114

@@ -108,6 +120,8 @@ module('Acceptance | Sentry Errors', function (hooks) {
108120
});
109121

110122
test('Check "Error inside RSVP"', async function (assert) {
123+
assert.expect(4);
124+
111125
await visit('/');
112126
const button = find('[data-test-button="Error inside RSVP"]');
113127

packages/ember/tests/acceptance/sentry-performance-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ module('Acceptance | Sentry Performance', function (hooks) {
5353
setupSentryTest(hooks);
5454

5555
test('Test transaction', async function (assert) {
56+
assert.expect(6);
57+
5658
await visit('/tracing');
5759

5860
assertSentryTransactionCount(assert, 1);
@@ -75,6 +77,8 @@ module('Acceptance | Sentry Performance', function (hooks) {
7577
});
7678

7779
test('Test navigating to slow route', async function (assert) {
80+
assert.expect(7);
81+
7882
await visit('/tracing');
7983
const button = find('[data-test-button="Transition to slow loading route"]');
8084

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import Controller from '@ember/controller';
2-
import { computed } from '@ember/object';
32

43
export default class SlowLoadingRouteController extends Controller {
5-
@computed()
6-
get slowLoadingTemplateOnlyItems() {
7-
return new Array(2000).fill(0).map((_, index) => index);
8-
}
4+
slowLoadingTemplateOnlyItems = new Array(2000).fill(0).map((_, index) => index);
95
}

packages/ember/tests/helpers/setup-sentry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export function setupSentryTest(hooks) {
1313
const errorMessages = [];
1414
this.errorMessages = errorMessages;
1515

16+
// eslint-disable-next-line ember/no-private-routing-service
1617
const routerMain = this.owner.lookup('router:main');
1718
const routerService = this.owner.lookup('service:router');
1819

yarn.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11094,10 +11094,10 @@ ember-cli-typescript@^2.0.2:
1109411094
stagehand "^1.0.0"
1109511095
walk-sync "^1.0.0"
1109611096

11097-
ember-cli-typescript@^4.2.1:
11098-
version "4.2.1"
11099-
resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-4.2.1.tgz#54d08fc90318cc986f3ea562f93ce58a6cc4c24d"
11100-
integrity sha512-0iKTZ+/wH6UB/VTWKvGuXlmwiE8HSIGcxHamwNhEC5x1mN3z8RfvsFZdQWYUzIWFN2Tek0gmepGRPTwWdBYl/A==
11097+
ember-cli-typescript@^5.1.1:
11098+
version "5.1.1"
11099+
resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-5.1.1.tgz#cf561026f3e7bd05312c1c212acffa1c30d5fa0c"
11100+
integrity sha512-DbzATYWY8nbXwSxXqtK8YlqGJTcyFyL+eg6IGCc2ur0AMnq/H+o6Z9np9eGoq1sI+HwX7vBkOVoD3k0WurAwXg==
1110111101
dependencies:
1110211102
ansi-to-html "^0.6.15"
1110311103
broccoli-stew "^3.0.0"
@@ -24626,6 +24626,11 @@ typescript@~4.0.2:
2462624626
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.8.tgz#5739105541db80a971fdbd0d56511d1a6f17d37f"
2462724627
integrity sha512-oz1765PN+imfz1MlZzSZPtC/tqcwsCyIYA8L47EkRnRW97ztRk83SzMiWLrnChC0vqoYxSU1fcFUDA5gV/ZiPg==
2462824628

24629+
typescript@~4.5.2:
24630+
version "4.5.5"
24631+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
24632+
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==
24633+
2462924634
ua-parser-js@^0.7.18, ua-parser-js@^0.7.30:
2463024635
version "0.7.31"
2463124636
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6"

0 commit comments

Comments
 (0)