Skip to content

Commit a256b9f

Browse files
committed
Upgrade addon-dev
1 parent 89f9ea5 commit a256b9f

3 files changed

Lines changed: 162 additions & 392 deletions

File tree

addon/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@babel/plugin-proposal-class-properties": "^7.18.6",
7373
"@babel/plugin-proposal-decorators": "^7.23.6",
7474
"@ember/library-tsconfig": "^2.0.0",
75-
"@embroider/addon-dev": "^4.1.3",
75+
"@embroider/addon-dev": "^8.3.0",
7676
"@glint/core": "^1.5.2",
7777
"@glint/environment-ember-loose": "^1.5.2",
7878
"@glint/environment-ember-template-imports": "^1.5.2",
@@ -89,8 +89,6 @@
8989
"eslint-plugin-jsonc": "^2.11.2",
9090
"eslint-plugin-node": "^11.1.0",
9191
"eslint-plugin-prettier": "^5.1.2",
92-
"execa": "^8.0.1",
93-
"fix-bad-declaration-output": "^1.0.2",
9492
"npm-run-all": "^4.1.5",
9593
"prettier": "^3.1.1",
9694
"rollup": "^4.9.1",

addon/rollup.config.mjs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { babel } from '@rollup/plugin-babel';
22
import { Addon } from '@embroider/addon-dev/rollup';
3-
import { execaCommand } from 'execa';
4-
import { fixBadDeclarationOutput } from 'fix-bad-declaration-output';
53

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

47-
{
48-
name: 'fix-bad-declaration-output',
49-
closeBundle: async () => {
50-
/**
51-
* Generate the types (these include /// <reference types="ember-source/types"
52-
* but our consumers may not be using those, or have a new enough ember-source that provides them.
53-
*/
54-
console.log('Building types');
55-
await execaCommand(`pnpm glint --declaration`, { stdio: 'inherit' });
56-
/**
57-
* https://github.com/microsoft/TypeScript/issues/56571#
58-
* README: https://github.com/NullVoxPopuli/fix-bad-declaration-output
59-
*/
60-
console.log('Fixing types');
61-
await fixBadDeclarationOutput('declarations/**/*.d.ts', [
62-
'TypeScript#56571',
63-
'Glint#628',
64-
]);
65-
console.log(
66-
'⚠️ Dangerously (but neededly) fixed bad declaration output from typescript',
67-
);
68-
},
69-
},
45+
addon.declarations('declarations'),
7046
],
7147
};

0 commit comments

Comments
 (0)