@inlang/paraglide-js 2.0.10 → 2.0.12

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.
Files changed (32) hide show
  1. package/dist/compiler/compiler-options.d.ts +9 -0
  2. package/dist/compiler/compiler-options.d.ts.map +1 -1
  3. package/dist/compiler/compiler-options.js +1 -0
  4. package/dist/compiler/create-paraglide.d.ts +20 -14
  5. package/dist/compiler/create-paraglide.d.ts.map +1 -1
  6. package/dist/compiler/create-paraglide.js +18 -14
  7. package/dist/compiler/create-paraglide.test.js +7 -11
  8. package/dist/compiler/index.d.ts +1 -1
  9. package/dist/compiler/index.d.ts.map +1 -1
  10. package/dist/compiler/index.js +1 -1
  11. package/dist/compiler/runtime/assert-is-locale.test.js +3 -3
  12. package/dist/compiler/runtime/create-runtime.d.ts +1 -0
  13. package/dist/compiler/runtime/create-runtime.d.ts.map +1 -1
  14. package/dist/compiler/runtime/create-runtime.js +1 -0
  15. package/dist/compiler/runtime/extract-locale-from-cookie.test.js +7 -11
  16. package/dist/compiler/runtime/extract-locale-from-request.test.js +57 -77
  17. package/dist/compiler/runtime/extract-locale-from-url.test.js +51 -61
  18. package/dist/compiler/runtime/generate-static-localized-urls.test.js +48 -58
  19. package/dist/compiler/runtime/get-locale.test.js +54 -69
  20. package/dist/compiler/runtime/get-url-origin.test.js +2 -4
  21. package/dist/compiler/runtime/localize-href.test.js +48 -58
  22. package/dist/compiler/runtime/localize-url.test.js +258 -294
  23. package/dist/compiler/runtime/set-locale.d.ts.map +1 -1
  24. package/dist/compiler/runtime/set-locale.js +6 -3
  25. package/dist/compiler/runtime/set-locale.test.js +108 -70
  26. package/dist/compiler/runtime/track-message-call.test.js +1 -1
  27. package/dist/compiler/runtime/variables.d.ts +2 -0
  28. package/dist/compiler/runtime/variables.d.ts.map +1 -1
  29. package/dist/compiler/runtime/variables.js +2 -0
  30. package/dist/compiler/server/middleware.test.js +85 -109
  31. package/dist/services/env-variables/index.js +1 -1
  32. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"set-locale.d.ts","sourceRoot":"","sources":["../../../src/compiler/runtime/set-locale.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,sBAFU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,CA2EnE;AAgBK,uCAFI,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,QAIrC"}
1
+ {"version":3,"file":"set-locale.d.ts","sourceRoot":"","sources":["../../../src/compiler/runtime/set-locale.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;GAeG;AACH,sBAFU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,CAkFnE;AAgBK,uCAFI,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,QAIrC"}
@@ -1,6 +1,6 @@
1
1
  import { getLocale } from "./get-locale.js";
2
2
  import { localizeUrl } from "./localize-url.js";
3
- import { cookieMaxAge, cookieName, isServer, localStorageKey, strategy, TREE_SHAKE_COOKIE_STRATEGY_USED, TREE_SHAKE_GLOBAL_VARIABLE_STRATEGY_USED, TREE_SHAKE_LOCAL_STORAGE_STRATEGY_USED, TREE_SHAKE_URL_STRATEGY_USED, } from "./variables.js";
3
+ import { cookieMaxAge, cookieName, cookieDomain, isServer, localStorageKey, strategy, TREE_SHAKE_COOKIE_STRATEGY_USED, TREE_SHAKE_GLOBAL_VARIABLE_STRATEGY_USED, TREE_SHAKE_LOCAL_STORAGE_STRATEGY_USED, TREE_SHAKE_URL_STRATEGY_USED, } from "./variables.js";
4
4
  /**
5
5
  * Set the locale.
6
6
  *
@@ -41,11 +41,14 @@ export let setLocale = (newLocale, options) => {
41
41
  _locale = newLocale;
42
42
  }
43
43
  else if (TREE_SHAKE_COOKIE_STRATEGY_USED && strat === "cookie") {
44
- if (isServer || typeof document === "undefined") {
44
+ if (isServer ||
45
+ typeof document === "undefined" ||
46
+ typeof window === "undefined") {
45
47
  continue;
46
48
  }
49
+ const domain = cookieDomain || window.location.hostname;
47
50
  // set the cookie
48
- document.cookie = `${cookieName}=${newLocale}; path=/; max-age=${cookieMaxAge}`;
51
+ document.cookie = `${cookieName}=${newLocale}; path=/; max-age=${cookieMaxAge}; domain=${domain}`;
49
52
  }
50
53
  else if (strat === "baseLocale") {
51
54
  // nothing to be set here. baseLocale is only a fallback
@@ -7,24 +7,74 @@ test("sets the cookie to a different locale", async () => {
7
7
  // @ts-expect-error - global variable definition
8
8
  globalThis.window = {};
9
9
  // @ts-expect-error - global variable definition
10
- globalThis.window.location = {};
10
+ globalThis.window.location = { hostname: "example.com" };
11
+ globalThis.window.location.reload = vi.fn();
12
+ const runtime = await createParaglide({
13
+ blob: await newProject({
14
+ settings: {
15
+ baseLocale: "en",
16
+ locales: ["en", "de"],
17
+ },
18
+ }),
19
+ strategy: ["cookie"],
20
+ cookieName: "PARAGLIDE_LOCALE",
21
+ });
22
+ globalThis.document.cookie = "PARAGLIDE_LOCALE=en";
23
+ runtime.setLocale("de");
24
+ // set the locale
25
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000; domain=example.com");
26
+ // reloads the site if window is available
27
+ expect(globalThis.window.location.reload).toBeCalled();
28
+ });
29
+ test("sets the cookie with explicit domain to a different locale navigating subdomain", async () => {
30
+ // @ts-expect-error - global variable definition
31
+ globalThis.document = {};
32
+ // @ts-expect-error - global variable definition
33
+ globalThis.window = {};
34
+ // @ts-expect-error - global variable definition
35
+ globalThis.window.location = { hostname: "web.example.com" };
11
36
  globalThis.window.location.reload = vi.fn();
12
37
  const runtime = await createParaglide({
13
- project: await newProject({
38
+ blob: await newProject({
14
39
  settings: {
15
40
  baseLocale: "en",
16
41
  locales: ["en", "de"],
17
42
  },
18
43
  }),
19
- compilerOptions: {
20
- strategy: ["cookie"],
21
- cookieName: "PARAGLIDE_LOCALE",
22
- },
44
+ strategy: ["cookie"],
45
+ cookieName: "PARAGLIDE_LOCALE",
46
+ cookieDomain: "example.com",
23
47
  });
24
48
  globalThis.document.cookie = "PARAGLIDE_LOCALE=en";
25
49
  runtime.setLocale("de");
26
50
  // set the locale
27
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000");
51
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000; domain=example.com");
52
+ // reloads the site if window is available
53
+ expect(globalThis.window.location.reload).toBeCalled();
54
+ });
55
+ test("sets the cookie with explicit domain to a different locale navigating domain", async () => {
56
+ // @ts-expect-error - global variable definition
57
+ globalThis.document = {};
58
+ // @ts-expect-error - global variable definition
59
+ globalThis.window = {};
60
+ // @ts-expect-error - global variable definition
61
+ globalThis.window.location = { hostname: "example.com" };
62
+ globalThis.window.location.reload = vi.fn();
63
+ const runtime = await createParaglide({
64
+ blob: await newProject({
65
+ settings: {
66
+ baseLocale: "en",
67
+ locales: ["en", "de"],
68
+ },
69
+ }),
70
+ strategy: ["cookie"],
71
+ cookieName: "PARAGLIDE_LOCALE",
72
+ cookieDomain: "example.com",
73
+ });
74
+ globalThis.document.cookie = "PARAGLIDE_LOCALE=en";
75
+ runtime.setLocale("de");
76
+ // set the locale
77
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000; domain=example.com");
28
78
  // reloads the site if window is available
29
79
  expect(globalThis.window.location.reload).toBeCalled();
30
80
  });
@@ -36,21 +86,19 @@ test("url pattern strategy sets the window location", async () => {
36
86
  globalThis.window.location.hostname = "example.com";
37
87
  globalThis.window.location.reload = vi.fn();
38
88
  const runtime = await createParaglide({
39
- project: await newProject({
89
+ blob: await newProject({
40
90
  settings: { baseLocale: "en", locales: ["en", "de"] },
41
91
  }),
42
- compilerOptions: {
43
- strategy: ["url"],
44
- urlPatterns: [
45
- {
46
- pattern: "https://example.:tld/:path*",
47
- localized: [
48
- ["en", "https://example.com/:path*"],
49
- ["de", "https://example.de/:path*"],
50
- ],
51
- },
52
- ],
53
- },
92
+ strategy: ["url"],
93
+ urlPatterns: [
94
+ {
95
+ pattern: "https://example.:tld/:path*",
96
+ localized: [
97
+ ["en", "https://example.com/:path*"],
98
+ ["de", "https://example.de/:path*"],
99
+ ],
100
+ },
101
+ ],
54
102
  });
55
103
  globalThis.window.location.href = "https://example.com/page";
56
104
  runtime.setLocale("de");
@@ -61,44 +109,40 @@ test("url pattern strategy sets the window location", async () => {
61
109
  // `!document.cookie` was used which returned false for an empty string
62
110
  test("sets the cookie when it's an empty string", async () => {
63
111
  const runtime = await createParaglide({
64
- project: await newProject({
112
+ blob: await newProject({
65
113
  settings: {
66
114
  baseLocale: "en",
67
115
  locales: ["en", "fr"],
68
116
  },
69
117
  }),
70
- compilerOptions: {
71
- strategy: ["cookie"],
72
- cookieName: "PARAGLIDE_LOCALE",
73
- },
118
+ strategy: ["cookie"],
119
+ cookieName: "PARAGLIDE_LOCALE",
74
120
  });
75
121
  /** @ts-expect-error - client side api */
76
122
  globalThis.document = { cookie: "" };
77
123
  runtime.setLocale("en");
78
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000");
124
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000; domain=example.com");
79
125
  });
80
126
  test("when strategy precedes URL, it should set the locale and re-direct to the URL", async () => {
81
127
  const runtime = await createParaglide({
82
- project: await newProject({
128
+ blob: await newProject({
83
129
  settings: {
84
130
  baseLocale: "en",
85
131
  locales: ["en", "fr"],
86
132
  },
87
133
  }),
88
- compilerOptions: {
89
- strategy: ["cookie", "url", "baseLocale"],
90
- cookieName: "PARAGLIDE_LOCALE",
91
- isServer: "false",
92
- urlPatterns: [
93
- {
94
- pattern: "https://example.com/en/:path(.*)?",
95
- localized: [
96
- ["en", "https://example.com/en/:path(.*)?"],
97
- ["fr", "https://example.com/fr/:path(.*)?"],
98
- ],
99
- },
100
- ],
101
- },
134
+ strategy: ["cookie", "url", "baseLocale"],
135
+ cookieName: "PARAGLIDE_LOCALE",
136
+ isServer: "false",
137
+ urlPatterns: [
138
+ {
139
+ pattern: "https://example.com/en/:path(.*)?",
140
+ localized: [
141
+ ["en", "https://example.com/en/:path(.*)?"],
142
+ ["fr", "https://example.com/fr/:path(.*)?"],
143
+ ],
144
+ },
145
+ ],
102
146
  });
103
147
  /** @ts-expect-error - client side api */
104
148
  globalThis.document = { cookie: "PARAGLIDE_LOCALE=fr" };
@@ -108,7 +152,7 @@ test("when strategy precedes URL, it should set the locale and re-direct to the
108
152
  // Cookie strategy should determine locale as French
109
153
  expect(runtime.getLocale()).toBe("fr");
110
154
  runtime.setLocale("en");
111
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000");
155
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000; domain=example.com");
112
156
  expect(globalThis.window.location.href).toBe("https://example.com/en/some-path");
113
157
  });
114
158
  // https://github.com/opral/inlang-paraglide-js/issues/430
@@ -118,30 +162,28 @@ test("should not reload when setting locale to current locale", async () => {
118
162
  // @ts-expect-error - global variable definition
119
163
  globalThis.window = {};
120
164
  // @ts-expect-error - global variable definition
121
- globalThis.window.location = {};
165
+ globalThis.window.location = { hostname: "example.com" };
122
166
  globalThis.window.location.reload = vi.fn();
123
167
  const runtime = await createParaglide({
124
- project: await newProject({
168
+ blob: await newProject({
125
169
  settings: {
126
170
  baseLocale: "en",
127
171
  locales: ["en", "de"],
128
172
  },
129
173
  }),
130
- compilerOptions: {
131
- strategy: ["cookie"],
132
- cookieName: "PARAGLIDE_LOCALE",
133
- },
174
+ strategy: ["cookie"],
175
+ cookieName: "PARAGLIDE_LOCALE",
134
176
  });
135
177
  globalThis.document.cookie = "PARAGLIDE_LOCALE=en; path=/";
136
178
  // Setting to the current locale (en)
137
179
  runtime.setLocale("en");
138
180
  // Cookie should remain unchanged
139
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000");
181
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=en; path=/; max-age=34560000; domain=example.com");
140
182
  // Should not trigger a reload
141
183
  expect(globalThis.window.location.reload).not.toBeCalled();
142
184
  // Setting to a different locale should still work
143
185
  runtime.setLocale("de");
144
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000");
186
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=de; path=/; max-age=34560000; domain=example.com");
145
187
  expect(globalThis.window.location.reload).toBeCalled();
146
188
  });
147
189
  test("sets the locale to localStorage", async () => {
@@ -153,15 +195,13 @@ test("sets the locale to localStorage", async () => {
153
195
  // @ts-expect-error - global variable definition
154
196
  globalThis.window = {};
155
197
  const runtime = await createParaglide({
156
- project: await newProject({
198
+ blob: await newProject({
157
199
  settings: {
158
200
  baseLocale: "en",
159
201
  locales: ["en", "de"],
160
202
  },
161
203
  }),
162
- compilerOptions: {
163
- strategy: ["localStorage"],
164
- },
204
+ strategy: ["localStorage"],
165
205
  });
166
206
  runtime.setLocale("de");
167
207
  expect(globalThis.localStorage.setItem).toHaveBeenCalledWith("PARAGLIDE_LOCALE", "de");
@@ -185,31 +225,29 @@ test("should set locale in all configured storage mechanisms regardless of which
185
225
  globalThis.window.location.reload = vi.fn();
186
226
  // Create runtime with multiple strategies
187
227
  const runtime = await createParaglide({
188
- project: await newProject({
228
+ blob: await newProject({
189
229
  settings: {
190
230
  baseLocale: "en",
191
231
  locales: ["en", "de", "fr"],
192
232
  },
193
233
  }),
194
- compilerOptions: {
195
- strategy: ["url", "localStorage", "cookie", "baseLocale"],
196
- cookieName: "PARAGLIDE_LOCALE",
197
- urlPatterns: [
198
- {
199
- pattern: "https://example.com/:locale/:path*",
200
- localized: [
201
- ["en", "https://example.com/en/:path*"],
202
- ["de", "https://example.com/de/:path*"],
203
- ["fr", "https://example.com/fr/:path*"],
204
- ],
205
- },
206
- ],
207
- },
234
+ strategy: ["url", "localStorage", "cookie", "baseLocale"],
235
+ cookieName: "PARAGLIDE_LOCALE",
236
+ urlPatterns: [
237
+ {
238
+ pattern: "https://example.com/:locale/:path*",
239
+ localized: [
240
+ ["en", "https://example.com/en/:path*"],
241
+ ["de", "https://example.com/de/:path*"],
242
+ ["fr", "https://example.com/fr/:path*"],
243
+ ],
244
+ },
245
+ ],
208
246
  });
209
247
  // Call setLocale
210
248
  runtime.setLocale("fr");
211
249
  // Verify that all storage mechanisms are updated
212
250
  expect(globalThis.window.location.href).toBe("https://example.com/fr/page");
213
251
  expect(globalThis.localStorage.setItem).toHaveBeenCalledWith("PARAGLIDE_LOCALE", "fr");
214
- expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=fr; path=/; max-age=34560000");
252
+ expect(globalThis.document.cookie).toBe("PARAGLIDE_LOCALE=fr; path=/; max-age=34560000; domain=example.com");
215
253
  });
@@ -4,7 +4,7 @@ import { newProject } from "@inlang/sdk";
4
4
  import { test, expect } from "vitest";
5
5
  test("tracks message calls", async () => {
6
6
  const runtime = await createParaglide({
7
- project: await newProject({
7
+ blob: await newProject({
8
8
  settings: {
9
9
  baseLocale: "en",
10
10
  locales: ["en", "de"],
@@ -32,6 +32,8 @@ export const cookieName: string;
32
32
  /** @type {number} */
33
33
  export const cookieMaxAge: number;
34
34
  /** @type {string} */
35
+ export const cookieDomain: string;
36
+ /** @type {string} */
35
37
  export const localStorageKey: string;
36
38
  /**
37
39
  * @type {Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage">}
@@ -1 +1 @@
1
- {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/compiler/runtime/variables.js"],"names":[],"mappings":"AAqEA;;;;;;;;;GASG;AACH,wDAFW,0BAA0B,GAAG,SAAS,QAIhD;AAjFD;;;;;;;GAOG;AACH,yBAA0B,IAAI,CAAC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,CAAA;KAAC,EAC3E,EAAE,EAAE,GAAG,KAAK,GAAG,CAAA;CACjB"}
@@ -21,6 +21,8 @@ export const cookieName = "<cookie-name>";
21
21
  /** @type {number} */
22
22
  export const cookieMaxAge = 60 * 60 * 24 * 400;
23
23
  /** @type {string} */
24
+ export const cookieDomain = "<cookie-domain>";
25
+ /** @type {string} */
24
26
  export const localStorageKey = "PARAGLIDE_LOCALE";
25
27
  /**
26
28
  * @type {Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage">}