@intlify/bundle-utils 7.0.2 → 7.2.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/lib/index.cjs CHANGED
@@ -234,7 +234,10 @@ function generateResourceAst(msg, options = {}, path) {
234
234
  }
235
235
  const _msg = detecteHtmlInMsg && escapeHtml ? shared.escapeHtml(msg) : msg;
236
236
  const newOptions = Object.assign(
237
- { location: env === "development" },
237
+ {
238
+ location: env === "development",
239
+ minify: shared.isBoolean(options.minify) ? options.minify : env === "production"
240
+ },
238
241
  options
239
242
  );
240
243
  if (newOptions.jit != null) {
package/lib/index.d.ts CHANGED
@@ -31,6 +31,7 @@ interface CodeGenOptions {
31
31
  strictMessage?: boolean;
32
32
  escapeHtml?: boolean;
33
33
  jit?: boolean;
34
+ minify?: boolean;
34
35
  onWarn?: (msg: string) => void;
35
36
  onError?: (msg: string, extra?: {
36
37
  source: string;
package/lib/index.mjs CHANGED
@@ -227,7 +227,10 @@ function generateResourceAst(msg, options = {}, path) {
227
227
  }
228
228
  const _msg = detecteHtmlInMsg && escapeHtml$1 ? escapeHtml(msg) : msg;
229
229
  const newOptions = Object.assign(
230
- { location: env === "development" },
230
+ {
231
+ location: env === "development",
232
+ minify: isBoolean(options.minify) ? options.minify : env === "production"
233
+ },
231
234
  options
232
235
  );
233
236
  if (newOptions.jit != null) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@intlify/bundle-utils",
3
3
  "description": "Bundle utilities for Intlify project",
4
- "version": "7.0.2",
4
+ "version": "7.2.0",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -18,16 +18,16 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@intlify/message-compiler": "9.3.0-beta.24",
22
- "@intlify/shared": "9.3.0-beta.24",
21
+ "@intlify/message-compiler": "^9.3.0",
22
+ "@intlify/shared": "^9.3.0",
23
23
  "acorn": "^8.8.2",
24
24
  "escodegen": "^2.0.0",
25
25
  "estree-walker": "^2.0.2",
26
- "jsonc-eslint-parser": "^1.0.1",
26
+ "jsonc-eslint-parser": "^2.3.0",
27
27
  "magic-string": "^0.30.0",
28
28
  "mlly": "^1.2.0",
29
29
  "source-map-js": "^1.0.1",
30
- "yaml-eslint-parser": "^0.3.2"
30
+ "yaml-eslint-parser": "^1.2.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/escodegen": "^0.0.7",