@intlayer/babel 7.0.8 → 7.0.9-canary.2
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/README.md +6 -5
- package/dist/cjs/chokidar/dist/esm/utils/getFileHash.cjs +12 -0
- package/dist/cjs/chokidar/dist/esm/utils/getFileHash.cjs.map +1 -0
- package/dist/cjs/config/dist/esm/utils/normalizePath.cjs +17 -0
- package/dist/cjs/config/dist/esm/utils/normalizePath.cjs.map +1 -0
- package/dist/esm/_virtual/rolldown_runtime.mjs +7 -0
- package/dist/esm/chokidar/dist/esm/utils/getFileHash.mjs +10 -0
- package/dist/esm/chokidar/dist/esm/utils/getFileHash.mjs.map +1 -0
- package/package.json +15 -12
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
<p align="center" style="margin-top:15px;">
|
|
21
21
|
<a href="https://www.npmjs.com/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/v/intlayer?style=for-the-badge&labelColor=FFFFFF&color=000000&logoColor=FFFFFF" alt="npm version" height="24"/></a>
|
|
22
22
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub Stars" height="24"/></a>
|
|
23
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="monthly downloads" height="24"/></a>
|
|
24
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="license"/></a>
|
|
25
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="last commit"/>
|
|
23
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="monthly downloads" height="24"/></a>
|
|
24
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="license"/></a>
|
|
25
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="last commit"/>
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
@@ -60,7 +60,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
60
60
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
|
|
61
61
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
|
|
62
62
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
|
|
63
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations,
|
|
63
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
|
|
64
64
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, and react-intl. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) |
|
|
65
65
|
|
|
66
66
|
---
|
|
@@ -171,8 +171,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
171
171
|
<details open>
|
|
172
172
|
<summary style="font-size:16px; font-weight:bold;">🌐 Environment</summary>
|
|
173
173
|
<ul>
|
|
174
|
-
<li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js
|
|
174
|
+
<li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js 16</a>
|
|
175
175
|
<ul>
|
|
176
|
+
<li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
|
|
176
177
|
<li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
|
|
177
178
|
<li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
|
|
178
179
|
</ul>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let crypto_js = require("crypto-js");
|
|
3
|
+
crypto_js = require_rolldown_runtime.__toESM(crypto_js);
|
|
4
|
+
|
|
5
|
+
//#region ../chokidar/dist/esm/utils/getFileHash.mjs
|
|
6
|
+
const getFileHash = (filePath) => {
|
|
7
|
+
return crypto_js.default.SHA3(filePath).toString(crypto_js.default.enc.Base64).replace(/[^A-Z\d]/gi, "").substring(0, 20);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.getFileHash = getFileHash;
|
|
12
|
+
//# sourceMappingURL=getFileHash.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFileHash.cjs","names":["crypto"],"sources":["../../../../../../../chokidar/dist/esm/utils/getFileHash.mjs"],"sourcesContent":["import crypto from \"crypto-js\";\n\n//#region src/utils/getFileHash.ts\nconst getFileHash = (filePath) => {\n\treturn crypto.SHA3(filePath).toString(crypto.enc.Base64).replace(/[^A-Z\\d]/gi, \"\").substring(0, 20);\n};\n\n//#endregion\nexport { getFileHash };\n//# sourceMappingURL=getFileHash.mjs.map"],"mappings":";;;;;AAGA,MAAM,eAAe,aAAa;AACjC,QAAOA,kBAAO,KAAK,SAAS,CAAC,SAASA,kBAAO,IAAI,OAAO,CAAC,QAAQ,cAAc,GAAG,CAAC,UAAU,GAAG,GAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../config/dist/esm/utils/normalizePath.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Normalize a path for glob by replacing backslashes with forward slashes
|
|
5
|
+
*
|
|
6
|
+
* Utils for Windows compatibility, as Glob pattern as `**\\*.js` is not supported
|
|
7
|
+
*
|
|
8
|
+
* C:\\Users\\John\\Desktop\\test.txt -> C:/Users/John/Desktop/test.txt
|
|
9
|
+
*
|
|
10
|
+
* @param path - The path to normalize
|
|
11
|
+
* @returns The normalized path
|
|
12
|
+
*/
|
|
13
|
+
const normalizePath = (path) => path.replace(/\\/g, "/");
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.normalizePath = normalizePath;
|
|
17
|
+
//# sourceMappingURL=normalizePath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizePath.cjs","names":[],"sources":["../../../../../../../config/dist/esm/utils/normalizePath.mjs"],"sourcesContent":["//#region src/utils/normalizePath.ts\n/**\n* Normalize a path for glob by replacing backslashes with forward slashes\n*\n* Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n*\n* C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n*\n* @param path - The path to normalize\n* @returns The normalized path\n*/\nconst normalizePath = (path) => path.replace(/\\\\/g, \"/\");\n\n//#endregion\nexport { normalizePath };\n//# sourceMappingURL=normalizePath.mjs.map"],"mappings":";;;;;;;;;;;;AAWA,MAAM,iBAAiB,SAAS,KAAK,QAAQ,OAAO,IAAI"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
3
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
4
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import crypto from "crypto-js";
|
|
2
|
+
|
|
3
|
+
//#region ../chokidar/dist/esm/utils/getFileHash.mjs
|
|
4
|
+
const getFileHash = (filePath) => {
|
|
5
|
+
return crypto.SHA3(filePath).toString(crypto.enc.Base64).replace(/[^A-Z\d]/gi, "").substring(0, 20);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { getFileHash };
|
|
10
|
+
//# sourceMappingURL=getFileHash.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFileHash.mjs","names":[],"sources":["../../../../../../../chokidar/dist/esm/utils/getFileHash.mjs"],"sourcesContent":["import crypto from \"crypto-js\";\n\n//#region src/utils/getFileHash.ts\nconst getFileHash = (filePath) => {\n\treturn crypto.SHA3(filePath).toString(crypto.enc.Base64).replace(/[^A-Z\\d]/gi, \"\").substring(0, 20);\n};\n\n//#endregion\nexport { getFileHash };\n//# sourceMappingURL=getFileHash.mjs.map"],"mappings":";;;AAGA,MAAM,eAAe,aAAa;AACjC,QAAO,OAAO,KAAK,SAAS,CAAC,SAAS,OAAO,IAAI,OAAO,CAAC,QAAQ,cAAc,GAAG,CAAC,UAAU,GAAG,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/babel",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.9-canary.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Babel plugin for Intlayer that transforms declaration files and provides internationalization features during the build process according to the Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
"lint": "biome lint .",
|
|
68
68
|
"lint:fix": "biome lint --write .",
|
|
69
69
|
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
70
|
+
"publish": "bun publish --access public || true",
|
|
71
|
+
"publish:canary": "bun publish --tag canary --access public || true",
|
|
72
|
+
"publish:latest": "bun publish --tag latest --access public || true",
|
|
70
73
|
"test": "vitest run",
|
|
71
74
|
"test:watch": "vitest",
|
|
72
75
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
@@ -77,27 +80,27 @@
|
|
|
77
80
|
"@babel/parser": "7.1.5",
|
|
78
81
|
"@babel/traverse": "7.28.0",
|
|
79
82
|
"@babel/types": "7.28.4",
|
|
80
|
-
"@intlayer/chokidar": "7.0.
|
|
81
|
-
"@intlayer/config": "7.0.
|
|
82
|
-
"@intlayer/types": "7.0.
|
|
83
|
+
"@intlayer/chokidar": "7.0.9-canary.2",
|
|
84
|
+
"@intlayer/config": "7.0.9-canary.2",
|
|
85
|
+
"@intlayer/types": "7.0.9-canary.2",
|
|
83
86
|
"@types/babel__core": "7.20.5",
|
|
84
87
|
"@types/babel__generator": "7.27.0",
|
|
85
88
|
"@types/babel__traverse": "7.28.0"
|
|
86
89
|
},
|
|
87
90
|
"devDependencies": {
|
|
88
91
|
"@types/crypto-js": "4.2.2",
|
|
89
|
-
"@types/node": "24.10.
|
|
90
|
-
"@utils/ts-config": "
|
|
91
|
-
"@utils/ts-config-types": "
|
|
92
|
-
"@utils/tsdown-config": "
|
|
92
|
+
"@types/node": "24.10.1",
|
|
93
|
+
"@utils/ts-config": "1.0.4",
|
|
94
|
+
"@utils/ts-config-types": "1.0.4",
|
|
95
|
+
"@utils/tsdown-config": "1.0.4",
|
|
93
96
|
"rimraf": "6.1.0",
|
|
94
|
-
"tsdown": "0.16.
|
|
97
|
+
"tsdown": "0.16.4",
|
|
95
98
|
"typescript": "5.9.3",
|
|
96
|
-
"vitest": "4.0.
|
|
99
|
+
"vitest": "4.0.8"
|
|
97
100
|
},
|
|
98
101
|
"peerDependencies": {
|
|
99
|
-
"@intlayer/chokidar": "7.0.
|
|
100
|
-
"@intlayer/config": "7.0.
|
|
102
|
+
"@intlayer/chokidar": "7.0.9-canary.2",
|
|
103
|
+
"@intlayer/config": "7.0.9-canary.2"
|
|
101
104
|
},
|
|
102
105
|
"engines": {
|
|
103
106
|
"node": ">=14.18"
|