File tree Expand file tree Collapse file tree 5 files changed +18
-4
lines changed
loaders/ts_loader/bootstrap
scripts/typescript/templating/source
tests/metacall_typescript_tsx_test Expand file tree Collapse file tree 5 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ if(NOT OPTION_BUILD_GUIX)
5252 add_custom_target (${target} ALL
5353 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /lib
5454 COMMAND npm run build
55+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} /lib/node_modules/typescript ${BOOTSTRAP_OUTPUT_PATH} /node_modules/typescript
56+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR} /lib/build /bootstrap.js ${BOOTSTRAP_OUTPUT_PATH} /bootstrap.ts
5557 SOURCES ${sources}
5658 )
5759
Original file line number Diff line number Diff line change @@ -152,8 +152,9 @@ export const load_from_file = safe(function load_from_file(paths: string[]) {
152152 result [ fileName ] = wrappedExports ;
153153 } ) ;
154154 } ) ;
155- return result ;
156- } , { } ) ;
155+
156+ return Object . keys ( result ) . length !== 0 ? result : null ;
157+ } , null ) ;
157158
158159/** Loads a TypeScript file from memory */
159160export const load_from_memory = safe (
@@ -205,7 +206,7 @@ export const load_from_memory = safe(
205206 discoverTypes . set ( name , exportTypes ) ;
206207 return result ;
207208 } ,
208- { } ,
209+ null ,
209210) ;
210211
211212/** Unloads a TypeScript file using handle returned from load_from_file / load_from_memory */
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ if(NOT NODEJS_FOUND)
138138endif ()
139139
140140add_test (NAME ${target} _node_binary
141- COMMAND ${TEST_COMMAND} "${NODEJS_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} /test/node_integration.js | ${GREP_COMMAND} \" NodeJS Integration Test Passed\" "
141+ COMMAND ${TEST_COMMAND} "${NODEJS_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} /test/node_integration.js | ${GREP_COMMAND} \" NodeJS Integration Test Passed\" "
142142 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
143143)
144144test_environment_variables(${target} _node_binary
Original file line number Diff line number Diff line change 1+ {
2+ "include" : [
3+ " templating.tsx"
4+ ],
5+ "compilerOptions" : {
6+ "target" : " es5" ,
7+ "jsx" : " react" ,
8+ "lib" : [" es2015" , " dom" ]
9+ }
10+ }
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ target_link_libraries(${target}
148148
149149add_test (NAME ${target}
150150 COMMAND $<TARGET_FILE:${target} >
151+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /source /scripts/typescript/templating/source
151152)
152153
153154#
You can’t perform that action at this time.
0 commit comments