Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Aug 17, 2023
1 parent ee9c9e7 commit 35ada13
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/bundle-utils/test/fixtures/codegen/import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import mod1 from './module1'
import { mod2 } from './module2'

export default {
foo: 'foo',
mod1,
nest: {
bar: 'bar',
mod2: mod2
}
}
3 changes: 3 additions & 0 deletions packages/bundle-utils/test/fixtures/codegen/module1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
module1: 'this is module1'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`import > code 1`] = `
"const resource = {
\\"foo\\": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize([\\"foo\\"])};fn.source=\\"foo\\";return fn;})(),
\\"nest\\": {
\\"bar\\": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize([\\"bar\\"])};fn.source=\\"bar\\";return fn;})(),
}
}
export default resource"
`;

exports[`import > map 1`] = `
{
"mappings": "",
"names": [],
"sources": [],
"version": 3,
}
`;
13 changes: 13 additions & 0 deletions packages/bundle-utils/test/generator/js1.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { readFile, validateSyntax } from '../utils'

Check warning on line 1 in packages/bundle-utils/test/generator/js1.test.ts

View workflow job for this annotation

GitHub Actions / Lint on Node.js 16 OS: ubuntu-latest

'validateSyntax' is defined but never used
import { generate } from '../../src/js'

test('import', async () => {
const { source } = await readFile('./fixtures/codegen/import.js')
const { code, map } = generate(source, {
sourceMap: true,
env: 'development'
})

expect(code).toMatchSnapshot('code')
expect(map).toMatchSnapshot('map')
})
9 changes: 9 additions & 0 deletions packages/unplugin-vue-i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

## @intlify/unplugin-vue-i18n@0.12.3 (2023-08-17)

#### :zap: Improvement Features
* [#272](https://github.com/intlify/bundle-tools/pull/272) Set `messages` type to the vue-i18n type instead of any ([@ferferga](https://github.com/ferferga))

#### Committers: 1
- Fernando Fernández ([@ferferga](https://github.com/ferferga))




## @intlify/unplugin-vue-i18n@0.12.1 (2023-07-07)
Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin-vue-i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intlify/unplugin-vue-i18n",
"version": "0.12.2",
"version": "0.12.3",
"description": "unplugin for Vue I18n",
"author": {
"name": "kazuya kawaguchi",
Expand Down

0 comments on commit 35ada13

Please sign in to comment.