Skip to content

Commit 449d81f

Browse files
authored
fix(octicons_react): include extension in type declaration (#1020)
* 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
1 parent 30be326 commit 449d81f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.changeset/blue-crabs-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/octicons': patch
3+
---
4+
5+
Update types for @primer/octicons-react to explicitly include extensions for different moduleResolution settings

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ jobs:
8888
run: yarn lint
8989
- name: Test
9090
run: yarn test
91+
- name: Types
92+
run: |
93+
# Run @arethetypeswrong/cli
94+
npx @arethetypeswrong/cli --pack .
95+
96+
# Run publint
97+
npx publint . --strict
9198
9299
octicons_gem:
93100
name: 'gem:octicons'

lib/octicons_react/src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import * as React from 'react'
33

44
// eslint-disable-next-line prettier/prettier
5-
import { Icon } from './__generated__/icons'
5+
import {Icon} from './__generated__/icons.js'
66

77
type Size = 'small' | 'medium' | 'large'
88

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

23-
export * from './__generated__/icons'
23+
export * from './__generated__/icons.js'

0 commit comments

Comments
 (0)