diff --git a/Gemfile.lock b/Gemfile.lock index f2a782b9..280fea91 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,7 +14,7 @@ PATH PATH remote: vite_ruby specs: - vite_ruby (3.6.1) + vite_ruby (3.6.2) dry-cli (>= 0.7, < 2) rack-proxy (~> 0.6, >= 0.6.1) zeitwerk (~> 2.2) diff --git a/test/file_utils_test.rb b/test/file_utils_test.rb index df4fd8f4..ddcb20b5 100644 --- a/test/file_utils_test.rb +++ b/test/file_utils_test.rb @@ -22,6 +22,16 @@ def teardown FileUtils.remove_entry_secure(root) end + def test_fresh_installation + app_root = root.join('test_fresh_install').tap(&:mkpath) + Dir.chdir(app_root) { + `bundle exec vite install` + } + assert_path_exists app_root.join('vite.config.ts') + assert_path_exists app_root.join('package.json') + assert 'module', JSON.parse(app_root.join('package.json').read)['type'] + end + def test_write path = root.join('write') write(path, "Hello\nWorld") diff --git a/vite_ruby/CHANGELOG.md b/vite_ruby/CHANGELOG.md index 5b478517..7cc84578 100644 --- a/vite_ruby/CHANGELOG.md +++ b/vite_ruby/CHANGELOG.md @@ -1,3 +1,7 @@ +## [3.6.2](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.6.1...vite_ruby@3.6.2) (2024-07-16) + + + ## [3.6.1](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.6.0...vite_ruby@3.6.1) (2024-07-16) diff --git a/vite_ruby/lib/vite_ruby/cli/install.rb b/vite_ruby/lib/vite_ruby/cli/install.rb index 62001786..1d8335ba 100644 --- a/vite_ruby/lib/vite_ruby/cli/install.rb +++ b/vite_ruby/lib/vite_ruby/cli/install.rb @@ -81,7 +81,7 @@ def create_configuration_files def install_js_dependencies package_json = root.join('package.json') unless package_json.exist? - write(package.json, <<~JSON) + write package_json, <<~JSON { "private": true, "type": "module" diff --git a/vite_ruby/lib/vite_ruby/version.rb b/vite_ruby/lib/vite_ruby/version.rb index d85e6462..401feede 100644 --- a/vite_ruby/lib/vite_ruby/version.rb +++ b/vite_ruby/lib/vite_ruby/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class ViteRuby - VERSION = '3.6.1' + VERSION = '3.6.2' # Internal: Versions used by default when running `vite install`. DEFAULT_VITE_VERSION = '^5.0.0'