lingo.dev 0.79.2 → 0.79.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.cjs +5 -23
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +54 -72
- package/build/cli.mjs.map +1 -1
- package/package.json +3 -3
package/build/cli.cjs
CHANGED
|
@@ -1816,9 +1816,7 @@ function createXcodeXcstringsLoader(defaultLocale) {
|
|
|
1816
1816
|
|
|
1817
1817
|
// src/cli/loaders/prettier.ts
|
|
1818
1818
|
|
|
1819
|
-
|
|
1820
1819
|
var _prettier = require('prettier'); var _prettier2 = _interopRequireDefault(_prettier);
|
|
1821
|
-
var _child_process = require('child_process');
|
|
1822
1820
|
function createPrettierLoader(options) {
|
|
1823
1821
|
return createLoader({
|
|
1824
1822
|
async pull(locale, data) {
|
|
@@ -1847,8 +1845,9 @@ function createPrettierLoader(options) {
|
|
|
1847
1845
|
} catch (error) {
|
|
1848
1846
|
if (error instanceof Error && error.message.startsWith("Cannot find package")) {
|
|
1849
1847
|
console.log();
|
|
1850
|
-
console.log("Prettier
|
|
1851
|
-
|
|
1848
|
+
console.log("\u26A0\uFE0F Prettier plugins are not installed. Formatting without plugins.");
|
|
1849
|
+
console.log("\u26A0\uFE0F To use prettier plugins install project dependencies before running Lingo.dev.");
|
|
1850
|
+
config.plugins = [];
|
|
1852
1851
|
await _prettier2.default.clearConfigCache();
|
|
1853
1852
|
const result = await _prettier2.default.format(data, config);
|
|
1854
1853
|
return result;
|
|
@@ -1867,23 +1866,6 @@ async function loadPrettierConfig(filePath) {
|
|
|
1867
1866
|
return {};
|
|
1868
1867
|
}
|
|
1869
1868
|
}
|
|
1870
|
-
async function installDependencies() {
|
|
1871
|
-
const packageManager = await getPackageManager();
|
|
1872
|
-
console.log(`Installing dependencies using ${packageManager}`);
|
|
1873
|
-
_child_process.execSync.call(void 0, `${packageManager} install --frozen-lockfile`, { stdio: "inherit" });
|
|
1874
|
-
console.log(`Dependencies installed`);
|
|
1875
|
-
}
|
|
1876
|
-
async function getPackageManager() {
|
|
1877
|
-
const yarnLockfile = _path2.default.resolve(process.cwd(), "yarn.lock");
|
|
1878
|
-
const pnpmLockfile = _path2.default.resolve(process.cwd(), "pnpm-lock.yaml");
|
|
1879
|
-
if (_fs2.default.existsSync(yarnLockfile)) {
|
|
1880
|
-
return "yarn";
|
|
1881
|
-
}
|
|
1882
|
-
if (_fs2.default.existsSync(pnpmLockfile)) {
|
|
1883
|
-
return "pnpm";
|
|
1884
|
-
}
|
|
1885
|
-
return "npm";
|
|
1886
|
-
}
|
|
1887
1869
|
|
|
1888
1870
|
// src/cli/loaders/unlocalizable.ts
|
|
1889
1871
|
|
|
@@ -4028,7 +4010,7 @@ var mcp_default = new (0, _interactivecommander.Command)().command("mcp").descri
|
|
|
4028
4010
|
|
|
4029
4011
|
|
|
4030
4012
|
// ../../action/src/flows/pull-request.ts
|
|
4031
|
-
|
|
4013
|
+
var _child_process = require('child_process');
|
|
4032
4014
|
|
|
4033
4015
|
// ../../action/src/flows/in-branch.ts
|
|
4034
4016
|
|
|
@@ -4637,7 +4619,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
|
|
|
4637
4619
|
// package.json
|
|
4638
4620
|
var package_default = {
|
|
4639
4621
|
name: "lingo.dev",
|
|
4640
|
-
version: "0.79.
|
|
4622
|
+
version: "0.79.4",
|
|
4641
4623
|
description: "Lingo.dev CLI",
|
|
4642
4624
|
private: false,
|
|
4643
4625
|
publishConfig: {
|