From 96f99c714715651b85eb7a03f58ecc9e1316d156 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 22 Aug 2023 13:04:57 -0400 Subject: [PATCH] [error-utils] fix `files` in package.json to use `dist` (#10378) These packages were publishing unnecessary files to npm so we can reduce to only the `dist` directory. - Example: https://unpkg.com/browse/@vercel/error-utils@2.0.0/ - Docs: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files --- .changeset/fuzzy-yaks-judge.md | 5 +++++ internals/constants/package.json | 3 +++ internals/get-package-json/package.json | 2 +- internals/types/package.json | 3 +++ packages/error-utils/package.json | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .changeset/fuzzy-yaks-judge.md diff --git a/.changeset/fuzzy-yaks-judge.md b/.changeset/fuzzy-yaks-judge.md new file mode 100644 index 000000000..f39d48135 --- /dev/null +++ b/.changeset/fuzzy-yaks-judge.md @@ -0,0 +1,5 @@ +--- +"@vercel/error-utils": patch +--- + +fix `files` in package.json to use `dist` diff --git a/internals/constants/package.json b/internals/constants/package.json index 9bd252504..ff18bcea0 100644 --- a/internals/constants/package.json +++ b/internals/constants/package.json @@ -4,6 +4,9 @@ "version": "1.0.4", "types": "dist/index.d.ts", "main": "dist/index.js", + "files": [ + "dist" + ], "scripts": { "build": "tsc -p tsconfig.json" }, diff --git a/internals/get-package-json/package.json b/internals/get-package-json/package.json index 82ad0616e..19fcb68c6 100644 --- a/internals/get-package-json/package.json +++ b/internals/get-package-json/package.json @@ -5,7 +5,7 @@ "types": "dist/index.d.ts", "main": "dist/index.js", "files": [ - "dist/*" + "dist" ], "scripts": { "build": "tsc", diff --git a/internals/types/package.json b/internals/types/package.json index 3a75aa280..92b279dc4 100644 --- a/internals/types/package.json +++ b/internals/types/package.json @@ -4,6 +4,9 @@ "version": "1.0.7", "types": "index.d.ts", "main": "index.d.ts", + "files": [ + "*.d.ts" + ], "dependencies": { "@types/node": "14.14.31", "@vercel-internals/constants": "1.0.4", diff --git a/packages/error-utils/package.json b/packages/error-utils/package.json index bb4e7c244..e3ed241b5 100644 --- a/packages/error-utils/package.json +++ b/packages/error-utils/package.json @@ -4,6 +4,9 @@ "description": "A collection of error utilities for vercel/vercel", "main": "dist/index.js", "types": "dist/index.d.ts", + "files": [ + "dist" + ], "repository": { "type": "git", "url": "https://github.com/vercel/vercel.git",