From b563bc34b09f41c15621e106290f23f72ca3e23d Mon Sep 17 00:00:00 2001 From: Josh Black Date: Mon, 15 Apr 2024 12:33:55 -0500 Subject: [PATCH 1/4] ci: update octicons_react job to check types --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 200b2f2a4..e8e6af830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,16 @@ jobs: run: yarn lint - name: Test run: yarn test + - name: Types + run: | + yarn pack + VERSION=$(jq -r '.version' package.json) + + # Run @arethetypeswrong/cli + npx @arethetypeswrong/cli --pack 'primer-octicons-react-v$VERSION.tgz' + + # Run publint + npx publint . --strict octicons_gem: name: 'gem:octicons' From 01214a51e1c2e0af6ce0e46c45167f29d425630a Mon Sep 17 00:00:00 2001 From: Josh Black Date: Mon, 15 Apr 2024 12:34:24 -0500 Subject: [PATCH 2/4] fix(octicons_react): include extension in type declaration --- lib/octicons_react/src/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/octicons_react/src/index.d.ts b/lib/octicons_react/src/index.d.ts index ed922ea5b..3b7302c5b 100644 --- a/lib/octicons_react/src/index.d.ts +++ b/lib/octicons_react/src/index.d.ts @@ -2,7 +2,7 @@ import * as React from 'react' // eslint-disable-next-line prettier/prettier -import { Icon } from './__generated__/icons' +import {Icon} from './__generated__/icons.js' type Size = 'small' | 'medium' | 'large' @@ -20,4 +20,4 @@ export interface OcticonProps { verticalAlign?: 'middle' | 'text-bottom' | 'text-top' | 'top' | 'unset' } -export * from './__generated__/icons' +export * from './__generated__/icons.js' From a81fa133993dc38536cd14d4725bb45c34823b0a Mon Sep 17 00:00:00 2001 From: Josh Black Date: Mon, 15 Apr 2024 12:35:03 -0500 Subject: [PATCH 3/4] chore: add changeset --- .changeset/blue-crabs-tie.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/blue-crabs-tie.md diff --git a/.changeset/blue-crabs-tie.md b/.changeset/blue-crabs-tie.md new file mode 100644 index 000000000..3089b87eb --- /dev/null +++ b/.changeset/blue-crabs-tie.md @@ -0,0 +1,5 @@ +--- +'@primer/octicons': patch +--- + +Update types for @primer/octicons-react to explicitly include extensions for different moduleResolution settings From ac146f1fbde896e506e32650821e3f6239f0367f Mon Sep 17 00:00:00 2001 From: Josh Black Date: Mon, 15 Apr 2024 15:18:27 -0500 Subject: [PATCH 4/4] ci: update arethetypeswrong to run directly instead of from pack --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8e6af830..eb904b2c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,11 +90,8 @@ jobs: run: yarn test - name: Types run: | - yarn pack - VERSION=$(jq -r '.version' package.json) - # Run @arethetypeswrong/cli - npx @arethetypeswrong/cli --pack 'primer-octicons-react-v$VERSION.tgz' + npx @arethetypeswrong/cli --pack . # Run publint npx publint . --strict