@lingui/vite-plugin 4.4.2 → 4.5.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/dist/index.cjs CHANGED
@@ -6,6 +6,10 @@ const conf = require('@lingui/conf');
6
6
  const api = require('@lingui/cli/api');
7
7
  const path = require('path');
8
8
 
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
10
+
11
+ const path__default = /*#__PURE__*/_interopDefaultCompat(path);
12
+
9
13
  const fileRegex = /(\.po|\?lingui)$/;
10
14
  function lingui(linguiConfig = {}) {
11
15
  const config = conf.getConfig(linguiConfig);
@@ -34,7 +38,7 @@ This indicates that you don't have the "babel-plugin-macros" or "@lingui/swc-plu
34
38
  async transform(src, id) {
35
39
  if (fileRegex.test(id)) {
36
40
  id = id.split("?")[0];
37
- const catalogRelativePath = path.relative(config.rootDir, id);
41
+ const catalogRelativePath = path__default.relative(config.rootDir, id);
38
42
  const fileCatalog = api.getCatalogForFile(
39
43
  catalogRelativePath,
40
44
  await api.getCatalogs(config)
@@ -0,0 +1,10 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ type LinguiConfigOpts = {
4
+ cwd?: string;
5
+ configPath?: string;
6
+ skipValidation?: boolean;
7
+ };
8
+ declare function lingui(linguiConfig?: LinguiConfigOpts): Plugin[];
9
+
10
+ export { lingui as default, lingui };
@@ -0,0 +1,10 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ type LinguiConfigOpts = {
4
+ cwd?: string;
5
+ configPath?: string;
6
+ skipValidation?: boolean;
7
+ };
8
+ declare function lingui(linguiConfig?: LinguiConfigOpts): Plugin[];
9
+
10
+ export { lingui as default, lingui };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/vite-plugin",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "description": "Vite plugin for Lingui message catalogs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -39,18 +39,18 @@
39
39
  "dist/"
40
40
  ],
41
41
  "dependencies": {
42
- "@lingui/cli": "4.4.2",
43
- "@lingui/conf": "4.4.2"
42
+ "@lingui/cli": "4.5.0",
43
+ "@lingui/conf": "4.5.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "vite": "3 - 4"
47
47
  },
48
48
  "devDependencies": {
49
- "@lingui/format-json": "^4.4.2",
50
- "@lingui/macro": "^4.4.2",
51
- "unbuild": "^1.1.2",
49
+ "@lingui/format-json": "^4.5.0",
50
+ "@lingui/macro": "^4.5.0",
51
+ "unbuild": "2.0.0",
52
52
  "vite": "4.1.4",
53
53
  "vite-plugin-babel-macros": "^1.0.6"
54
54
  },
55
- "gitHead": "316a004ec82721fcceb8f3c4a5aeb4a48d367927"
55
+ "gitHead": "62c92d1f8c60b3890bdda870f307fa780d423080"
56
56
  }