Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified __tests__/frameworks/vite/__snapshots__/external.spec.ts.snap
Binary file not shown.
Binary file modified __tests__/frameworks/vite/__snapshots__/sfc.spec.ts.snap
Binary file not shown.
12 changes: 6 additions & 6 deletions __tests__/frameworks/vite/errors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('Error checking', () => {

// Assert
await expect(code).rejects.toThrowErrorMatchingInlineSnapshot(`
"Fluent parse errors:
E0003: Expected token: \\"}\\" (2:31)
[Error: Fluent parse errors:
E0003: Expected token: "}" (2:31)
1 | # Simple things are simple.
2 | hello-user = Hello, {$userName!
| ^
Expand All @@ -42,7 +42,7 @@ describe('Error checking', () => {
9 | }to {$userGender ->
| ^
10 | [male] his stream
11 | [female] her stream"
11 | [female] her stream]
`)
})

Expand All @@ -62,8 +62,8 @@ describe('Error checking', () => {

// Assert
await expect(code).rejects.toThrowErrorMatchingInlineSnapshot(`
"Fluent parse errors:
E0003: Expected token: \\"}\\" (2:31)
[Error: Fluent parse errors:
E0003: Expected token: "}" (2:31)
1 | # Simple things are simple.
2 | hello-user = Hello, {$userName!
| ^
Expand All @@ -75,7 +75,7 @@ describe('Error checking', () => {
9 | }to {$userGender ->
| ^
10 | [male] his stream
11 | [female] her stream"
11 | [female] her stream]
`)
})
})
6 changes: 3 additions & 3 deletions __tests__/frameworks/vite/external.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ describe('Vite external', () => {
// Assert
expect(code).toMatchInlineSnapshot(`
"=== /fixtures/importer.js ===
import translations from \\"/@id/virtual:ftl-for-file?importer=/fixtures/importer.js\\"
import translations from "/@id/virtual:ftl-for-file?importer=/fixtures/importer.js"

// eslint-disable-next-line no-console -- this is a test file
console.log(translations)


=== virtual:ftl-for-file?importer=/fixtures/importer.js ===
import en_ftl from \\"/fixtures/ftl/en/importer.js.ftl?import\\";
import da_ftl from \\"/fixtures/ftl/da/importer.js.ftl?import\\";
import en_ftl from "/fixtures/ftl/en/importer.js.ftl?import";
import da_ftl from "/fixtures/ftl/da/importer.js.ftl?import";
export default { 'en': en_ftl, 'da': da_ftl }
"
`)
Expand Down
4 changes: 2 additions & 2 deletions __tests__/frameworks/webpack/__snapshots__/sfc.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { FluentResource } from '@fluent/bundle'
export default function (Component) {
const target = Component.options || Component
target.fluent = target.fluent || {}
target.fluent['en'] = new FluentResource(\\"# Simple things are simple.\\\\nhello-user = Hello, {$userName}!\\\\n\\\\n# Complex things are possible.\\\\nshared-photos =\\\\n {$userName} {$photoCount ->\\\\n [one] added one photo\\\\n *[other] added {$photoCount} new photos\\\\n } to {$userGender ->\\\\n [male] his stream\\\\n [female] her stream\\\\n *[other] their stream\\\\n }.\\")
target.fluent['en'] = new FluentResource("# Simple things are simple.\\nhello-user = Hello, {$userName}!\\n\\n# Complex things are possible.\\nshared-photos =\\n {$userName} {$photoCount ->\\n [one] added one photo\\n *[other] added {$photoCount} new photos\\n } to {$userGender ->\\n [male] his stream\\n [female] her stream\\n *[other] their stream\\n }.")
}
",
]
Expand All @@ -22,7 +22,7 @@ import { FluentResource } from '@fluent/bundle'
export default function (Component) {
const target = Component.options || Component
target.fluent = target.fluent || {}
target.fluent['en'] = new FluentResource(\\"# Simple things are simple.\\\\nhello-user = Hello, {$userName}!\\\\n\\\\n# Complex things are possible.\\\\nshared-photos =\\\\n {$userName} {$photoCount ->\\\\n [one] added one photo\\\\n *[other] added {$photoCount} new photos\\\\n } to {$userGender ->\\\\n [male] his stream\\\\n [female] her stream\\\\n *[other] their stream\\\\n }.\\")
target.fluent['en'] = new FluentResource("# Simple things are simple.\\nhello-user = Hello, {$userName}!\\n\\n# Complex things are possible.\\nshared-photos =\\n {$userName} {$photoCount ->\\n [one] added one photo\\n *[other] added {$photoCount} new photos\\n } to {$userGender ->\\n [male] his stream\\n [female] her stream\\n *[other] their stream\\n }.")
}
",
]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@release-it-plugins/lerna-changelog": "6.0.0",
"@types/node": "20.10.5",
"@vitejs/plugin-vue": "5.0.0",
"@vitest/coverage-istanbul": "^0.34.1",
"@vitest/coverage-istanbul": "^1.0.0",
"@vue/compiler-sfc": "3.3.4",
"dotenv-cli": "7.2.1",
"eslint": "8.46.0",
Expand All @@ -84,7 +84,7 @@
"tsup": "8.0.1",
"typescript": "5.1.6",
"vite": "5.0.10",
"vitest": "0.34.1",
"vitest": "1.1.0",
"vue": "3.3.4",
"vue-loader": "17.2.2",
"webpack": "5.88.2"
Expand Down
Loading