From 5ec0c21c929baa7ff47e8a1c80e558536aa0db93 Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Mon, 30 Aug 2021 12:46:07 -0700 Subject: [PATCH] Update package.json's `files` list Updates package.json to: * Include `src` which enables setting breakpoints in patch-package code when it's not running, and enables you to navigate from breakpoints in VSCode to the corresponding source line. Also prevents an annoyance where every time I debug into patch-package code, VSCode prompts me for the directory location of the corresponding TS source file (which I can't provide because it's not installed). * Exclude *.test.js and *.test.ts files that shouldn't be installed via `npm install` or `yarn add`. I tested this config using `npm pack` and the results are as expected: test files are missing and src files are present. --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index bf67ee95..8416a2b1 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,9 @@ "files": [ "index.js", "dist/**/*.js", + "!dist/**/*.test.js", + "src/**/*.ts", + "!src/**/*.test.ts", "CHANGELOG.md", "LICENSE", "patch-package-banner.png",