@intlify/unplugin-vue-i18n 5.0.0-beta.4 → 5.0.0-beta.5

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
@@ -1054,7 +1054,7 @@ function resolveIdentifier(localVariables, returnVariable) {
1054
1054
 
1055
1055
  const debug = createDebug__default(resolveNamespace("root"));
1056
1056
  const installedPkgInfo = checkInstallPackage(debug);
1057
- const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
1057
+ const unpluginFactory = (options = {}, meta) => {
1058
1058
  debug("meta framework", meta.framework);
1059
1059
  if (!["vite", "webpack"].includes(meta.framework)) {
1060
1060
  raiseError(`This plugin is supported 'vite' and 'webpack' only`);
@@ -1073,7 +1073,9 @@ We are waiting for your Pull Request \u{1F642}.`
1073
1073
  plugins.push(directivePlugin(resolvedOptions));
1074
1074
  }
1075
1075
  return plugins;
1076
- });
1076
+ };
1077
+ const unplugin = /* @__PURE__ */ unplugin$1.createUnplugin(unpluginFactory);
1077
1078
 
1078
1079
  exports.default = unplugin;
1079
1080
  exports.unplugin = unplugin;
1081
+ exports.unpluginFactory = unpluginFactory;
package/lib/index.d.cts CHANGED
@@ -1,7 +1,8 @@
1
- import * as _unplugin from 'unplugin';
1
+ import { UnpluginFactory, UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.cjs';
3
3
  export { SFCLangFormat } from './types.cjs';
4
4
 
5
- declare const unplugin: _unplugin.UnpluginInstance<PluginOptions, boolean>;
5
+ declare const unpluginFactory: UnpluginFactory<PluginOptions | undefined>;
6
+ declare const unplugin: UnpluginInstance<PluginOptions | undefined, boolean>;
6
7
 
7
- export { PluginOptions, unplugin as default, unplugin };
8
+ export { PluginOptions, unplugin as default, unplugin, unpluginFactory };
package/lib/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
- import * as _unplugin from 'unplugin';
1
+ import { UnpluginFactory, UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.mjs';
3
3
  export { SFCLangFormat } from './types.mjs';
4
4
 
5
- declare const unplugin: _unplugin.UnpluginInstance<PluginOptions, boolean>;
5
+ declare const unpluginFactory: UnpluginFactory<PluginOptions | undefined>;
6
+ declare const unplugin: UnpluginInstance<PluginOptions | undefined, boolean>;
6
7
 
7
- export { PluginOptions, unplugin as default, unplugin };
8
+ export { PluginOptions, unplugin as default, unplugin, unpluginFactory };
package/lib/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import * as _unplugin from 'unplugin';
1
+ import { UnpluginFactory, UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.js';
3
3
  export { SFCLangFormat } from './types.js';
4
4
 
5
- declare const unplugin: _unplugin.UnpluginInstance<PluginOptions, boolean>;
5
+ declare const unpluginFactory: UnpluginFactory<PluginOptions | undefined>;
6
+ declare const unplugin: UnpluginInstance<PluginOptions | undefined, boolean>;
6
7
 
7
- export { PluginOptions, unplugin as default, unplugin };
8
+ export { PluginOptions, unplugin as default, unplugin, unpluginFactory };
package/lib/index.mjs CHANGED
@@ -1039,7 +1039,7 @@ function resolveIdentifier(localVariables, returnVariable) {
1039
1039
 
1040
1040
  const debug = createDebug(resolveNamespace("root"));
1041
1041
  const installedPkgInfo = checkInstallPackage(debug);
1042
- const unplugin = createUnplugin((options = {}, meta) => {
1042
+ const unpluginFactory = (options = {}, meta) => {
1043
1043
  debug("meta framework", meta.framework);
1044
1044
  if (!["vite", "webpack"].includes(meta.framework)) {
1045
1045
  raiseError(`This plugin is supported 'vite' and 'webpack' only`);
@@ -1058,6 +1058,7 @@ We are waiting for your Pull Request \u{1F642}.`
1058
1058
  plugins.push(directivePlugin(resolvedOptions));
1059
1059
  }
1060
1060
  return plugins;
1061
- });
1061
+ };
1062
+ const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
1062
1063
 
1063
- export { unplugin as default, unplugin };
1064
+ export { unplugin as default, unplugin, unpluginFactory };
package/lib/vite.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ const unplugin = require('unplugin');
3
4
  const index = require('./index.cjs');
4
- require('unplugin');
5
5
  require('debug');
6
6
  require('picocolors');
7
7
  require('node:path');
@@ -19,6 +19,6 @@ require('@typescript-eslint/scope-manager');
19
19
  require('@typescript-eslint/typescript-estree');
20
20
  require('@eslint-community/eslint-utils');
21
21
 
22
- const vite = index.unplugin.vite;
22
+ const vite = unplugin.createVitePlugin(index.unpluginFactory);
23
23
 
24
24
  module.exports = vite;
package/lib/vite.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import * as vite from 'vite';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.cjs';
3
3
 
4
- declare const _default: (options: PluginOptions) => vite.Plugin | vite.Plugin[];
4
+ declare const vite: UnpluginInstance<PluginOptions | undefined, boolean>['vite'];
5
5
 
6
- export { _default as default };
6
+ export { vite as default };
package/lib/vite.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import * as vite from 'vite';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.mjs';
3
3
 
4
- declare const _default: (options: PluginOptions) => vite.Plugin | vite.Plugin[];
4
+ declare const vite: UnpluginInstance<PluginOptions | undefined, boolean>['vite'];
5
5
 
6
- export { _default as default };
6
+ export { vite as default };
package/lib/vite.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as vite from 'vite';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.js';
3
3
 
4
- declare const _default: (options: PluginOptions) => vite.Plugin | vite.Plugin[];
4
+ declare const vite: UnpluginInstance<PluginOptions | undefined, boolean>['vite'];
5
5
 
6
- export { _default as default };
6
+ export { vite as default };
package/lib/vite.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { unplugin } from './index.mjs';
2
- import 'unplugin';
1
+ import { createVitePlugin } from 'unplugin';
2
+ import { unpluginFactory } from './index.mjs';
3
3
  import 'debug';
4
4
  import 'picocolors';
5
5
  import 'node:path';
@@ -17,6 +17,6 @@ import '@typescript-eslint/scope-manager';
17
17
  import '@typescript-eslint/typescript-estree';
18
18
  import '@eslint-community/eslint-utils';
19
19
 
20
- const vite = unplugin.vite;
20
+ const vite = createVitePlugin(unpluginFactory);
21
21
 
22
22
  export { vite as default };
package/lib/webpack.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ const unplugin = require('unplugin');
3
4
  const index = require('./index.cjs');
4
- require('unplugin');
5
5
  require('debug');
6
6
  require('picocolors');
7
7
  require('node:path');
@@ -19,6 +19,6 @@ require('@typescript-eslint/scope-manager');
19
19
  require('@typescript-eslint/typescript-estree');
20
20
  require('@eslint-community/eslint-utils');
21
21
 
22
- const webpack = index.unplugin.webpack;
22
+ const webpack = unplugin.createWebpackPlugin(index.unpluginFactory);
23
23
 
24
24
  module.exports = webpack;
package/lib/webpack.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.cjs';
3
3
 
4
- declare const _default: (options: PluginOptions) => webpack.WebpackPluginInstance;
4
+ declare const webpack: UnpluginInstance<PluginOptions | undefined, boolean>['webpack'];
5
5
 
6
- export { _default as default };
6
+ export { webpack as default };
package/lib/webpack.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.mjs';
3
3
 
4
- declare const _default: (options: PluginOptions) => webpack.WebpackPluginInstance;
4
+ declare const webpack: UnpluginInstance<PluginOptions | undefined, boolean>['webpack'];
5
5
 
6
- export { _default as default };
6
+ export { webpack as default };
package/lib/webpack.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import { UnpluginInstance } from 'unplugin';
2
2
  import { PluginOptions } from './types.js';
3
3
 
4
- declare const _default: (options: PluginOptions) => webpack.WebpackPluginInstance;
4
+ declare const webpack: UnpluginInstance<PluginOptions | undefined, boolean>['webpack'];
5
5
 
6
- export { _default as default };
6
+ export { webpack as default };
package/lib/webpack.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { unplugin } from './index.mjs';
2
- import 'unplugin';
1
+ import { createWebpackPlugin } from 'unplugin';
2
+ import { unpluginFactory } from './index.mjs';
3
3
  import 'debug';
4
4
  import 'picocolors';
5
5
  import 'node:path';
@@ -17,6 +17,6 @@ import '@typescript-eslint/scope-manager';
17
17
  import '@typescript-eslint/typescript-estree';
18
18
  import '@eslint-community/eslint-utils';
19
19
 
20
- const webpack = unplugin.webpack;
20
+ const webpack = createWebpackPlugin(unpluginFactory);
21
21
 
22
22
  export { webpack as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/unplugin-vue-i18n",
3
- "version": "5.0.0-beta.4",
3
+ "version": "5.0.0-beta.5",
4
4
  "description": "unplugin for Vue I18n",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",