Skip to content

Commit

Permalink
fix(octicons_react): include extension in type declaration (#1020)
Browse files Browse the repository at this point in the history
* ci: update octicons_react job to check types

* fix(octicons_react): include extension in type declaration

* chore: add changeset

* ci: update arethetypeswrong to run directly instead of from pack
  • Loading branch information
joshblack authored Apr 18, 2024
1 parent 30be326 commit 449d81f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-crabs-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/octicons': patch
---

Update types for @primer/octicons-react to explicitly include extensions for different moduleResolution settings
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ jobs:
run: yarn lint
- name: Test
run: yarn test
- name: Types
run: |
# Run @arethetypeswrong/cli
npx @arethetypeswrong/cli --pack .
# Run publint
npx publint . --strict
octicons_gem:
name: 'gem:octicons'
Expand Down
4 changes: 2 additions & 2 deletions lib/octicons_react/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -20,4 +20,4 @@ export interface OcticonProps {
verticalAlign?: 'middle' | 'text-bottom' | 'text-top' | 'top' | 'unset'
}

export * from './__generated__/icons'
export * from './__generated__/icons.js'

0 comments on commit 449d81f

Please sign in to comment.