Skip to content

Commit

Permalink
chore: remove @reach/auto-id dep, opt for react's useId (#989)
Browse files Browse the repository at this point in the history
* remove reach useId dep

* remove react/auto-id dep, use react

* adds changeset

* update peer dep to react 18

* update changeset to be major
  • Loading branch information
kendallstrautman committed Aug 2, 2023
1 parent 6d7763d commit 1338cdc
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 170 deletions.
7 changes: 7 additions & 0 deletions .changeset/old-days-rescue.md
@@ -0,0 +1,7 @@
---
'@hashicorp/react-checkbox-input': major
'@hashicorp/react-text-input': major
'@hashicorp/react-textarea-input': major
---

Remove @reach/auto-id dependency in favor of react's `useId` and update peer dependency `react` version to >=18.x
167 changes: 7 additions & 160 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/checkbox-input/index.js
Expand Up @@ -3,8 +3,7 @@
* SPDX-License-Identifier: MPL-2.0
*/

import React from 'react'
import { useId } from '@reach/auto-id'
import React, { useId } from 'react'
import s from './style.module.css'
import classNames from 'classnames'

Expand Down
3 changes: 1 addition & 2 deletions packages/checkbox-input/package.json
Expand Up @@ -7,13 +7,12 @@
"Zach Shilton"
],
"dependencies": {
"@reach/auto-id": "^0.17.0",
"classnames": "^2.3.1"
},
"license": "MPL-2.0",
"peerDependencies": {
"@hashicorp/mktg-global-styles": ">=3.x",
"react": ">=16.x"
"react": ">=18.x"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/text-input/index.js
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: MPL-2.0
*/

import { useId } from 'react'
import classNames from 'classnames'
import { useId } from '@reach/auto-id'
import s from './style.module.css'

function TextInput({
Expand Down
3 changes: 1 addition & 2 deletions packages/text-input/package.json
Expand Up @@ -7,13 +7,12 @@
"Zach Shilton"
],
"dependencies": {
"@reach/auto-id": "^0.17.0",
"classnames": "^2.3.1"
},
"license": "MPL-2.0",
"peerDependencies": {
"@hashicorp/mktg-global-styles": ">=3.x",
"react": ">=16.x"
"react": ">=18.x"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/textarea-input/index.tsx
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: MPL-2.0
*/

import { useId } from 'react'
import clsx from 'clsx'
import { useId } from '@reach/auto-id'
import type { ChangeEventHandler, FocusEventHandler } from 'react'
import s from './style.module.css'

Expand Down
3 changes: 1 addition & 2 deletions packages/textarea-input/package.json
Expand Up @@ -7,13 +7,12 @@
"Zach Shilton"
],
"dependencies": {
"@reach/auto-id": "^0.17.0",
"clsx": "^1.1.1"
},
"license": "MPL-2.0",
"peerDependencies": {
"@hashicorp/mktg-global-styles": ">=3.x",
"react": ">=16.x"
"react": ">=18.x"
},
"publishConfig": {
"access": "public"
Expand Down

1 comment on commit 1338cdc

@vercel
Copy link

@vercel vercel bot commented on 1338cdc Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.