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

Update dependencies / devDependencies to latest. #122

Merged
merged 2 commits into from
Feb 26, 2020
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
12 changes: 10 additions & 2 deletions addon/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
export {
WaiterName,
Token,
Primitive,
Waiter,
TestWaiter,
TestWaiterDebugInfo,
PendingWaiterState,
} from './types';

export {
register,
unregister,
Expand All @@ -9,5 +19,3 @@ export {

export { default as buildWaiter } from './build-waiter';
export { default as waitForPromise } from './wait-for-promise';

export * from './types';
3 changes: 2 additions & 1 deletion addon/wait-for-promise.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DEBUG } from '@glimmer/env';
import { Promise } from 'rsvp';
import buildWaiter from './build-waiter';

const PROMISE_WAITER = buildWaiter('promise-waiter');
Expand All @@ -24,7 +25,7 @@ const PROMISE_WAITER = buildWaiter('promise-waiter');
* }
* }
*/
export default function waitForPromise<T>(promise: Promise<T>, label?: string) {
export default function waitForPromise<T>(promise: Promise<T>, label?: string): Promise<T> {
let result = promise;

if (DEBUG) {
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,49 @@
"test:prod": "ember test --environment=production"
},
"dependencies": {
"ember-cli-babel": "^7.11.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-typescript": "^3.1.3",
"semver": "^7.1.3"
},
"devDependencies": {
"@ember/optional-features": "^0.7.0",
"@ember/optional-features": "^1.3.0",
"@glimmer/env": "^0.1.7",
"@types/ember": "^3.1.1",
"@types/ember-test-helpers": "^1.0.6",
"@types/ember-testing-helpers": "^0.0.3",
"@types/ember__test-helpers": "^0.7.7",
"@types/ember__test-helpers": "^0.7.9",
"@types/qunit": "^2.9.0",
"@types/rsvp": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"documentation": "^9.3.1",
"ember-cli": "~3.8.1",
"@types/rsvp": "^4.0.3",
"@typescript-eslint/eslint-plugin": "^2.21.0",
"@typescript-eslint/parser": "^2.21.0",
"documentation": "^12.1.4",
"ember-cli": "~3.16.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^4.2.3",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-test-loader": "^2.2.0",
"ember-cli-typescript": "^1.5.0",
"ember-cli-test-loader": "^3.0.0",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-cli-uglify": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^5.0.1",
"ember-source": "~3.7.0",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.2.1",
"eslint": "^5.16.0",
"eslint-config-prettier": "^6.9.0",
"ember-resolver": "^7.0.0",
"ember-source": "~3.16.3",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-ember": "^7.8.1",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"loader.js": "^4.7.0",
"prettier": "^1.18.2",
"qunit": "^2.9.2",
"release-it": "^12.2.1",
"prettier": "^1.19.1",
"qunit": "^2.9.3",
"release-it": "^12.6.1",
"release-it-lerna-changelog": "^1.0.3",
"typescript": "^3.7.4"
"typescript": "^3.8.2"
},
"engines": {
"node": "10.* || >= 12.*"
Expand Down
13 changes: 7 additions & 6 deletions tests/unit/wait-for-promise-test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import MockStableError, { overrideError, resetError } from './utils/mock-stable-error';
import { _reset, getPendingWaiterState, waitForPromise } from 'ember-test-waiters';
import { module, test } from 'qunit';
import { Promise } from 'rsvp';
import { _reset, waitForPromise, getPendingWaiterState } from 'ember-test-waiters';
import MockStableError, { resetError, overrideError } from './utils/mock-stable-error';

import { DEBUG } from '@glimmer/env';
import { Promise } from 'rsvp';

if (DEBUG) {
module('wait-for-promise', function(hooks) {
Expand All @@ -12,7 +13,7 @@ if (DEBUG) {
});

test('waitForPromise wraps and registers a waiter', async function(assert) {
let promise: Promise<{}> = new Promise(resolve => {
let promise = new Promise(resolve => {
resolve();
});

Expand All @@ -38,7 +39,7 @@ if (DEBUG) {
});

test('waitForPromise transitions waiter to not pending even if promise throws', async function(assert) {
let promise: Promise<{}> = Promise.resolve().then(() => {
let promise = Promise.resolve().then(() => {
throw new Error('Promise threw');
});

Expand All @@ -50,7 +51,7 @@ if (DEBUG) {
});

test('waitForPromise transitions waiter to not pending even if promise throws when thenable wrapped', async function(assert) {
let promise: Promise<{}> = Promise.resolve().then(() => {
let promise = Promise.resolve().then(() => {
throw new Error('Promise threw');
});

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"inlineSources": true,
"baseUrl": ".",
"module": "es6",
"experimentalDecorators": true,
"paths": {
"dummy/tests/*": [
"tests/*"
Expand Down
6 changes: 6 additions & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Types for compiled templates
declare module 'ember-test-waiters/templates/*' {
import { TemplateFactory } from 'htmlbars-inline-precompile';
const tmpl: TemplateFactory;
export default tmpl;
}
Loading