diff --git a/CHANGELOG.md b/CHANGELOG.md index cee338e53c..8f50ec4639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,14 @@ should change the heading of the (upcoming) version to include a major version b - Updated `getClosestMatchingOption()` to use `resolveAllReferences()` for all oneOf/anyOf schemas - Updated `resolveAnyOrOneOfSchemas()` to use `resolveAllReferences()` for all oneOf/anyOf schemas +## Dev / playground + +- update playground vite config to use sources directly, allowing to reload changes in it without additional build step +- moving from `dts-cli` to use individual dev tools directly, updating package publish config + - tsc for generating type definitions and esm modules + - esbuild for CJS bundle + - rollup for UMD bundle + # 5.11.0 ## @rjsf/core diff --git a/packages/antd/dts.config.js b/packages/antd/dts.config.js deleted file mode 100644 index 2fd687d728..0000000000 --- a/packages/antd/dts.config.js +++ /dev/null @@ -1,16 +0,0 @@ -const replace = require('@rollup/plugin-replace'); - -module.exports = { - // This function will run for each entry/format/env combination - rollup(config, options) { - if (options.format === 'esm') { - config.plugins.push( - replace({ - 'antd/lib': 'antd/es', - 'rc-picker/lib': 'rc-picker/es', - }) - ); - } - return config; // always return a config. - }, -}; diff --git a/packages/antd/package.json b/packages/antd/package.json index a94b6a741b..76fe9ac89f 100644 --- a/packages/antd/package.json +++ b/packages/antd/package.json @@ -6,8 +6,7 @@ "module": "lib/index.js", "typings": "lib/index.d.ts", "scripts": { - - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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", diff --git a/packages/bootstrap-4/package.json b/packages/bootstrap-4/package.json index 3841ea58a6..4dc07652c7 100644 --- a/packages/bootstrap-4/package.json +++ b/packages/bootstrap-4/package.json @@ -15,7 +15,7 @@ "url": "" }, "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/bootstrap-4.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/bootstrap-4.esm.js --format=umd --file=dist/bootstrap-4.umd.js --name=@rjsf/bootstrap-4", diff --git a/packages/chakra-ui/package.json b/packages/chakra-ui/package.json index 7293082d76..f6d3254ecd 100644 --- a/packages/chakra-ui/package.json +++ b/packages/chakra-ui/package.json @@ -11,7 +11,7 @@ "src" ], "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/chakra-ui.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/chakra-ui.esm.js --format=umd --file=dist/chakra-ui.umd.js --name=@rjsf/chakra-ui", diff --git a/packages/core/package.json b/packages/core/package.json index f250a3763c..53bd972bd7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,7 +3,7 @@ "version": "5.11.0", "description": "A simple React component capable of building HTML forms out of a JSON schema.", "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/index.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/index.esm.js --format=umd --file=dist/core.umd.js --name=JSONSchemaForm", @@ -30,7 +30,8 @@ "typings": "lib/index.d.ts", "files": [ "dist", - "lib" + "lib", + "src" ], "engineStrict": false, "engines": { diff --git a/packages/fluent-ui/package.json b/packages/fluent-ui/package.json index 2ded369e15..431b2f01a5 100644 --- a/packages/fluent-ui/package.json +++ b/packages/fluent-ui/package.json @@ -11,7 +11,7 @@ "src" ], "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/fluent-ui.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/fluent-ui.esm.js --format=umd --file=dist/fluent-ui.umd.js --name=@rjsf/fluent-ui", diff --git a/packages/material-ui/package.json b/packages/material-ui/package.json index 99e05d2157..85afa69cb9 100644 --- a/packages/material-ui/package.json +++ b/packages/material-ui/package.json @@ -1,8 +1,8 @@ { "name": "@rjsf/material-ui", "version": "5.11.0", - "module": "./lib/index.js", "main": "./dist/index.js", + "module": "./lib/index.js", "types": "./lib/index.d.ts", "description": "Material UI 4 theme, fields and widgets for react-jsonschema-form", "files": [ @@ -11,7 +11,7 @@ "src" ], "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/material-ui.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/material-ui.esm.js --format=umd --file=dist/material-ui.umd.js --name=@rjsf/material-ui", diff --git a/packages/mui/package.json b/packages/mui/package.json index ab968ec45d..a04e7f4786 100644 --- a/packages/mui/package.json +++ b/packages/mui/package.json @@ -1,8 +1,8 @@ { "name": "@rjsf/mui", "version": "5.11.0", - "module": "./lib/index.js", "main": "./dist/index.js", + "module": "./lib/index.js", "types": "./lib/index.d.ts", "description": "Material UI 5 theme, fields and widgets for react-jsonschema-form", "files": [ @@ -11,7 +11,7 @@ "src" ], "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/mui.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/mui.esm.js --format=umd --file=dist/mui.umd.js --name=@rjsf/mui", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index b561ad252e..3e733a89f3 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -15,7 +15,7 @@ "node": ">=14" }, "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/semantic-ui.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/semantic-ui.esm.js --format=umd --file=dist/semantic-ui.umd.js --name=@rjsf/semantic-ui", diff --git a/packages/utils/package.json b/packages/utils/package.json index 286a9ccc04..bdfe014621 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -15,7 +15,7 @@ "node": ">=14" }, "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/utils.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/utils.esm.js --format=umd --file=dist/utils.umd.js --name=@rjsf/utils", diff --git a/packages/validator-ajv6/package.json b/packages/validator-ajv6/package.json index 4d50e7af7b..f4071c42f2 100644 --- a/packages/validator-ajv6/package.json +++ b/packages/validator-ajv6/package.json @@ -15,7 +15,7 @@ "node": ">=14" }, "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "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/validator-ajv6.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/validator-ajv6.esm.js --format=umd --file=dist/validator-ajv6.umd.js --name=@rjsf/validator-ajv6", diff --git a/packages/validator-ajv8/package.json b/packages/validator-ajv8/package.json index 191f577557..e06c865b91 100644 --- a/packages/validator-ajv8/package.json +++ b/packages/validator-ajv8/package.json @@ -15,7 +15,7 @@ "node": ">=14" }, "scripts": { - "build:ts": "tsc", + "build:ts": "rimraf lib && tsc", "build:cjs": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --sourcemap --packages=external --format=cjs && esbuild ./src/compileSchemaValidators.ts --bundle --outfile=dist/compileSchemaValidators.js --sourcemap --packages=external --format=cjs", "build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/validator-ajv8.esm.js --sourcemap --packages=external --format=esm && esbuild ./src/compileSchemaValidators.ts --bundle --outfile=dist/compileSchemaValidators.esm.js --sourcemap --packages=external --format=esm", "build:umd": "rollup dist/validator-ajv8.esm.js --format=umd --file=dist/validator-ajv8.umd.js --name=@rjsf/validator-ajv8",