Skip to content
Open
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
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@datadog/pprof",
"version": "5.16.0",
"version": "5.16.1",
"description": "pprof support for Node.js",
"repository": {
"type": "git",
"url": "git+https://github.com/DataDog/pprof-nodejs.git"
},
"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",
Expand Down Expand Up @@ -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",
Expand Down
15 changes: 13 additions & 2 deletions ts/test/test-no-build-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Loading