@intlify/bundle-utils 3.1.0 → 3.1.2
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/lib/codegen.d.ts +9 -3
- package/lib/codegen.js +16 -5
- package/lib/errors.d.ts +2 -0
- package/lib/errors.js +6 -0
- package/lib/json.d.ts +1 -1
- package/lib/json.js +28 -6
- package/lib/yaml.d.ts +1 -1
- package/lib/yaml.js +28 -6
- package/package.json +1 -1
- package/CHANGELOG.md +0 -111
package/lib/codegen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResourceNode } from '@intlify/message-compiler';
|
|
1
|
+
import { CompileError, ResourceNode } from '@intlify/message-compiler';
|
|
2
2
|
import { SourceMapGenerator } from 'source-map';
|
|
3
3
|
import type { RawSourceMap } from 'source-map';
|
|
4
4
|
/**
|
|
@@ -35,7 +35,13 @@ export interface CodeGenOptions {
|
|
|
35
35
|
forceStringify?: boolean;
|
|
36
36
|
useClassComponent?: boolean;
|
|
37
37
|
onWarn?: (msg: string) => void;
|
|
38
|
-
onError?: (msg: string
|
|
38
|
+
onError?: (msg: string, extra?: {
|
|
39
|
+
source: string;
|
|
40
|
+
path: string;
|
|
41
|
+
code?: CompileError['code'];
|
|
42
|
+
domain?: CompileError['domain'];
|
|
43
|
+
location?: CompileError['location'];
|
|
44
|
+
}) => void;
|
|
39
45
|
}
|
|
40
46
|
export interface CodeGenContext {
|
|
41
47
|
source?: string;
|
|
@@ -66,5 +72,5 @@ export interface CodeGenResult<ASTNode> {
|
|
|
66
72
|
map?: RawSourceMap;
|
|
67
73
|
}
|
|
68
74
|
export declare function createCodeGenerator(options?: CodeGenOptions): CodeGenerator;
|
|
69
|
-
export declare function generateMessageFunction(msg: string, options: CodeGenOptions): CodeGenResult<ResourceNode>;
|
|
75
|
+
export declare function generateMessageFunction(msg: string, options: CodeGenOptions, path?: string[]): CodeGenResult<ResourceNode>;
|
|
70
76
|
export declare function mapLinesColumns(resMap: RawSourceMap, codeMaps: Map<string, RawSourceMap>, inSourceMap?: RawSourceMap): RawSourceMap | null;
|
package/lib/codegen.js
CHANGED
|
@@ -94,15 +94,26 @@ function advancePositionWithSource(pos, source, numberOfCharacters = source.leng
|
|
|
94
94
|
: numberOfCharacters - lastNewLinePos;
|
|
95
95
|
return pos;
|
|
96
96
|
}
|
|
97
|
-
function generateMessageFunction(msg, options) {
|
|
97
|
+
function generateMessageFunction(msg, options, path) {
|
|
98
98
|
const env = options.env != null ? options.env : 'development';
|
|
99
|
-
|
|
100
|
-
const
|
|
99
|
+
const onError = options.onError;
|
|
100
|
+
const errors = [];
|
|
101
|
+
const newOptions = Object.assign({ mode: 'arrow' }, options);
|
|
101
102
|
newOptions.onError = (err) => {
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
if (onError) {
|
|
104
|
+
const extra = {
|
|
105
|
+
source: msg,
|
|
106
|
+
path: path ? path.join('.') : '',
|
|
107
|
+
code: err.code,
|
|
108
|
+
domain: err.domain,
|
|
109
|
+
location: err.location
|
|
110
|
+
};
|
|
111
|
+
onError(err.message, extra);
|
|
112
|
+
errors.push(err);
|
|
113
|
+
}
|
|
104
114
|
};
|
|
105
115
|
const { code, ast, map } = (0, message_compiler_1.baseCompile)(msg, newOptions);
|
|
116
|
+
const occured = errors.length > 0;
|
|
106
117
|
const genCode = !occured
|
|
107
118
|
? env === 'development'
|
|
108
119
|
? `(()=>{const fn=${code};fn.source=${JSON.stringify(msg)};return fn;})()`
|
package/lib/errors.d.ts
ADDED
package/lib/errors.js
ADDED
package/lib/json.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ import type { CodeGenOptions, CodeGenResult } from './codegen';
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export declare function generate(targetSource: string | Buffer, { type, bridge, exportESM, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, useClassComponent }: CodeGenOptions, injector?: () => string): CodeGenResult<JSONProgram>;
|
|
10
|
+
export declare function generate(targetSource: string | Buffer, { type, bridge, exportESM, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError, useClassComponent }: CodeGenOptions, injector?: () => string): CodeGenResult<JSONProgram>;
|
package/lib/json.js
CHANGED
|
@@ -10,7 +10,7 @@ const codegen_1 = require("./codegen");
|
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
function generate(targetSource, { type = 'plain', bridge = false, exportESM = false, filename = 'vue-i18n-loader.json', inSourceMap = undefined, locale = '', isGlobal = false, sourceMap = false, env = 'development', forceStringify = false, useClassComponent = false }, injector) {
|
|
13
|
+
function generate(targetSource, { type = 'plain', bridge = false, exportESM = false, filename = 'vue-i18n-loader.json', inSourceMap = undefined, locale = '', isGlobal = false, sourceMap = false, env = 'development', forceStringify = false, onError = undefined, useClassComponent = false }, injector) {
|
|
14
14
|
const target = Buffer.isBuffer(targetSource)
|
|
15
15
|
? targetSource.toString()
|
|
16
16
|
: targetSource;
|
|
@@ -30,6 +30,7 @@ function generate(targetSource, { type = 'plain', bridge = false, exportESM = fa
|
|
|
30
30
|
env,
|
|
31
31
|
filename,
|
|
32
32
|
forceStringify,
|
|
33
|
+
onError,
|
|
33
34
|
useClassComponent
|
|
34
35
|
};
|
|
35
36
|
const generator = (0, codegen_1.createCodeGenerator)(options);
|
|
@@ -55,6 +56,7 @@ function generate(targetSource, { type = 'plain', bridge = false, exportESM = fa
|
|
|
55
56
|
exports.generate = generate;
|
|
56
57
|
function generateNode(generator, node, options, injector) {
|
|
57
58
|
const propsCountStack = [];
|
|
59
|
+
const pathStack = [];
|
|
58
60
|
const itemsCountStack = [];
|
|
59
61
|
const { forceStringify } = generator.context();
|
|
60
62
|
const codeMaps = new Map();
|
|
@@ -96,6 +98,8 @@ function generateNode(generator, node, options, injector) {
|
|
|
96
98
|
propsCountStack.push(node.properties.length);
|
|
97
99
|
if (parent.type === 'JSONArrayExpression') {
|
|
98
100
|
const lastIndex = itemsCountStack.length - 1;
|
|
101
|
+
const currentCount = parent.elements.length - itemsCountStack[lastIndex];
|
|
102
|
+
pathStack.push(currentCount.toString());
|
|
99
103
|
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
100
104
|
}
|
|
101
105
|
break;
|
|
@@ -107,7 +111,8 @@ function generateNode(generator, node, options, injector) {
|
|
|
107
111
|
const value = node.value.value;
|
|
108
112
|
if ((0, shared_1.isString)(value)) {
|
|
109
113
|
generator.push(`${JSON.stringify(name)}: `);
|
|
110
|
-
|
|
114
|
+
pathStack.push(name.toString());
|
|
115
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options, pathStack);
|
|
111
116
|
sourceMap && map != null && codeMaps.set(value, map);
|
|
112
117
|
generator.push(`${code}`, node.value, value);
|
|
113
118
|
}
|
|
@@ -115,12 +120,14 @@ function generateNode(generator, node, options, injector) {
|
|
|
115
120
|
if (forceStringify) {
|
|
116
121
|
const strValue = JSON.stringify(value);
|
|
117
122
|
generator.push(`${JSON.stringify(name)}: `);
|
|
118
|
-
|
|
123
|
+
pathStack.push(name.toString());
|
|
124
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options, pathStack);
|
|
119
125
|
sourceMap && map != null && codeMaps.set(strValue, map);
|
|
120
126
|
generator.push(`${code}`, node.value, strValue);
|
|
121
127
|
}
|
|
122
128
|
else {
|
|
123
129
|
generator.push(`${JSON.stringify(name)}: ${JSON.stringify(value)}`);
|
|
130
|
+
pathStack.push(name.toString());
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
}
|
|
@@ -130,6 +137,7 @@ function generateNode(generator, node, options, injector) {
|
|
|
130
137
|
node.key.type === 'JSONIdentifier')) {
|
|
131
138
|
const name = node.key.type === 'JSONLiteral' ? node.key.value : node.key.name;
|
|
132
139
|
generator.push(`${JSON.stringify(name)}: `);
|
|
140
|
+
pathStack.push(name.toString());
|
|
133
141
|
}
|
|
134
142
|
const lastIndex = propsCountStack.length - 1;
|
|
135
143
|
propsCountStack[lastIndex] = --propsCountStack[lastIndex];
|
|
@@ -137,21 +145,30 @@ function generateNode(generator, node, options, injector) {
|
|
|
137
145
|
case 'JSONArrayExpression':
|
|
138
146
|
generator.push(`[`);
|
|
139
147
|
generator.indent();
|
|
148
|
+
if (parent.type === 'JSONArrayExpression') {
|
|
149
|
+
const lastIndex = itemsCountStack.length - 1;
|
|
150
|
+
const currentCount = parent.elements.length - itemsCountStack[lastIndex];
|
|
151
|
+
pathStack.push(currentCount.toString());
|
|
152
|
+
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
153
|
+
}
|
|
140
154
|
itemsCountStack.push(node.elements.length);
|
|
141
155
|
break;
|
|
142
156
|
case 'JSONLiteral':
|
|
143
157
|
if (parent.type === 'JSONArrayExpression') {
|
|
158
|
+
const lastIndex = itemsCountStack.length - 1;
|
|
159
|
+
const currentCount = parent.elements.length - itemsCountStack[lastIndex];
|
|
160
|
+
pathStack.push(currentCount.toString());
|
|
144
161
|
if (node.type === 'JSONLiteral') {
|
|
145
162
|
const value = node.value;
|
|
146
163
|
if ((0, shared_1.isString)(value)) {
|
|
147
|
-
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options);
|
|
164
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options, pathStack);
|
|
148
165
|
sourceMap && map != null && codeMaps.set(value, map);
|
|
149
166
|
generator.push(`${code}`, node, value);
|
|
150
167
|
}
|
|
151
168
|
else {
|
|
152
169
|
if (forceStringify) {
|
|
153
170
|
const strValue = JSON.stringify(value);
|
|
154
|
-
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options);
|
|
171
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options, pathStack);
|
|
155
172
|
sourceMap && map != null && codeMaps.set(strValue, map);
|
|
156
173
|
generator.push(`${code}`, node, strValue);
|
|
157
174
|
}
|
|
@@ -160,7 +177,6 @@ function generateNode(generator, node, options, injector) {
|
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
179
|
}
|
|
163
|
-
const lastIndex = itemsCountStack.length - 1;
|
|
164
180
|
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
165
181
|
}
|
|
166
182
|
break;
|
|
@@ -186,29 +202,34 @@ function generateNode(generator, node, options, injector) {
|
|
|
186
202
|
break;
|
|
187
203
|
case 'JSONObjectExpression':
|
|
188
204
|
if (propsCountStack[propsCountStack.length - 1] === 0) {
|
|
205
|
+
pathStack.pop();
|
|
189
206
|
propsCountStack.pop();
|
|
190
207
|
}
|
|
191
208
|
generator.deindent();
|
|
192
209
|
generator.push(`}`);
|
|
193
210
|
if (parent.type === 'JSONArrayExpression') {
|
|
194
211
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
212
|
+
pathStack.pop();
|
|
195
213
|
generator.pushline(`,`);
|
|
196
214
|
}
|
|
197
215
|
}
|
|
198
216
|
break;
|
|
199
217
|
case 'JSONProperty':
|
|
200
218
|
if (propsCountStack[propsCountStack.length - 1] !== 0) {
|
|
219
|
+
pathStack.pop();
|
|
201
220
|
generator.pushline(`,`);
|
|
202
221
|
}
|
|
203
222
|
break;
|
|
204
223
|
case 'JSONArrayExpression':
|
|
205
224
|
if (itemsCountStack[itemsCountStack.length - 1] === 0) {
|
|
225
|
+
pathStack.pop();
|
|
206
226
|
itemsCountStack.pop();
|
|
207
227
|
}
|
|
208
228
|
generator.deindent();
|
|
209
229
|
generator.push(`]`);
|
|
210
230
|
if (parent.type === 'JSONArrayExpression') {
|
|
211
231
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
232
|
+
pathStack.pop();
|
|
212
233
|
generator.pushline(`,`);
|
|
213
234
|
}
|
|
214
235
|
}
|
|
@@ -216,6 +237,7 @@ function generateNode(generator, node, options, injector) {
|
|
|
216
237
|
case 'JSONLiteral':
|
|
217
238
|
if (parent.type === 'JSONArrayExpression') {
|
|
218
239
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
240
|
+
pathStack.pop();
|
|
219
241
|
generator.pushline(`,`);
|
|
220
242
|
}
|
|
221
243
|
else {
|
package/lib/yaml.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ import type { CodeGenOptions, CodeGenResult } from './codegen';
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export declare function generate(targetSource: string | Buffer, { type, bridge, exportESM, useClassComponent, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify }: CodeGenOptions, injector?: () => string): CodeGenResult<YAMLProgram>;
|
|
10
|
+
export declare function generate(targetSource: string | Buffer, { type, bridge, exportESM, useClassComponent, filename, inSourceMap, locale, isGlobal, sourceMap, env, forceStringify, onError }: CodeGenOptions, injector?: () => string): CodeGenResult<YAMLProgram>;
|
package/lib/yaml.js
CHANGED
|
@@ -10,7 +10,7 @@ const yaml_eslint_parser_1 = require("yaml-eslint-parser");
|
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
function generate(targetSource, { type = 'plain', bridge = false, exportESM = false, useClassComponent = false, filename = 'vue-i18n-loader.yaml', inSourceMap = undefined, locale = '', isGlobal = false, sourceMap = false, env = 'development', forceStringify = false }, injector) {
|
|
13
|
+
function generate(targetSource, { type = 'plain', bridge = false, exportESM = false, useClassComponent = false, filename = 'vue-i18n-loader.yaml', inSourceMap = undefined, locale = '', isGlobal = false, sourceMap = false, env = 'development', forceStringify = false, onError = undefined }, injector) {
|
|
14
14
|
const value = Buffer.isBuffer(targetSource)
|
|
15
15
|
? targetSource.toString()
|
|
16
16
|
: targetSource;
|
|
@@ -26,6 +26,7 @@ function generate(targetSource, { type = 'plain', bridge = false, exportESM = fa
|
|
|
26
26
|
env,
|
|
27
27
|
filename,
|
|
28
28
|
forceStringify,
|
|
29
|
+
onError,
|
|
29
30
|
useClassComponent
|
|
30
31
|
};
|
|
31
32
|
const generator = (0, codegen_1.createCodeGenerator)(options);
|
|
@@ -45,6 +46,7 @@ function generate(targetSource, { type = 'plain', bridge = false, exportESM = fa
|
|
|
45
46
|
exports.generate = generate;
|
|
46
47
|
function generateNode(generator, node, options, injector) {
|
|
47
48
|
const propsCountStack = [];
|
|
49
|
+
const pathStack = [];
|
|
48
50
|
const itemsCountStack = [];
|
|
49
51
|
const { forceStringify } = generator.context();
|
|
50
52
|
const codeMaps = new Map();
|
|
@@ -85,6 +87,8 @@ function generateNode(generator, node, options, injector) {
|
|
|
85
87
|
propsCountStack.push(node.pairs.length);
|
|
86
88
|
if (parent.type === 'YAMLSequence') {
|
|
87
89
|
const lastIndex = itemsCountStack.length - 1;
|
|
90
|
+
const currentCount = parent.entries.length - itemsCountStack[lastIndex];
|
|
91
|
+
pathStack.push(currentCount.toString());
|
|
88
92
|
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
89
93
|
}
|
|
90
94
|
break;
|
|
@@ -97,7 +101,8 @@ function generateNode(generator, node, options, injector) {
|
|
|
97
101
|
const value = node.value.value;
|
|
98
102
|
if ((0, shared_1.isString)(value)) {
|
|
99
103
|
generator.push(`${JSON.stringify(name)}: `);
|
|
100
|
-
|
|
104
|
+
name && pathStack.push(name.toString());
|
|
105
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options, pathStack);
|
|
101
106
|
sourceMap && map != null && codeMaps.set(value, map);
|
|
102
107
|
generator.push(`${code}`, node.value, value);
|
|
103
108
|
}
|
|
@@ -105,12 +110,14 @@ function generateNode(generator, node, options, injector) {
|
|
|
105
110
|
if (forceStringify) {
|
|
106
111
|
const strValue = JSON.stringify(value);
|
|
107
112
|
generator.push(`${JSON.stringify(name)}: `);
|
|
108
|
-
|
|
113
|
+
name && pathStack.push(name.toString());
|
|
114
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options, pathStack);
|
|
109
115
|
sourceMap && map != null && codeMaps.set(strValue, map);
|
|
110
116
|
generator.push(`${code}`, node.value, strValue);
|
|
111
117
|
}
|
|
112
118
|
else {
|
|
113
119
|
generator.push(`${JSON.stringify(name)}: ${JSON.stringify(value)}`);
|
|
120
|
+
name && pathStack.push(name.toString());
|
|
114
121
|
}
|
|
115
122
|
}
|
|
116
123
|
}
|
|
@@ -121,6 +128,7 @@ function generateNode(generator, node, options, injector) {
|
|
|
121
128
|
node.key.type === 'YAMLScalar') {
|
|
122
129
|
const name = node.key.value;
|
|
123
130
|
generator.push(`${JSON.stringify(name)}: `);
|
|
131
|
+
name && pathStack.push(name.toString());
|
|
124
132
|
}
|
|
125
133
|
const lastIndex = propsCountStack.length - 1;
|
|
126
134
|
propsCountStack[lastIndex] = --propsCountStack[lastIndex];
|
|
@@ -128,21 +136,30 @@ function generateNode(generator, node, options, injector) {
|
|
|
128
136
|
case 'YAMLSequence':
|
|
129
137
|
generator.push(`[`);
|
|
130
138
|
generator.indent();
|
|
139
|
+
if (parent.type === 'YAMLSequence') {
|
|
140
|
+
const lastIndex = itemsCountStack.length - 1;
|
|
141
|
+
const currentCount = parent.entries.length - itemsCountStack[lastIndex];
|
|
142
|
+
pathStack.push(currentCount.toString());
|
|
143
|
+
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
144
|
+
}
|
|
131
145
|
itemsCountStack.push(node.entries.length);
|
|
132
146
|
break;
|
|
133
147
|
case 'YAMLScalar':
|
|
134
148
|
if (parent.type === 'YAMLSequence') {
|
|
149
|
+
const lastIndex = itemsCountStack.length - 1;
|
|
150
|
+
const currentCount = parent.entries.length - itemsCountStack[lastIndex];
|
|
151
|
+
pathStack.push(currentCount.toString());
|
|
135
152
|
if (node.type === 'YAMLScalar') {
|
|
136
153
|
const value = node.value;
|
|
137
154
|
if ((0, shared_1.isString)(value)) {
|
|
138
|
-
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options);
|
|
155
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(value, options, pathStack);
|
|
139
156
|
sourceMap && map != null && codeMaps.set(value, map);
|
|
140
157
|
generator.push(`${code}`, node, value);
|
|
141
158
|
}
|
|
142
159
|
else {
|
|
143
160
|
if (forceStringify) {
|
|
144
161
|
const strValue = JSON.stringify(value);
|
|
145
|
-
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options);
|
|
162
|
+
const { code, map } = (0, codegen_1.generateMessageFunction)(strValue, options, pathStack);
|
|
146
163
|
sourceMap && map != null && codeMaps.set(strValue, map);
|
|
147
164
|
generator.push(`${code}`, node, strValue);
|
|
148
165
|
}
|
|
@@ -151,7 +168,6 @@ function generateNode(generator, node, options, injector) {
|
|
|
151
168
|
}
|
|
152
169
|
}
|
|
153
170
|
}
|
|
154
|
-
const lastIndex = itemsCountStack.length - 1;
|
|
155
171
|
itemsCountStack[lastIndex] = --itemsCountStack[lastIndex];
|
|
156
172
|
}
|
|
157
173
|
break;
|
|
@@ -177,29 +193,34 @@ function generateNode(generator, node, options, injector) {
|
|
|
177
193
|
break;
|
|
178
194
|
case 'YAMLMapping':
|
|
179
195
|
if (propsCountStack[propsCountStack.length - 1] === 0) {
|
|
196
|
+
pathStack.pop();
|
|
180
197
|
propsCountStack.pop();
|
|
181
198
|
}
|
|
182
199
|
generator.deindent();
|
|
183
200
|
generator.push(`}`);
|
|
184
201
|
if (parent.type === 'YAMLSequence') {
|
|
185
202
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
203
|
+
pathStack.pop();
|
|
186
204
|
generator.pushline(`,`);
|
|
187
205
|
}
|
|
188
206
|
}
|
|
189
207
|
break;
|
|
190
208
|
case 'YAMLPair':
|
|
191
209
|
if (propsCountStack[propsCountStack.length - 1] !== 0) {
|
|
210
|
+
pathStack.pop();
|
|
192
211
|
generator.pushline(`,`);
|
|
193
212
|
}
|
|
194
213
|
break;
|
|
195
214
|
case 'YAMLSequence':
|
|
196
215
|
if (itemsCountStack[itemsCountStack.length - 1] === 0) {
|
|
216
|
+
pathStack.pop();
|
|
197
217
|
itemsCountStack.pop();
|
|
198
218
|
}
|
|
199
219
|
generator.deindent();
|
|
200
220
|
generator.push(`]`);
|
|
201
221
|
if (parent.type === 'YAMLSequence') {
|
|
202
222
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
223
|
+
pathStack.pop();
|
|
203
224
|
generator.pushline(`,`);
|
|
204
225
|
}
|
|
205
226
|
}
|
|
@@ -207,6 +228,7 @@ function generateNode(generator, node, options, injector) {
|
|
|
207
228
|
case 'YAMLScalar':
|
|
208
229
|
if (parent.type === 'YAMLSequence') {
|
|
209
230
|
if (itemsCountStack[itemsCountStack.length - 1] !== 0) {
|
|
231
|
+
pathStack.pop();
|
|
210
232
|
generator.pushline(`,`);
|
|
211
233
|
}
|
|
212
234
|
else {
|
package/package.json
CHANGED
package/CHANGELOG.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
## @intlify/bundle-utils@3.1.0 (2022-05-06)
|
|
3
|
-
|
|
4
|
-
#### :zap: Improvement Features
|
|
5
|
-
* [#116](https://github.com/intlify/bundle-tools/pull/116) improvement(bundle-utils): support ESM exporting on bridge ([@kazupon](https://github.com/kazupon))
|
|
6
|
-
|
|
7
|
-
#### Committers: 1
|
|
8
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## @intlify/bundle-utils@3.0.0 (2022-04-05)
|
|
12
|
-
|
|
13
|
-
#### :star: Features
|
|
14
|
-
* [#101](https://github.com/intlify/bundle-tools/pull/101) feat(bundle-utils): pinned intlify related module next version ([@kazupon](https://github.com/kazupon))
|
|
15
|
-
|
|
16
|
-
#### Committers: 1
|
|
17
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## @intlify/bundle-utils@2.2.2 (2022-04-05)
|
|
21
|
-
|
|
22
|
-
#### :zap: Improvement Features
|
|
23
|
-
* [#100](https://github.com/intlify/bundle-tools/pull/100) fix(bundle-utils): pinned latest stable version ([@kazupon](https://github.com/kazupon))
|
|
24
|
-
|
|
25
|
-
#### Committers: 1
|
|
26
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## @intlify/bundle-utils@2.2.1 (2022-03-22)
|
|
30
|
-
|
|
31
|
-
#### :bug: Bug Fixes
|
|
32
|
-
* [#98](https://github.com/intlify/bundle-tools/pull/98) fix(bundle-utils): fix nested array code generation ([@kazupon](https://github.com/kazupon))
|
|
33
|
-
|
|
34
|
-
#### Committers: 1
|
|
35
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## @intlify/bundle-utils@2.2.1 (2022-03-22)
|
|
39
|
-
|
|
40
|
-
#### :bug: Bug Fixes
|
|
41
|
-
* [#98](https://github.com/intlify/bundle-tools/pull/98) fix(bundle-utils): fix nested array code generation ([@kazupon](https://github.com/kazupon))
|
|
42
|
-
|
|
43
|
-
#### Committers: 1
|
|
44
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## @intlify/bundle-utils@2.2.0 (2021-12-16)
|
|
48
|
-
|
|
49
|
-
#### :zap: Improvement Features
|
|
50
|
-
* [#75](https://github.com/intlify/bundle-tools/pull/75) Add vue-class-components support via loader option ([@SniperJoe](https://github.com/SniperJoe))
|
|
51
|
-
|
|
52
|
-
#### Committers: 1
|
|
53
|
-
- [@SniperJoe](https://github.com/SniperJoe)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## @intlify/bundle-utils@2.1.0 (2021-11-10)
|
|
57
|
-
|
|
58
|
-
#### :zap: Improvement Features
|
|
59
|
-
* [#67](https://github.com/intlify/bundle-tools/pull/67) fix: add vite and vue-i18n as peerDependencies ([@AlexandreBonaventure](https://github.com/AlexandreBonaventure))
|
|
60
|
-
|
|
61
|
-
#### Committers: 1
|
|
62
|
-
- Alexandre Bonaventure Geissmann ([@AlexandreBonaventure](https://github.com/AlexandreBonaventure))
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## @intlify/bundle-utils@2.0.0 (2021-10-24)
|
|
66
|
-
|
|
67
|
-
#### :star: Features
|
|
68
|
-
* [#60](https://github.com/intlify/bundle-tools/pull/60) feat: change to intlify beta related deps ([@kazupon](https://github.com/kazupon))
|
|
69
|
-
|
|
70
|
-
#### Committers: 1
|
|
71
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## @intlify/bundle-utils@1.0.0 (2021-10-24)
|
|
75
|
-
|
|
76
|
-
#### :star: Features
|
|
77
|
-
* [#56](https://github.com/intlify/bundle-tools/pull/56) feat: bump to major version ([@kazupon](https://github.com/kazupon))
|
|
78
|
-
|
|
79
|
-
#### Committers: 1
|
|
80
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## @intlify/bundle-utils@0.3.0 (2021-09-29)
|
|
84
|
-
|
|
85
|
-
#### :star: Features
|
|
86
|
-
* [#47](https://github.com/intlify/bundle-tools/pull/47) feat: support vue i18n bridge ([@kazupon](https://github.com/kazupon))
|
|
87
|
-
|
|
88
|
-
#### Committers: 1
|
|
89
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## @intlify/bundle-utils@0.2.0 (2021-07-26)
|
|
93
|
-
|
|
94
|
-
#### :star: Features
|
|
95
|
-
* [#36](https://github.com/intlify/bundle-tools/pull/36) add install package checking ([@kazupon](https://github.com/kazupon))
|
|
96
|
-
|
|
97
|
-
#### Committers: 1
|
|
98
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
## @intlify/bundle-utils@0.1.0 (2021-07-12)
|
|
102
|
-
|
|
103
|
-
#### :star: Features
|
|
104
|
-
* [#26](https://github.com/intlify/bundle-tools/pull/26) feat: bundle-utils basic implementation ([@kazupon](https://github.com/kazupon))
|
|
105
|
-
|
|
106
|
-
#### Committers: 1
|
|
107
|
-
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
|
|
108
|
-
|
|
109
|
-
## v0.0.0 (2021-07-13)
|
|
110
|
-
|
|
111
|
-
:tada: Initial release.
|