@inquirer/prompts 8.2.0 → 8.3.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.
- package/README.md +15 -0
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -170,6 +170,21 @@ import { rawlist } from '@inquirer/prompts';
|
|
|
170
170
|
|
|
171
171
|
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/rawlist) for usage example and options documentation.
|
|
172
172
|
|
|
173
|
+
# Internationalization (i18n)
|
|
174
|
+
|
|
175
|
+
Need prompts in a language other than English? The [`@inquirer/i18n`](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/i18n) package is a drop-in replacement for `@inquirer/prompts` with built-in localization.
|
|
176
|
+
|
|
177
|
+
The root import automatically detects your locale from the `LANGUAGE`, `LC_ALL`, `LC_MESSAGES`, and `LANG` environment variables (falling back to the `Intl` API). If no supported locale is found, English is used.
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
// Drop-in replacement — locale is auto-detected from environment variables
|
|
181
|
+
import { input, select, confirm } from '@inquirer/i18n';
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Built-in locales include English, French, Spanish, Chinese (Simplified), and Portuguese. You can also pin to a specific language via sub-path imports (e.g. `@inquirer/i18n/fr`), or use the `createLocalizedPrompts` and `registerLocale` APIs to add your own.
|
|
185
|
+
|
|
186
|
+
[See the full documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/i18n) for available languages and how to create a custom locale.
|
|
187
|
+
|
|
173
188
|
# Create your own prompts
|
|
174
189
|
|
|
175
190
|
The [API documentation is over here](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/core), and our [testing utilities here](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/testing).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/prompts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "Inquirer prompts, combined in a single package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
"tsc": "tsc"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@inquirer/checkbox": "^5.0
|
|
73
|
-
"@inquirer/confirm": "^6.0.
|
|
74
|
-
"@inquirer/editor": "^5.0.
|
|
75
|
-
"@inquirer/expand": "^5.0.
|
|
76
|
-
"@inquirer/input": "^5.0.
|
|
77
|
-
"@inquirer/number": "^4.0.
|
|
78
|
-
"@inquirer/password": "^5.0.
|
|
79
|
-
"@inquirer/rawlist": "^5.2.
|
|
80
|
-
"@inquirer/search": "^4.1.
|
|
81
|
-
"@inquirer/select": "^5.0
|
|
72
|
+
"@inquirer/checkbox": "^5.1.0",
|
|
73
|
+
"@inquirer/confirm": "^6.0.8",
|
|
74
|
+
"@inquirer/editor": "^5.0.8",
|
|
75
|
+
"@inquirer/expand": "^5.0.8",
|
|
76
|
+
"@inquirer/input": "^5.0.8",
|
|
77
|
+
"@inquirer/number": "^4.0.8",
|
|
78
|
+
"@inquirer/password": "^5.0.8",
|
|
79
|
+
"@inquirer/rawlist": "^5.2.4",
|
|
80
|
+
"@inquirer/search": "^4.1.4",
|
|
81
|
+
"@inquirer/select": "^5.1.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@inquirer/type": "^4.0.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
},
|
|
98
98
|
"main": "./dist/index.js",
|
|
99
99
|
"types": "./dist/index.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "526eca2e64853510821ffd457561840ec0cbfb93"
|
|
101
101
|
}
|