Skip to content

Conversation

heath-freenome
Copy link
Member

Reasons for making this change

There is another place where the ESM build needs an update to for proper import of AJV standalone code.

  • Added a new ajvReplacer that adds /index.js to the end of ajv/dist/standalone
  • Updated @rjsf/validator-ajv8 to add the ajvReplacer to the tsconfig.replacer.json and tsc.build.json
    • Also fixed up some formatting around imports in a few files
  • Updated .gitignore to add ajvReplacer.js
  • Updated formTests.ts to add tests for the fix in #4519
    • Updated the snapshots for these new tests
  • Updated the CHANGELOG.md accordingly

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

There is another place where the ESM build needs an update to for proper import of AJV standalone code.
- Added a new `ajvReplacer` that adds `/index.js` to the end of `ajv/dist/standalone`
- Updated `@rjsf/validator-ajv8` to add the `ajvReplacer` to the `tsconfig.replacer.json` and `tsc.build.json`
  - Also fixed up some formatting around imports in a few files
- Updated `.gitignore` to add `ajvReplacer.js`
- Updated `formTests.ts` to add tests for the fix in [#4519](#4519)
  - Updated the snapshots for these new tests
- Updated the `CHANGELOG.md` accordingly
@heath-freenome heath-freenome merged commit c40f4e6 into main Mar 13, 2025
5 checks passed
@heath-freenome heath-freenome deleted the fix-esm-in-validator branch March 13, 2025 20:59
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