@rushstack/localization-utilities 0.9.0 → 0.9.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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.36.4"
8
+ "packageVersion": "7.37.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
4
7
  Object.defineProperty(exports, "__esModule", { value: true });
5
8
  exports.parseLocJson = void 0;
6
9
  const node_core_library_1 = require("@rushstack/node-core-library");
7
- // Use `require` here to allow this package to be bundled with Webpack.
8
- const LOC_JSON_SCHEMA = node_core_library_1.JsonSchema.fromLoadedObject(require('../schemas/locJson.schema.json'));
10
+ const locJson_schema_json_1 = __importDefault(require("../schemas/locJson.schema.json"));
11
+ const LOC_JSON_SCHEMA = node_core_library_1.JsonSchema.fromLoadedObject(locJson_schema_json_1.default);
9
12
  /**
10
13
  * @public
11
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"parseLocJson.js","sourceRoot":"","sources":["../../src/parsers/parseLocJson.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAAoE;AAIpE,uEAAuE;AACvE,MAAM,eAAe,GAAe,8BAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC;AAE3G;;GAEG;AACH,SAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAqB;IACjF,MAAM,UAAU,GAAsB,4BAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACpE,IAAI;QACF,eAAe,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;KACtD;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,EAAE,CAAC,CAAC;KACzD;IAED,IAAI,YAAY,EAAE;QAChB,MAAM,aAAa,GAAsB,EAAE,CAAC;QAC5C,KAAK,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YAC1D,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;gBAChC,aAAa,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC;aACjC;SACF;QAED,OAAO,aAAa,CAAC;KACtB;SAAM;QACL,OAAO,UAAU,CAAC;KACnB;AACH,CAAC;AApBD,oCAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { JsonFile, JsonSchema } from '@rushstack/node-core-library';\n\nimport { ILocalizationFile, IParseFileOptions } from '../interfaces';\n\n// Use `require` here to allow this package to be bundled with Webpack.\nconst LOC_JSON_SCHEMA: JsonSchema = JsonSchema.fromLoadedObject(require('../schemas/locJson.schema.json'));\n\n/**\n * @public\n */\nexport function parseLocJson({ content, filePath, ignoreString }: IParseFileOptions): ILocalizationFile {\n const parsedFile: ILocalizationFile = JsonFile.parseString(content);\n try {\n LOC_JSON_SCHEMA.validateObject(parsedFile, filePath);\n } catch (e) {\n throw new Error(`The loc file is invalid. Error: ${e}`);\n }\n\n if (ignoreString) {\n const newParsedFile: ILocalizationFile = {};\n for (const [key, stringData] of Object.entries(parsedFile)) {\n if (!ignoreString(filePath, key)) {\n newParsedFile[key] = stringData;\n }\n }\n\n return newParsedFile;\n } else {\n return parsedFile;\n }\n}\n"]}
1
+ {"version":3,"file":"parseLocJson.js","sourceRoot":"","sources":["../../src/parsers/parseLocJson.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,oEAAoE;AAGpE,yFAA2D;AAE3D,MAAM,eAAe,GAAe,8BAAU,CAAC,gBAAgB,CAAC,6BAAa,CAAC,CAAC;AAE/E;;GAEG;AACH,SAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAqB;IACjF,MAAM,UAAU,GAAsB,4BAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACpE,IAAI;QACF,eAAe,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;KACtD;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,EAAE,CAAC,CAAC;KACzD;IAED,IAAI,YAAY,EAAE;QAChB,MAAM,aAAa,GAAsB,EAAE,CAAC;QAC5C,KAAK,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YAC1D,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;gBAChC,aAAa,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC;aACjC;SACF;QAED,OAAO,aAAa,CAAC;KACtB;SAAM;QACL,OAAO,UAAU,CAAC;KACnB;AACH,CAAC;AApBD,oCAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { JsonFile, JsonSchema } from '@rushstack/node-core-library';\n\nimport { ILocalizationFile, IParseFileOptions } from '../interfaces';\nimport locJsonSchema from '../schemas/locJson.schema.json';\n\nconst LOC_JSON_SCHEMA: JsonSchema = JsonSchema.fromLoadedObject(locJsonSchema);\n\n/**\n * @public\n */\nexport function parseLocJson({ content, filePath, ignoreString }: IParseFileOptions): ILocalizationFile {\n const parsedFile: ILocalizationFile = JsonFile.parseString(content);\n try {\n LOC_JSON_SCHEMA.validateObject(parsedFile, filePath);\n } catch (e) {\n throw new Error(`The loc file is invalid. Error: ${e}`);\n }\n\n if (ignoreString) {\n const newParsedFile: ILocalizationFile = {};\n for (const [key, stringData] of Object.entries(parsedFile)) {\n if (!ignoreString(filePath, key)) {\n newParsedFile[key] = stringData;\n }\n }\n\n return newParsedFile;\n } else {\n return parsedFile;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/localization-utilities",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "This plugin contains some useful functions for localization.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "dist/localization-utilities.d.ts",
@@ -14,15 +14,13 @@
14
14
  "pseudolocale": "~1.1.0",
15
15
  "xmldoc": "~1.1.2",
16
16
  "@rushstack/node-core-library": "3.60.0",
17
- "@rushstack/typings-generator": "0.12.0"
17
+ "@rushstack/typings-generator": "0.12.1"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/heft-jest": "1.0.1",
21
- "@types/node": "18.17.15",
22
20
  "@types/xmldoc": "1.1.4",
23
21
  "@rushstack/eslint-config": "3.3.4",
24
- "@rushstack/heft": "0.59.0",
25
- "@rushstack/heft-node-rig": "2.2.23"
22
+ "@rushstack/heft": "0.60.0",
23
+ "local-node-rig": "1.0.0"
26
24
  },
27
25
  "scripts": {
28
26
  "build": "heft build --clean",