Skip to content

Commit 1cf6434

Browse files
committed
fix: reference for npm tokens
1 parent bc8a20c commit 1cf6434

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/workflows/beta-release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ jobs:
3939
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
4040

4141
- name: Release a new beta version
42-
run: npm publish --tag beta
42+
run: npm publish --tag beta --provenance --access public
4343
env:
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
NODE_AUTH_TOKEN: ''
45+
NPM_TOKEN: ''
4546

4647
- uses: actions/github-script@v6
4748
with:

.github/workflows/pull-request.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818

1919
beta_release:
2020
uses: ./.github/workflows/beta-release.yaml
21-
# allow the children job to have access to the secrets of the repository
22-
secrets: inherit
2321

2422
fail_if_pull_request_is_draft:
2523
if: github.event.pull_request.draft == true

src/components/TooltipController/TooltipController.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
8989
const { anchorRefs, activeAnchor: providerActiveAnchor } = useTooltip(id)
9090

9191
const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {
92-
const dataAttributes = elementReference?.getAttributeNames().reduce((acc, name) => {
93-
if (name.startsWith('data-tooltip-')) {
94-
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
95-
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
96-
}
97-
return acc
98-
}, {} as Record<DataAttribute, string | null>)
92+
const dataAttributes = elementReference?.getAttributeNames().reduce(
93+
(acc, name) => {
94+
if (name.startsWith('data-tooltip-')) {
95+
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
96+
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
97+
}
98+
return acc
99+
},
100+
{} as Record<DataAttribute, string | null>,
101+
)
99102

100103
return dataAttributes
101104
}

0 commit comments

Comments
 (0)