Skip to content

Commit

Permalink
Use shared type tests for preview and stable types
Browse files Browse the repository at this point in the history
This guarantees that we will be testing exactly what our consumers use,
with the only difference being the specific import paths used to expose
the side effect modules. It also keeps the type tests from diverging
between the two sets of types.

Previously, following the DefinitelyTyped approach, all the preview
type modules had their own `tsconfig.json`, but this actually made them
fail to interoperate with stable types, and this approach *only* works
if they work together. Removing those means they operate as a single
coherent set of type definitions with the stable types, distinguished
*only* by the way they are authored.
  • Loading branch information
chriskrycho committed Nov 30, 2022
1 parent ed4a6e9 commit 74c2895
Show file tree
Hide file tree
Showing 111 changed files with 7 additions and 293 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@
"test:blueprints": "yarn test:blueprints:js && yarn test:blueprints:ts",
"test:node": "qunit tests/node/**/*-test.js",
"test:browserstack": "node bin/run-browserstack-tests.js",
"type-check:packages": "tsc --noEmit",
"type-check:stable": "tsc --noEmit --project type-tests/stable",
"type-check:preview": "tsc --noEmit --project type-tests/preview",
"type-check:internals": "tsc --noEmit",
"type-check:types": "tsc --noEmit --project type-tests",
"type-check": "npm-run-all type-check:*"
},
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions type-tests/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This is equivalent to the import we have end users write.
import '../types/stable';
import '../types/preview';
1 change: 0 additions & 1 deletion type-tests/preview/index.d.ts

This file was deleted.

216 changes: 0 additions & 216 deletions type-tests/stable/@ember/owner-tests.ts

This file was deleted.

2 changes: 0 additions & 2 deletions type-tests/stable/index.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions type-tests/stable/tsconfig.json

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions types/preview/@ember/application/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/array/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/component/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/controller/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/debug/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/destroyable/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module '@ember/engine/-private/container-proxy-mixin' {
import { ContainerProxy } from '@ember/owner';
import { ContainerProxy } from '@ember/-internals/owner';
import Mixin from '@ember/object/mixin';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module '@ember/engine/-private/registry-proxy-mixin' {
import { RegistryProxy } from '@ember/owner';
import { RegistryProxy } from '@ember/-internals/owner';
import Mixin from '@ember/object/mixin';

/**
Expand Down
3 changes: 0 additions & 3 deletions types/preview/@ember/engine/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/error/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/helper/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/modifier/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/object/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/polyfills/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/routing/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/runloop/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/service/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/string/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/template/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/test/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/@ember/utils/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions types/preview/ember/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions types/preview/tsconfig.json

This file was deleted.

0 comments on commit 74c2895

Please sign in to comment.