@lingui/loader 4.4.2 → 4.6.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
@@ -4,13 +4,17 @@ const path = require('path');
4
4
  const conf = require('@lingui/conf');
5
5
  const api = require('@lingui/cli/api');
6
6
 
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
+
9
+ const path__default = /*#__PURE__*/_interopDefaultCompat(path);
10
+
7
11
  const loader = async function(source) {
8
12
  const options = this.getOptions() || {};
9
13
  const config = conf.getConfig({
10
14
  configPath: options.config,
11
- cwd: path.dirname(this.resourcePath)
15
+ cwd: path__default.dirname(this.resourcePath)
12
16
  });
13
- const catalogRelativePath = path.relative(config.rootDir, this.resourcePath);
17
+ const catalogRelativePath = path__default.relative(config.rootDir, this.resourcePath);
14
18
  const fileCatalog = api.getCatalogForFile(
15
19
  catalogRelativePath,
16
20
  await api.getCatalogs(config)
@@ -0,0 +1,8 @@
1
+ import { LoaderDefinitionFunction } from 'webpack';
2
+
3
+ type LinguiLoaderOptions = {
4
+ config?: string;
5
+ };
6
+ declare const loader: LoaderDefinitionFunction<LinguiLoaderOptions>;
7
+
8
+ export { loader as default };
@@ -0,0 +1,8 @@
1
+ import { LoaderDefinitionFunction } from 'webpack';
2
+
3
+ type LinguiLoaderOptions = {
4
+ config?: string;
5
+ };
6
+ declare const loader: LoaderDefinitionFunction<LinguiLoaderOptions>;
7
+
8
+ export { loader as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/loader",
3
- "version": "4.4.2",
3
+ "version": "4.6.0",
4
4
  "description": "webpack loader for lingui message catalogs",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.cjs",
@@ -43,16 +43,16 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@babel/runtime": "^7.20.13",
46
- "@lingui/cli": "4.4.2",
47
- "@lingui/conf": "4.4.2"
46
+ "@lingui/cli": "4.6.0",
47
+ "@lingui/conf": "4.6.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@lingui/format-json": "4.4.2",
51
- "unbuild": "^1.1.2",
50
+ "@lingui/format-json": "4.6.0",
51
+ "unbuild": "2.0.0",
52
52
  "webpack": "^5.76.1"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "webpack": "^5.0.0"
56
56
  },
57
- "gitHead": "316a004ec82721fcceb8f3c4a5aeb4a48d367927"
57
+ "gitHead": "2afa0efb2d0cd1d47adc76e1eec9f5e57e34ae18"
58
58
  }