Skip to content

Commit 167d225

Browse files
authored
ci, examples : add package-lock.json to examples addon node (#3919)
* ci, examples : add package-lock.json to examples addon node This commit commits the package-lock.json file for examples/addon.node. This is needed to make the CI workflow work properly and after we started pinning the action versions in the workflow, the CI started failing because the package-lock.json was not committed. At least that is what I think is happening. * ci: use node 20.x and 22.x instead of 16.x and 18.x * fix CMakeLists.txt target properties for addon.node
1 parent 5cad7ab commit 167d225

3 files changed

Lines changed: 4367 additions & 4 deletions

File tree

.github/workflows/examples.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-22.04
1717
strategy:
1818
matrix:
19-
node-version: [ 16.x, 18.x ]
19+
node-version: [ 20.x, 22.x ]
2020
steps:
2121
- name: Clone
2222
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -33,6 +33,7 @@ jobs:
3333
with:
3434
node-version: ${{ matrix.node-version }}
3535
cache: 'npm'
36+
cache-dependency-path: examples/addon.node/package-lock.json
3637

3738
- name: Install package.json dependencies
3839
working-directory: ./examples/addon.node

examples/addon.node/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ include_directories(${CMAKE_JS_INC})
88
#==================================================================
99

1010
add_library(${TARGET} SHARED ${CMAKE_JS_SRC} addon.cpp)
11-
set_target_properties(${TARGET} PROPERTIES PREFIX "" SUFFIX ".node")
12-
13-
include(DefaultTargetOptions)
11+
set_target_properties(${TARGET} PROPERTIES
12+
PREFIX ""
13+
OUTPUT_NAME "addon"
14+
SUFFIX ".node"
15+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Release"
16+
)
1417

1518
# Include N-API wrappers
1619
#==================================================================

0 commit comments

Comments
 (0)