diff --git a/package-lock.json b/package-lock.json index 84fbda1a..13dd4bcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@datadog/pprof", - "version": "5.16.0", + "version": "5.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datadog/pprof", - "version": "5.16.0", + "version": "5.16.1", "license": "Apache-2.0", "dependencies": { "node-gyp-build": "^4.8.4", @@ -22,13 +22,13 @@ "clang-format": "^1.8.0", "codecov": "^3.8.3", "deep-copy": "^1.4.2", - "eslint-plugin-n": "^18.0.1", + "eslint-plugin-n": "^18.2.1", "gts": "^7.0.0", "js-green-licenses": "^4.0.0", "mocha": "^11.7.6", - "nan": "^2.27.0", + "nan": "^2.28.0", "nyc": "^18.0.0", - "semver": "^7.8.1", + "semver": "^7.8.5", "sinon": "^22.0.0", "source-map-support": "^0.5.21", "tmp": "0.2.7", @@ -2245,9 +2245,9 @@ } }, "node_modules/eslint-plugin-n": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-18.1.0.tgz", - "integrity": "sha512-hkUm9EtnFV2h2fE16jNVUfCVUqvPzI7fGLsFdun5lFt/pbmf2kCgDx6ymi9rx+NCUSggBmurJCZOfG20JBs/kg==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-18.2.1.tgz", + "integrity": "sha512-aO3C9//yq8JIvYOi/T+jPvcZ9hZzpwzbR8esrYpFtgE9vpbyM8kn42AQOtIqYspVmpaSWr8X+nrlQuAJYxXAaw==", "dev": true, "license": "MIT", "dependencies": { @@ -4290,9 +4290,9 @@ "license": "ISC" }, "node_modules/nan": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.27.0.tgz", - "integrity": "sha512-hC+0LidcL3XE4rp1C4H54KujgXKzbfyTngZTwBByQxsOxCEKZT0MPQ4hOKUH2jU1OYstqdDH4onyHPDzcV0XdQ==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.28.0.tgz", + "integrity": "sha512-fTsDz99OTq2sVePhGdp4qQhggZFtKr64ZNVyVajRKtMOkJxYekplBh577PiJB12v/D3s2E5cGtOI45LWp6rnLQ==", "dev": true, "license": "MIT" }, @@ -5641,9 +5641,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", - "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { diff --git a/package.json b/package.json index c0f35521..9e0c9c19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/pprof", - "version": "5.16.0", + "version": "5.16.1", "description": "pprof support for Node.js", "repository": { "type": "git", @@ -8,6 +8,7 @@ }, "main": "out/src/index.js", "types": "out/src/index.d.ts", + "gypfile": false, "scripts": { "build:asan": "node-gyp configure build --jobs=max --address_sanitizer", "build:tsan": "node-gyp configure build --jobs=max --thread_sanitizer", @@ -49,13 +50,13 @@ "clang-format": "^1.8.0", "codecov": "^3.8.3", "deep-copy": "^1.4.2", - "eslint-plugin-n": "^18.0.1", + "eslint-plugin-n": "^18.2.1", "gts": "^7.0.0", "js-green-licenses": "^4.0.0", "mocha": "^11.7.6", - "nan": "^2.27.0", + "nan": "^2.28.0", "nyc": "^18.0.0", - "semver": "^7.8.1", + "semver": "^7.8.5", "sinon": "^22.0.0", "source-map-support": "^0.5.21", "tmp": "0.2.7", diff --git a/ts/test/test-no-build-scripts.ts b/ts/test/test-no-build-scripts.ts index 4aee2b12..cb7ba35f 100644 --- a/ts/test/test-no-build-scripts.ts +++ b/ts/test/test-no-build-scripts.ts @@ -3,12 +3,23 @@ import * as fs from 'fs'; import * as path from 'path'; describe('package manifest', () => { + const manifest = path.join(__dirname, '..', '..', 'package.json'); + const pkg = JSON.parse(fs.readFileSync(manifest, 'utf8')); + it('declares no npm build lifecycle scripts (Yarn Berry YN0007)', () => { - const manifest = path.join(__dirname, '..', '..', 'package.json'); - const pkg = JSON.parse(fs.readFileSync(manifest, 'utf8')); const scripts = pkg.scripts || {}; const hooks = ['preinstall', 'install', 'postinstall']; const present = hooks.filter(name => scripts[name] !== undefined); assert.deepStrictEqual(present, []); }); + + it('opts out of node-gyp on install via gypfile:false (npm implicit rebuild)', () => { + // binding.gyp lives in the dev tree (excluded from the published tarball). + // Without gypfile:false, npm's publish-time normalization synthesizes + // "gypfile": true and "install": "node-gyp rebuild" into the registry + // manifest, so consumers run node-gyp rebuild against a missing + // binding.gyp and the install fails. Pinning gypfile:false suppresses + // that hook while keeping the manifest free of lifecycle scripts. + assert.strictEqual(pkg.gypfile, false); + }); });