Skip to content

Commit 3c4fa7a

Browse files
authored
Merge branch 'main' into aleksandrsl/custom-resolvers
2 parents aff4651 + d18be81 commit 3c4fa7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1685
-1259
lines changed

demo/new-compiler-next16/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @compiler/demo-next
22

3+
## 0.1.27
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`73a8c73`](https://github.com/lingodotdev/lingo.dev/commit/73a8c731f5af03db9c165000e87ee5e5a1086a48)]:
8+
- @lingo.dev/compiler@0.4.0
9+
10+
## 0.1.26
11+
12+
### Patch Changes
13+
14+
- Updated dependencies [[`15f361e`](https://github.com/lingodotdev/lingo.dev/commit/15f361e7335fc4200da25b324894b0f1fd38b7e2)]:
15+
- @lingo.dev/compiler@0.3.12
16+
317
## 0.1.25
418

519
### Patch Changes

demo/new-compiler-next16/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@compiler/demo-next",
3-
"version": "0.1.25",
3+
"version": "0.1.27",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

i18n.lock

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ checksums:
88
content/4: fdb5d914fd53a8502b906bd89fe6f6d1
99
content/5: 51adf33450cab2ef392e93147386647c
1010
content/6: 56ea06288e338a3c329d80a0f845b4a0
11-
content/7: ae9cd7c558922aa5eba1d4dfd8915b2e
11+
content/7: ac632ee57422256987ec69fa1fa55571
1212
content/8: 51adf33450cab2ef392e93147386647c
1313
content/9: 9c9e94642807e3728a1791e6cfd7516b
1414
content/10: b0dd1b2af0249cadc8147fcd2824162d
@@ -19,24 +19,24 @@ checksums:
1919
content/15: e6b92356986f64601ded73a3a9af1760
2020
content/16: c925da800b56879b8b83d151a263f7bb
2121
content/17: 385018fc789da284a0c96960fe3f6ec4
22-
content/18: 39673a2fbbfcb3d6035f8a12f32a6e52
22+
content/18: 2f6014a509bf52e9a0db39569885dfd5
2323
content/19: 97f1f7f04ad2be288b05caacb61f66c3
24-
content/20: 96afeb7ab8ab312120cb0dec235f407e
24+
content/20: 9934e6aeaf9c4b8a33e70cc0601679a9
2525
content/21: 7d2a6af3866f9c4beba6a53f207a599b
2626
content/22: ca7c2dd535aa43aa1804fdb47c26cf42
2727
content/23: 51adf33450cab2ef392e93147386647c
2828
content/24: 8462a747b18279082fe601bc44c41b96
2929
content/25: 9efc8f824620922048a0cbd5463e6baf
3030
content/26: ac19d92f18727a2abce5e8b280412f72
3131
content/27: a9dae9fb033168e0cc0128b42c133897
32-
content/28: b581d7213fcd9fe1ffef252d04edafea
32+
content/28: cab963eba977bb2538989ce8a02c4e50
3333
content/29: a3eef7ecff263ece91113908c007b486
34-
content/30: da146b6a33df8ab327349ef2cd9de5e1
34+
content/30: 904b08ea9e505e43a60a01563ffc74a9
3535
content/31: 520419d855f9069c9a48f0c590d2c60b
36-
content/32: 384243c13b52adaa4aa619e8b10e65c3
37-
content/33: 348895c13a0f06afbae7f3c832cbee98
38-
content/34: c4d10409af53c453ed6bd243b8b97651
39-
content/35: 0b7c38fd121008dcdbadbf16904c652f
36+
content/32: d260e7ce3242f424076b40c1ad3e1f65
37+
content/33: 69db4bb5d135eb2173ff00a3ad5fe4fc
38+
content/34: 36593fbb8a8679de7088014740b04770
39+
content/35: edc9976e14549f7b4f33bf15cd12b208
4040
content/36: eb9ad4a218b52cd59a4d23e889627a62
4141
content/37: 920e5ca759926d926da155e9656dcd02
4242
content/38: c9c30d1a6b315c734b07060cd402b1fa
@@ -47,60 +47,60 @@ checksums:
4747
content/43: 48e65dd974a85d67d43e5b3da6a78ff8
4848
content/44: b7e51ae9cce80e0be35533cf8ccce5a7
4949
content/45: 590b699bc7b9f756129e6f5c2b189c9e
50-
content/46: f326987f3b0dd0162fa9a6f0b32ae181
51-
content/47: 931dc0722c3fbd4cf5af40d67c92255c
50+
content/46: ed02fd2d93a74e9d3c692ac1620990fe
51+
content/47: a0364c9c16e27ff63e92db74f27bf8be
5252
content/48: 05960209692c8fc636f7da40163fac04
53-
content/49: 3aa3ab067923c80b37c641f3d6566831
53+
content/49: 15617f8218be7bf0c656c608ed6541fc
5454
content/50: a106f8db58f6d2e59173e9c68affa713
5555
content/51: b9830587df82e6a5a870afa08f30544c
56-
content/52: 309e2ce52a98e9bb0f6143996549eebb
56+
content/52: 755163c96e23f2783dcba2e032349782
5757
content/53: 1837a73959f9d011a5d1b21de26f815e
58-
content/54: 2c22a291c616fe28a204ed2f10dd905b
58+
content/54: 57c98b2f8f235598ae294f1d09eb1274
5959
content/55: f485581183a6a7b40851438e5b2a1f1b
60-
content/56: 9c985b24acc2d0cbbada8e161af777d5
60+
content/56: 68c9888b4baef08387b1a21a7e44e6cd
6161
content/57: 549f415f93ce5b29bfb16cf5fe0bf785
6262
content/58: 51adf33450cab2ef392e93147386647c
6363
content/59: 3f5c50b11a42c261f57641175fc69222
6464
content/60: 2ff59376b60be9d37dd4845afb951e94
6565
content/61: f2c27e1ada8ed0823ad58ad83eee76b1
6666
content/62: 155571e96a847fa90449522f2b77a54b
67-
content/63: 0190ab67d95a4c2d453fce9dae4508b6
67+
content/63: 863046676d0454d212c40ddf7bb700e4
6868
content/64: c925da800b56879b8b83d151a263f7bb
69-
content/65: 8969b18c6bc5d0c7018aa965410a1be5
69+
content/65: e16c6b546c5e32ee71ec11b54e456216
7070
content/66: 36c89a48af78d0c2a439185e74c170ea
7171
content/67: d1ef1d51d33535073230250d9e8dfee8
7272
content/68: bd52587c186fb2501e9c47a7fb0b2189
7373
content/69: 51adf33450cab2ef392e93147386647c
7474
content/70: e961a3814821e9529a4d8e08cf496f17
75-
content/71: 47c181bd7227e1dc0830adce14f94b14
75+
content/71: d8bec837d112c3cd1c53438353b09ed8
7676
content/72: 86788f54446ee8745226bdddf4055cb9
7777
content/73: 155571e96a847fa90449522f2b77a54b
78-
content/74: 751561cfdbc84712b32cd375697a362f
78+
content/74: def921ed25d6ff8216542490a5fbc1a0
7979
content/75: 092fde845f398b5322bb9b3e69a07ce6
80-
content/76: 39b85b238c3a00ae1acb1d9ad7e834b7
80+
content/76: d14a2bf38e78a012e159a7915a612a15
8181
content/77: 1d76d5f8d23c18ea8789cac55c440bcb
82-
content/78: e63e5f6a557b28fd6d2d9a2e6babe9d0
82+
content/78: 4a2f9c451c8e957a54c2cb818b8cf34a
8383
content/79: 79dc425a930dabcbc62c4af289f2e6d5
84-
content/80: e2df426b0840fb9088fd7a33a9ac57bc
84+
content/80: 3280b3907d020b3a691d740832ae70e7
8585
content/81: be664aea2917020efb16c4946593f119
86-
content/82: a206be4b15f56d3face035b3b7784b99
86+
content/82: 2633e220ade7f46cb6d4c9273fd001d5
8787
content/83: 0c5c9be2b269111bd0c388ee7a3184cd
88-
content/84: b4c67f33e5014e9226490ca951ce9c47
89-
content/85: 7a8782963389d2189f52be8c9d232de6
90-
content/86: b7d77c41ac0a05293a82106fe76c5b63
91-
content/87: 78d2b9d0bb00df8cd51d787d86d55c6e
88+
content/84: dd0c693003eade2e536aff82f043d57a
89+
content/85: ab82386736186c1e02042d3b0eff3d84
90+
content/86: e55631402680e7be376aca390cdbd207
91+
content/87: 4a14b613ffd8aec8fe21af632429259b
9292
content/88: 7c42527fc9be269d599e31379c49a1fe
93-
content/89: fb110f75da846dd85bc444842616ada1
93+
content/89: f2630e5a88e09a612d4d8413c2d02745
9494
content/90: bc32754a3325936c0e49c1bfbd710eac
95-
content/91: 28ffebda0009dc7110d779aaf80de7d2
95+
content/91: 26caa05ddbd48ee00bee8fe553321815
9696
content/92: 0b8b6bb14eeae9d2ea344cabfefaa543
9797
content/93: 2b8ba27330ad5af9422b0de27bc01e00
9898
content/94: 3b04113f7cf1b64fe9a357a247925d34
9999
content/95: 59e04b5c97c9c7fccdb6f284f3be9981
100100
content/96: 51adf33450cab2ef392e93147386647c
101101
content/97: 72b9fd0ce0e4bfc98dfd36fb35238fab
102102
content/98: 982245493d09b3db1ef60824afa1bbf8
103-
content/99: a252b562fc300883f2845e0c54a2d0cd
103+
content/99: 0649cda26da4bb9ce185b9e8dd6ee41e
104104
content/100: c234c213e540ee3bcffad017c9c9cb75
105105
content/101: dcd5bc676b9b4956e66fe1045f86a5a0
106106
content/102: fa2896ac28faaddc29540dba0f2ea7cf
@@ -111,6 +111,6 @@ checksums:
111111
content/107: c708ae80a2e8b9752789a68a9bee176d
112112
content/108: 11f28ceca8ebac9f2469cb627a1a7937
113113
content/109: acb15cd882a954ec87b446478a0fc54b
114-
content/110: 9d640420f03b6b66571e4e10ff8f2e23
115-
content/111: 3a723392b702f4ca317da50a6204c68a
116-
content/112: 013ff55aff5956cfe7cf59fdb790f8ed
114+
content/110: 96c485d76c0e7f680d657f4e14beab7a
115+
content/111: ea8aaa0be5ef7931c7f7e671b51a6cc1
116+
content/112: 526a7243df6a8a7adaac235aa7271601

packages/cli/CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,74 @@
11
# lingo.dev
22

3+
## 0.133.5
4+
5+
### Patch Changes
6+
7+
- [#2049](https://github.com/lingodotdev/lingo.dev/pull/2049) [`2aa4145`](https://github.com/lingodotdev/lingo.dev/commit/2aa414565c802db71367ce00b1d062dc0488ef2f) Thanks [@AndreyHirsa](https://github.com/AndreyHirsa)! - Fixed a bug where the CI pull request flow would ignore the existing translation branch and start from scratch, which could produce duplicate PRs when the original was merged during a concurrent run.
8+
9+
## 0.133.4
10+
11+
### Patch Changes
12+
13+
- [#2051](https://github.com/lingodotdev/lingo.dev/pull/2051) [`9991515`](https://github.com/lingodotdev/lingo.dev/commit/9991515adad3773d40791b18f2e6105235145609) Thanks [@AndreyHirsa](https://github.com/AndreyHirsa)! - SDK: Improved API error messages by parsing server JSON responses instead of using HTTP status text. Removed try/catch from whoami so network errors propagate instead of being silently treated as "not authenticated". Deduplicated error handling into shared helpers. Removed unused workflowId parameter.
14+
15+
CLI: Auth failures now show specific error messages (e.g., "Invalid API key" vs generic "Authentication failed").
16+
17+
- Updated dependencies [[`9991515`](https://github.com/lingodotdev/lingo.dev/commit/9991515adad3773d40791b18f2e6105235145609)]:
18+
- @lingo.dev/_sdk@0.16.1
19+
- @lingo.dev/_compiler@0.12.1
20+
21+
## 0.133.3
22+
23+
### Patch Changes
24+
25+
- [#2042](https://github.com/lingodotdev/lingo.dev/pull/2042) [`a759e16`](https://github.com/lingodotdev/lingo.dev/commit/a759e1653ac3adfd93af16302c0bc79138f3aaa3) Thanks [@gmpaliwal07](https://github.com/gmpaliwal07)! - fix(cli): preserve terminal scrollback buffer during run command
26+
27+
## 0.133.2
28+
29+
### Patch Changes
30+
31+
- [#2043](https://github.com/lingodotdev/lingo.dev/pull/2043) [`06f4823`](https://github.com/lingodotdev/lingo.dev/commit/06f4823463496ea04e70bfa8aa7c6e076ad739b2) Thanks [@vrcprl](https://github.com/vrcprl)! - fix posthog
32+
33+
## 0.133.1
34+
35+
### Patch Changes
36+
37+
- [#2036](https://github.com/lingodotdev/lingo.dev/pull/2036) [`a73abec`](https://github.com/lingodotdev/lingo.dev/commit/a73abec7040fcc9146907861360c63bbb3223547) Thanks [@tjazsilovsek](https://github.com/tjazsilovsek)! - Bump @biomejs/js-api and @biomejs/wasm-nodejs to latest versions
38+
39+
## 0.133.0
40+
41+
### Minor Changes
42+
43+
- [#2035](https://github.com/lingodotdev/lingo.dev/pull/2035) [`73a8c73`](https://github.com/lingodotdev/lingo.dev/commit/73a8c731f5af03db9c165000e87ee5e5a1086a48) Thanks [@AndreyHirsa](https://github.com/AndreyHirsa)! - Migrate SDK and CLI to unified API endpoints. All requests now use `api.lingo.dev` with `X-API-Key` auth. Added `engineId` config option (auto-migrated from `vNext`)
44+
45+
### Patch Changes
46+
47+
- Updated dependencies [[`73a8c73`](https://github.com/lingodotdev/lingo.dev/commit/73a8c731f5af03db9c165000e87ee5e5a1086a48)]:
48+
- @lingo.dev/_compiler@0.12.0
49+
- @lingo.dev/_spec@0.49.0
50+
- @lingo.dev/_sdk@0.16.0
51+
52+
## 0.132.10
53+
54+
### Patch Changes
55+
56+
- Updated dependencies [[`1cfcf73`](https://github.com/lingodotdev/lingo.dev/commit/1cfcf736b0c6494bf66aa2478b2e7c194bdd5b92)]:
57+
- @lingo.dev/_sdk@0.15.3
58+
- @lingo.dev/_compiler@0.11.7
59+
60+
## 0.132.9
61+
62+
### Patch Changes
63+
64+
- [#2027](https://github.com/lingodotdev/lingo.dev/pull/2027) [`bb3ec79`](https://github.com/lingodotdev/lingo.dev/commit/bb3ec797ad0379d99f84f20731f37ab03f759b00) Thanks [@AndreyHirsa](https://github.com/AndreyHirsa)! - Add vNext API support to LingoDotDevEngine. When engineId is provided, the engine routes requests to the vNext API. Refactor vNext localizer to use LingoDotDevEngine from SDK instead of custom inline implementation
65+
66+
- [#2026](https://github.com/lingodotdev/lingo.dev/pull/2026) [`a6aa9f2`](https://github.com/lingodotdev/lingo.dev/commit/a6aa9f2df134de2de706246847dcbeef83b13eec) Thanks [@cherkanovart](https://github.com/cherkanovart)! - Exit with non-zero code when localization tasks fail, so CI/CD pipelines correctly detect partial errors
67+
68+
- Updated dependencies [[`bb3ec79`](https://github.com/lingodotdev/lingo.dev/commit/bb3ec797ad0379d99f84f20731f37ab03f759b00)]:
69+
- @lingo.dev/_sdk@0.15.2
70+
- @lingo.dev/_compiler@0.11.6
71+
372
## 0.132.8
473

574
### Patch Changes

packages/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lingo.dev",
3-
"version": "0.132.8",
3+
"version": "0.133.5",
44
"description": "Lingo.dev CLI",
55
"private": false,
66
"repository": {
@@ -138,8 +138,8 @@
138138
"@babel/parser": "7.28.5",
139139
"@babel/traverse": "7.28.5",
140140
"@babel/types": "7.28.5",
141-
"@biomejs/js-api": "3.0.0",
142-
"@biomejs/wasm-nodejs": "2.3.7",
141+
"@biomejs/js-api": "4.0.0",
142+
"@biomejs/wasm-nodejs": "2.4.6",
143143
"@datocms/cma-client-node": "4.0.1",
144144
"@gitbeaker/rest": "39.34.3",
145145
"@inkjs/ui": "2.0.0",

packages/cli/src/cli/cmd/ci/flows/pull-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class PullRequestFlow extends InBranchFlow {
9999

100100
private checkoutI18nBranch(i18nBranchName: string) {
101101
execSync(`git fetch origin ${i18nBranchName}`, { stdio: "inherit" });
102-
execSync(`git checkout -b ${i18nBranchName}`, {
102+
execSync(`git checkout -b ${i18nBranchName} origin/${i18nBranchName}`, {
103103
stdio: "inherit",
104104
});
105105
}

packages/cli/src/cli/cmd/ci/index.ts

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import path from "path";
21
import { Command } from "interactive-commander";
32
import createOra from "ora";
43
import { getSettings } from "../../utils/settings";
@@ -7,7 +6,6 @@ import { IIntegrationFlow } from "./flows/_base";
76
import { PullRequestFlow } from "./flows/pull-request";
87
import { InBranchFlow } from "./flows/in-branch";
98
import { getPlatformKit } from "./platforms";
10-
import { getConfig } from "../../utils/config";
119

1210
interface CIOptions {
1311
parallel?: boolean;
@@ -72,53 +70,29 @@ export default new Command()
7270
parseBooleanArg,
7371
)
7472
.action(async (options: CIOptions) => {
75-
const configDir = options.workingDirectory
76-
? path.resolve(process.cwd(), options.workingDirectory)
77-
: process.cwd();
78-
const originalCwd = process.cwd();
79-
let config;
80-
try {
81-
process.chdir(configDir);
82-
config = getConfig(false);
83-
} finally {
84-
process.chdir(originalCwd);
85-
}
86-
87-
const isVNext = !!config?.vNext;
88-
8973
const settings = getSettings(options.apiKey);
9074

91-
if (isVNext) {
92-
if (!settings.auth.vnext?.apiKey) {
93-
console.error(
94-
"No LINGO_API_KEY provided. vNext requires LINGO_API_KEY environment variable.",
95-
);
96-
return;
97-
}
98-
} else {
99-
if (!settings.auth.apiKey) {
100-
console.error("No API key provided");
101-
return;
102-
}
75+
if (!settings.auth.apiKey) {
76+
console.error(
77+
"No API key provided. Set LINGO_API_KEY environment variable or use --api-key flag.",
78+
);
79+
return;
80+
}
10381

104-
const authenticator = createAuthenticator({
105-
apiUrl: settings.auth.apiUrl,
106-
apiKey: settings.auth.apiKey,
107-
});
82+
const authenticator = createAuthenticator({
83+
apiUrl: settings.auth.apiUrl,
84+
apiKey: settings.auth.apiKey,
85+
});
10886

109-
const auth = await authenticator.whoami();
110-
if (!auth) {
111-
console.error("Not authenticated");
112-
return;
113-
}
87+
const auth = await authenticator.whoami();
88+
if (!auth) {
89+
console.error("Not authenticated");
90+
return;
11491
}
11592

11693
const env = {
11794
...(settings.auth.apiKey && {
118-
LINGODOTDEV_API_KEY: settings.auth.apiKey,
119-
}),
120-
...(settings.auth.vnext?.apiKey && {
121-
LINGO_API_KEY: settings.auth.vnext.apiKey,
95+
LINGO_API_KEY: settings.auth.apiKey,
12296
}),
12397
LINGODOTDEV_PULL_REQUEST: options.pullRequest?.toString() || "false",
12498
...(options.commitMessage && {
@@ -162,7 +136,7 @@ export default new Command()
162136
}
163137

164138
const hasChanges = await flow.run({
165-
parallel: isVNext || options.parallel,
139+
parallel: options.parallel,
166140
});
167141
if (!hasChanges) {
168142
return;

packages/cli/src/cli/cmd/ci/platforms/_base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export abstract class PlatformKit<
4747

4848
get config() {
4949
const env = Z.object({
50+
LINGO_API_KEY: Z.string().optional(),
5051
LINGODOTDEV_API_KEY: Z.string().optional(),
5152
LINGODOTDEV_PULL_REQUEST: Z.preprocess(
5253
(val) => val === "true" || val === true,
@@ -68,7 +69,7 @@ export abstract class PlatformKit<
6869
}).parse(process.env);
6970

7071
return {
71-
replexicaApiKey: env.LINGODOTDEV_API_KEY || "",
72+
replexicaApiKey: env.LINGO_API_KEY || env.LINGODOTDEV_API_KEY || "",
7273
isPullRequestMode: env.LINGODOTDEV_PULL_REQUEST,
7374
commitMessage: env.LINGODOTDEV_COMMIT_MESSAGE || defaultMessage,
7475
pullRequestTitle: env.LINGODOTDEV_PULL_REQUEST_TITLE || defaultMessage,

packages/cli/src/cli/cmd/i18n.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ export default new Command()
439439
let processPayload = createProcessor(i18nConfig!.provider, {
440440
apiKey: settings.auth.apiKey,
441441
apiUrl: settings.auth.apiUrl,
442+
engineId: i18nConfig!.engineId,
442443
});
443444
processPayload = withExponentialBackoff(
444445
processPayload,
@@ -600,6 +601,7 @@ export default new Command()
600601
await new Promise((resolve) => setTimeout(resolve, 50));
601602
} else {
602603
ora.warn("Localization completed with errors.");
604+
process.exitCode = 1;
603605
await trackEvent(email, "cmd.i18n.error", {
604606
flags,
605607
...aggregateErrorAnalytics(

packages/cli/src/cli/cmd/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Press Enter to open the browser for authentication.
4949
5050
---
5151
52-
Having issues? Put LINGODOTDEV_API_KEY in your .env file instead.
52+
Having issues? Put LINGO_API_KEY in your .env file instead.
5353
`.trim() + "\n",
5454
);
5555

0 commit comments

Comments
 (0)