@prettier/plugin-ruby
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -9,2 +9,8 @@ # Changelog | ||
## [4.0.4] - 2023-12-12 | ||
### Changed | ||
- [#1413](https://github.com/prettier/plugin-ruby/pull/1413) - hrabe - Fix the cwd detection for mono-repos. | ||
## [4.0.3] - 2023-11-27 | ||
@@ -1302,3 +1308,4 @@ | ||
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v4.0.3...HEAD | ||
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v4.0.4...HEAD | ||
[4.0.4]: https://github.com/prettier/plugin-ruby/compare/v4.0.3...v4.0.4 | ||
[4.0.3]: https://github.com/prettier/plugin-ruby/compare/v4.0.2...v4.0.3 | ||
@@ -1305,0 +1312,0 @@ [4.0.2]: https://github.com/prettier/plugin-ruby/compare/v4.0.1...v4.0.2 |
{ | ||
"name": "@prettier/plugin-ruby", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "prettier plugin for the Ruby programming language", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -8,2 +8,3 @@ import { spawn } from "child_process"; | ||
import url from "url"; | ||
import { resolveConfigFile } from "prettier"; | ||
@@ -71,3 +72,3 @@ // In order to properly parse ruby code, we need to tell the ruby process to | ||
const default_options = { | ||
const options = { | ||
env: Object.assign({}, process.env, { LANG: getLang() }), | ||
@@ -77,6 +78,8 @@ stdio: ["ignore", "ignore", "inherit"], | ||
}; | ||
const options = opts.filepath | ||
? { cwd: path.dirname(opts.filepath), ...default_options } | ||
: default_options; | ||
if (opts.filepath) { | ||
const prettierConfig = await resolveConfigFile(opts.filepath); | ||
options.cwd = path.dirname(prettierConfig); | ||
} | ||
const server = spawn( | ||
@@ -83,0 +86,0 @@ opts.rubyExecutablePath || "ruby", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133473
350