Skip to content

Commit b36fd5d

Browse files
committed
Remove 'own types' testing because its now part of the rollup build
It doesn't make sense to run tests for type-tests with ember-try, since they're in a different workspace and not using the app Remove Glint
1 parent 29d356a commit b36fd5d

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ jobs:
4646
- run: pnpm i -f # sync injected dependencies
4747
- run: pnpm test
4848
working-directory: test-app
49-
- name: own types
50-
working-directory: addon
51-
run: pnpm tsc --noEmit
5249

5350
docs-gen:
5451
timeout-minutes: 5
@@ -87,9 +84,6 @@ jobs:
8784
- name: Run Tests
8885
working-directory: test-app
8986
run: pnpm test
90-
- name: own types
91-
working-directory: addon
92-
run: pnpm tsc --noEmit
9387

9488
try-scenarios:
9589
timeout-minutes: 10
@@ -130,9 +124,6 @@ jobs:
130124
- name: test
131125
working-directory: test-app
132126
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
133-
- name: types compatibility
134-
working-directory: addon
135-
run: pnpm lint:ts
136127

137128
types:
138129
runs-on: ubuntu-latest

addon/rollup.config.mjs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { babel } from '@rollup/plugin-babel';
22
import copy from 'rollup-plugin-copy';
33
import { Addon } from '@embroider/addon-dev/rollup';
4-
import { execaCommand } from "execa";
4+
import { execaCommand } from 'execa';
5+
import { fixBadDeclarationOutput } from 'fix-bad-declaration-output';
56

67
const addon = new Addon({
78
srcDir: 'src',
@@ -72,9 +73,23 @@ export default {
7273
{
7374
name: 'Build declarations',
7475
closeBundle: async () => {
75-
console.log("Building types");
76-
await execaCommand(`pnpm glint --declaration`, { stdio: "inherit" });
77-
}
78-
}
76+
console.log('Building types');
77+
await execaCommand(`pnpm tsc --declaration`, { stdio: 'inherit' });
78+
79+
/**
80+
* https://github.com/microsoft/TypeScript/issues/56571#
81+
* README: https://github.com/NullVoxPopuli/fix-bad-declaration-output
82+
*/
83+
console.log('Fixing types');
84+
await fixBadDeclarationOutput('declarations/**/*.d.ts', [
85+
['TypeScript#56571', { types: 'all' }],
86+
'Glint#628',
87+
'Glint#697',
88+
]);
89+
console.log(
90+
'⚠️ Dangerously (but neededly) fixed bad declaration output from typescript',
91+
);
92+
},
93+
},
7994
],
8095
};

addon/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"src/**/*",
55
"unpublished-development-types/**/*"
66
],
7-
"glint": {
8-
"environment": ["ember-loose", "ember-template-imports"]
9-
},
107
"compilerOptions": {
118
"allowJs": true,
129
"declarationDir": "declarations",

0 commit comments

Comments
 (0)