File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
src/handlers/event-handler Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66
7+ ## [ 0.0.6] - 2023-07-02
8+
9+ ### Fixed
10+
11+ - Fixed a bug where wrong event names were being registered on Windows.
12+
713## [ 0.0.5] - 2023-07-02
814
915### Added
Original file line number Diff line number Diff line change 11{
22 "name" : " commandkit" ,
3- "version" : " 0.0.5 " ,
3+ "version" : " 0.0.6 " ,
44 "main" : " dist/index.js" ,
55 "license" : " MIT" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ export class EventHandler {
1818 const eventFolderPaths = getFolderPaths ( this . _data . eventsPath ) ;
1919
2020 for ( const eventFolderPath of eventFolderPaths ) {
21- const eventFolderPathChunks = eventFolderPath . replace ( '\\' , '/' ) . split ( '/' ) ;
22- const eventName = eventFolderPathChunks [ eventFolderPathChunks . length - 1 ] ;
21+ const eventName = eventFolderPath . replace ( / \\ / g, '/' ) . split ( '/' ) . pop ( ) as string ;
2322
2423 const eventFilePaths = getFilePaths ( eventFolderPath ) . filter (
2524 ( path ) => path . endsWith ( '.js' ) || path . endsWith ( '.ts' )
You can’t perform that action at this time.
0 commit comments