Comparing version 6.0.0-beta.20 to 6.0.0
@@ -1,9 +0,13 @@ | ||
"use strict" | ||
module.exports = { | ||
require: ["ts-node/register", "rocha"], | ||
spec: ["test/unit/*-test.ts", "test/unit/compat/*-test.{ts,js}"], | ||
/** | ||
* @type {import('mocha').MochaOptions} | ||
*/ | ||
const config = { | ||
require: ["ts-node/register"], | ||
spec: ["test/unit/*-test.ts", "test/unit/compat/*-test.js"], | ||
"expose-gc": true, | ||
"experimental-worker": true, | ||
recursive: true, | ||
"v8-expose-gc": true, | ||
exit: true, | ||
parallel: true, | ||
} | ||
module.exports = config |
@@ -83,2 +83,2 @@ /// <reference types="node" /> | ||
declare const version: string; | ||
export { version, Context, Socket, createSocket as socket, createSocket, curveKeypair, proxy, shortOptions as options, }; | ||
export { version, Context, Socket, SocketType, createSocket as socket, createSocket, curveKeypair, proxy, shortOptions as options, }; |
"use strict"; | ||
/* eslint-disable @typescript-eslint/camelcase */ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
/* | ||
The API of the compatibility layer and parts of the implementation has been | ||
adapted from the original ZeroMQ.js version (up to 5.x) | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -29,27 +31,2 @@ if (k2 === undefined) k2 = k; | ||
exports.options = exports.proxy = exports.curveKeypair = exports.createSocket = exports.socket = exports.Socket = exports.Context = exports.version = void 0; | ||
/* The API of the compatibility layer and parts of the implementation has been | ||
adapted from the original ZeroMQ.js version (up to 5.x) for which the license | ||
and copyright notice is reproduced below. | ||
Copyright (c) 2017-2019 Rolf Timmermans | ||
Copyright (c) 2011 TJ Holowaychuk | ||
Copyright (c) 2010, 2011 Justin Tulloss | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
const events_1 = require("events"); | ||
@@ -56,0 +33,0 @@ const zmq = __importStar(require(".")); |
{ | ||
"name": "zeromq", | ||
"version": "6.0.0-beta.20", | ||
"version": "6.0.0", | ||
"description": "Next-generation ZeroMQ bindings for Node.js", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"type": "commonjs", | ||
"typesVersions": { | ||
@@ -22,15 +23,14 @@ ">=3.7": { | ||
"@aminya/node-gyp-build": "4.8.1-aminya.1", | ||
"cross-env": "^7.0.3", | ||
"node-addon-api": "^7.1.0", | ||
"shelljs": "^0.8.5", | ||
"shx": "^0.3.4" | ||
"shelljs": "^0.8.5" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.3.16", | ||
"@types/fs-extra": "^9.0.13", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^18.19.34", | ||
"@types/node": "^20.14.3", | ||
"@types/proper-lockfile": "^4.1.4", | ||
"@types/semver": "^7.5.8", | ||
"@types/shelljs": "^0.8.15", | ||
"@types/which": "^2.0.2", | ||
"@types/which": "^3.0.4", | ||
"benchmark": "^2.1.4", | ||
@@ -40,9 +40,9 @@ "chai": "^4.4.1", | ||
"downlevel-dts": "^0.11.0", | ||
"electron-mocha": "^11.0.2", | ||
"electron-mocha": "^12.3.0", | ||
"eslint": "^8", | ||
"eslint-config-atomic": "^1.22.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"execa": "^9.2.0", | ||
"fs-extra": "^10.1.0", | ||
"gh-pages": "^4.0.0", | ||
"fs-extra": "^11.2.0", | ||
"gh-pages": "^6.1.1", | ||
"minify-all-cli": "^1.0.13", | ||
@@ -53,4 +53,4 @@ "mocha": "^10.4.0", | ||
"prebuildify": "^6.0.1", | ||
"prettier": "^2.8.8", | ||
"rocha": "^2.5.10", | ||
"prettier": "^3.3.2", | ||
"proper-lockfile": "^4.1.2", | ||
"semver": "^7.6.2", | ||
@@ -60,3 +60,5 @@ "ts-node": "~10.9.2", | ||
"typescript": "~4.9.5", | ||
"which": "^3.0.1" | ||
"which": "^4.0.0", | ||
"cross-env": "^7.0.3", | ||
"shx": "^0.3.4" | ||
}, | ||
@@ -97,12 +99,13 @@ "engines": { | ||
], | ||
"license": "MIT", | ||
"author": "Rolf Timmermans <rolf@zxcv.nl>", | ||
"license": "MIT AND MPL-2.0", | ||
"author": "Amin Yahyaabadi <aminyahyaabadi74@gmail.com>, Rolf Timmermans <rolf@zxcv.nl>", | ||
"scripts": { | ||
"install": "(shx test -f ./script/build.js || run-s build.js) && cross-env npm_config_build_from_source=true aminya-node-gyp-build", | ||
"clean": "shx rm -rf ./build ./lib/ ./prebuilds ./script/*.js ./script/*.js.map ./script/*.d.ts ./script/*.tsbuildinfo", | ||
"install": "(npm run build.js || echo ok) && aminya-node-gyp-build --build-from-source", | ||
"clean": "shx rm -rf ./build ./lib/ ./prebuilds ./script/*.js ./script/*.mjs ./script/*.js.map ./script/*.mjs.map ./script/*.d.ts ./script/*.d.mts ./script/*.cjs ./scripts/*.cjs.map ./scripts/*.d.cts ./script/*.tsbuildinfo", | ||
"clean.release": "shx rm -rf ./build/Release", | ||
"clean.temp": "shx rm -rf ./tmp && shx mkdir -p ./tmp", | ||
"build.library": "tsc -p ./src/tsconfig.json", | ||
"build.script": "tsc -p ./script/tsconfig.json && tsc -p ./script/tsconfig.esm.json", | ||
"build.script": "tsc -p ./script/tsconfig.esm.json && tsc -p ./script/tsconfig.json", | ||
"build.js": "run-p build.script build.library", | ||
"build.doc": "typedoc --options ./typedoc.json && minify-all -s docs-raw -d docs --jsCompressor terser", | ||
"build.doc": "typedoc --options ./typedoc.json && minify-all -s docs-unminified -d docs --jsCompressor terser && shx rm -rf docs-unminified", | ||
"deploy.doc": "run-s build.doc && gh-pages --dist \"./docs\"", | ||
@@ -114,10 +117,9 @@ "build.prebuild": "run-s build.js && node ./script/prebuild.mjs", | ||
"build.debug": "run-s build.js build.native.debug", | ||
"test.deps": "cd test && pnpm install && cd ..", | ||
"test": "run-s clean.temp test.deps build && mocha", | ||
"test.skip_gc_tests": "run-s clean.temp test.deps build.debug && cross-env SKIP_GC_TESTS=true mocha", | ||
"test.electron.main": "run-s clean.temp test.deps build && electron-mocha", | ||
"test": "run-s clean.temp build && mocha", | ||
"test.skip_gc_tests": "run-s clean.temp build.debug && cross-env SKIP_GC_TESTS=true mocha", | ||
"test.electron.main": "run-s clean.temp build && electron-mocha", | ||
"format": "prettier --write .", | ||
"test.electron.renderer": "run-s build && electron-mocha --renderer", | ||
"lint.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h", | ||
"lint-test.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/", | ||
"lint-test.eslint": "eslint ./**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/", | ||
"lint.eslint": "pnpm run lint-test.eslint --fix", | ||
@@ -124,0 +126,0 @@ "lint": "run-p lint.eslint lint.clang-format", |
# ZeroMQ.js Next Generation | ||
[![Latest version](https://img.shields.io/npm/v/zeromq?label=version)](https://www.npmjs.com/package/zeromq) | ||
[![Greenkeeper monitoring](https://img.shields.io/badge/dependencies-monitored-brightgreen)](https://greenkeeper.io/) | ||
[![Travis build status](https://img.shields.io/travis/zeromq/zeromq.js)](https://travis-ci.org/zeromq/zeromq.js) | ||
## ⚠️ Version 6.0.0 (in beta) features a brand new API that solves many fundamental issues and is recommended for new projects. ⚠️ | ||
## ⚠️ For the current stable version see the [5.x branch](https://github.com/zeromq/zeromq.js/tree/5.x) ⚠️ | ||
[ØMQ](http://zeromq.org) bindings for Node.js. The goals of this library are: | ||
@@ -48,3 +42,3 @@ | ||
```sh | ||
npm install zeromq@6.0.0-beta.20 | ||
npm install zeromq | ||
``` | ||
@@ -87,22 +81,84 @@ | ||
To install from source: | ||
To install from source, specify `build_from_source=true` in a `.npmrc` file | ||
```sh | ||
npm install zeromq@6.0.0-beta.20 --build-from-source | ||
``` | ||
build_from_source=true | ||
``` | ||
If you want to link against a shared ZeroMQ library, you can build skip | ||
downloading `libzmq` and link with the installed library instead as follows: | ||
When building from source, you can also specify additional build options in a | ||
`.npmrc` file in your project: | ||
```sh | ||
npm install zeromq@6.0.0-beta.20 --zmq-shared | ||
### Available Build Options | ||
<details> | ||
<summary>👉🏻 Options</summary> | ||
#### Draft support | ||
By default `libzmq` is built with support for `Draft` patterns (e.g. | ||
`server-client`, `radio-dish`, `scatter-gather`). If you want to build `libzmq` | ||
without support for `Draft`, you can specify the following in `.npmrc`: | ||
```ini | ||
zmq_draft=false | ||
``` | ||
If you wish to use any DRAFT sockets then it is also necessary to compile the | ||
library from source: | ||
#### Not Synchronous Resolve | ||
```sh | ||
npm install zeromq@6.0.0-beta.20 --zmq-draft | ||
If you want to send/receive on the socket immediately, you can specify the | ||
following in `.npmrc`: | ||
```ini | ||
zmq_no_sync_resolve="true" | ||
``` | ||
#### Shared library support | ||
If you want to link against a shared ZeroMQ library installed on your system, | ||
you can build skip downloading `libzmq` and link with the installed library | ||
instead by specifying the following in `.npmrc`: | ||
```ini | ||
zmq_shared=true | ||
``` | ||
#### Alternative libzmq version | ||
You can specify an alternative version or Git revision of `libzmq` to build | ||
against by specifying the following in `.npmrc`: | ||
```ini | ||
zmq_version="4.3.5" | ||
``` | ||
#### Debug build of libzmq | ||
If you want to build `libzmq` with debug symbols, you can specify the following | ||
in `.npmrc`: | ||
```ini | ||
zmq_build_type="Debug" | ||
``` | ||
#### Cross-compilation for different architectures | ||
If you want to cross-compile for a different architecture, you can specify the | ||
following in `.npmrc`: | ||
```ini | ||
arch="arm64" | ||
target_arch="arm64" | ||
``` | ||
#### MacOS Deployment Target | ||
If you want to specify the MacOS deployment target, you can specify the | ||
following in `.npmrc`: | ||
```ini | ||
macos_deployment_target="10.15" | ||
``` | ||
</details> | ||
## Examples | ||
@@ -109,0 +165,0 @@ |
@@ -6,19 +6,31 @@ "use strict"; | ||
const shelljs_1 = require("shelljs"); | ||
const utils_js_1 = require("./utils.js"); | ||
const root = (0, path_1.dirname)(__dirname); | ||
function parseOptions() { | ||
return { | ||
zmq_shared: (0, utils_js_1.toBool)(process.env.npm_config_zmq_shared) ?? false, | ||
zmq_draft: (0, utils_js_1.toBool)(process.env.npm_config_zmq_draft) ?? false, | ||
zmq_version: (0, utils_js_1.toString)(process.env.npm_config_zmq_version) ?? | ||
"5657b4586f24ec433930e8ece02ddba7afcf0fe0", | ||
zmq_build_type: (0, utils_js_1.toString)(process.env.npm_config_zmq_build_type) ?? "Release", | ||
arch: (0, utils_js_1.toString)(process.env.npm_config_arch) ?? process.arch, | ||
macosx_deployment_target: (0, utils_js_1.toString)(process.env.npm_config_macosx_deployment_target) ?? "10.15", | ||
}; | ||
} | ||
function main() { | ||
const zmq_rev = | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
process.env.ZMQ_VERSION || "5657b4586f24ec433930e8ece02ddba7afcf0fe0"; | ||
const src_url = `https://github.com/zeromq/libzmq/archive/${zmq_rev}.tar.gz`; | ||
const opts = parseOptions(); | ||
console.log("Building libzmq with options ", opts); | ||
if (opts.zmq_shared) { | ||
return; | ||
} | ||
const src_url = `https://github.com/zeromq/libzmq/archive/${opts.zmq_version}.tar.gz`; | ||
const libzmq_build_prefix = `${root}/build/libzmq-staging`; | ||
const libzmq_install_prefix = `${root}/build/libzmq`; | ||
const installed_artifact = `${libzmq_install_prefix}/lib/libzmq${process.platform === "win32" ? ".lib" : ".a"}`; | ||
const src_dir = `libzmq-${zmq_rev}`; | ||
const tarball = `libzmq-${zmq_rev}.tar.gz`; | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
const CMAKE_BUILD_TYPE = process.env.CMAKE_BUILD_TYPE || "Release"; | ||
const src_dir = `libzmq-${opts.zmq_version}`; | ||
const tarball = `libzmq-${opts.zmq_version}.tar.gz`; | ||
let build_options = ""; | ||
// https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html | ||
if (process.platform === "win32") { | ||
if (CMAKE_BUILD_TYPE !== "Debug") { | ||
if (opts.zmq_build_type !== "Debug") { | ||
build_options += " -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL"; | ||
@@ -30,7 +42,6 @@ } | ||
} | ||
build_options += archCMakeOptions(); | ||
build_options += archCMakeOptions(opts); | ||
if (process.platform === "darwin") { | ||
const MACOSX_DEPLOYMENT_TARGET = "10.15"; | ||
process.env.MACOSX_DEPLOYMENT_TARGET = MACOSX_DEPLOYMENT_TARGET; | ||
build_options += ` -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}`; | ||
process.env.MACOSX_DEPLOYMENT_TARGET = opts.macosx_deployment_target; | ||
build_options += ` -DCMAKE_OSX_DEPLOYMENT_TARGET=${opts.macosx_deployment_target}`; | ||
} | ||
@@ -54,7 +65,7 @@ (0, shelljs_1.mkdir)("-p", libzmq_build_prefix); | ||
} | ||
if (process.env.ZMQ_DRAFT === "true") { | ||
if (opts.zmq_draft) { | ||
console.log("Enabling draft support"); | ||
build_options += " -DENABLE_DRAFTS=ON"; | ||
} | ||
console.log(`Building libzmq ${CMAKE_BUILD_TYPE}`); | ||
console.log(`Building libzmq ${opts.zmq_build_type}`); | ||
// ClangFormat include causes issues but is not required to build. | ||
@@ -65,6 +76,6 @@ const clang_format_file = `${src_dir}/builds/cmake/Modules/ClangFormat.cmake`; | ||
} | ||
const cmake_configure = `cmake -S "${src_dir}" -B ./build ${build_options} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX="${libzmq_install_prefix}" -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_STATIC=ON -DBUILD_TESTS=OFF -DBUILD_SHARED=OFF -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF`; | ||
const cmake_configure = `cmake -S "${src_dir}" -B ./build ${build_options} -DCMAKE_BUILD_TYPE=${opts.zmq_build_type} -DCMAKE_INSTALL_PREFIX="${libzmq_install_prefix}" -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_STATIC=ON -DBUILD_TESTS=OFF -DBUILD_SHARED=OFF -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF`; | ||
console.log(cmake_configure); | ||
(0, shelljs_1.exec)(cmake_configure, execOptions); | ||
const cmake_build = `cmake --build ./build --config ${CMAKE_BUILD_TYPE} --target install --parallel`; | ||
const cmake_build = `cmake --build ./build --config ${opts.zmq_build_type} --target install --parallel`; | ||
console.log(cmake_build); | ||
@@ -79,5 +90,4 @@ (0, shelljs_1.exec)(cmake_build, execOptions); | ||
main(); | ||
function archCMakeOptions() { | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
const arch = (process.env.ARCH || process.arch).toLowerCase(); | ||
function archCMakeOptions(opts) { | ||
const arch = opts.arch.toLowerCase(); | ||
if (process.platform === "win32") { | ||
@@ -84,0 +94,0 @@ // CMAKE_GENERATOR_PLATFORM only supported on Windows |
import {dirname} from "path" | ||
import {existsSync, writeFileSync} from "fs" | ||
import {mkdir, cd, exec, find, mv} from "shelljs" | ||
import {toBool, toString} from "./utils.js" | ||
const root = dirname(__dirname) | ||
type Options = { | ||
zmq_shared: boolean | ||
zmq_version: string | ||
zmq_draft: boolean | ||
zmq_build_type: string | ||
arch: string | ||
macosx_deployment_target?: string | ||
} | ||
function parseOptions(): Options { | ||
return { | ||
zmq_shared: toBool(process.env.npm_config_zmq_shared) ?? false, | ||
zmq_draft: toBool(process.env.npm_config_zmq_draft) ?? false, | ||
zmq_version: | ||
toString(process.env.npm_config_zmq_version) ?? | ||
"5657b4586f24ec433930e8ece02ddba7afcf0fe0", | ||
zmq_build_type: | ||
toString(process.env.npm_config_zmq_build_type) ?? "Release", | ||
arch: toString(process.env.npm_config_arch) ?? process.arch, | ||
macosx_deployment_target: | ||
toString(process.env.npm_config_macosx_deployment_target) ?? "10.15", | ||
} | ||
} | ||
function main() { | ||
const zmq_rev = | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
process.env.ZMQ_VERSION || "5657b4586f24ec433930e8ece02ddba7afcf0fe0" | ||
const src_url = `https://github.com/zeromq/libzmq/archive/${zmq_rev}.tar.gz` | ||
const opts = parseOptions() | ||
console.log("Building libzmq with options ", opts) | ||
if (opts.zmq_shared) { | ||
return | ||
} | ||
const src_url = `https://github.com/zeromq/libzmq/archive/${opts.zmq_version}.tar.gz` | ||
const libzmq_build_prefix = `${root}/build/libzmq-staging` | ||
@@ -20,8 +49,5 @@ const libzmq_install_prefix = `${root}/build/libzmq` | ||
const src_dir = `libzmq-${zmq_rev}` | ||
const tarball = `libzmq-${zmq_rev}.tar.gz` | ||
const src_dir = `libzmq-${opts.zmq_version}` | ||
const tarball = `libzmq-${opts.zmq_version}.tar.gz` | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
const CMAKE_BUILD_TYPE = process.env.CMAKE_BUILD_TYPE || "Release" | ||
let build_options: string = "" | ||
@@ -31,3 +57,3 @@ | ||
if (process.platform === "win32") { | ||
if (CMAKE_BUILD_TYPE !== "Debug") { | ||
if (opts.zmq_build_type !== "Debug") { | ||
build_options += " -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL" | ||
@@ -39,8 +65,7 @@ } else { | ||
build_options += archCMakeOptions() | ||
build_options += archCMakeOptions(opts) | ||
if (process.platform === "darwin") { | ||
const MACOSX_DEPLOYMENT_TARGET = "10.15" | ||
process.env.MACOSX_DEPLOYMENT_TARGET = MACOSX_DEPLOYMENT_TARGET | ||
build_options += ` -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}` | ||
process.env.MACOSX_DEPLOYMENT_TARGET = opts.macosx_deployment_target | ||
build_options += ` -DCMAKE_OSX_DEPLOYMENT_TARGET=${opts.macosx_deployment_target}` | ||
} | ||
@@ -71,3 +96,3 @@ | ||
if (process.env.ZMQ_DRAFT === "true") { | ||
if (opts.zmq_draft) { | ||
console.log("Enabling draft support") | ||
@@ -77,3 +102,3 @@ build_options += " -DENABLE_DRAFTS=ON" | ||
console.log(`Building libzmq ${CMAKE_BUILD_TYPE}`) | ||
console.log(`Building libzmq ${opts.zmq_build_type}`) | ||
@@ -86,7 +111,7 @@ // ClangFormat include causes issues but is not required to build. | ||
const cmake_configure = `cmake -S "${src_dir}" -B ./build ${build_options} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX="${libzmq_install_prefix}" -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_STATIC=ON -DBUILD_TESTS=OFF -DBUILD_SHARED=OFF -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF` | ||
const cmake_configure = `cmake -S "${src_dir}" -B ./build ${build_options} -DCMAKE_BUILD_TYPE=${opts.zmq_build_type} -DCMAKE_INSTALL_PREFIX="${libzmq_install_prefix}" -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_STATIC=ON -DBUILD_TESTS=OFF -DBUILD_SHARED=OFF -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF` | ||
console.log(cmake_configure) | ||
exec(cmake_configure, execOptions) | ||
const cmake_build = `cmake --build ./build --config ${CMAKE_BUILD_TYPE} --target install --parallel` | ||
const cmake_build = `cmake --build ./build --config ${opts.zmq_build_type} --target install --parallel` | ||
console.log(cmake_build) | ||
@@ -104,5 +129,4 @@ exec(cmake_build, execOptions) | ||
function archCMakeOptions() { | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions | ||
const arch = (process.env.ARCH || process.arch).toLowerCase() | ||
function archCMakeOptions(opts: Options) { | ||
const arch = opts.arch.toLowerCase() | ||
@@ -109,0 +133,0 @@ if (process.platform === "win32") { |
@@ -8,3 +8,3 @@ { | ||
"include": ["./**/*.mts"], | ||
"exclude": [] | ||
"exclude": ["./**/*.d.mts"] | ||
} |
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./" | ||
"outDir": "./", | ||
}, | ||
"include": ["./**/*.ts"], | ||
"exclude": [] | ||
"include": [ | ||
"./**/*.ts", | ||
"./**/*.cts" | ||
], | ||
"exclude": [ | ||
"./**/*.d.ts", | ||
"./**/*.d.cts" | ||
] | ||
} |
@@ -1,28 +0,4 @@ | ||
/* eslint-disable @typescript-eslint/camelcase */ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
/* The API of the compatibility layer and parts of the implementation has been | ||
adapted from the original ZeroMQ.js version (up to 5.x) for which the license | ||
and copyright notice is reproduced below. | ||
Copyright (c) 2017-2019 Rolf Timmermans | ||
Copyright (c) 2011 TJ Holowaychuk | ||
Copyright (c) 2010, 2011 Justin Tulloss | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
/* | ||
The API of the compatibility layer and parts of the implementation has been | ||
adapted from the original ZeroMQ.js version (up to 5.x) | ||
*/ | ||
@@ -928,2 +904,3 @@ | ||
Socket, | ||
SocketType, | ||
createSocket as socket, | ||
@@ -930,0 +907,0 @@ createSocket, |
@@ -626,7 +626,4 @@ /* eslint-disable @typescript-eslint/no-var-requires */ | ||
/* https://stackoverflow.com/questions/49579094 */ | ||
type IfEquals<X, Y, A, B = never> = (<T>() => T extends X ? 1 : 2) extends < | ||
T, | ||
>() => T extends Y ? 1 : 2 | ||
? A | ||
: B | ||
type IfEquals<X, Y, A, B = never> = | ||
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B | ||
@@ -633,0 +630,0 @@ /* https://stackoverflow.com/questions/57683303 */ |
{ | ||
"root": true, | ||
"compilerOptions": { | ||
@@ -7,3 +8,7 @@ "allowJs": false, | ||
"module": "commonjs", | ||
"types": ["node", "mocha"], | ||
"moduleResolution": "node", | ||
"types": [ | ||
"node", | ||
"mocha" | ||
], | ||
"strictPropertyInitialization": false, // TODO | ||
@@ -21,4 +26,8 @@ "strict": true, | ||
"esModuleInterop": true, | ||
"lib": ["ES2020", "dom"] | ||
"lib": [ | ||
"ES2020", | ||
// only used in tests | ||
"ES2021.WeakRef" | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3
0
0
480
7
5865350
33
91
3
70
7217
22
- Removedcross-env@^7.0.3
- Removedshx@^0.3.4
- Removedcross-env@7.0.3(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedisexe@2.0.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedshx@0.3.4(transitive)
- Removedwhich@2.0.2(transitive)