Skip to content

Conversation

heath-freenome
Copy link
Member

Reasons for making this change

As part of v6 readiness, removed old deprecations and bumped react support to >= 18

  • Updated all of the package.json files to change react peer dependency support to >=18
  • Updated Form to remove the deprecated acceptcharset
    • Updated the tests accordingly
  • Updated SchemaField to remove support for the deprecated uiSchema.classNames
    • Updated the tests accordingly
  • Updated BooleanField and optionsList() to remove the deprecated support for schema.enumNames
    • Updated the tests accordingly
  • Updated @rjsf/utils to remove deprecations:
    • Removed the deprecated getMatchingOption() and mergeValidationData() and the matching functions in the SchemaUtilsType
      • Updated the tests accordingly
    • Updated the ValidatorType to remove the toErrorList() function
      • Updated the tests accordingly
    • Moved the implementation getMatchingOption() into the getFirstMatchingOption()
  • Updated @rjsf/validator-ajv8 to remove the toErrorList() implementations and tests associated with them
  • Updated the form-props.md and utility-functions.md documentation files to remove deprecation mentions
  • Updated the v6.x upgrade guide.md to document the deprecations removals
  • Updated the CHANGELOG_v6.md to document the deprecations removals

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@heath-freenome heath-freenome requested a review from nickgros April 23, 2025 23:51
Comment on lines -7 to -8
// @ts-expect-error -- enumNames an RJSF keyword and is not in the JSON Schema spec
enumNames: ['New York', 'Amsterdam', 'Hong Kong'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Is keeping enumNames blocking anything? I would rather not remove it if we're losing this functionality (which is essential IMO).

Copy link
Contributor

Choose a reason for hiding this comment

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

Also we mentioned keeping enumNames in v6 #3829 (comment) (though that was before it was ported to the UiSchema).

I think we would need to add the ability to attach a UiSchema to a definition before I would feel comfortable removing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

As we discussed, let's remove custom JSON Schema code to minimize the challenges for supporting newer versions

As part of v6 readiness, removed old deprecations and bumped react support to >= 18
- Updated all of the `package.json` files to change react peer dependency support to `>=18`
- Updated `Form` to remove the deprecated `acceptcharset`
  - Updated the tests accordingly
- Updated `SchemaField` to remove support for the deprecated `uiSchema.classNames`
  - Updated the tests accordingly
- Updated `BooleanField` and `optionsList()` to remove the deprecated support for `schema.enumNames`
  - Updated the tests accordingly
- Updated `@rjsf/utils` to remove deprecations:
  - Removed the deprecated `getMatchingOption()` and `mergeValidationData()` and the matching functions in the `SchemaUtilsType`
    - Updated the tests accordingly
  - Updated the `ValidatorType` to remove the `toErrorList()` function
    - Updated the tests accordingly
  - Moved the implementation `getMatchingOption()` into the `getFirstMatchingOption()`
- Updated `@rjsf/validator-ajv8` to remove the `toErrorList()` implementations and tests associated with them
- Updated the `form-props.md` and `utility-functions.md` documentation files to remove deprecation mentions
- Updated the `v6.x upgrade guide.md` to document the deprecations removals
- Updated the `CHANGELOG_v6.md` to document the deprecations removals

# Conflicts:
#	packages/docs/docs/migration-guides/v6.x upgrade guide.md
@heath-freenome heath-freenome force-pushed the remove-deprecations-and-react-18-min branch from ca955d1 to f92badc Compare April 24, 2025 18:44
@heath-freenome heath-freenome merged commit 65586f2 into rjsf-v6 Apr 25, 2025
4 checks passed
@heath-freenome heath-freenome deleted the remove-deprecations-and-react-18-min branch April 25, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants