Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couchbase

Package Overview
Dependencies
Maintainers
4
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchbase - npm Package Compare versions

Comparing version 4.2.4 to 4.2.5-dev.1

scripts/createPlatformPackages.js

147

CMakeLists.txt
cmake_minimum_required(VERSION 3.17)
cmake_policy(SET CMP0042 NEW)
cmake_policy(SET CMP0048 NEW)
include(FetchContent)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
function(download_nodejs_headers)
message("Finding Node.js headers SHA for version: ${NODE_RUNTIMEVERSION}")
file(DOWNLOAD
https://nodejs.org/dist/v${NODE_RUNTIMEVERSION}/SHASUMS256.txt
"${CMAKE_CURRENT_BINARY_DIR}/SHASUM256.txt"
TLS_VERIFY ON)
file(READ "${CMAKE_CURRENT_BINARY_DIR}/SHASUM256.txt" HASH_FILE_CONTENT)
set(REGEX_CHECK "node-v${NODE_RUNTIMEVERSION}-headers.tar.gz")
string(REPLACE "\n" ";" HASH_FILE_CONTENT ${HASH_FILE_CONTENT})
FOREACH(HASH ${HASH_FILE_CONTENT})
string(FIND ${HASH} ${REGEX_CHECK} FOUND_FILE)
if("${FOUND_FILE}" GREATER_EQUAL "0")
string(REGEX MATCH
"^[0-9a-f]+"
CB_NODE_VERSION_SHA256
${HASH})
break()
endif()
ENDFOREACH()
if(NOT CB_NODE_VERSION_SHA256)
message(FATAL_ERROR "Failed to extract expected hash from node shasum file.")
else()
message("Using SHA=${CB_NODE_VERSION_SHA256}")
endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
# see https://cmake.org/cmake/help/latest/policy/CMP0135.html
# and Externalproject_add - DOWNLOAD_EXTRACT_TIMESTAMP
FetchContent_Declare(
nodejs_headers
URL https://nodejs.org/dist/v${NODE_RUNTIMEVERSION}/node-v${NODE_RUNTIMEVERSION}-headers.tar.gz
URL_HASH SHA256=${CB_NODE_VERSION_SHA256}
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
)
else()
FetchContent_Declare(
nodejs_headers
URL https://nodejs.org/dist/v${NODE_RUNTIMEVERSION}/node-v${NODE_RUNTIMEVERSION}-headers.tar.gz
URL_HASH SHA256=${CB_NODE_VERSION_SHA256}
)
endif()
message("Downloading Node.js ${NODE_RUNTIMEVERSION} headers...")
FetchContent_MakeAvailable(nodejs_headers)
message("Downloaded Node.js ${NODE_RUNTIMEVERSION} headers to ${nodejs_headers_SOURCE_DIR}")
set(NODEJS_INC_DIR "${nodejs_headers_SOURCE_DIR}/include/node" PARENT_SCOPE)
endfunction()
function(download_nodejs_win_lib)
if(NODE_RUNTIME STREQUAL "electron")
set(NODE_LIB_URL "https://artifacts.electronjs.org/headers/dist/v${NODE_RUNTIMEVERSION}")
if(NODE_ARCH STREQUAL "x64")
set(NODE_LIB_URL "${NODE_LIB_URL}/x64")
endif()
else()
set(NODE_LIB_URL "https://nodejs.org/dist/v${NODE_RUNTIMEVERSION}")
if(NODE_ARCH STREQUAL "x64")
set(NODE_LIB_URL "${NODE_LIB_URL}/win-x64")
else()
set(NODE_LIB_URL "${NODE_LIB_URL}/win-x86")
endif()
endif()
set(NODE_LIB_URL "${NODE_LIB_URL}/node.lib")
FetchContent_Declare(
nodejs_win_lib
URL ${NODE_LIB_URL}
DOWNLOAD_NO_EXTRACT TRUE
)
message("Downloading ${NODE_RUNTIME} v${NODE_RUNTIMEVERSION} win lib...")
FetchContent_MakeAvailable(nodejs_win_lib)
message("Downloaded ${NODE_RUNTIME} v${NODE_RUNTIMEVERSION} win lib to ${nodejs_win_lib_SOURCE_DIR}")
set(NODEJS_LIB "${nodejs_win_lib_SOURCE_DIR}/node.lib" PARENT_SCOPE)
endfunction()
# cmake-js >= v7.0 no longer downloads the full Node.js Windows lib and utilizes the https://github.com/nodejs/node-api-headers
# project to build the lib. Since we rely on OpenSSL we need to pull in more than just the node-api headers, so lets download
# the node.lib ourselves.
if(WIN32 AND CMAKE_JS_VERSION VERSION_GREATER_EQUAL "7.0.0")
SET(NODEJS_LIB "")
download_nodejs_win_lib()
else()
SET(NODEJS_LIB "${CMAKE_JS_LIB}")
endif()
if(CMAKE_JS_VERSION VERSION_GREATER_EQUAL "7.0.0")
set(NODEJS_INC_DIR "")
download_nodejs_headers()
set(NODEJS_INC_DIR "${NODEJS_INC_DIR};${CMAKE_JS_INC}")
else()
set(NODEJS_INC_DIR "${CMAKE_JS_INC}")
endif()
message(STATUS "NODEJS_INC_DIR=${NODEJS_INC_DIR}")
message(STATUS "NODEJS_LIB=${NODEJS_LIB}")
# Set up some build requirements for Windows.

@@ -16,3 +115,3 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

# to our dependant libraries such as couchbase-cxx-client.
include_directories(${CMAKE_JS_INC})
include_directories(${NODEJS_INC_DIR})

@@ -22,3 +121,3 @@ set(COUCHBASE_CXX_CLIENT_BUILD_TESTS OFF CACHE BOOL "" FORCE)

set(COUCHBASE_CXX_CLIENT_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(COUCHBASE_CXX_CLIENT_POST_LINKED_OPENSSL ON CACHE BOOL "" FORCE)
set(COUCHBASE_CXX_CLIENT_POST_LINKED_OPENSSL ON CACHE BOOL "")
set(COUCHBASE_CXX_CLIENT_STATIC_STDLIB ON CACHE BOOL "" FORCE)

@@ -33,18 +132,44 @@ add_subdirectory(deps/couchbase-cxx-client)

add_definitions(-DNAPI_VERSION=6)
target_include_directories(${PROJECT_NAME}
PRIVATE ${CMAKE_JS_INC}
"${CMAKE_SOURCE_DIR}/node_modules/node-addon-api"
"deps/couchbase-cxx-client/include"
"deps/couchbase-cxx-client/third_party/asio/asio/include")
if(CMAKE_JS_VERSION VERSION_GREATER_EQUAL "7.0.0")
target_include_directories(${PROJECT_NAME}
PRIVATE ${NODEJS_INC_DIR}
"deps/couchbase-cxx-client/include"
"deps/couchbase-cxx-client/third_party/asio/asio/include")
else()
execute_process(COMMAND node -p "require('node-addon-api').include"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE NODE_ADDON_API_DIR
)
string(REPLACE "\n" "" NODE_ADDON_API_DIR ${NODE_ADDON_API_DIR})
string(REPLACE "\"" "" NODE_ADDON_API_DIR ${NODE_ADDON_API_DIR})
target_include_directories(${PROJECT_NAME}
PRIVATE ${NODEJS_INC_DIR}
${NODE_ADDON_API_DIR}
"deps/couchbase-cxx-client/include"
"deps/couchbase-cxx-client/third_party/asio/asio/include")
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
target_link_libraries(${PROJECT_NAME}
${CMAKE_JS_LIB}
${NODEJS_LIB}
couchbase_cxx_client
)
# Workaround a bug in cmake-js with removal of used references:
# https://github.com/cmake-js/cmake-js/issues/205
if(MSVC)
if(MSVC)
# Workaround a bug in cmake-js with removal of used references:
# https://github.com/cmake-js/cmake-js/issues/205
target_link_options(${PROJECT_NAME} PUBLIC /OPT:NOREF)
# since we only care about the *.PDB for a command line build, this _should_ be okay.
if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_options(${PROJECT_NAME} PUBLIC /Zi)
# Do we want /OPT:ICF?
set_target_properties(${PROJECT_NAME} PROPERTIES
LINK_FLAGS "/INCREMENTAL:NO /DEBUG"
COMPILE_PDB_NAME ${PROJECT_NAME}
COMPILE_PDB_OUTPUT_DIR ${CMAKE_BINARY_DIR}
)
endif()
endif()

5

dist/binding.js

@@ -12,3 +12,3 @@ "use strict";

*/
const bindings_1 = __importDefault(require("bindings"));
const path_1 = __importDefault(require("path"));
exports.zeroCas = 0;

@@ -161,3 +161,4 @@ //#region Autogenerated Bindings

// Load it with require
const binding = (0, bindings_1.default)('couchbase_impl');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const binding = require('../scripts/prebuilds').loadPrebuild(path_1.default.resolve(__dirname, '..'));
exports.default = binding;

@@ -1,1 +0,96 @@

{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=12.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","cmake-js":"^6.3.2","node-addon-api":"^5.0.0","prebuild-install":"^7.1.1"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.1.0","@tsconfig/node12":"^1.0.11","@types/bindings":"^1.5.1","@types/debug":"^4.1.7","@types/node":"^20.1.0","@typescript-eslint/eslint-plugin":"^5.32.0","@typescript-eslint/parser":"^5.32.0","chai":"^4.3.6","eslint":"^8.21.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jsdoc":"^41.1.0","eslint-plugin-mocha":"^10.1.0","eslint-plugin-node":"^11.1.0","expose-gc":"^1.0.0","mocha":"^10.0.0","npm-check-updates":"^16.0.5","nyc":"^15.1.0","prebuild":"^11.0.4","prettier":"^2.7.1","segfault-handler":"^1.3.0","semver":"^7.3.7","ts-mocha":"^10.0.0","ts-node":"^10.9.1","typedoc":"^0.24.1","typescript":"^4.7.4","uuid":"^9.0.0"},"repository":{"type":"git","url":"http://github.com/couchbase/couchnode.git"},"version":"4.2.4","config":{"native":false},"scripts":{"install":"prebuild-install -r napi || cmake-js compile","build":"cmake-js build && tsc","rebuild":"cmake-js rebuild && tsc","prebuild":"prebuild --backend cmake-js --verbose --strip","prepare":"tsc","build-docs":"typedoc","test":"ts-mocha test/*.test.*","test-fast":"ts-mocha test/*.test.* -ig '(slow)'","cover":"nyc ts-mocha test/*.test.*","cover-fast":"nyc ts-mocha test/*.test.* -ig '(slow)'","lint":"eslint ./lib/ ./test/","check-deps":"ncu"},"binary":{"napi_versions":[6]}}
{
"bugs": {
"url": "http://www.couchbase.com/issues/browse/JSCBC"
},
"description": "The official Couchbase Node.js Client Library.",
"engines": {
"node": ">=12.0.0"
},
"homepage": "http://www.couchbase.com/communities/nodejs",
"keywords": [
"couchbase",
"libcouchbase",
"memcached",
"nosql",
"json",
"document"
],
"main": "dist/couchbase.js",
"types": "dist/couchbase.d.ts",
"license": "Apache-2.0",
"name": "couchbase",
"dependencies": {
"cmake-js": "^7.2.0",
"node-addon-api": "^5.0.0"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.0",
"@types/bindings": "^1.5.1",
"@types/debug": "^4.1.7",
"@types/node": "^20.1.0",
"@tsconfig/node12": "^1.0.11",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"chai": "^4.3.6",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^41.1.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-node": "^11.1.0",
"expose-gc": "^1.0.0",
"mocha": "^10.0.0",
"npm-check-updates": "^16.0.5",
"nyc": "^15.1.0",
"prebuild": "^11.0.4",
"prettier": "^2.7.1",
"segfault-handler": "^1.3.0",
"semver": "^7.3.7",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"typedoc": "^0.24.1",
"typescript": "^4.7.4",
"uuid": "^9.0.0"
},
"repository": {
"type": "git",
"url": "http://github.com/couchbase/couchnode.git"
},
"version": "4.2.5-dev.1",
"config": {
"native": false
},
"scripts": {
"install": "node ./scripts/install.js",
"build": "cmake-js build && tsc",
"rebuild": "cmake-js rebuild && tsc",
"prebuild": "prebuild --backend cmake-js --verbose --strip",
"prepare": "tsc",
"help-prune": "node ./scripts/prune.js",
"build-docs": "typedoc",
"test": "ts-mocha test/*.test.*",
"test-fast": "ts-mocha test/*.test.* -ig '(slow)'",
"cover": "nyc ts-mocha test/*.test.*",
"cover-fast": "nyc ts-mocha test/*.test.* -ig '(slow)'",
"lint": "eslint ./lib/ ./test/",
"check-deps": "ncu"
},
"binary": {
"napi_versions": [
6
]
},
"optionalDependencies": {
"@couchbase/couchbase-darwin-arm64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-darwin-arm64-openssl3": "4.2.5-dev.1",
"@couchbase/couchbase-darwin-x64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-darwin-x64-openssl3": "4.2.5-dev.1",
"@couchbase/couchbase-linux-arm64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-linux-arm64-openssl3": "4.2.5-dev.1",
"@couchbase/couchbase-linux-x64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-linux-x64-openssl3": "4.2.5-dev.1",
"@couchbase/couchbase-linuxmusl-x64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-linuxmusl-x64-openssl3": "4.2.5-dev.1",
"@couchbase/couchbase-win32-x64-openssl1": "4.2.5-dev.1",
"@couchbase/couchbase-win32-x64-openssl3": "4.2.5-dev.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc