Skip to content

Commit fd060df

Browse files
authored
feat: move to ESM first (#302)
* feat: move to ESM first * chore: fix docs. generation
1 parent a12369e commit fd060df

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ etc
99
dist
1010
temp
1111
.eslintcache
12+
.idea/

docs/@intlify/vue-i18n-extensions-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Transform `v-t` custom directive
1717

1818
**Signature:**
1919
```typescript
20-
declare function transformVTDirective<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
21-
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
22-
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
20+
declare function transformVTDirective<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
21+
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
22+
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
2323
Legacy extends boolean = true>(options?: TransformVTDirectiveOptions<Messages, DateTimeFormats, NumberFormats, Legacy>): DirectiveTransform;
2424
```
2525

@@ -86,9 +86,9 @@ Transform options for `v-t` custom directive
8686

8787
**Signature:**
8888
```typescript
89-
interface TransformVTDirectiveOptions<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
90-
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
91-
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
89+
interface TransformVTDirectiveOptions<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
90+
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
91+
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
9292
Legacy extends boolean = true>
9393
```
9494

docsgen.config.js renamed to docsgen.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @typescript-eslint/no-require-imports
12
const { tocResolver, tocProcessor } = require('api-docs-gen')
23

34
module.exports = {

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@intlify/vue-i18n-extensions",
3-
"description": "vue-i18n extensions",
3+
"type": "module",
44
"version": "7.0.0",
5+
"description": "vue-i18n extensions",
56
"author": {
67
"name": "kazuya kawaguchi",
78
"email": "[email protected]"
@@ -77,24 +78,23 @@
7778
"optional": true
7879
}
7980
},
80-
"files": [
81-
"dist/idnex.cjs",
82-
"dist/index.mjs",
83-
"dist/index.d.ts",
84-
"dist/index.d.mts",
85-
"dist/index.d.cts"
86-
],
87-
"main": "dist/index.cjs",
88-
"module": "dist/index.mjs",
89-
"types": "dist/index.d.ts",
9081
"exports": {
9182
".": {
92-
"types": "./dist/index.d.ts",
9383
"import": "./dist/index.mjs",
9484
"require": "./dist/index.cjs"
9585
},
9686
"./package.json": "./package.json"
9787
},
88+
"main": "dist/index.cjs",
89+
"module": "dist/index.mjs",
90+
"types": "dist/index.d.ts",
91+
"files": [
92+
"dist/index.cjs",
93+
"dist/index.mjs",
94+
"dist/index.d.ts",
95+
"dist/index.d.mts",
96+
"dist/index.d.cts"
97+
],
9898
"repository": {
9999
"type": "git",
100100
"url": "git+https://github.com/intlify/vue-i18n-extensions.git"
@@ -105,7 +105,7 @@
105105
"release": "bumpp --commit \"release: v%s\" --push --tag",
106106
"build": "pnpm build:transpile && pnpm build:extract && pnpm build:docs",
107107
"build:nightly": "pnpm build:transpile && pnpm build:extract",
108-
"build:docs": "api-docs-gen ./temp/vue-i18n-extensions.api.json -c ./docsgen.config.js -o ./docs",
108+
"build:docs": "api-docs-gen ./temp/vue-i18n-extensions.api.json -c ./docsgen.config.cjs -o ./docs",
109109
"build:extract": "api-extractor run -l -c ./api-extractor.json --typescript-compiler-folder node_modules/typescript",
110110
"build:transpile": "unbuild",
111111
"check-install": "tsx scripts/playwright.ts",

0 commit comments

Comments
 (0)