Skip to content

Commit

Permalink
Move types-tests to their own package
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jul 24, 2024
1 parent 42ca54e commit 82c3b94
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 21 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 0 additions & 18 deletions addon/type-tests/tsconfig.json

This file was deleted.

18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
packages:
- "addon"
- "type-tests"
File renamed without changes.
17 changes: 17 additions & 0 deletions type-tests/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
12 changes: 12 additions & 0 deletions type-tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@tsconfig/ember",
"compilerOptions": {
"baseUrl": "..",
"paths": {
"*": [
"types/*"
]
}
},
"include": ["api.ts", "./types/**/*"]
}
3 changes: 3 additions & 0 deletions type-tests/types/dummy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import 'ember-source/types';
// For ember versions <5.1
import 'ember-source/types/preview';
2 changes: 2 additions & 0 deletions type-tests/types/require.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export default function <T = any>(moduleName: string): T;
export function has(moduleName: string): boolean;

0 comments on commit 82c3b94

Please sign in to comment.