Starting with dbc 2.0.0, metadata.json is no longer included in the published wheel. It was present in 1.7.1 and earlier.
The dash_bootstrap_components/_components/metadata.json file contains the JS-level component type metadata (prop types, descriptions, defaults, etc.) that is generated by dash-generate-components during the build. It's the same file that all other Dash component packages ship (dash.dcc, dash.html, dash_ag_grid, dash_daq, etc.).
Verified by inspecting the wheels directly:
1.7.1 — present
dash_bootstrap_components/_components/metadata.json ✓
2.0.4 — absent
(no metadata.json anywhere in the wheel)
Why is the file useful?
I do see that the file is not explicitly documented as a build artifact to include in the package, but it can be quite useful for downstream tooling that reads metadata.json for code generation, introspection, or IDE support. And all of the built-in dash packages do include it.
It is less severe since the type annotations are richer after Dash 3. I believe they contain most/all of the same information.
Root cause
The migration to hatchling as build backend. Hatchling respects .gitignore by default, and the dbc .gitignore excludes _components/. The pyproject.toml whitelists specific generated files via [tool.hatch.build.targets.wheel] artifacts, but only *.py and *.min.js — metadata.json was not included:
[tool.hatch.build.targets.wheel]
artifacts = [
"dash_bootstrap_components/_components/dash_bootstrap_components.min.js",
"dash_bootstrap_components/_components/*.py",
]
Starting with dbc 2.0.0, metadata.json is no longer included in the published wheel. It was present in 1.7.1 and earlier.
The
dash_bootstrap_components/_components/metadata.jsonfile contains the JS-level component type metadata (prop types, descriptions, defaults, etc.) that is generated by dash-generate-components during the build. It's the same file that all other Dash component packages ship (dash.dcc, dash.html, dash_ag_grid, dash_daq, etc.).Verified by inspecting the wheels directly:
1.7.1 — present
dash_bootstrap_components/_components/metadata.json ✓
2.0.4 — absent
(no metadata.json anywhere in the wheel)
Why is the file useful?
I do see that the file is not explicitly documented as a build artifact to include in the package, but it can be quite useful for downstream tooling that reads metadata.json for code generation, introspection, or IDE support. And all of the built-in dash packages do include it.
It is less severe since the type annotations are richer after Dash 3. I believe they contain most/all of the same information.
Root cause
The migration to hatchling as build backend. Hatchling respects .gitignore by default, and the dbc .gitignore excludes
_components/. The pyproject.toml whitelists specific generated files via[tool.hatch.build.targets.wheel]artifacts, but only *.py and *.min.js — metadata.json was not included: