Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/profiling-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"/scripts/prune-profiler-binaries.js"
],
"scripts": {
"install": "node scripts/check-build.js",
"clean": "rm -rf build && rm -rf lib",
"lint": "yarn lint:eslint && yarn lint:clang",
"lint:eslint": "eslint . --format stylish",
Expand All @@ -63,6 +64,8 @@
"build:types:downlevel": "yarn downlevel-dts lib/types lib/types-ts3.8 --to ts3.8",
"build:types": "tsc -p tsconfig.types.json && yarn build:types:downlevel",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:bindings:configure": "node-gyp configure",
"build:bindings": "node-gyp build && node scripts/copy-target.js",
"build:copy-bindings": "cp -r compiled-bindings/ lib/",
"build:dev": "yarn clean && yarn build",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/profiling-node/scripts/check-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function clean(err) {

function recompileFromSource() {
console.log('@sentry/profiling-node: Compiling from source...');
let spawn = child_process.spawnSync('npm', ['run', 'build:bindings:configure'], {
let spawn = child_process.spawnSync('npm run build:bindings:configure', {
stdio: ['inherit', 'inherit', 'pipe'],
env: process.env,
shell: true,
Expand All @@ -23,7 +23,7 @@ function recompileFromSource() {
return;
}

spawn = child_process.spawnSync('npm', ['run', 'build:bindings'], {
spawn = child_process.spawnSync('npm run build:bindings', {
stdio: ['inherit', 'inherit', 'pipe'],
env: process.env,
shell: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/profiling-node/src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export const _nodeProfilingIntegration = ((): ProfilingIntegration<NodeClient> =
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
`[Sentry Profiling] You are using a Node.js version that does not have prebuilt binaries (${NODE_VERSION}).`,
`[Sentry Profiling] You are using a Node.js version that does not have prebuilt binaries (${NODE_VERSION.major}.${NODE_VERSION.minor}.${NODE_VERSION.patch}).`,
'The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22.',
'To use the @sentry/profiling-node package with this version of Node.js, you will need to compile the native addon from source.',
'See: https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node#building-the-package-from-source',
Expand Down
Loading