Skip to content

Commit 00a0d76

Browse files
committed
chore: bump version 10.5.0
Signed-off-by: Dylan <[email protected]>
1 parent a6569f0 commit 00a0d76

File tree

224 files changed

+11010
-26729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+11010
-26729
lines changed

.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
],
5+
"env": {
6+
"test": {
7+
"presets": [
8+
"@babel/preset-env"
9+
]
10+
}
11+
}
12+
}

.cmake/PlatformSettings.cmake

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ endif ()
4646
if (APPLE)
4747
# target system is macOS, iOS, tvOS or watchOS
4848
add_compile_options(-Wno-deprecated-declarations)
49-
add_compile_options($<$<CONFIG:RELEASE>:-fembed-bitcode>)
5049
endif ()
5150

5251
if (IOS)
5352
# target system is iOS
5453
message(STATUS "Yunxin: Configure for [iOS]")
5554
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
56-
set(CMAKE_OSX_DEPLOYMENT_TARGET 9.3 CACHE STRING "Minimum iOS deployment version" FORCE)
55+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.0 CACHE STRING "Minimum iOS deployment version" FORCE)
5756
endif ()
5857
if (CMAKE_OSX_ARCHITECTURES STREQUAL "armv7")
5958
add_compile_options(-fno-aligned-allocation)
@@ -92,7 +91,7 @@ endif ()
9291

9392
# pre-commit hooks
9493
macro(ne_install_pre_commit_hooks)
95-
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/.git/hooks/pre-commit AND "CMAKE_BUILD_TYPE" STREQUAL "Debug")
94+
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/.git/hooks/pre-commit)
9695
find_package(Python3 COMPONENTS Interpreter Development)
9796

9897
if (POLICY CMP0094) # https://cmake.org/cmake/help/latest/policy/CMP0094.html
@@ -112,7 +111,7 @@ macro(ne_install_pre_commit_hooks)
112111
find_package(Python REQUIRED COMPONENTS Interpreter)
113112
message(STATUS "Python executable: ${Python_EXECUTABLE}")
114113
execute_process(COMMAND ${Python_EXECUTABLE} -m pip install pre-commit)
115-
execute_process(COMMAND pre-commit install WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
114+
execute_process(COMMAND pre-commit install --hook-type commit-msg WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
116115
endif ()
117116
endmacro()
118117

@@ -122,12 +121,12 @@ macro(ne_install_conan_packages)
122121
execute_process(COMMAND conan config set general.revisions_enabled=True)
123122
include(${CMAKE_SOURCE_DIR}/.cmake/conan.cmake)
124123
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
125-
set(CONAN_ENV_CFLAGS "CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden")
126-
set(CONAN_ENV_CXXFLAGS "CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden")
124+
set(CONAN_ENV_CFLAGS "CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations -g3 -DUV_EXTERN=")
125+
set(CONAN_ENV_CXXFLAGS "CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations -g3")
127126
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
128-
set(CONAN_ENV_CFLAGS "CFLAGS=-fembed-bitcode -fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations")
129-
set(CONAN_ENV_CXXFLAGS "CXXFLAGS=-fembed-bitcode -fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations")
130-
set(CONAN_ENV_OBJCFLAGS "OBJCFLAGS=-fembed-bitcode -fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations")
127+
set(CONAN_ENV_CFLAGS "CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations -g3 -DUV_EXTERN=")
128+
set(CONAN_ENV_CXXFLAGS "CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations -g3")
129+
set(CONAN_ENV_OBJCFLAGS "OBJCFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden -Wno-error=deprecated-declarations")
131130
endif()
132131
if (CONAN_PROFILE_BUILD AND CONAN_PROFILE_HOST)
133132
conan_cmake_install(PATH_OR_REFERENCE .. BUILD missing
@@ -142,7 +141,9 @@ macro(ne_install_conan_packages)
142141
endif ()
143142
endif ()
144143
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
145-
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
144+
if(EXISTS ${CMAKE_BINARY_DIR}/conan_paths.cmake)
145+
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
146+
endif()
146147
conan_basic_setup(${PROJECT_NAME} KEEP_RPATHS)
147148
endmacro()
148149

@@ -186,7 +187,13 @@ function(ne_add_library target)
186187
FRAMEWORK_VERSION A
187188
MACOSX_FRAMEWORK_IDENTIFIER ${arg_MACOSX_FRAMEWORK_IDENTIFIER}
188189
MACHO_CURRENT_VERSION ${GIT_VERSION}
190+
XCODE_ATTRIBUTE_ENABLE_BITCODE NO
189191
)
192+
if (NOT DEFINED arg_NO_SYMLINKS)
193+
set_target_properties(${target} PROPERTIES
194+
VERSION ${GIT_VERSION}
195+
)
196+
endif ()
190197
if (CMAKE_BUILD_TYPE MATCHES "Release")
191198
set_target_properties(${target} PROPERTIES
192199
XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING YES
@@ -198,15 +205,12 @@ function(ne_add_library target)
198205
)
199206
endif ()
200207
elseif (UNIX)
201-
if (arg_NO_SYMLINKS)
202-
set_target_properties(${target} PROPERTIES
203-
BUILD_WITH_INSTALL_RPATH 1
204-
INSTALL_RPATH "$ORIGIN"
205-
)
206-
else ()
208+
set_target_properties(${target} PROPERTIES
209+
BUILD_WITH_INSTALL_RPATH 1
210+
INSTALL_RPATH "$ORIGIN"
211+
)
212+
if (NOT DEFINED arg_NO_SYMLINKS)
207213
set_target_properties(${target} PROPERTIES
208-
BUILD_WITH_INSTALL_RPATH 1
209-
INSTALL_RPATH "$ORIGIN"
210214
VERSION ${GIT_VERSION}
211215
)
212216
endif ()
@@ -226,39 +230,15 @@ function(ne_target_link_libraries target)
226230
endfunction()
227231

228232
function(_ne_target_install target)
229-
if (ANDROID)
230-
install(
231-
TARGETS ${target}
232-
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_ANDROID_ARCH_ABI}
233-
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_ANDROID_ARCH_ABI}
234-
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_ANDROID_ARCH_ABI}
235-
PUBLIC_HEADER DESTINATION include
236-
)
237-
elseif (APPLE)
238-
install(
239-
TARGETS ${target}
240-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
241-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
242-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
243-
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
244-
PUBLIC_HEADER DESTINATION include
245-
)
246-
elseif (MSVC)
247-
install(
248-
TARGETS ${target}
249-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
250-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
251-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
252-
PUBLIC_HEADER DESTINATION include
253-
)
233+
install(
234+
TARGETS ${target}
235+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
236+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
237+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
238+
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
239+
PUBLIC_HEADER DESTINATION include
240+
)
241+
if (MSVC)
254242
install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION pdb OPTIONAL)
255-
elseif (UNIX)
256-
install(
257-
TARGETS ${target}
258-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
259-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
260-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
261-
PUBLIC_HEADER DESTINATION include
262-
)
263243
endif ()
264244
endfunction()

.eslintrc.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
"es2021": true,
55
"mocha": true
66
},
7-
"extends": [
8-
"eslint:recommended",
9-
"plugin:@typescript-eslint/recommended",
10-
"plugin:prettier/recommended"
11-
],
7+
"extends": ["standard", "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
128
"parser": "@typescript-eslint/parser",
139
"parserOptions": {
1410
"ecmaVersion": 12,
1511
"sourceType": "module"
1612
},
17-
"plugins": [
18-
"@typescript-eslint"
19-
],
13+
"plugins": ["@typescript-eslint"],
2014
"rules": {
2115
"no-tabs": "off",
2216
"require-jsdoc": "off",
@@ -25,4 +19,4 @@
2519
"camelcase": "off",
2620
"@typescript-eslint/no-empty-function": "off"
2721
}
28-
}
22+
}

.mocharc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"timeout": 5000,
3+
"bail": true,
4+
"recursive": true,
5+
"require": [
6+
"@babel/register",
7+
"test/hooks_v2.spec.js"
8+
],
9+
"spec": [
10+
"test/**/*.spec.js"
11+
]
12+
}

0 commit comments

Comments
 (0)