File tree 4 files changed +193
-142
lines changed
4 files changed +193
-142
lines changed Original file line number Diff line number Diff line change 53
53
"@types/node" : " ^22.10.2" ,
54
54
"@types/yargs" : " ^17.0.32" ,
55
55
"discord.js" : " ^14.16.3" ,
56
- "esbuild-plugin-version-injector" : " ^1.2.1" ,
57
56
"tsconfig" : " workspace:*" ,
58
57
"tsx" : " ^4.7.0" ,
59
58
"typescript" : " ^5.7.2" ,
59
+ "use-macro" : " ^1.0.1" ,
60
60
"vitest" : " ^1.2.1"
61
61
},
62
62
"peerDependencies" : {
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ export * from './components';
3
3
export * from './config' ;
4
4
export type * from './types' ;
5
5
6
+ function getCommandKitVersion ( ) : string {
7
+ 'use macro' ;
8
+ return require ( '../package.json' ) . version ;
9
+ }
10
+
6
11
/**
7
12
* The current version of CommandKit.
8
13
*/
9
- // Note to developers: This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild
10
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
11
- export const version : string = '[VI]{{inject}}[/VI]' ;
14
+ export const version = getCommandKitVersion ( ) ;
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from 'tsup' ;
2
- import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector ' ;
2
+ import { esbuildPluginUseMacro } from 'use-macro ' ;
3
3
4
4
export default defineConfig ( {
5
5
format : [ 'cjs' , 'esm' ] ,
@@ -13,5 +13,5 @@ export default defineConfig({
13
13
shims : true ,
14
14
skipNodeModulesBundle : true ,
15
15
clean : true ,
16
- esbuildPlugins : [ esbuildPluginVersionInjector ( ) ] ,
16
+ esbuildPlugins : [ esbuildPluginUseMacro ( ) ] ,
17
17
} ) ;
You can’t perform that action at this time.
0 commit comments