@ni/xliff-to-json-converter 1.0.1 → 1.1.1

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.
@@ -9,7 +9,7 @@ const helpers_1 = require("yargs/helpers");
9
9
  const convert_1 = require("./convert");
10
10
  // This is how yargs expects to be run at the entry point of a cli application
11
11
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions, @typescript-eslint/no-floating-promises
12
- yargs_1.default(helpers_1.hideBin(process.argv))
12
+ (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
13
13
  .strict()
14
14
  .scriptName('xliff-to-json-converter')
15
15
  .usage('$0 --source <src.xlf> --destination <dst.json>')
@@ -28,7 +28,7 @@ yargs_1.default(helpers_1.hideBin(process.argv))
28
28
  }), async (argv) => {
29
29
  const { source, destination } = argv;
30
30
  console.log(`Converting ${source} -> ${destination}`);
31
- await convert_1.convertXliff2Json(source, destination);
31
+ await (0, convert_1.convertXliff2Json)(source, destination);
32
32
  })
33
33
  .help()
34
34
  .argv;
@@ -4,9 +4,9 @@ exports.makeParsedTranslation = exports.xliff2Json = exports.convertXliff2Json =
4
4
  const json_file_1 = require("./json-file");
5
5
  const xliff_file_1 = require("./xliff-file");
6
6
  async function convertXliff2Json(src, dst) {
7
- const xliff = await xliff_file_1.loadXliff(src);
7
+ const xliff = await (0, xliff_file_1.loadXliff)(src);
8
8
  const json = xliff2Json(xliff);
9
- json_file_1.saveJson(json, dst);
9
+ (0, json_file_1.saveJson)(json, dst);
10
10
  }
11
11
  exports.convertXliff2Json = convertXliff2Json;
12
12
  function xliff2Json(xliff) {
@@ -9,6 +9,6 @@ function stringify(json) {
9
9
  exports.stringify = stringify;
10
10
  function saveJson(json, dst) {
11
11
  const content = stringify(json);
12
- fs_1.writeFileSync(dst, content);
12
+ (0, fs_1.writeFileSync)(dst, content);
13
13
  }
14
14
  exports.saveJson = saveJson;
@@ -4,11 +4,11 @@ exports.parseXliff = exports.loadXliff = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const xliff_1 = require("xliff");
6
6
  async function loadXliff(path) {
7
- const xliff = fs_1.readFileSync(path);
7
+ const xliff = (0, fs_1.readFileSync)(path);
8
8
  return parseXliff(xliff.toString());
9
9
  }
10
10
  exports.loadXliff = loadXliff;
11
11
  async function parseXliff(contents) {
12
- return xliff_1.xliff12ToJs(contents);
12
+ return (0, xliff_1.xliff12ToJs)(contents);
13
13
  }
14
14
  exports.parseXliff = parseXliff;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/xliff-to-json-converter",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "A utility to convert translation files from XLIFF to JSON for Angular localization",
5
5
  "main": "dist/commonjs/cli.js",
6
6
  "bin": {
@@ -25,13 +25,13 @@
25
25
  "author": "National Instruments",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@ni/eslint-config-javascript": "^3.1.0",
29
- "@ni/eslint-config-typescript": "^3.0.5",
30
- "@types/jasmine": "^4.0.2",
28
+ "@ni/eslint-config-javascript": "^4.2.0",
29
+ "@ni/eslint-config-typescript": "^4.2.0",
30
+ "@types/jasmine": "^4.3.1",
31
31
  "@types/yargs": "^17.0.10",
32
32
  "jasmine": "^4.2.0",
33
- "jasmine-core": "^4.1.0",
34
- "typescript": "^4.3.2"
33
+ "jasmine-core": "^4.5.0",
34
+ "typescript": "~4.7.4"
35
35
  },
36
36
  "dependencies": {
37
37
  "xliff": "^6.0.3",