diff --git a/nodejs/BUILD b/nodejs/BUILD index 263927036..b5969123a 100644 --- a/nodejs/BUILD +++ b/nodejs/BUILD @@ -53,6 +53,7 @@ USER = [ name = "nodejs" + major_version + ("" if (not mode) else mode) + "_" + user + "_" + arch + "_" + distro + "_test", configs = [ "testdata/nodejs" + major_version + ".yaml", + "testdata/check_headers.yaml", "testdata/check_npm.yaml", ], image = "nodejs" + major_version + ("" if (not mode) else mode) + "_" + user + "_" + arch + "_" + distro, diff --git a/nodejs/testdata/check_headers.yaml b/nodejs/testdata/check_headers.yaml new file mode 100644 index 000000000..d32ee4066 --- /dev/null +++ b/nodejs/testdata/check_headers.yaml @@ -0,0 +1,5 @@ +schemaVersion: "2.0.0" +fileExistenceTests: + - name: npm + path: '/nodejs/include/node/node.h' + shouldExist: false diff --git a/private/remote/node_archive.bzl b/private/remote/node_archive.bzl index e020120a0..0aac37657 100644 --- a/private/remote/node_archive.bzl +++ b/private/remote/node_archive.bzl @@ -9,13 +9,9 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar") pkg_tar( name = "data", srcs = glob( - ["output/**/*"], - exclude = [ - "output/lib/node_modules/corepack/**", - "output/lib/node_modules/npm/**", - "output/bin/corepack", - "output/bin/npm", - "output/bin/npx", + [ + "output/bin/node", + "output/LICENSE", ], ), package_dir = "/nodejs",