Skip to content
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
4 changes: 1 addition & 3 deletions addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@ember/library-tsconfig": "^2.0.0",
"@embroider/addon-dev": "^4.1.3",
"@embroider/addon-dev": "^8.3.0",
"@glint/core": "^1.5.2",
"@glint/environment-ember-loose": "^1.5.2",
"@glint/environment-ember-template-imports": "^1.5.2",
Expand All @@ -89,8 +89,6 @@
"eslint-plugin-jsonc": "^2.11.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.2",
"execa": "^8.0.1",
"fix-bad-declaration-output": "^1.0.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"rollup": "^4.9.1",
Expand Down
26 changes: 1 addition & 25 deletions addon/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { babel } from '@rollup/plugin-babel';
import { Addon } from '@embroider/addon-dev/rollup';
import { execaCommand } from 'execa';
import { fixBadDeclarationOutput } from 'fix-bad-declaration-output';

const addon = new Addon({
srcDir: 'src',
Expand Down Expand Up @@ -44,28 +42,6 @@ export default {
// Remove leftover build artifacts when starting a new build.
addon.clean(),

{
name: 'fix-bad-declaration-output',
closeBundle: async () => {
/**
* Generate the types (these include /// <reference types="ember-source/types"
* but our consumers may not be using those, or have a new enough ember-source that provides them.
*/
console.log('Building types');
await execaCommand(`pnpm glint --declaration`, { stdio: 'inherit' });
/**
* https://github.com/microsoft/TypeScript/issues/56571#
* README: https://github.com/NullVoxPopuli/fix-bad-declaration-output
*/
console.log('Fixing types');
await fixBadDeclarationOutput('declarations/**/*.d.ts', [
'TypeScript#56571',
'Glint#628',
]);
console.log(
'⚠️ Dangerously (but neededly) fixed bad declaration output from typescript',
);
},
},
addon.declarations('declarations'),
],
};
Loading
Loading