From 543ed75e8435fb93f76700d2202328e23cf4889f Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Mon, 15 Jan 2024 20:36:56 +0000 Subject: [PATCH 1/2] Safelist files to be added to the published package Currently we include all files including tests, ci scripts and tooling config. See: https://npmfs.com/package/replicate/0.25.2/ --- package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package.json b/package.json index ca06b8bd..d0d77fb3 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,16 @@ "license": "Apache-2.0", "main": "index.js", "type": "commonjs", + "types": "index.d.ts", + "files": [ + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "index.d.ts", + "index.js", + "lib/**/*.js", + "package.json" + ], "engines": { "node": ">=18.0.0", "npm": ">=7.19.0", From aedea0c7370eca8e10ec84ee947bb4dd49fe469c Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Wed, 17 Jan 2024 15:35:26 +0000 Subject: [PATCH 2/2] Update CI integration tests to run the Replicate tarball --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de7cec3d..b42984ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,5 +47,8 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: "npm" - - run: npm --prefix integration/${{ matrix.suite }} ci --omit=dev - - run: npm --prefix integration/${{ matrix.suite }} test + # Build a production tarball and run the integration tests against it. + - run: | + PKG_TARBALL=$(npm --loglevel error pack) + npm --prefix integration/${{ matrix.suite }} install "file:/./$PKG_TARBALL" + npm --prefix integration/${{ matrix.suite }} test