Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript project references #3782

Merged
merged 16 commits into from
Nov 10, 2023
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ coverage
venv
*.orig
out/

# typescript tsbuildinfo
*.tsbuildinfo
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ should change the heading of the (upcoming) version to include a major version b
-->
# 5.14.0

## Dev / playground

- update configuration to use typescript project references, start type checking the tests

## @rjsf/snapshot-tests

Move theme snapshot tests into separate package

Copy link
Member

Choose a reason for hiding this comment

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

Can you reorder these to be after @rjsf/fluentui-rc with @rjsf/snapshot-tests first?

## @rjsf/fluentui-rc

- Added theme for Fluent UI v9 (React Components), fixing [#3659](https://github.com/rjsf-team/react-jsonschema-form/issues/3659)
Expand Down
6 changes: 5 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"]
"dependsOn": [{
"//": "use only dependencies to avoid cycle @rjsf/core:build --> @rjsf/snapshot-tests:build --> @rjsf/core:build",
"projects": "dependencies",
"target": "^build"
}]
}
},
"affected": {
Expand Down
95 changes: 60 additions & 35 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"packages/semantic-ui",
"packages/utils",
"packages/validator-ajv6",
"packages/validator-ajv8"
"packages/validator-ajv8",
"packages/snapshot-tests"
]
}
6 changes: 4 additions & 2 deletions packages/antd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"module": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"build:ts": "rimraf lib && tsc",
"build:ts": "tsc -b",
"build:cjs": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --sourcemap --packages=external --format=cjs",
"build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/antd.esm.js --sourcemap --packages=external --format=esm",
"build:umd": "rollup dist/antd.esm.js --format=umd --file=dist/antd.umd.js --name=@rjsf/antd",
"build": "rimraf dist && npm run build:ts && npm run build:cjs && npm run build:esm && npm run build:umd",
"build": "npm run build:ts && npm run build:cjs && npm run build:esm && npm run build:umd",
"cs-check": "prettier -l \"{src,test}/**/*.ts?(x)\"",
"cs-format": "prettier \"{src,test}/**/*.ts?(x)\" --write",
"lint": "eslint src test",
Expand Down Expand Up @@ -57,9 +57,11 @@
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@rjsf/core": "^5.13.6",
"@rjsf/snapshot-tests": "^5.13.6",
"@rjsf/utils": "^5.13.6",
"@rjsf/validator-ajv8": "^5.13.6",
"@rollup/plugin-replace": "^5.0.2",
"@types/jest": "^29.5.5",
"@types/lodash": "^4.14.198",
"@types/react": "^17.0.65",
"@types/react-dom": "^17.0.20",
Expand Down
23 changes: 23 additions & 0 deletions packages/antd/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "../../../tsconfig.base.json",
"include": [
"./"
],
"compilerOptions": {
"rootDir": "./",
"outDir": "../lib",
"baseUrl": "../",
"jsx": "react-jsx"
},
"references": [
{
"path": "../../core"
},
{
"path": "../../utils"
},
{
"path": "../../validator-ajv8"
}
]
}
2 changes: 1 addition & 1 deletion packages/antd/test/Array.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import arrayTests, { CHECKBOXES_CUSTOMIZE } from '@rjsf/core/testSnap/arrayTests';
import { arrayTests, CHECKBOXES_CUSTOMIZE } from '@rjsf/snapshot-tests';

import '../__mocks__/matchMedia.mock';
import Form from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/antd/test/Form.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import renderer from 'react-test-renderer';
import validator from '@rjsf/validator-ajv8';
import { RJSFSchema } from '@rjsf/utils';
import formTests, { SELECT_CUSTOMIZE } from '@rjsf/core/testSnap/formTests';
import { formTests, SELECT_CUSTOMIZE } from '@rjsf/snapshot-tests';

import '../__mocks__/matchMedia.mock';
import Form from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/antd/test/Object.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import objectTests from '@rjsf/core/testSnap/objectTests';
import { objectTests } from '@rjsf/snapshot-tests';

import '../__mocks__/matchMedia.mock';
import Form from '../src';
Expand Down
18 changes: 18 additions & 0 deletions packages/antd/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../../tsconfig.base.json",
"include": ["./"],
"compilerOptions": {
"rootDir": "./",
"baseUrl": "../",
"noEmit": true,
"jsx": "react-jsx"
},
"references": [
{
"path": "../src"
},
{
"path": "../../snapshot-tests"
}
]
}
Loading