@intlify/vue-i18n-extensions 2.0.1 → 4.0.0

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 (3) hide show
  1. package/README.md +10 -78
  2. package/package.json +65 -47
  3. package/CHANGELOG.md +0 -125
package/README.md CHANGED
@@ -1,104 +1,35 @@
1
- # :globe_with_meridians: @intlify/vue-i18n-extensions
1
+ # 🌏 @intlify/vue-i18n-extensions
2
2
 
3
- [![CircleCI](https://circleci.com/gh/intlify/vue-i18n-extensions/tree/next.svg?style=svg)](https://circleci.com/gh/intlify/vue-i18n-extensions/tree/dev)
4
3
  [![npm](https://img.shields.io/npm/v/@intlify/vue-i18n-extensions/next.svg)](https://www.npmjs.com/package/@intlify/vue-i18n-extensions)
5
4
  [![npm](https://img.shields.io/npm/v/@intlify/vue-i18n-extensions.svg)](https://www.npmjs.com/package/@intlify/vue-i18n-extensions)
6
5
  [![vue-i18n-extensions Dev Token](https://badge.devtoken.rocks/vue-i18n-extensions)](https://devtoken.rocks/package/vue-i18n-extensions)
7
6
 
8
7
  Extensions for vue-i18n
9
8
 
10
- ## :warning: Notice
9
+ ## âš ī¸ Notice
11
10
  This `next` branch is development branch for Vue 3! The version for Vue 2 is now in [`master`](https://github.com/intlify/vue-i18n-extensions/tree/master) branch!
12
11
 
13
12
 
14
- <h2 align="center">🤝 Supporting Intlify Project</h2>
15
-
16
- Intlify Project is an open source project that is included Vue I18n and i18n tooling and libralies with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
17
-
18
- <p align="center">
19
- <a
20
- href="https://github.com/sponsors/kazupon"
21
- target="_blank">
22
- Become a Sponsor on GitHub
23
- </a>
24
- </p>
25
-
26
- <h3 align="center">đŸĨ‡ Gold Sponsors</h3>
27
-
28
- <p align="center">
29
- <a
30
- href="https://nuxtjs.org/"
31
- target="_blank">
32
- <img
33
- src="https://raw.githubusercontent.com/intlify/vue-i18n-next/master/docs/public/nuxt.png"
34
- width="240px"
35
- />
36
- </a>
37
- </p>
38
-
39
- <h3 align="center">đŸĨˆ Silver Sponsors</h3>
40
-
41
- <p align="center">
42
- <a
43
- href="https://www.codeandweb.com/babeledit?utm_campaign=vue-i18n-2019-01"
44
- target="_blank">
45
- <img
46
- src="https://secure.codeandweb.com/static/babeledit.svg"
47
- width="200px"
48
- />
49
- </a>
50
- </p>
51
-
52
- <h3 align="center">đŸĨ‰ Bronze Sponsors</h3>
53
-
54
- <p align="center">
55
- <a href="https://zenarchitects.co.jp/" target="_blank">
56
- <img
57
- src="https://raw.githubusercontent.com/intlify/vue-i18n-next/master/docs/public/zenarchitects.png"
58
- width="144px"
59
- />
60
- </a>
61
- </p>
62
- <p align="center">
63
- <a href="https://www.sendcloud.com/" target="_blank">
64
- <img
65
- src="https://raw.githubusercontent.com/intlify/vue-i18n-next/master/docs/public/sendcloud.png"
66
- width="144px"
67
- />
68
- </a>
69
- </p>
70
- <p align="center">
71
- <a href="https://www.vuemastery.com/" target="_blank">
72
- <img
73
- src="https://raw.githubusercontent.com/intlify/vue-i18n-next/master/docs/public/vuemastery.png"
74
- width="144px"
75
- />
76
- </a>
77
- </p>
78
-
79
- <br/>
80
-
81
-
82
13
  This library exports the following extensions:
83
14
 
84
- ## :star: Features
15
+ ## 🌟 Features
85
16
 
86
17
  - Server-side rendering for `v-t` custom directive
87
18
  - Pre-Translation
88
19
 
89
20
 
90
- ## :cd: Installation
21
+ ## đŸ’ŋ Installation
91
22
 
92
23
  ```sh
93
24
  $ npm i --save-dev @intlify/vue-i18n-extensions@next
94
25
  ```
95
26
 
96
27
 
97
- ## :rocket: Extensions
28
+ ## 🚀 Extensions
98
29
 
99
30
  ### Server-side rendering for `v-t` custom directive
100
31
 
101
- You can use tnrasform offered with this package, to support Server-side rendering for `v-t` custom directives.
32
+ You can use transform offered with this package, to support Server-side rendering for `v-t` custom directives.
102
33
 
103
34
  In order to use this feature, you need to specify to Vue compiler option.
104
35
  The following example that use `compile` of `@vue/compiler-ssr`:
@@ -248,7 +179,8 @@ module.exports = {
248
179
  // ...
249
180
  ]
250
181
  },
251
- plugins: [new VueLoaderPlugin()]
182
+ plugins: [new VueLoaderPlugin()],
183
+ parallel: false // the compilerOptions.directiveTransforms are not serializable
252
184
  }
253
185
  ```
254
186
 
@@ -263,11 +195,11 @@ You can specify the transform resulting from `transformVTDirective` in the compi
263
195
  - `vite` (`vueCompilerOptions` at [`CoreOptions`](https://github.com/vitejs/vite/blob/master/src/node/config.ts#L154))
264
196
 
265
197
 
266
- ## API
198
+ ## 🤝 API
267
199
 
268
200
  About details, See [docs](./docs/@intlify/vue-i18n-extensions-api.md)
269
201
 
270
202
 
271
- ## :copyright: License
203
+ ## ÂŠī¸ License
272
204
 
273
205
  [MIT](http://opensource.org/licenses/MIT)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@intlify/vue-i18n-extensions",
3
3
  "description": "vue-i18n extensions",
4
- "version": "2.0.1",
4
+ "version": "4.0.0",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -24,54 +24,58 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@babel/parser": "^7.13.3",
27
+ "@babel/parser": "^7.15.2",
28
28
  "@intlify/shared": "^9.0.0",
29
- "@vue/compiler-dom": "^3.0.9",
29
+ "@vue/compiler-dom": "^3.1.5",
30
30
  "vue-i18n": "^9.0.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@microsoft/api-extractor": "^7.12.0",
34
- "@types/jest": "^26.0.22",
35
- "@types/node": "^14.14.0",
36
- "@types/webpack": "^4.41.1",
37
- "@types/webpack-merge": "^4.1.5",
38
- "@typescript-eslint/eslint-plugin": "^4.19.0",
39
- "@typescript-eslint/parser": "^4.19.0",
40
- "@vue/compiler-sfc": "^3.0.9",
41
- "@vue/compiler-ssr": "^3.0.9",
42
- "@vue/runtime-dom": "^3.0.9",
43
- "@vue/server-renderer": "^3.0.9",
44
- "api-docs-gen": "^0.2.6",
33
+ "@kazupon/lerna-changelog": "^4.3.0",
34
+ "@microsoft/api-extractor": "^7.18.4",
35
+ "@secretlint/secretlint-rule-preset-recommend": "^3.3.0",
36
+ "@types/jest": "^26.0.24",
37
+ "@types/node": "^16.4.13",
38
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
39
+ "@typescript-eslint/parser": "^5.0.0",
40
+ "@vue/compiler-sfc": "^3.1.5",
41
+ "@vue/compiler-ssr": "^3.1.5",
42
+ "@vue/runtime-dom": "^3.1.5",
43
+ "@vue/server-renderer": "^3.1.5",
44
+ "api-docs-gen": "^0.4.0",
45
45
  "babel-loader": "^8.2.0",
46
- "eslint": "^7.23.0",
47
- "eslint-config-prettier": "^8.1.0",
48
- "eslint-plugin-prettier": "^3.3.0",
46
+ "eslint": "^7.32.0",
47
+ "eslint-config-prettier": "^8.3.0",
48
+ "eslint-plugin-prettier": "^3.4.0",
49
49
  "eslint-plugin-vue-libs": "^4.0.0",
50
- "jest": "^26.4.2",
51
- "jest-puppeteer": "^4.4.0",
52
- "jest-watch-typeahead": "^0.6.0",
53
- "lerna-changelog": "^1.0.0",
50
+ "jest": "^27.0.6",
51
+ "jest-puppeteer": "^6.0.0",
52
+ "jest-watch-typeahead": "^1.0.0",
53
+ "lint-staged": "^11.0.0",
54
54
  "npm-run-all": "^4.1.5",
55
- "opener": "^1.5.1",
56
- "puppeteer": "^2.1.1",
57
- "shipjs": "^0.23.0",
58
- "ts-jest": "^26.5.0",
59
- "typescript": "^4.1.3",
60
- "typescript-eslint-language-service": "^4.1.3",
61
- "vue": "^3.0.9",
62
- "vue-loader": "^16.1.2",
63
- "webpack": "^4.42.1",
64
- "webpack-cli": "^3.3.11",
65
- "webpack-dev-server": "^3.10.3",
66
- "webpack-merge": "^4.2.2"
55
+ "opener": "^1.5.2",
56
+ "puppeteer": "^12.0.0",
57
+ "secretlint": "^3.3.0",
58
+ "shipjs": "^0.24.0",
59
+ "ts-jest": "^27.0.4",
60
+ "typescript": "^4.3.5",
61
+ "typescript-eslint-language-service": "^5.0.0",
62
+ "vue": "^3.1.5",
63
+ "vue-loader": "^16.2.0",
64
+ "webpack": "^5.49.0",
65
+ "webpack-cli": "^4.7.2",
66
+ "webpack-dev-server": "^3.11.2",
67
+ "yorkie": "^2.0.0"
67
68
  },
68
69
  "engines": {
69
- "node": ">= 10.0"
70
+ "node": ">= 14.18"
70
71
  },
71
72
  "files": [
72
73
  "lib/*.js",
73
74
  "dist/*.d.ts"
74
75
  ],
76
+ "gitHooks": {
77
+ "pre-commit": "lint-staged"
78
+ },
75
79
  "homepage": "https://github.com/intlify/vue-i18n-extensions#readme",
76
80
  "keywords": [
77
81
  "extensions",
@@ -82,39 +86,53 @@
82
86
  "vue-i18n"
83
87
  ],
84
88
  "license": "MIT",
89
+ "lint-staged": {
90
+ "*.js": [
91
+ "prettier --write"
92
+ ],
93
+ "*.ts?(x)": [
94
+ "prettier --parser=typescript --write"
95
+ ],
96
+ "*": [
97
+ "secretlint"
98
+ ]
99
+ },
85
100
  "main": "lib/index.js",
86
101
  "peerDependencies": {
87
- "vue": "^3.0.0"
102
+ "vue": "^3.0.0",
103
+ "vue-i18n": "^9.0.0"
88
104
  },
89
- "types": "dist/vue-i18n-extensions.d.ts",
90
105
  "repository": {
91
106
  "type": "git",
92
107
  "url": "git+https://github.com/intlify/vue-i18n-extensions.git"
93
108
  },
94
109
  "scripts": {
95
110
  "build": "yarn build:transpile && yarn build:extract && yarn build:docs",
96
- "build:transpile": "tsc -p .",
97
- "build:extract": "api-extractor run -l -c ./api-extractor.json",
98
111
  "build:docs": "api-docs-gen ./temp/vue-i18n-extensions.api.json -c ./docsgen.config.js -o ./docs",
99
- "watch": "tsc -p . --watch",
100
- "example": "yarn build && webpack-dev-server --config example/webpack.config.js --inline --hot",
112
+ "build:extract": "api-extractor run -l -c ./api-extractor.json",
113
+ "build:transpile": "tsc -p .",
101
114
  "clean": "npm-run-all clean:*",
102
115
  "clean:cache:jest": "jest --clearCache",
103
116
  "clean:coverage": "rm -rf ./coverage",
104
- "clean:lib": "rm -rf ./lib/*.*",
105
117
  "clean:extract": "rm -rf ./temp/*.* ./dist/*.* ./etc/*.*",
118
+ "clean:lib": "rm -rf ./lib/*.*",
106
119
  "coverage": "opener coverage/lcov-report/index.html",
107
- "fix": "npm-run-all --parallel lint:fix format:fix",
120
+ "example": "webpack serve --config example/webpack.config.js --inline --hot",
121
+ "fix": "npm-run-all --parallel lint:eslint:fix format:fix",
108
122
  "format": "prettier --config .prettierrc --ignore-path .prettierignore '**/*.{js,json,html}'",
109
123
  "format:fix": "yarn format --write",
110
- "lint": "eslint ./src ./test --ext .ts",
111
- "lint:fix": "yarn lint --fix",
124
+ "lint": "npm-run-all --parallel lint:eslint lint:secret",
125
+ "lint:eslint": "eslint ./src ./test --ext .ts",
126
+ "lint:eslint:fix": "yarn lint:eslint --fix",
127
+ "lint:secret": "npx secretlint \"**/*\"",
112
128
  "release:prepare": "shipjs prepare",
113
129
  "release:trigger": "shipjs trigger",
114
130
  "test": "yarn lint && yarn test:cover && yarn test:e2e",
115
131
  "test:cover": "yarn clean:cache:jest && yarn test:unit --coverage",
116
132
  "test:e2e": "jest --runInBand --config ./jest.e2e.config.js",
117
133
  "test:unit": "yarn clean:cache:jest && jest --env node",
118
- "test:watch": "yarn clean:cache:jest && jest --env node --watch"
119
- }
134
+ "test:watch": "yarn clean:cache:jest && jest --env node --watch",
135
+ "watch": "tsc -p . --watch"
136
+ },
137
+ "types": "dist/vue-i18n-extensions.d.ts"
120
138
  }
package/CHANGELOG.md DELETED
@@ -1,125 +0,0 @@
1
-
2
- ## v2.0.1 (2021-03-27)
3
-
4
- #### :zap: Improvement Features
5
- * [#92](https://github.com/intlify/vue-i18n-extensions/pull/92) support vue 3.0.9 ([@kazupon](https://github.com/kazupon))
6
-
7
- #### Committers: 1
8
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
9
-
10
-
11
- ## v2.0.0 (2021-03-01)
12
-
13
- #### :zap: Improvement Features
14
- * [#89](https://github.com/intlify/vue-i18n-extensions/pull/89) upgrade deps ([@kazupon](https://github.com/kazupon))
15
-
16
- #### Committers: 1
17
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
18
-
19
-
20
- ## v2.0.0-rc.1 (2021-02-09)
21
-
22
- #### :zap: Improvement Features
23
- * [#79](https://github.com/intlify/vue-i18n-extensions/pull/79) fix: vue 3.0.3 compatible ([@kazupon](https://github.com/kazupon))
24
-
25
- #### Committers: 1
26
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
27
-
28
-
29
- ## v2.0.0-beta.1 (2020-09-17)
30
-
31
- #### :zap: Improvement Features
32
- * [#70](https://github.com/intlify/vue-i18n-extensions/pull/70) upgrade deps ([@kazupon](https://github.com/kazupon))
33
-
34
- #### Committers: 1
35
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
36
-
37
-
38
- ## v2.0.0-alpha.2 (2020-08-07)
39
-
40
- #### :star: Features
41
- * [#60](https://github.com/intlify/vue-i18n-extensions/pull/60) feat: support SSR ([@kazupon](https://github.com/kazupon))
42
-
43
- #### :zap: Improvement Features
44
- * [#59](https://github.com/intlify/vue-i18n-extensions/pull/59) improve directive compilation ([@kazupon](https://github.com/kazupon))
45
-
46
- #### :pencil: Documentation
47
- * [#61](https://github.com/intlify/vue-i18n-extensions/pull/61) API docs ([@kazupon](https://github.com/kazupon))
48
-
49
- #### Committers: 1
50
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
51
-
52
-
53
- ## v2.0.0-alpha.1 (2020-05-09)
54
-
55
- #### :star: Features
56
- * [#43](https://github.com/intlify/vue-i18n-extensions/pull/43) feat: transform v-t ([@kazupon](https://github.com/kazupon))
57
-
58
- #### Committers: 1
59
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
60
-
61
-
62
- ## v1.0.2 (2020-05-07)
63
-
64
- #### :bug: Bug Fixes
65
- * [#39](https://github.com/intlify/vue-i18n-extensions/pull/39) fix: v-t argument evaluation ([@kazupon](https://github.com/kazupon))
66
- * [#32](https://github.com/intlify/vue-i18n-extensions/pull/32) Added whitespace trim to handle oddly formatted vue templates ([@ewohlken2](https://github.com/ewohlken2))
67
-
68
- #### Committers: 2
69
- - [@ewohlken2](https://github.com/ewohlken2)
70
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
71
-
72
-
73
- ## v1.0.1 (2020-02-27)
74
-
75
- #### :bug: Bug Fixes
76
- * [#30](https://github.com/intlify/vue-i18n-extensions/pull/30) Update ecma keyword detection regex to not misfire on strings containing periods ([@ewohlken2](https://github.com/ewohlken2))
77
-
78
- #### Committers: 1
79
- - [@ewohlken2](https://github.com/ewohlken2)
80
-
81
-
82
- ## v1.0.0 (2020-01-21)
83
-
84
- #### :boom: Breaking Change
85
- * [#19](https://github.com/intlify/vue-i18n-extensions/pull/19) upgrade node.js ([@kazupon](https://github.com/kazupon))
86
-
87
- #### Committers: 2
88
- - [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
89
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
90
-
91
- <a name="0.2.1"></a>
92
- ## [0.2.1](https://github.com/kazupon/vue-i18n-extensions/compare/v0.2.0...v0.2.1) (2019-03-12)
93
-
94
-
95
- ### :lock: Security Fixes
96
-
97
- * **util:** XSS vulnerability ([5f00336](https://github.com/kazupon/vue-i18n-extensions/commit/5f00336))
98
-
99
-
100
-
101
- <a name="0.2.0"></a>
102
- # [0.2.0](https://github.com/kazupon/vue-i18n-extensions/compare/v0.1.0...v0.2.0) (2018-08-11)
103
-
104
-
105
- ### :bug: Bug Fixes
106
-
107
- * fix cannot resolve dependency ([c620eda](https://github.com/kazupon/vue-i18n-extensions/commit/c620eda)), closes [#2](https://github.com/kazupon/vue-i18n-extensions/issues/2)
108
-
109
-
110
-
111
- <a name="0.1.0"></a>
112
- # 0.1.0 (2017-09-22)
113
-
114
-
115
- ### :star: New Features
116
-
117
- * i18n compiler module ([578839c](https://github.com/kazupon/vue-i18n-extensions/commit/578839c))
118
- * vue-i18n custom directive for server-side-rendering ([11f6d01](https://github.com/kazupon/vue-i18n-extensions/commit/11f6d01))
119
-
120
-
121
- ### :up: Updates
122
-
123
- * babelrc ([eae5920](https://github.com/kazupon/vue-i18n-extensions/commit/eae5920))
124
- * security fix ([0521f1f](https://github.com/kazupon/vue-i18n-extensions/commit/0521f1f))
125
-