From 70771b7eb0e69a5094357653424fc2ac3d4a76a9 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Fri, 13 Jan 2023 12:01:09 -0600 Subject: [PATCH 1/3] fix(octicons-react): add files to package.json and update npmignore --- lib/octicons_react/.npmignore | 4 +++- lib/octicons_react/package.json | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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..3c49eb3fc 100644 --- a/lib/octicons_react/package.json +++ b/lib/octicons_react/package.json @@ -19,6 +19,10 @@ "ts-test": "tsc -P ts-tests", "posttest": "yarn ts-test" }, + "files": [ + "build", + "dist" + ], "keywords": [ "GitHub", "icons", From 044d42319d7f9b96fc5c4fa6305b12513f88656e Mon Sep 17 00:00:00 2001 From: Josh Black Date: Fri, 13 Jan 2023 12:06:50 -0600 Subject: [PATCH 2/3] chore: add exports key to package.json --- lib/octicons_react/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/octicons_react/package.json b/lib/octicons_react/package.json index 3c49eb3fc..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", From 09b5a779e311003c9ee0ceec93930d16413daccc Mon Sep 17 00:00:00 2001 From: Josh Black Date: Fri, 13 Jan 2023 12:09:55 -0600 Subject: [PATCH 3/3] Create mighty-berries-behave.md --- .changeset/mighty-berries-behave.md | 5 +++++ 1 file changed, 5 insertions(+) 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`