Skip to content
Draft
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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"compile": "tsc -p .",
"fix": "gts fix",
"format": "clang-format --style file -i --glob='bindings/**/*.{h,hh,cpp,cc}'",
"install": "exit 0",
"lint": "jsgl --local . && gts check && clang-format --style file -n -Werror --glob='bindings/**/*.{h,hh,cpp,cc}'",
"prepare": "npm run compile && npm run rebuild",
"pretest:js-asan": "npm run compile && npm run build:asan",
Expand Down
14 changes: 14 additions & 0 deletions ts/test/test-no-build-scripts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as assert from 'assert';
import * as fs from 'fs';
import * as path from 'path';

describe('package manifest', () => {
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, []);
});
});
Loading