Socket
Socket
Sign inDemoInstall

@sentry/profiling-node

Package Overview
Dependencies
Maintainers
12
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/profiling-node - npm Package Compare versions

Comparing version 0.3.0 to 1.0.0-alpha.1

lib/binaries/sentry_cpu_profiler-v108-darwin-x64.node

19

package.json
{
"name": "@sentry/profiling-node",
"version": "0.3.0",
"version": "1.0.0-alpha.1",
"description": "Sampling based nodejs profiler.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"types": "lib/types/index.d.ts",
"repository": {

@@ -18,3 +19,2 @@ "type": "git",

"binding.gyp",
"root.js",
"LICENSE",

@@ -24,3 +24,2 @@ "README.md",

"package-lock.json",
"binaries",
"scripts/binaries.js",

@@ -37,9 +36,9 @@ "scripts/check-build.js",

"build": "npm run build:bindings && npm run build:lib",
"build:lib": "tsc -p ./tsconfig.json",
"build:lib": "tsc -p ./tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p ./tsconfig.types.json",
"build:configure": "node-gyp configure",
"build:configure:arm64": "node-gyp configure --arch=arm64",
"build:bindings": "node-gyp build",
"build:bindings": "node-gyp build && node scripts/copy-target.js",
"build:bindings:arm64": "node-gyp build --arch=arm64",
"build:benchmark:format": "node-gyp -DFORMAT_BENCHMARK=1 build",
"build:dev": "npm run clean && npm run build:configure && npm run build && node scripts/copy-target.js",
"build:dev": "npm run clean && npm run build:configure && npm run build",
"benchmark": "npm run benchmark:methods && npm run benchmark:profiler && npm run benchmark:server && npm run benchmark:format",

@@ -70,2 +69,3 @@ "benchmark:methods": "node benchmarks/cpu/benchmark.methods.js",

"dependencies": {
"@sentry/core": "^7.44.0",
"@sentry/hub": "^7.44.1",

@@ -76,2 +76,3 @@ "@sentry/node": "^7.44.1",

"@sentry/utils": "^7.44.1",
"app-root-path": "^3.1.0",
"detect-libc": "^2.0.1",

@@ -103,4 +104,4 @@ "nan": "^2.17.0",

"ts-node": "^10.9.1",
"typescript": "^4.8.3"
"typescript": "^5.0.2"
}
}

@@ -19,3 +19,3 @@ /* eslint-env node */

const source = path.join(__dirname, '..', 'build', 'Release', 'sentry_cpu_profiler.node');
const target = path.join(__dirname, '..', 'binaries', getModuleName());
const target = path.join(__dirname, '..', 'lib', 'binaries', getModuleName());

@@ -22,0 +22,0 @@ module.exports.getModuleName = getModuleName;

@@ -23,6 +23,16 @@ /* eslint-env node */

try {
console.log('@sentry/profiling-node: Precompiled binary found, attempting to load...');
require(target);
console.log('@sentry/profiling-node: Precompiled binary found, skipping build from source.');
if (existsSync(target)) {
console.log('@sentry/profiling-node: Precompiled binary found, attempting to load...');
require(target);
console.log('@sentry/profiling-node: Precompiled binary found, skipping build from source.');
} else {
console.log('@sentry/profiling-node: Precompiled binary not found, attempting to compile...');
const success = recompileFromSource();
if (success) {
process.exit(0);
}
}
} catch (e) {
console.log('@sentry/profiling-node: Precompiled binary found but failed loading');
// Check for node version missmatch

@@ -35,4 +45,5 @@ if (/was compiled against a different Node.js/.test(e.message)) {

}
// Not sure if this could even happen, but just in case it somehow does,
// we can provide a better experience than just crashing with cannot find module message.
// we can provide a better experience than just crashing with cannot find module message.
if (/Cannot find module/.test(e.message)) {

@@ -39,0 +50,0 @@ const success = recompileFromSource();

@@ -7,3 +7,9 @@ /* eslint-env node */

const binaries = path.resolve(__dirname, '..', 'binaries');
const lib = path.resolve(__dirname, '..', 'lib');
const binaries = path.resolve(__dirname, '..', 'lib', 'binaries');
if (!fs.existsSync(lib)) {
fs.mkdirSync(lib);
}
if (!fs.existsSync(binaries)) {

@@ -14,5 +20,5 @@ fs.mkdirSync(binaries);

const source = path.join(__dirname, '..', 'build', 'Release', 'sentry_cpu_profiler.node');
const target = path.join(__dirname, '..', 'binaries', getModuleName());
const target = path.join(__dirname, '..', 'lib', 'binaries', getModuleName());
console.log('Renaming', source, 'to', target);
fs.renameSync(source, target);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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