Skip to content

Commit 78688c0

Browse files
Packages/utils (#2863)
* Implemented the utils package - Refactored the `packages/core/src/utils.js` file into separate typescript files in the new `packages/utils/src` * - More changes * - Added all of the non-validation-based utilities and many of the tests * - removed schema related files temporarily * - Added missing tests to get test coverage up to 100% for all but `getWidget()` - Also did some cleanup in the `src` files, moving types into `types.ts`, and exporting all the types * - Fixed getWidget tests * - Update README.md * - update the target to for typescript in * - revert `package-lock.json` for antd, core and playground * - fix build issues * - Added the `rjsf-v5` branch to the `ci.yml` - Added a new `RJSFSchema` as a redefine of `JSONSchema7` to make changing schemas everywhere else easier - Updated all the utils and tests to change `JSONSchema7` to `RJSFSchema` - Fixed test breaks by casting e to Error * - changed tabs to spaces in package.json, fixed bug in deepEquals * - Add `tsdx` to `package.json` to enable running `npm run test` inside of the `packages/utils` directory - Bumped `@types/jest` to match the version in use by `tsdx` - Fixed the `utcToLocal()` test by mocking the `getDate()` and `getHours()` functions to be UTC + 2 hours to avoid server vs local timezone issues * - Began adding documentation to the utility functions - Reordered the logic in `asNumber` to avoid converting to number until we have to - Updated `findSchemaDefinition()` to handle the case where a `$ref` in a schema also contains additional props - Updated `getSubmitButtonOptions()` to export its `DEFAULT_OPTIONS` for testing purposes - Updated `getUiOptions()` to no longer support `ui:widget` objects as it has been deprecated for years - Made some other test fixes * - Finished adding documentation to all of the remaining utils methods * - Minor documentation changes, and allow `findSchemaDefinition()` to support undefined ref name * - Responded to self-review comments
1 parent 8863080 commit 78688c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+17573
-21328
lines changed

.github/workflows/ci.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, rjsf-v5 ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ master, rjsf-v5 ]
88

99
jobs:
1010
build:
@@ -22,7 +22,7 @@ jobs:
2222
- run: npm ci
2323
- run: npm run lint
2424
- run: npm run cs-check
25-
25+
2626
- name: Build with Netlify badge
2727
if: github.ref != 'refs/heads/master'
2828
run: npm run build
@@ -31,14 +31,14 @@ jobs:
3131
- name: Build
3232
if: github.ref == 'refs/heads/master'
3333
run: npm run build
34-
34+
3535
- if: matrix.node-version == '14.x'
3636
uses: actions/upload-artifact@v2
3737
with:
3838
name: dist
3939
path: packages/playground/build
4040
- run: npm test
41-
41+
4242
deploy_preview:
4343
runs-on: ubuntu-latest
4444
if: github.ref != 'refs/heads/master'
@@ -58,7 +58,7 @@ jobs:
5858
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
5959
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
6060
PR_NUMBER: ${{ github.event.pull_request.number }}
61-
61+
6262
deploy_playground:
6363
runs-on: ubuntu-latest
6464
if: github.ref == 'refs/heads/master'
@@ -78,7 +78,7 @@ jobs:
7878
build_dir: dist
7979
env:
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
81+
8282
# deploy_canary:
8383
# runs-on: ubuntu-latest
8484
# if: github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)