@gunshi/plugin-i18n 0.32.0 → 0.34.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 (2) hide show
  1. package/lib/index.d.ts +12 -4
  2. package/package.json +11 -13
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Args, Awaitable, Command, CommandContext, DefaultGunshiParams, ExtendContext, ExtractArgs, ExtractExtensions, GunshiParams, GunshiParamsConstraint, PluginWithExtension, Prettify } from "@gunshi/plugin";
2
2
 
3
- //#region ../../node_modules/.pnpm/args-tokens@0.25.0/node_modules/args-tokens/lib/resolver.d.ts
3
+ //#region ../../node_modules/.pnpm/args-tokens@0.26.1/node_modules/args-tokens/lib/resolver.d.ts
4
4
 
5
5
  //#region src/resolver.d.ts
6
6
  /**
@@ -118,7 +118,10 @@ interface ArgSchema {
118
118
  * When `true`, the argument must be provided by the user.
119
119
  * If missing, an `ArgResolveError` with type 'required' will be thrown.
120
120
  *
121
- * Note: Only `true` is allowed (not `false`) to make intent explicit.
121
+ * For single-value positional arguments, omitting `required` keeps the argument
122
+ * required for compatibility. Set `required: false` to make a positional argument
123
+ * optional. Optional positional arguments leave enough input values for later
124
+ * required positional arguments before consuming a value.
122
125
  *
123
126
  * @example
124
127
  * Required arguments:
@@ -142,7 +145,8 @@ interface ArgSchema {
142
145
  *
143
146
  * When `true`, the resolved value becomes an array.
144
147
  * For options: can be specified multiple times (--tag foo --tag bar)
145
- * For positional: collects remaining positional arguments
148
+ * For positional: collects remaining positional arguments after preserving values for
149
+ * later required positional arguments.
146
150
  *
147
151
  * Note: Only `true` is allowed (not `false`) to make intent explicit.
148
152
  *
@@ -222,7 +226,11 @@ interface ArgSchema {
222
226
  * - `boolean` type: boolean default
223
227
  * - `number` type: number default
224
228
  * - `enum` type: must be one of the `choices` values
225
- * - `positional`/`custom` type: any appropriate default
229
+ * - `positional`/`custom` type: string, boolean, or number default
230
+ *
231
+ * For single-value positional arguments, the default is used when the positional
232
+ * value is missing or when the value is preserved for later required positional
233
+ * arguments, unless `required: true` is set.
226
234
  *
227
235
  * @example
228
236
  * Default values by type:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gunshi/plugin-i18n",
3
3
  "description": "internationalization plugin for gunshi",
4
- "version": "0.32.0",
4
+ "version": "0.34.0",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -53,10 +53,10 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@gunshi/plugin": "0.32.0"
56
+ "@gunshi/plugin": "0.34.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@gunshi/plugin-global": "0.32.0"
59
+ "@gunshi/plugin-global": "0.34.0"
60
60
  },
61
61
  "peerDependenciesMeta": {
62
62
  "@gunshi/plugin-global": {
@@ -64,25 +64,23 @@
64
64
  }
65
65
  },
66
66
  "devDependencies": {
67
- "@intlify/core": "next",
67
+ "@intlify/core-base": "12.0.0-alpha.4",
68
68
  "deno": "^2.7.14",
69
69
  "jsr": "^0.14.3",
70
70
  "jsr-exports-lint": "^0.4.2",
71
71
  "messageformat": "4.0.0",
72
72
  "publint": "^0.3.20",
73
73
  "tsdown": "0.21.0",
74
- "typedoc": "^0.28.19",
75
- "typedoc-plugin-markdown": "^4.11.0",
76
- "@gunshi/bone": "0.32.0",
77
- "@gunshi/plugin-global": "0.32.0",
78
- "@gunshi/plugin-renderer": "0.32.0",
79
- "@gunshi/resources": "0.32.0",
80
- "@gunshi/shared": "0.32.0",
81
- "gunshi": "0.32.0"
74
+ "@gunshi/plugin-global": "0.34.0",
75
+ "@gunshi/resources": "0.34.0",
76
+ "@gunshi/plugin-renderer": "0.34.0",
77
+ "@gunshi/bone": "0.34.0",
78
+ "@gunshi/shared": "0.34.0",
79
+ "gunshi": "0.34.0"
82
80
  },
83
81
  "scripts": {
84
82
  "build": "tsdown",
85
- "build:docs": "typedoc --excludeInternal",
83
+ "build:docs": "tsx ../../scripts/api-references.ts",
86
84
  "lint:jsr": "jsr publish --dry-run --allow-dirty",
87
85
  "typecheck:deno": "deno check --import-map=../../importmap.json ./src"
88
86
  }