From c6b3f96f850c00f9b988475fbb05cd2df2e5d6b6 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 22 Mar 2022 10:46:38 +0100 Subject: [PATCH] ensure generated types are published as well In my testing, I was publishing using a node 16 install, but on CI we are using Node 12. It seems that the NPM that shipped with Node 12 ignores all files for publishing if they are mentioned in `.gitignore` which I could reproduce locally. Doing a bit of testing, I used this solution which I think we also used in v2 when generating `dist/` files. The `npm publish --dry-run` now _does_ include the generated types as well and they are still ignored for version control. --- .gitignore | 1 + types/generated/.gitignore | 2 -- types/generated/.gitkeep | 0 3 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 types/generated/.gitignore create mode 100644 types/generated/.gitkeep diff --git a/.gitignore b/.gitignore index 03592caf4..fc3080cf8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ tailwind.config.js index.html yarn.lock yarn-error.log +types/generated/*.d.ts # Perf related files isolate*.log diff --git a/types/generated/.gitignore b/types/generated/.gitignore deleted file mode 100644 index d6b7ef32c..000000000 --- a/types/generated/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/types/generated/.gitkeep b/types/generated/.gitkeep new file mode 100644 index 000000000..e69de29bb