@jsverse/transloco-optimize 7.0.0 → 8.0.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/CHANGELOG.md CHANGED
@@ -1,24 +1,30 @@
1
- # Changelog
1
+ # 8.0.0 (2025-09-14)
2
2
 
3
- This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
3
+ ### 💡 Refactor
4
4
 
5
- # [7.0.0](https://github.com/jsverse/transloco/compare/transloco-optimize-6.0.0...transloco-optimize-7.0.0) (2024-03-23)
5
+ - **optimize:** 💡 update node version ([d4d275ba](https://github.com/jsverse/transloco/commit/d4d275ba))
6
6
 
7
+ ### ⚠ BREAKING CHANGES
7
8
 
8
- ### chore
9
+ - **optimize:** 🧨 Minimum node version is now 18
9
10
 
10
- * **optimize:** 🤖 update package scope ([65645ee](https://github.com/jsverse/transloco/commit/65645ee0a79413c74be64ede5bf33174f06465f7))
11
+ ### ❤️ Thank You
11
12
 
13
+ - shaharkazaz @shaharkazaz
12
14
 
13
- ### BREAKING CHANGES
15
+ ## [7.0.1](https://github.com/jsverse/transloco/compare/transloco-optimize-7.0.0...transloco-optimize-7.0.1) (2024-05-31)
14
16
 
15
- * **optimize:** 🧨 The package is now published under the jsverse scope
17
+ # [7.0.0](https://github.com/jsverse/transloco/compare/transloco-optimize-6.0.0...transloco-optimize-7.0.0) (2024-03-23)
16
18
 
19
+ ### chore
17
20
 
21
+ - **optimize:** 🤖 update package scope ([65645ee](https://github.com/jsverse/transloco/commit/65645ee0a79413c74be64ede5bf33174f06465f7))
18
22
 
19
- # [6.0.0](https://github.com/jsverse/transloco/compare/transloco-optimize-5.0.3...transloco-optimize-6.0.0) (2024-03-23)
23
+ ### BREAKING CHANGES
20
24
 
25
+ - **optimize:** 🧨 The package is now published under the jsverse scope
21
26
 
27
+ # [6.0.0](https://github.com/jsverse/transloco/compare/transloco-optimize-5.0.3...transloco-optimize-6.0.0) (2024-03-23)
22
28
 
23
29
  ## [5.0.3](https://github.com/jsverse/transloco/compare/transloco-optimize-5.0.2...transloco-optimize-5.0.3) (2023-08-13)
24
30
 
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Transloco Optimize
2
2
 
3
- Please visit the [official Transloco docs](https://jsverse.github.io/transloco/docs/tools/optimize).
3
+ Discover more about this plugin and how it can enhance your workflow in the [official Transloco documentation](https://jsverse.gitbook.io/transloco/tools/optimize).
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@jsverse/transloco-optimize",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "Transloco optimization process for production environments",
5
- "main": "./src/index.js",
5
+ "main": "src/lib/transloco-optimize.js",
6
6
  "engines": {
7
- "node": ">=16"
7
+ "node": ">=18"
8
8
  },
9
9
  "bin": {
10
10
  "transloco-optimize": "src/index.js"
@@ -15,22 +15,20 @@
15
15
  "bugs": {
16
16
  "url": "https://github.com/jsverse/transloco/issues"
17
17
  },
18
- "homepage": "https://jsverse.github.io/transloco/docs/tools/optimize/",
18
+ "homepage": "https://jsverse.gitbook.io/transloco/tools/optimize",
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "https://github.com/jsverse/transloco"
22
22
  },
23
23
  "keywords": [
24
- "angular",
25
- "angular 2",
24
+ "Angular",
26
25
  "i18n",
27
- "translate",
28
- "angular translate",
29
- "angular i18n",
30
- "transloco",
31
- "comments",
32
- "build",
33
- "optimize"
26
+ "Translate",
27
+ "Angular Translate",
28
+ "Transloco",
29
+ "Translator Comments",
30
+ "Build",
31
+ "Optimize"
34
32
  ],
35
33
  "license": "MIT",
36
34
  "dependencies": {
@@ -38,5 +36,6 @@
38
36
  "command-line-args": "^5.2.0",
39
37
  "glob": "^10.0.0"
40
38
  },
41
- "type": "commonjs"
42
- }
39
+ "type": "commonjs",
40
+ "types": "./src/index.d.ts"
41
+ }
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.optimizeFiles = exports.getTranslationFiles = exports.getTranslationsFolder = void 0;
3
+ exports.getTranslationsFolder = getTranslationsFolder;
4
+ exports.getTranslationFiles = getTranslationFiles;
5
+ exports.optimizeFiles = optimizeFiles;
4
6
  const tslib_1 = require("tslib");
5
7
  const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
6
8
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
9
  const glob_1 = require("glob");
8
10
  const flat_1 = require("flat");
9
- const isWindows = process.platform === "win32";
11
+ const isWindows = process.platform === 'win32';
10
12
  function removeComments(translation, commentsKey = 'comment') {
11
13
  return Object.keys(translation).reduce((acc, key) => {
12
14
  const lastKey = key.split('.').pop();
@@ -19,12 +21,10 @@ function removeComments(translation, commentsKey = 'comment') {
19
21
  function getTranslationsFolder(dist) {
20
22
  return node_path_1.default.resolve(process.cwd(), dist);
21
23
  }
22
- exports.getTranslationsFolder = getTranslationsFolder;
23
24
  function getTranslationFiles(dist) {
24
25
  const filesMatcher = node_path_1.default.resolve(getTranslationsFolder(dist), '**/*.json');
25
26
  return (0, glob_1.glob)(filesMatcher, { windowsPathsNoEscape: isWindows });
26
27
  }
27
- exports.getTranslationFiles = getTranslationFiles;
28
28
  function optimizeFiles(translationPaths, commentsKey) {
29
29
  return new Promise((resolve, reject) => {
30
30
  let error;
@@ -49,4 +49,3 @@ function optimizeFiles(translationPaths, commentsKey) {
49
49
  }
50
50
  });
51
51
  }
52
- exports.optimizeFiles = optimizeFiles;