Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade bundle-utils and unplugin-vue-i18n for fully esm using #2214

Merged
merged 2 commits into from
Jul 8, 2023
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
}
},
"dependencies": {
"@intlify/bundle-utils": "^7.0.1",
"@intlify/shared": "9.3.0-beta.22",
"@intlify/unplugin-vue-i18n": "^0.12.1",
"@intlify/bundle-utils": "^7.0.2",
"@intlify/shared": "9.3.0-beta.24",
"@intlify/unplugin-vue-i18n": "^0.12.2",
"@mizchi/sucrase": "^4.1.0",
"@nuxt/kit": "^3.4.1",
"@vue/compiler-sfc": "^3.3.4",
Expand All @@ -94,7 +94,7 @@
"ufo": "^1.1.2",
"unplugin": "^1.3.2",
"unstorage": "^1.5.0",
"vue-i18n": "9.3.0-beta.22",
"vue-i18n": "9.3.0-beta.24",
"vue-i18n-routing": "^0.13.0"
},
"devDependencies": {
Expand Down
114 changes: 51 additions & 63 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions test/__snapshots__/gen.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,17 @@ export const localeMessages = {
}

export const additionalMessages = Object({\\"en\\":[() => Promise.resolve({
\\"foo\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"foo\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"value\\":\\"foo\\"}],\\"static\\":\\"foo\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello1\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"value\\":\\"hello1\\"}],\\"static\\":\\"hello1\\"}}
\\"foo\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"foo\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}}}],\\"static\\":\\"foo\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello1\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}}}],\\"static\\":\\"hello1\\"}}
}),() => Promise.resolve({
\\"bar\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"bar\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"value\\":\\"bar\\"}],\\"static\\":\\"bar\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello2\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"value\\":\\"hello2\\"}],\\"static\\":\\"hello2\\"}}
\\"bar\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"bar\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}}}],\\"static\\":\\"bar\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello2\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}}}],\\"static\\":\\"hello2\\"}}
}),],\\"ja\\":[() => Promise.resolve({
\\"buz\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"buz\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"value\\":\\"buz\\"}],\\"static\\":\\"buz\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello3\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"value\\":\\"hello3\\"}],\\"static\\":\\"hello3\\"}}
\\"buz\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"buz\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}}}],\\"static\\":\\"buz\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello3\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}}}],\\"static\\":\\"hello3\\"}}
}),() => Promise.resolve({
\\"baz\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"baz\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"value\\":\\"baz\\"}],\\"static\\":\\"baz\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello4\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"value\\":\\"hello4\\"}],\\"static\\":\\"hello4\\"}}
\\"baz\\": {\\"type\\":0,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3},\\"source\\":\\"baz\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":3,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":4,\\"offset\\":3}}}],\\"static\\":\\"baz\\"}},
\\"hello\\": {\\"type\\":0,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6},\\"source\\":\\"hello4\\"},\\"body\\":{\\"type\\":2,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}},\\"items\\":[{\\"type\\":3,\\"start\\":0,\\"end\\":6,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":1,\\"offset\\":0},\\"end\\":{\\"line\\":1,\\"column\\":7,\\"offset\\":6}}}],\\"static\\":\\"hello4\\"}}
}),],})

export const resolveNuxtI18nOptions = async (context) => {
Expand Down