@intlify/unplugin-vue-i18n 1.6.0 → 2.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.
package/lib/index.cjs CHANGED
@@ -98,7 +98,6 @@ function raiseError(message) {
98
98
  }
99
99
 
100
100
  const INTLIFY_BUNDLE_IMPORT_ID = "@intlify/unplugin-vue-i18n/messages";
101
- const INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID = "@intlify/vite-plugin-vue-i18n/messages";
102
101
  const VIRTUAL_PREFIX = "\0";
103
102
  const debug = createDebug__default("unplugin-vue-i18n");
104
103
  const installedPkg = bundleUtils.checkInstallPackage("@intlify/unplugin-vue-i18n", debug);
@@ -410,12 +409,6 @@ const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
410
409
  },
411
410
  resolveId(id, importer) {
412
411
  debug("resolveId", id, importer);
413
- if (id === INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID) {
414
- warn(
415
- `deprected '${INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID}', you should switch to '${INTLIFY_BUNDLE_IMPORT_ID}'`
416
- );
417
- return asVirtualId(id, meta.framework);
418
- }
419
412
  if (id === INTLIFY_BUNDLE_IMPORT_ID) {
420
413
  return asVirtualId(id, meta.framework);
421
414
  }
@@ -424,9 +417,7 @@ const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
424
417
  async load(id) {
425
418
  debug("load", id);
426
419
  const { query } = parseVueRequest(id);
427
- if ([INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID, INTLIFY_BUNDLE_IMPORT_ID].includes(
428
- getVirtualId(id, meta.framework)
429
- ) && include) {
420
+ if (INTLIFY_BUNDLE_IMPORT_ID === getVirtualId(id, meta.framework) && include) {
430
421
  let resourcePaths = [];
431
422
  const includePaths = shared.isArray(include) ? include : [include];
432
423
  for (const inc of includePaths) {
@@ -460,7 +451,7 @@ const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
460
451
  return true;
461
452
  } else {
462
453
  const { filename } = parseVueRequest(id);
463
- return filename.endsWith("vue") || filename.endsWith(INTLIFY_BUNDLE_IMPORT_ID) || filename.endsWith(INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID) || /\.(json5?|ya?ml)$/.test(filename) && filter(filename);
454
+ return filename.endsWith("vue") || filename.endsWith(INTLIFY_BUNDLE_IMPORT_ID) || /\.(json5?|ya?ml)$/.test(filename) && filter(filename);
464
455
  }
465
456
  },
466
457
  async transform(code, id) {
package/lib/index.mjs CHANGED
@@ -86,7 +86,6 @@ function raiseError(message) {
86
86
  }
87
87
 
88
88
  const INTLIFY_BUNDLE_IMPORT_ID = "@intlify/unplugin-vue-i18n/messages";
89
- const INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID = "@intlify/vite-plugin-vue-i18n/messages";
90
89
  const VIRTUAL_PREFIX = "\0";
91
90
  const debug = createDebug("unplugin-vue-i18n");
92
91
  const installedPkg = checkInstallPackage("@intlify/unplugin-vue-i18n", debug);
@@ -398,12 +397,6 @@ const unplugin = createUnplugin((options = {}, meta) => {
398
397
  },
399
398
  resolveId(id, importer) {
400
399
  debug("resolveId", id, importer);
401
- if (id === INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID) {
402
- warn(
403
- `deprected '${INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID}', you should switch to '${INTLIFY_BUNDLE_IMPORT_ID}'`
404
- );
405
- return asVirtualId(id, meta.framework);
406
- }
407
400
  if (id === INTLIFY_BUNDLE_IMPORT_ID) {
408
401
  return asVirtualId(id, meta.framework);
409
402
  }
@@ -412,9 +405,7 @@ const unplugin = createUnplugin((options = {}, meta) => {
412
405
  async load(id) {
413
406
  debug("load", id);
414
407
  const { query } = parseVueRequest(id);
415
- if ([INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID, INTLIFY_BUNDLE_IMPORT_ID].includes(
416
- getVirtualId(id, meta.framework)
417
- ) && include) {
408
+ if (INTLIFY_BUNDLE_IMPORT_ID === getVirtualId(id, meta.framework) && include) {
418
409
  let resourcePaths = [];
419
410
  const includePaths = isArray(include) ? include : [include];
420
411
  for (const inc of includePaths) {
@@ -448,7 +439,7 @@ const unplugin = createUnplugin((options = {}, meta) => {
448
439
  return true;
449
440
  } else {
450
441
  const { filename } = parseVueRequest(id);
451
- return filename.endsWith("vue") || filename.endsWith(INTLIFY_BUNDLE_IMPORT_ID) || filename.endsWith(INTLIFY_BUNDLE_IMPORT_DEPRECTED_ID) || /\.(json5?|ya?ml)$/.test(filename) && filter(filename);
442
+ return filename.endsWith("vue") || filename.endsWith(INTLIFY_BUNDLE_IMPORT_ID) || /\.(json5?|ya?ml)$/.test(filename) && filter(filename);
452
443
  }
453
444
  },
454
445
  async transform(code, id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/unplugin-vue-i18n",
3
- "version": "1.6.0",
3
+ "version": "2.0.0",
4
4
  "description": "unplugin for Vue I18n",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",