Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dash_vite_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
support_less: bool = False,
support_sass: bool = False,
download_node: bool = False,
node_version: str = '18.17.0',
node_version: str = '18.20.8',
clean_after: bool = False,
skip_build_if_recent: bool = True,
skip_build_time_threshold: int = 5,
Expand Down
8 changes: 8 additions & 0 deletions tests/test_dash_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_vite_plugin_integration(self, dash_duo: DashComposite):
build_assets_paths=['assets/js'],
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
download_node=True,
clean_after=False,
)

Expand Down Expand Up @@ -202,6 +203,7 @@ def test_vite_plugin_with_less_support(self, dash_duo: DashComposite):
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
support_less=True,
download_node=True,
clean_after=False,
)

Expand Down Expand Up @@ -289,6 +291,7 @@ def test_vite_plugin_with_assets_path_ignore(self, dash_duo: DashComposite):
build_assets_paths=['./assets/css', 'assets/js'], # These should be ignored by Dash
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
download_node=True,
clean_after=False,
)

Expand Down Expand Up @@ -362,6 +365,7 @@ def test_vite_plugin_skip_build_if_recent(self, dash_duo: DashComposite):
build_assets_paths=['assets/js'],
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
download_node=True,
clean_after=False,
skip_build_if_recent=True,
skip_build_time_threshold=5, # 5 second threshold
Expand Down Expand Up @@ -459,6 +463,7 @@ def test_vite_plugin_with_custom_tmp_dir(self, dash_duo: DashComposite):
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
plugin_tmp_dir='_custom_vite',
download_node=True,
clean_after=False,
)

Expand Down Expand Up @@ -535,6 +540,7 @@ def test_vite_plugin_with_clean_after(self, dash_duo: DashComposite):
build_assets_paths=['assets/js'],
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('react')],
download_node=True,
clean_after=True,
)

Expand Down Expand Up @@ -678,6 +684,7 @@ def test_vite_plugin_with_vue_support(self, dash_duo: DashComposite):
build_assets_paths=['assets/js', 'assets/vue'],
entry_js_paths=['assets/js/main.js'],
npm_packages=[NpmPackage('vue')],
download_node=True,
clean_after=False,
)

Expand Down Expand Up @@ -878,6 +885,7 @@ def test_vite_plugin_with_react_support(self, dash_duo: DashComposite):
NpmPackage('react'),
NpmPackage('react-dom'),
],
download_node=True,
clean_after=False,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_plugin_initialization(self):
assert plugin.support_less is False
assert plugin.support_sass is False
assert plugin.download_node is False
assert plugin.node_version == '18.17.0'
assert plugin.node_version == '18.20.8'
assert plugin.clean_after is False
assert plugin.skip_build_if_recent is True
assert plugin.skip_build_time_threshold == 5
Expand Down
Loading