From c2a53328565775279a52ce7f13957a4e8dc766e2 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:17:53 -0400 Subject: [PATCH 01/12] Fix import type via upgrading @tsconfig/ember --- .../test-helpers/-internal/build-registry.ts | 2 +- .../test-helpers/-internal/debug-info.ts | 9 ++-- .../test-helpers/-internal/deprecations.ts | 2 +- .../@ember/test-helpers/-internal/warnings.ts | 2 +- .../@ember/test-helpers/build-owner.ts | 4 +- .../test-helpers/dom/-get-description.ts | 2 +- .../@ember/test-helpers/dom/-get-element.ts | 2 +- .../dom/-get-window-or-element.ts | 2 +- .../test-helpers/dom/-guard-for-maxlength.ts | 2 +- .../@ember/test-helpers/dom/-logging.ts | 2 +- .../@ember/test-helpers/dom/-target.ts | 9 ++-- .../@ember/test-helpers/dom/blur.ts | 2 +- .../@ember/test-helpers/dom/click.ts | 2 +- .../@ember/test-helpers/dom/double-click.ts | 2 +- .../@ember/test-helpers/dom/fill-in.ts | 4 +- .../@ember/test-helpers/dom/fire-event.ts | 2 +- .../@ember/test-helpers/dom/focus.ts | 2 +- .../@ember/test-helpers/dom/scroll-to.ts | 3 +- .../@ember/test-helpers/dom/select.ts | 2 +- .../@ember/test-helpers/dom/tab.ts | 3 +- .../@ember/test-helpers/dom/tap.ts | 2 +- .../@ember/test-helpers/dom/trigger-event.ts | 2 +- .../test-helpers/dom/trigger-key-event.ts | 4 +- .../@ember/test-helpers/dom/type-in.ts | 7 +-- .../@ember/test-helpers/index.ts | 4 +- .../@ember/test-helpers/settled.ts | 48 ++++++++++++------- .../test-helpers/setup-application-context.ts | 4 +- .../@ember/test-helpers/setup-context.ts | 6 +-- .../@ember/test-helpers/setup-onerror.ts | 2 +- .../test-helpers/setup-rendering-context.ts | 6 +-- .../@ember/test-helpers/teardown-context.ts | 2 +- .../@ember/test-helpers/test-metadata.ts | 2 +- addon/package.json | 4 +- pnpm-lock.yaml | 12 ++--- 34 files changed, 95 insertions(+), 70 deletions(-) diff --git a/addon/addon-test-support/@ember/test-helpers/-internal/build-registry.ts b/addon/addon-test-support/@ember/test-helpers/-internal/build-registry.ts index 2d3f26c14..64065f8b4 100644 --- a/addon/addon-test-support/@ember/test-helpers/-internal/build-registry.ts +++ b/addon/addon-test-support/@ember/test-helpers/-internal/build-registry.ts @@ -6,7 +6,7 @@ import EmberObject from '@ember/object'; import require, { has } from 'require'; import Ember from 'ember'; -import { FullName } from '@ember/owner'; +import type { FullName } from '@ember/owner'; // These shenanigans work around the fact that the import locations are not // public API and are not stable, so we jump through hoops to get the right diff --git a/addon/addon-test-support/@ember/test-helpers/-internal/debug-info.ts b/addon/addon-test-support/@ember/test-helpers/-internal/debug-info.ts index 4fd66a07f..866723a18 100644 --- a/addon/addon-test-support/@ember/test-helpers/-internal/debug-info.ts +++ b/addon/addon-test-support/@ember/test-helpers/-internal/debug-info.ts @@ -2,9 +2,12 @@ // "provides" this public API, but does not for earlier versions. As a result, // this type will be `any`. import { _backburner } from '@ember/runloop'; -import { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner'; -import { DebugInfoHelper, debugInfoHelpers } from './debug-info-helpers'; -import { getPendingWaiterState, PendingWaiterState } from '@ember/test-waiters'; +import type { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner'; +import { type DebugInfoHelper, debugInfoHelpers } from './debug-info-helpers'; +import { + getPendingWaiterState, + type PendingWaiterState, +} from '@ember/test-waiters'; const PENDING_AJAX_REQUESTS = 'Pending AJAX requests'; const PENDING_TEST_WAITERS = 'Pending test waiters'; diff --git a/addon/addon-test-support/@ember/test-helpers/-internal/deprecations.ts b/addon/addon-test-support/@ember/test-helpers/-internal/deprecations.ts index 332922291..ac0385ecf 100644 --- a/addon/addon-test-support/@ember/test-helpers/-internal/deprecations.ts +++ b/addon/addon-test-support/@ember/test-helpers/-internal/deprecations.ts @@ -1,4 +1,4 @@ -import { BaseContext } from '../setup-context'; +import type { BaseContext } from '../setup-context'; import { registerDeprecationHandler } from '@ember/debug'; import isPromise from './is-promise'; diff --git a/addon/addon-test-support/@ember/test-helpers/-internal/warnings.ts b/addon/addon-test-support/@ember/test-helpers/-internal/warnings.ts index a71b033af..373287e78 100644 --- a/addon/addon-test-support/@ember/test-helpers/-internal/warnings.ts +++ b/addon/addon-test-support/@ember/test-helpers/-internal/warnings.ts @@ -1,4 +1,4 @@ -import { BaseContext } from '../setup-context'; +import type { BaseContext } from '../setup-context'; import { registerWarnHandler } from '@ember/debug'; import isPromise from './is-promise'; diff --git a/addon/addon-test-support/@ember/test-helpers/build-owner.ts b/addon/addon-test-support/@ember/test-helpers/build-owner.ts index 4123927cf..7fda491fb 100644 --- a/addon/addon-test-support/@ember/test-helpers/build-owner.ts +++ b/addon/addon-test-support/@ember/test-helpers/build-owner.ts @@ -2,8 +2,8 @@ import Application from '@ember/application'; import type { Resolver } from '@ember/owner'; import legacyBuildRegistry from './-internal/build-registry'; -import EmberOwner from '@ember/owner'; -import { SimpleElement } from '@simple-dom/interface'; +import type EmberOwner from '@ember/owner'; +import type { SimpleElement } from '@simple-dom/interface'; export interface Owner extends EmberOwner { _emberTestHelpersMockOwner?: boolean; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-get-description.ts b/addon/addon-test-support/@ember/test-helpers/dom/-get-description.ts index 26172c3b6..0349e415d 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-get-description.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-get-description.ts @@ -1,5 +1,5 @@ import { isDescriptor, lookupDescriptorData } from 'dom-element-descriptors'; -import type Target from './-target'; +import type { Target } from './-target'; /** Used internally by the DOM interaction helpers to get a description of a diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-get-element.ts b/addon/addon-test-support/@ember/test-helpers/dom/-get-element.ts index 801c674d6..d9183916c 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-get-element.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-get-element.ts @@ -1,5 +1,5 @@ import getRootElement from './get-root-element'; -import Target, { isDocument, isElement } from './-target'; +import { type Target, isDocument, isElement } from './-target'; import { type IDOMElementDescriptor, lookupDescriptorData, diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-get-window-or-element.ts b/addon/addon-test-support/@ember/test-helpers/dom/-get-window-or-element.ts index 82a6e6a76..4217c03e3 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-get-window-or-element.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-get-window-or-element.ts @@ -1,5 +1,5 @@ import getElement from './-get-element'; -import Target, { isWindow } from './-target'; +import { type Target, isWindow } from './-target'; /** Used internally by the DOM interaction helpers to find either window or an element. diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-guard-for-maxlength.ts b/addon/addon-test-support/@ember/test-helpers/dom/-guard-for-maxlength.ts index 084db9b8d..537225e24 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-guard-for-maxlength.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-guard-for-maxlength.ts @@ -1,4 +1,4 @@ -import { FormControl } from './-is-form-control'; +import type { FormControl } from './-is-form-control'; // ref: https://html.spec.whatwg.org/multipage/input.html#concept-input-apply const constrainedInputTypes = [ diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-logging.ts b/addon/addon-test-support/@ember/test-helpers/dom/-logging.ts index 8d7508f15..0a7dc51f9 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-logging.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-logging.ts @@ -1,4 +1,4 @@ -import Target from './-target'; +import type { Target } from './-target'; /** * Logs a debug message to the console if the `testHelperLogging` query diff --git a/addon/addon-test-support/@ember/test-helpers/dom/-target.ts b/addon/addon-test-support/@ember/test-helpers/dom/-target.ts index 27d27aaa1..ca141b957 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/-target.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/-target.ts @@ -1,8 +1,11 @@ import type { IDOMElementDescriptor } from 'dom-element-descriptors'; -type Target = string | Element | IDOMElementDescriptor | Document | Window; - -export default Target; +export type Target = + | string + | Element + | IDOMElementDescriptor + | Document + | Window; export interface HTMLElementContentEditable extends HTMLElement { isContentEditable: true; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/blur.ts b/addon/addon-test-support/@ember/test-helpers/dom/blur.ts index 87c49c4d3..aa397756d 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/blur.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/blur.ts @@ -1,7 +1,7 @@ import getElement from './-get-element'; import fireEvent from './fire-event'; import settled from '../settled'; -import Target from './-target'; +import type { Target } from './-target'; import { log } from './-logging'; import isFocusable from './-is-focusable'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/click.ts b/addon/addon-test-support/@ember/test-helpers/dom/click.ts index ef12bbfa9..e0ec10a1d 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/click.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/click.ts @@ -3,7 +3,7 @@ import fireEvent from './fire-event'; import { __focus__ } from './focus'; import settled from '../settled'; import isFormControl from './-is-form-control'; -import Target, { isWindow } from './-target'; +import { isWindow, type Target } from './-target'; import { log } from './-logging'; import { runHooks, registerHook } from '../helper-hooks'; import getDescription from './-get-description'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/double-click.ts b/addon/addon-test-support/@ember/test-helpers/dom/double-click.ts index 20d40ea48..0179dc380 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/double-click.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/double-click.ts @@ -3,7 +3,7 @@ import fireEvent from './fire-event'; import { __focus__ } from './focus'; import settled from '../settled'; import { DEFAULT_CLICK_OPTIONS } from './click'; -import Target, { isWindow } from './-target'; +import { isWindow, type Target } from './-target'; import { log } from './-logging'; import isFormControl from './-is-form-control'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/fill-in.ts b/addon/addon-test-support/@ember/test-helpers/dom/fill-in.ts index ff6b515d8..5510ad881 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/fill-in.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/fill-in.ts @@ -1,10 +1,10 @@ import getElement from './-get-element'; -import isFormControl, { FormControl } from './-is-form-control'; +import isFormControl, { type FormControl } from './-is-form-control'; import guardForMaxlength from './-guard-for-maxlength'; import { __focus__ } from './focus'; import settled from '../settled'; import fireEvent from './fire-event'; -import Target, { isContentEditable } from './-target'; +import { isContentEditable, type Target } from './-target'; import { log } from './-logging'; import { runHooks, registerHook } from '../helper-hooks'; import getDescription from './-get-description'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/fire-event.ts b/addon/addon-test-support/@ember/test-helpers/dom/fire-event.ts index dee0b716e..87dddae66 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/fire-event.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/fire-event.ts @@ -1,6 +1,6 @@ import { isDocument, isElement } from './-target'; import tuple from '../-tuple'; -import Target from './-target'; +import type { Target } from './-target'; import { log } from './-logging'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/focus.ts b/addon/addon-test-support/@ember/test-helpers/dom/focus.ts index 5ad6d65de..a75e7b1a3 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/focus.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/focus.ts @@ -2,7 +2,7 @@ import getElement from './-get-element'; import fireEvent from './fire-event'; import settled from '../settled'; import isFocusable from './-is-focusable'; -import Target, { isDocument } from './-target'; +import { isDocument, type Target } from './-target'; import { log } from './-logging'; import { runHooks, registerHook } from '../helper-hooks'; import { __blur__ } from './blur'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/scroll-to.ts b/addon/addon-test-support/@ember/test-helpers/dom/scroll-to.ts index 41c201086..5d45cfe76 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/scroll-to.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/scroll-to.ts @@ -1,7 +1,8 @@ import getElement from './-get-element'; import fireEvent from './fire-event'; import settled from '../settled'; -import Target, { isDocument, isElement } from './-target'; +import type { Target } from './-target'; +import { isDocument, isElement } from './-target'; import { runHooks } from '../helper-hooks'; import type { IDOMElementDescriptor } from 'dom-element-descriptors'; import getDescription from './-get-description'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/select.ts b/addon/addon-test-support/@ember/test-helpers/dom/select.ts index eca24089e..4110f7fcd 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/select.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/select.ts @@ -3,7 +3,7 @@ import isSelectElement from './-is-select-element'; import { __focus__ } from './focus'; import settled from '../settled'; import fireEvent from './fire-event'; -import Target from './-target'; +import type { Target } from './-target'; import { runHooks } from '../helper-hooks'; import getDescription from './-get-description'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/tab.ts b/addon/addon-test-support/@ember/test-helpers/dom/tab.ts index 52b45c326..50d776921 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/tab.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/tab.ts @@ -1,7 +1,8 @@ import getRootElement from './get-root-element'; import settled from '../settled'; import fireEvent, { _buildKeyboardEvent } from './fire-event'; -import Target, { isDocument } from './-target'; +import type { Target } from './-target'; +import { isDocument } from './-target'; import { __blur__ } from './blur'; import { __focus__ } from './focus'; import { isVisible, isDisabled } from '../-utils'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/tap.ts b/addon/addon-test-support/@ember/test-helpers/dom/tap.ts index f73bce36b..855b40beb 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/tap.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/tap.ts @@ -2,7 +2,7 @@ import getElement from './-get-element'; import fireEvent from './fire-event'; import { __click__ } from './click'; import settled from '../settled'; -import Target from './-target'; +import type { Target } from './-target'; import { log } from './-logging'; import isFormControl from './-is-form-control'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/trigger-event.ts b/addon/addon-test-support/@ember/test-helpers/dom/trigger-event.ts index 766aece51..59d8939d1 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/trigger-event.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/trigger-event.ts @@ -1,7 +1,7 @@ import { getWindowOrElement } from './-get-window-or-element'; import fireEvent from './fire-event'; import settled from '../settled'; -import Target from './-target'; +import type { Target } from './-target'; import { log } from './-logging'; import isFormControl from './-is-form-control'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/trigger-key-event.ts b/addon/addon-test-support/@ember/test-helpers/dom/trigger-key-event.ts index de2b51403..1dec313d5 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/trigger-key-event.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/trigger-key-event.ts @@ -3,11 +3,11 @@ import fireEvent from './fire-event'; import settled from '../settled'; import { KEYBOARD_EVENT_TYPES, - KeyboardEventType, + type KeyboardEventType, isKeyboardEventType, } from './fire-event'; import { isNumeric } from '../-utils'; -import Target from './-target'; +import type { Target } from './-target'; import { log } from './-logging'; import isFormControl from './-is-form-control'; import { runHooks, registerHook } from '../helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/dom/type-in.ts b/addon/addon-test-support/@ember/test-helpers/dom/type-in.ts index 856cf1166..ea903ed7a 100644 --- a/addon/addon-test-support/@ember/test-helpers/dom/type-in.ts +++ b/addon/addon-test-support/@ember/test-helpers/dom/type-in.ts @@ -1,13 +1,14 @@ import settled from '../settled'; import getElement from './-get-element'; -import isFormControl, { FormControl } from './-is-form-control'; +import isFormControl, { type FormControl } from './-is-form-control'; import { __focus__ } from './focus'; import fireEvent from './fire-event'; import guardForMaxlength from './-guard-for-maxlength'; -import Target, { +import { + type Target, isContentEditable, isDocument, - HTMLElementContentEditable, + type HTMLElementContentEditable, } from './-target'; import { __triggerKeyEvent__ } from './trigger-key-event'; import { log } from './-logging'; diff --git a/addon/addon-test-support/@ember/test-helpers/index.ts b/addon/addon-test-support/@ember/test-helpers/index.ts index c547d687e..0e1d953e3 100644 --- a/addon/addon-test-support/@ember/test-helpers/index.ts +++ b/addon/addon-test-support/@ember/test-helpers/index.ts @@ -1,4 +1,4 @@ -import { +import type { Backburner, DeferredActionQueues, } from '@ember/runloop/-private/backburner'; @@ -74,7 +74,7 @@ export { default as find } from './dom/find'; export { default as findAll } from './dom/find-all'; export { default as typeIn } from './dom/type-in'; export { default as scrollTo } from './dom/scroll-to'; -export type { default as Target } from './dom/-target'; +export type { Target } from './dom/-target'; // Declaration-merge for our internal purposes. declare module '@ember/runloop' { diff --git a/addon/addon-test-support/@ember/test-helpers/settled.ts b/addon/addon-test-support/@ember/test-helpers/settled.ts index 8447a573f..7d3045879 100644 --- a/addon/addon-test-support/@ember/test-helpers/settled.ts +++ b/addon/addon-test-support/@ember/test-helpers/settled.ts @@ -11,7 +11,8 @@ import { nextTick } from './-utils'; import waitUntil from './wait-until'; import { hasPendingTransitions } from './setup-application-context'; import { hasPendingWaiters } from '@ember/test-waiters'; -import DebugInfo, { TestDebugInfo } from './-internal/debug-info'; +import type DebugInfo from './-internal/debug-info'; +import { TestDebugInfo } from './-internal/debug-info'; // Ember internally tracks AJAX requests in the same way that we do here for // legacy style "acceptance" tests using the `ember-testing.js` asset provided @@ -42,7 +43,10 @@ const _internalGetPendingRequestsCount = () => { return 0; }; -if (typeof jQuery !== 'undefined' && _internalPendingRequestsModule) { +if ( + typeof (globalThis as any).jQuery !== 'undefined' && + _internalPendingRequestsModule +) { // This exists to ensure that the AJAX listeners setup by Ember itself // (which as of 2.17 are not properly torn down) get cleared and released // when the application is destroyed. Without this, any AJAX requests @@ -52,14 +56,18 @@ if (typeof jQuery !== 'undefined' && _internalPendingRequestsModule) { // This can be removed once Ember 4.0.0 is released EmberApplicationInstance.reopen({ willDestroy(this: EmberApplicationInstance, ...args: any[]) { - jQuery(document).off( - 'ajaxSend', - _internalPendingRequestsModule.incrementPendingRequests - ); - jQuery(document).off( - 'ajaxComplete', - _internalPendingRequestsModule.decrementPendingRequests - ); + (globalThis as any) + .jQuery(document) + .off( + 'ajaxSend', + _internalPendingRequestsModule.incrementPendingRequests + ); + (globalThis as any) + .jQuery(document) + .off( + 'ajaxComplete', + _internalPendingRequestsModule.decrementPendingRequests + ); _internalPendingRequestsModule.clearPendingRequests(); @@ -128,12 +136,16 @@ export function _teardownAJAXHooks() { // We can no longer handle any remaining requests requests = []; - if (typeof jQuery === 'undefined') { + if (typeof (globalThis as any).jQuery === 'undefined') { return; } - jQuery(document).off('ajaxSend', incrementAjaxPendingRequests); - jQuery(document).off('ajaxComplete', decrementAjaxPendingRequests); + (globalThis as any) + .jQuery(document) + .off('ajaxSend', incrementAjaxPendingRequests); + (globalThis as any) + .jQuery(document) + .off('ajaxComplete', decrementAjaxPendingRequests); } /** @@ -144,12 +156,16 @@ export function _teardownAJAXHooks() { export function _setupAJAXHooks() { requests = []; - if (typeof jQuery === 'undefined') { + if (typeof (globalThis as any).jQuery === 'undefined') { return; } - jQuery(document).on('ajaxSend', incrementAjaxPendingRequests); - jQuery(document).on('ajaxComplete', decrementAjaxPendingRequests); + (globalThis as any) + .jQuery(document) + .on('ajaxSend', incrementAjaxPendingRequests); + (globalThis as any) + .jQuery(document) + .on('ajaxComplete', decrementAjaxPendingRequests); } let _internalCheckWaiters: Function; diff --git a/addon/addon-test-support/@ember/test-helpers/setup-application-context.ts b/addon/addon-test-support/@ember/test-helpers/setup-application-context.ts index 68b6e087e..996d7d0f3 100644 --- a/addon/addon-test-support/@ember/test-helpers/setup-application-context.ts +++ b/addon/addon-test-support/@ember/test-helpers/setup-application-context.ts @@ -1,9 +1,9 @@ import { get } from '@ember/object'; import { - BaseContext, + type BaseContext, getContext, isTestContext, - TestContext, + type TestContext, } from './setup-context'; import global from './global'; import hasEmberVersion from './has-ember-version'; diff --git a/addon/addon-test-support/@ember/test-helpers/setup-context.ts b/addon/addon-test-support/@ember/test-helpers/setup-context.ts index 98ad24bc9..bfec370ca 100644 --- a/addon/addon-test-support/@ember/test-helpers/setup-context.ts +++ b/addon/addon-test-support/@ember/test-helpers/setup-context.ts @@ -6,7 +6,7 @@ import { set, setProperties, get, getProperties } from '@ember/object'; import type { Resolver } from '@ember/owner'; import { setOwner } from '@ember/application'; -import buildOwner, { Owner } from './build-owner'; +import buildOwner, { type Owner } from './build-owner'; import { _setupAJAXHooks, _teardownAJAXHooks } from './settled'; import { _prepareOnerror } from './setup-onerror'; import Ember from 'ember'; @@ -26,12 +26,12 @@ import { import { getDeprecationsForContext, getDeprecationsDuringCallbackForContext, - DeprecationFailure, + type DeprecationFailure, } from './-internal/deprecations'; import { getWarningsForContext, getWarningsDuringCallbackForContext, - Warning, + type Warning, } from './-internal/warnings'; export interface SetupContextOptions { diff --git a/addon/addon-test-support/@ember/test-helpers/setup-onerror.ts b/addon/addon-test-support/@ember/test-helpers/setup-onerror.ts index a0940db3e..8f28953e3 100644 --- a/addon/addon-test-support/@ember/test-helpers/setup-onerror.ts +++ b/addon/addon-test-support/@ember/test-helpers/setup-onerror.ts @@ -1,5 +1,5 @@ import Ember from 'ember'; -import { BaseContext, getContext } from './setup-context'; +import { type BaseContext, getContext } from './setup-context'; let cachedOnerror: Map void) | undefined> = new Map(); diff --git a/addon/addon-test-support/@ember/test-helpers/setup-rendering-context.ts b/addon/addon-test-support/@ember/test-helpers/setup-rendering-context.ts index a6ab4cd58..91c4808af 100644 --- a/addon/addon-test-support/@ember/test-helpers/setup-rendering-context.ts +++ b/addon/addon-test-support/@ember/test-helpers/setup-rendering-context.ts @@ -3,15 +3,15 @@ import { run } from '@ember/runloop'; import Ember from 'ember'; import global from './global'; import { - BaseContext, - TestContext, + type BaseContext, + type TestContext, isTestContext, getContext, } from './setup-context'; import settled from './settled'; import { hbs } from 'ember-cli-htmlbars'; import getRootElement from './dom/get-root-element'; -import { Owner } from './build-owner'; +import type { Owner } from './build-owner'; import getTestMetadata from './test-metadata'; import { assert } from '@ember/debug'; import { runHooks } from './helper-hooks'; diff --git a/addon/addon-test-support/@ember/test-helpers/teardown-context.ts b/addon/addon-test-support/@ember/test-helpers/teardown-context.ts index 304e286a3..287a8d744 100644 --- a/addon/addon-test-support/@ember/test-helpers/teardown-context.ts +++ b/addon/addon-test-support/@ember/test-helpers/teardown-context.ts @@ -1,4 +1,4 @@ -import { TestContext } from './setup-context'; +import type { TestContext } from './setup-context'; import settled from './settled'; import { _cleanupOnerror } from './setup-onerror'; import { destroy } from '@ember/destroyable'; diff --git a/addon/addon-test-support/@ember/test-helpers/test-metadata.ts b/addon/addon-test-support/@ember/test-helpers/test-metadata.ts index 009d06bd7..ee1f643dc 100644 --- a/addon/addon-test-support/@ember/test-helpers/test-metadata.ts +++ b/addon/addon-test-support/@ember/test-helpers/test-metadata.ts @@ -1,4 +1,4 @@ -import { BaseContext } from './setup-context'; +import type { BaseContext } from './setup-context'; class TestMetadata { [key: string]: any; diff --git a/addon/package.json b/addon/package.json index e47a4a3e2..5da6eec92 100644 --- a/addon/package.json +++ b/addon/package.json @@ -63,9 +63,9 @@ "@ember/string": "^3.0.1", "@embroider/test-setup": "^4.0.0", "@glimmer/component": "^1.1.2", - "@glimmer/interfaces": "*", + "@glimmer/interfaces": ">= 0.92.0", "@glint/template": "^1.4.0", - "@tsconfig/ember": "^1.0.1", + "@tsconfig/ember": "^3.0.8", "@types/jquery": "^3.5.16", "@types/rsvp": "^4.0.4", "@typescript-eslint/eslint-plugin": "^5.59.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76d16868f..24365cbed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,14 +64,14 @@ importers: specifier: ^1.1.2 version: 1.1.2(@babel/core@7.24.9) '@glimmer/interfaces': - specifier: '*' + specifier: '>= 0.92.0' version: 0.92.0 '@glint/template': specifier: ^1.4.0 version: 1.4.0 '@tsconfig/ember': - specifier: ^1.0.1 - version: 1.1.0 + specifier: ^3.0.8 + version: 3.0.8 '@types/jquery': specifier: ^3.5.16 version: 3.5.30 @@ -1205,8 +1205,8 @@ packages: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} - '@tsconfig/ember@1.1.0': - resolution: {integrity: sha512-VzIrPO7ZpnIEmU+dJe3ubEPhxUIyavwIh2vxg8rXrwSnB99hdVcq0ZFPQ4KRP0LrSNzaPI1QA2sATIPwnBYPQg==} + '@tsconfig/ember@3.0.8': + resolution: {integrity: sha512-OVnIsZIt/8q0VEtcdz3rRryNrm6gdJTxXlxefkGIrkZnME0wqslmwHlUEZ7mvh377df9FqBhNKrYNarhCW8zJA==} '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -8777,7 +8777,7 @@ snapshots: '@tootallnate/once@1.1.2': {} - '@tsconfig/ember@1.1.0': {} + '@tsconfig/ember@3.0.8': {} '@types/acorn@4.0.6': dependencies: From 7191af3303f0334da7362c17dd5efb5e2fdf3685 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:21:32 -0400 Subject: [PATCH 02/12] update type-tests --- addon/type-tests/api.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addon/type-tests/api.ts b/addon/type-tests/api.ts index 778d3c413..cf53654f6 100644 --- a/addon/type-tests/api.ts +++ b/addon/type-tests/api.ts @@ -47,7 +47,7 @@ import { unsetContext, teardownContext, setupRenderingContext, - RenderingTestContext, + type RenderingTestContext, getApplication, setApplication, setupApplicationContext, @@ -60,13 +60,13 @@ import { getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, - BaseContext, - TestContext, - TestMetadata, - DebugInfo as InternalDebugInfo, - DeprecationFailure, - Warning, - Target, + type BaseContext, + type TestContext, + type TestMetadata, + type DebugInfo as InternalDebugInfo, + type DeprecationFailure, + type Warning, + type Target, // Helper hooks registerHook, runHooks, @@ -74,12 +74,12 @@ import { type HookLabel, type HookUnregister, } from '@ember/test-helpers'; -import { ComponentInstance } from '@glimmer/interfaces'; -import { Owner } from '@ember/test-helpers/build-owner'; -import { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner'; +import type { ComponentInstance } from '@glimmer/interfaces'; +import type { Owner } from '@ember/test-helpers/build-owner'; +import type { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner'; import type { Resolver as EmberResolver } from '@ember/owner'; import Application from '@ember/application'; -import { TemplateFactory } from 'ember-cli-htmlbars'; +import type { TemplateFactory } from 'ember-cli-htmlbars'; import type { IDOMElementDescriptor } from 'dom-element-descriptors'; // DOM Interaction Helpers From 2f8cf9e708eb44d4106c9ca30c4d8d6784453be1 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:25:29 -0400 Subject: [PATCH 03/12] Drop support for TS < 5 --- .github/workflows/ci-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9b031bb7e..08de07dbe 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -102,9 +102,6 @@ jobs: fail-fast: false matrix: ts-version: - - 4.7 - - 4.8 - - 4.9 - 5.0 - 5.1 - 5.2 From f642ebc898aedc900a3658a0f54140ffed1af1ea Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:39:56 -0400 Subject: [PATCH 04/12] Re-add TS 4.7+, I think I can make it work --- .github/workflows/ci-build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 08de07dbe..293157fd0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -102,6 +102,9 @@ jobs: fail-fast: false matrix: ts-version: + - 4.7 + - 4.8 + - 4.9 - 5.0 - 5.1 - 5.2 @@ -121,6 +124,9 @@ jobs: - name: install TS version working-directory: addon run: pnpm add --save-dev typescript@${{matrix.ts-version}} - - name: test types + - name: own types working-directory: addon - run: pnpm lint:ts + run: pnpm tsc --noEmit + - name: public types + working-directory: addon + run: pnpm tsc --noEmit --project type-tests From 42ca54e78ce9ca3034c4d27d7a86ad9967f44992 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:48:51 -0400 Subject: [PATCH 05/12] We don't need to test our _source_ types against the TS version we support -- we only need to test the public API --- .github/workflows/ci-build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 293157fd0..4bc01d6c1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,6 +38,9 @@ jobs: - name: Install Dependencies run: pnpm install - run: pnpm test + - name: own types + working-directory: addon + run: pnpm tsc --noEmit floating: name: "Floating Dependencies" @@ -54,6 +57,9 @@ jobs: run: pnpm install --no-lockfile - name: Run Tests run: pnpm test + - name: own types + working-directory: addon + run: pnpm tsc --noEmit try-scenarios: timeout-minutes: 10 @@ -124,9 +130,6 @@ jobs: - name: install TS version working-directory: addon run: pnpm add --save-dev typescript@${{matrix.ts-version}} - - name: own types - working-directory: addon - run: pnpm tsc --noEmit - name: public types working-directory: addon run: pnpm tsc --noEmit --project type-tests From 82c3b9491c0315a1c33f6a26728ddb1823f580e9 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:23:56 -0400 Subject: [PATCH 06/12] Move types-tests to their own package --- .github/workflows/ci-build.yml | 9 ++++++--- addon/type-tests/tsconfig.json | 18 ------------------ pnpm-lock.yaml | 18 ++++++++++++++++++ pnpm-workspace.yaml | 1 + {addon/type-tests => type-tests}/api.ts | 0 type-tests/package.json | 17 +++++++++++++++++ type-tests/tsconfig.json | 12 ++++++++++++ type-tests/types/dummy/index.d.ts | 3 +++ type-tests/types/require.d.ts | 2 ++ 9 files changed, 59 insertions(+), 21 deletions(-) delete mode 100644 addon/type-tests/tsconfig.json rename {addon/type-tests => type-tests}/api.ts (100%) create mode 100644 type-tests/package.json create mode 100644 type-tests/tsconfig.json create mode 100644 type-tests/types/dummy/index.d.ts create mode 100644 type-tests/types/require.d.ts diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4bc01d6c1..e8c2e4abc 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -127,9 +127,12 @@ jobs: cache: pnpm - name: Install Dependencies run: pnpm install - - name: install TS version + - name: Build types for addon working-directory: addon + run: pnpm build + - name: install TS version + working-directory: type-tests run: pnpm add --save-dev typescript@${{matrix.ts-version}} - name: public types - working-directory: addon - run: pnpm tsc --noEmit --project type-tests + working-directory: type-tests + run: pnpm test diff --git a/addon/type-tests/tsconfig.json b/addon/type-tests/tsconfig.json deleted file mode 100644 index 75e4110fd..000000000 --- a/addon/type-tests/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "@tsconfig/ember", - "compilerOptions": { - "baseUrl": "..", - "paths": { - "@ember/test-helpers": [ - "./addon-test-support/@ember/test-helpers" - ], - "@ember/test-helpers/*": [ - "./addon-test-support/@ember/test-helpers/*" - ], - "*": [ - "types/*" - ] - } - }, - "include": ["api.ts", "../types/**/*"] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24365cbed..aab16144e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -184,6 +184,24 @@ importers: specifier: ^5.86.0 version: 5.93.0 + type-tests: + devDependencies: + '@ember/test-helpers': + specifier: workspace:* + version: link:../addon + '@tsconfig/ember': + specifier: ^3.0.8 + version: 3.0.8 + ember-source: + specifier: ~5.9.0 + version: 5.9.0(@babel/core@7.24.9)(@glimmer/component@1.1.2(@babel/core@7.24.9))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.93.0) + expect-type: + specifier: ^0.15.0 + version: 0.15.0 + typescript: + specifier: ^5.1.3 + version: 5.5.3 + packages: '@ampproject/remapping@2.3.0': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9cd2925e3..fda563ea0 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - "addon" +- "type-tests" diff --git a/addon/type-tests/api.ts b/type-tests/api.ts similarity index 100% rename from addon/type-tests/api.ts rename to type-tests/api.ts diff --git a/type-tests/package.json b/type-tests/package.json new file mode 100644 index 000000000..8e300effc --- /dev/null +++ b/type-tests/package.json @@ -0,0 +1,17 @@ +{ + "name": "type-tests", + "private": true, + "scripts": { + "test": "tsc --noEmit" + }, + "volta": { + "extends": "../package.json" + }, + "devDependencies": { + "@ember/test-helpers": "workspace:*", + "@tsconfig/ember": "^3.0.8", + "ember-source": "~5.9.0", + "expect-type": "^0.15.0", + "typescript": "^5.1.3" + } +} diff --git a/type-tests/tsconfig.json b/type-tests/tsconfig.json new file mode 100644 index 000000000..5aca4bfd3 --- /dev/null +++ b/type-tests/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@tsconfig/ember", + "compilerOptions": { + "baseUrl": "..", + "paths": { + "*": [ + "types/*" + ] + } + }, + "include": ["api.ts", "./types/**/*"] +} diff --git a/type-tests/types/dummy/index.d.ts b/type-tests/types/dummy/index.d.ts new file mode 100644 index 000000000..bcfb9fabf --- /dev/null +++ b/type-tests/types/dummy/index.d.ts @@ -0,0 +1,3 @@ +import 'ember-source/types'; +// For ember versions <5.1 +import 'ember-source/types/preview'; diff --git a/type-tests/types/require.d.ts b/type-tests/types/require.d.ts new file mode 100644 index 000000000..3b0f0876b --- /dev/null +++ b/type-tests/types/require.d.ts @@ -0,0 +1,2 @@ +export default function (moduleName: string): T; +export function has(moduleName: string): boolean; From 75c315637276417f973e776624870851e488b603 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:27:24 -0400 Subject: [PATCH 07/12] Remove type-tests reference from addon --- addon/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/package.json b/addon/package.json index 5da6eec92..3e7d7e12c 100644 --- a/addon/package.json +++ b/addon/package.json @@ -34,7 +34,7 @@ "lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'", "lint:js": "eslint --cache .", "lint:js:fix": "eslint . --fix", - "lint:ts": "tsc --noEmit && tsc --noEmit --project type-tests", + "lint:ts": "tsc --noEmit", "postpublish": "pnpm clean", "release": "release-it", "start": "ember serve", From 7ea3c6fd04b52e6fa3ed47846f13725e455a4fea Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:41:31 -0400 Subject: [PATCH 08/12] Build the addons types in every job --- .github/workflows/ci-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e8c2e4abc..71ba13dfc 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -37,6 +37,9 @@ jobs: cache: pnpm - name: Install Dependencies run: pnpm install + - name: Build addon + working-directory: addon + run: pnpm build - run: pnpm test - name: own types working-directory: addon @@ -94,6 +97,9 @@ jobs: cache: pnpm - name: Install Dependencies run: pnpm install + - name: Build addon + working-directory: addon + run: pnpm build - name: test working-directory: addon run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup From 2afdf26592cfec8c3d7ad3f2100c4a4f37bc8ea2 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:44:18 -0400 Subject: [PATCH 09/12] Add a missing dependency for the tests --- pnpm-lock.yaml | 3 +++ type-tests/api.ts | 2 -- type-tests/package.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aab16144e..fe603e86e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -192,6 +192,9 @@ importers: '@tsconfig/ember': specifier: ^3.0.8 version: 3.0.8 + dom-element-descriptors: + specifier: ^0.5.0 + version: 0.5.1 ember-source: specifier: ~5.9.0 version: 5.9.0(@babel/core@7.24.9)(@glimmer/component@1.1.2(@babel/core@7.24.9))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.93.0) diff --git a/type-tests/api.ts b/type-tests/api.ts index cf53654f6..0504ec57c 100644 --- a/type-tests/api.ts +++ b/type-tests/api.ts @@ -74,12 +74,10 @@ import { type HookLabel, type HookUnregister, } from '@ember/test-helpers'; -import type { ComponentInstance } from '@glimmer/interfaces'; import type { Owner } from '@ember/test-helpers/build-owner'; import type { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner'; import type { Resolver as EmberResolver } from '@ember/owner'; import Application from '@ember/application'; -import type { TemplateFactory } from 'ember-cli-htmlbars'; import type { IDOMElementDescriptor } from 'dom-element-descriptors'; // DOM Interaction Helpers diff --git a/type-tests/package.json b/type-tests/package.json index 8e300effc..15b243884 100644 --- a/type-tests/package.json +++ b/type-tests/package.json @@ -10,6 +10,7 @@ "devDependencies": { "@ember/test-helpers": "workspace:*", "@tsconfig/ember": "^3.0.8", + "dom-element-descriptors": "^0.5.0", "ember-source": "~5.9.0", "expect-type": "^0.15.0", "typescript": "^5.1.3" From f59b5ad5d0467579b215593cc69ca7f504d5e75d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:46:31 -0400 Subject: [PATCH 10/12] Forgot to build in the floating tests --- .github/workflows/ci-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 71ba13dfc..591f8891d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -58,6 +58,9 @@ jobs: cache: pnpm - name: Install Dependencies run: pnpm install --no-lockfile + - name: Build addon + working-directory: addon + run: pnpm build - name: Run Tests run: pnpm test - name: own types From 338f1da543688aa726395cb1be441e58ddab2f6c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:48:15 -0400 Subject: [PATCH 11/12] Support TS 4.9, 4.8, 4.7 --- type-tests/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/type-tests/tsconfig.json b/type-tests/tsconfig.json index 5aca4bfd3..b2bea4874 100644 --- a/type-tests/tsconfig.json +++ b/type-tests/tsconfig.json @@ -1,7 +1,10 @@ { "extends": "@tsconfig/ember", "compilerOptions": { - "baseUrl": "..", + // Required to Support TS < v5 + // We can remove this setting when We only support TS v5+ + "moduleResolution": "node", + "baseUrl": ".", "paths": { "*": [ "types/*" From 63b1d5da81b70f6201389e1fee1451e7c164b6ad Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:02:18 -0400 Subject: [PATCH 12/12] Use an earlier version of tsconfig/ember since verbatimModuleSyntax doesn't exist pre TSv5 --- pnpm-lock.yaml | 9 +++++++-- type-tests/package.json | 2 +- type-tests/tsconfig.json | 5 ++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe603e86e..342205dc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -190,8 +190,8 @@ importers: specifier: workspace:* version: link:../addon '@tsconfig/ember': - specifier: ^3.0.8 - version: 3.0.8 + specifier: ^2.0.0 + version: 2.0.0 dom-element-descriptors: specifier: ^0.5.0 version: 0.5.1 @@ -1226,6 +1226,9 @@ packages: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} + '@tsconfig/ember@2.0.0': + resolution: {integrity: sha512-RzbDYYcjxVdG8Ki0xe99HN3+nHTZe6EBgw6N7B3yup7QogVFQQxA9nY7X80j1XzF15xqetwWiYfAjv5lkkp0/A==} + '@tsconfig/ember@3.0.8': resolution: {integrity: sha512-OVnIsZIt/8q0VEtcdz3rRryNrm6gdJTxXlxefkGIrkZnME0wqslmwHlUEZ7mvh377df9FqBhNKrYNarhCW8zJA==} @@ -8798,6 +8801,8 @@ snapshots: '@tootallnate/once@1.1.2': {} + '@tsconfig/ember@2.0.0': {} + '@tsconfig/ember@3.0.8': {} '@types/acorn@4.0.6': diff --git a/type-tests/package.json b/type-tests/package.json index 15b243884..00c7f5328 100644 --- a/type-tests/package.json +++ b/type-tests/package.json @@ -9,7 +9,7 @@ }, "devDependencies": { "@ember/test-helpers": "workspace:*", - "@tsconfig/ember": "^3.0.8", + "@tsconfig/ember": "^2.0.0", "dom-element-descriptors": "^0.5.0", "ember-source": "~5.9.0", "expect-type": "^0.15.0", diff --git a/type-tests/tsconfig.json b/type-tests/tsconfig.json index b2bea4874..c954d8d89 100644 --- a/type-tests/tsconfig.json +++ b/type-tests/tsconfig.json @@ -1,9 +1,8 @@ { + // Required to Support TS < v5 + // We can't upgrade @tsconfig ember until we only support TS v5+ "extends": "@tsconfig/ember", "compilerOptions": { - // Required to Support TS < v5 - // We can remove this setting when We only support TS v5+ - "moduleResolution": "node", "baseUrl": ".", "paths": { "*": [