🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@datadog/libdatadog

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/libdatadog - npm Package Compare versions

Comparing version

to
0.5.0

prebuilds/library_config/library_config_bg.wasm

17

load.js

@@ -27,8 +27,19 @@ 'use strict'

const filename = find(name)
const filenameWASM = findWASM(name)
if (!filename) {
throw new Error(`Could not find a ${name} binary for ${PLATFORM}${LIBC}-${ARCH}.`)
if (filename) {
return runtimeRequire(filename)
} else if (filenameWASM) {
return runtimeRequire(filenameWASM)
}
throw new Error(`Could not find a ${name} binary for ${PLATFORM}${LIBC}-${ARCH} nor a ${name} WASM module.`)
}
return runtimeRequire(filename)
function findWASM (name) {
const root = __dirname
const prebuilds = path.join(root, 'prebuilds')
const folders = readdirSync(prebuilds)
if (folders.find(f => f === name)) {
return path.join(prebuilds, name, `${name}.js`)
}
}

@@ -35,0 +46,0 @@

8

package.json
{
"name": "@datadog/libdatadog",
"version": "0.4.0",
"version": "0.5.0",
"description": "Node.js binding for libdatadog",
"main": "index.js",
"scripts": {
"build": "yarn -s build-debug",
"install-wasm-pack": "curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh",
"build": "yarn -s build-debug && yarn -s build-wasm",
"build-debug": "mkdir -p target && yarn -s cargo-build > ./target/out.ndjson && yarn -s copy-artifacts",
"build-release": "mkdir -p target && yarn -s cargo-build-release > ./target/out.ndjson && yarn -s copy-artifacts",
"build-all": "mkdir -p target && yarn -s cargo-build -- --workspace > ./target/out.ndjson && yarn -s copy-artifacts",
"build-all": "mkdir -p target && yarn -s cargo-build -- --workspace > ./target/out.ndjson && yarn -s copy-artifacts && yarn -s build-wasm",
"build-wasm": "yarn -s install-wasm-pack && wasm-pack build --target nodejs ./crates/library_config --out-dir ../../prebuilds/library_config",
"cargo-build-release": "yarn -s cargo-build -- --release",

@@ -12,0 +14,0 @@ "cargo-build": "cargo build --message-format=json-render-diagnostics",

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