@lingo.dev/_compiler 0.1.7 → 0.1.9
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/build/index.cjs +5 -7
- package/build/index.mjs +5 -7
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var _unplugin = require('unplugin');
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@lingo.dev/_compiler",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.9",
|
|
8
8
|
description: "Lingo.dev Compiler",
|
|
9
9
|
private: false,
|
|
10
10
|
publishConfig: {
|
|
@@ -707,7 +707,7 @@ var LCP = class _LCP {
|
|
|
707
707
|
save() {
|
|
708
708
|
const hasChanges = !fs.existsSync(this.filePath) || fs.readFileSync(this.filePath, "utf8") !== this.toString();
|
|
709
709
|
if (hasChanges) {
|
|
710
|
-
const dir =
|
|
710
|
+
const dir = path.dirname(this.filePath);
|
|
711
711
|
if (!fs.existsSync(dir)) {
|
|
712
712
|
fs.mkdirSync(dir, { recursive: true });
|
|
713
713
|
}
|
|
@@ -716,7 +716,7 @@ var LCP = class _LCP {
|
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
_triggerLCPReload() {
|
|
719
|
-
const dir =
|
|
719
|
+
const dir = path.dirname(this.filePath);
|
|
720
720
|
const filePath = path.resolve(dir, LCP_DICTIONARY_FILE_NAME);
|
|
721
721
|
if (fs.existsSync(filePath)) {
|
|
722
722
|
const now = Date.now();
|
|
@@ -2356,10 +2356,8 @@ var unplugin = _unplugin.createUnplugin.call(void 0,
|
|
|
2356
2356
|
const result = _lodash2.default.chain({
|
|
2357
2357
|
code,
|
|
2358
2358
|
params,
|
|
2359
|
-
fileKey: path.default.relative(
|
|
2360
|
-
|
|
2361
|
-
id
|
|
2362
|
-
)
|
|
2359
|
+
fileKey: path.default.relative(path.default.resolve(process.cwd(), params.sourceRoot), id).split(path.default.sep).join("/")
|
|
2360
|
+
// Always normalize for consistent dictionaries
|
|
2363
2361
|
}).thru(createPayload).thru(
|
|
2364
2362
|
composeMutations(
|
|
2365
2363
|
i18n_directive_default,
|
package/build/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { createUnplugin } from "unplugin";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@lingo.dev/_compiler",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.9",
|
|
8
8
|
description: "Lingo.dev Compiler",
|
|
9
9
|
private: false,
|
|
10
10
|
publishConfig: {
|
|
@@ -707,7 +707,7 @@ var LCP = class _LCP {
|
|
|
707
707
|
save() {
|
|
708
708
|
const hasChanges = !fs.existsSync(this.filePath) || fs.readFileSync(this.filePath, "utf8") !== this.toString();
|
|
709
709
|
if (hasChanges) {
|
|
710
|
-
const dir =
|
|
710
|
+
const dir = path.dirname(this.filePath);
|
|
711
711
|
if (!fs.existsSync(dir)) {
|
|
712
712
|
fs.mkdirSync(dir, { recursive: true });
|
|
713
713
|
}
|
|
@@ -716,7 +716,7 @@ var LCP = class _LCP {
|
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
_triggerLCPReload() {
|
|
719
|
-
const dir =
|
|
719
|
+
const dir = path.dirname(this.filePath);
|
|
720
720
|
const filePath = path.resolve(dir, LCP_DICTIONARY_FILE_NAME);
|
|
721
721
|
if (fs.existsSync(filePath)) {
|
|
722
722
|
const now = Date.now();
|
|
@@ -2356,10 +2356,8 @@ var unplugin = createUnplugin(
|
|
|
2356
2356
|
const result = _11.chain({
|
|
2357
2357
|
code,
|
|
2358
2358
|
params,
|
|
2359
|
-
fileKey: path5.relative(
|
|
2360
|
-
|
|
2361
|
-
id
|
|
2362
|
-
)
|
|
2359
|
+
fileKey: path5.relative(path5.resolve(process.cwd(), params.sourceRoot), id).split(path5.sep).join("/")
|
|
2360
|
+
// Always normalize for consistent dictionaries
|
|
2363
2361
|
}).thru(createPayload).thru(
|
|
2364
2362
|
composeMutations(
|
|
2365
2363
|
i18n_directive_default,
|