From ce11fb3b3c67b9c0f4f69bec14e5a962b189cba2 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Tue, 17 Jan 2023 09:47:21 -0600 Subject: [PATCH] feat(octicons-react): add files to package.json and update npmignore (#895) * fix(octicons-react): add files to package.json and update npmignore * chore: add exports key to package.json * Create mighty-berries-behave.md Co-authored-by: Josh Black --- .changeset/mighty-berries-behave.md | 5 +++++ lib/octicons_react/.npmignore | 4 +++- lib/octicons_react/package.json | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .changeset/mighty-berries-behave.md diff --git a/.changeset/mighty-berries-behave.md b/.changeset/mighty-berries-behave.md new file mode 100644 index 000000000..965886a13 --- /dev/null +++ b/.changeset/mighty-berries-behave.md @@ -0,0 +1,5 @@ +--- +"@primer/octicons-react": minor +--- + +Update the npm package for `@primer/octicons-react` to include the `exports` field and explicitly list out files in `package.json` diff --git a/lib/octicons_react/.npmignore b/lib/octicons_react/.npmignore index 9722ae78b..d6b26beb4 100644 --- a/lib/octicons_react/.npmignore +++ b/lib/octicons_react/.npmignore @@ -7,4 +7,6 @@ .next script src -./pages +**/pages/** +**/__tests__/** +**/ts-tests/** diff --git a/lib/octicons_react/package.json b/lib/octicons_react/package.json index 06d9ba733..a77d3b144 100644 --- a/lib/octicons_react/package.json +++ b/lib/octicons_react/package.json @@ -7,6 +7,10 @@ "license": "MIT", "main": "dist/index.umd.js", "module": "dist/index.esm.js", + "exports": { + "import": "dist/index.esm.js", + "require": "dist/index.umd.js" + }, "sideEffects": false, "types": "dist/index.d.ts", "repository": "primer/octicons", @@ -19,6 +23,10 @@ "ts-test": "tsc -P ts-tests", "posttest": "yarn ts-test" }, + "files": [ + "build", + "dist" + ], "keywords": [ "GitHub", "icons",