@fgv/ts-sudoku-lib 2.1.1-alpha.0 → 2.1.1-alpha.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/CHANGELOG.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@fgv/ts-sudoku-lib",
3
+ "entries": [
4
+ {
5
+ "version": "2.2.0",
6
+ "tag": "@fgv/ts-sudoku-lib_v2.2.0",
7
+ "date": "Thu, 18 Jan 2024 05:45:04 GMT",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "comment": "bump versions"
12
+ },
13
+ {
14
+ "comment": "refactor"
15
+ },
16
+ {
17
+ "comment": "initial checkin"
18
+ },
19
+ {
20
+ "comment": "Match ts-utils refactor"
21
+ },
22
+ {
23
+ "comment": "update dependencies"
24
+ }
25
+ ]
26
+ }
27
+ }
28
+ ]
29
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Change Log - @fgv/ts-sudoku-lib
2
+
3
+ This log was last generated on Thu, 18 Jan 2024 05:45:04 GMT and should not be manually modified.
4
+
5
+ ## 2.2.0
6
+ Thu, 18 Jan 2024 05:45:04 GMT
7
+
8
+ ### Updates
9
+
10
+ - bump versions
11
+ - refactor
12
+ - initial checkin
13
+ - Match ts-utils refactor
14
+ - update dependencies
15
+
@@ -25,7 +25,7 @@
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.loadJsonPuzzlesFileSync = exports.puzzlesFile = void 0;
27
27
  const ts_utils_1 = require("@fgv/ts-utils");
28
- const ts_json_1 = require("@fgv/ts-json");
28
+ const ts_json_base_1 = require("@fgv/ts-json-base");
29
29
  const common_1 = require("../common");
30
30
  /**
31
31
  * Converts an arbitrary object to a {@link Data.Model.PuzzlesFile | PuzzlesFile}.
@@ -43,7 +43,7 @@ exports.puzzlesFile = ts_utils_1.Converters.strictObject({
43
43
  * @public
44
44
  */
45
45
  function loadJsonPuzzlesFileSync(path) {
46
- return ts_json_1.File.convertJsonFileSync(path, exports.puzzlesFile);
46
+ return ts_json_base_1.JsonFile.convertJsonFileSync(path, exports.puzzlesFile);
47
47
  }
48
48
  exports.loadJsonPuzzlesFileSync = loadJsonPuzzlesFileSync;
49
49
  //# sourceMappingURL=converters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/packlets/file/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAEH,4CAA8D;AAG9D,0CAAoC;AACpC,sCAA2D;AAE3D;;;GAGG;AACU,QAAA,WAAW,GAA4B,qBAAU,CAAC,YAAY,CAAe;IACxF,OAAO,EAAE,qBAAU,CAAC,OAAO,CAAC,mBAAgB,CAAC,iBAAiB,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CAAC,IAAY;IAClD,OAAO,cAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,mBAAW,CAAC,CAAC;AACrD,CAAC;AAFD,0DAEC","sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2023 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Converter, Converters, Result } from '@fgv/ts-utils';\nimport { IPuzzlesFile } from './model';\n\nimport { File } from '@fgv/ts-json';\nimport { Converters as CommonConverters } from '../common';\n\n/**\n * Converts an arbitrary object to a {@link Data.Model.PuzzlesFile | PuzzlesFile}.\n * @public\n */\nexport const puzzlesFile: Converter<IPuzzlesFile> = Converters.strictObject<IPuzzlesFile>({\n puzzles: Converters.arrayOf(CommonConverters.puzzleDescription)\n});\n\n/**\n * Loads an arbitrary JSON file and parses it to return a validated\n * {@link Data.Model.PuzzlesFile | PuzzlesFile}.\n * @param path - String path to the file\n * @returns `Success` with the resulting file, or `Failure` with details if an\n * error occurs.\n * @public\n */\nexport function loadJsonPuzzlesFileSync(path: string): Result<IPuzzlesFile> {\n return File.convertJsonFileSync(path, puzzlesFile);\n}\n"]}
1
+ {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/packlets/file/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAEH,4CAA8D;AAG9D,oDAA6C;AAC7C,sCAA2D;AAE3D;;;GAGG;AACU,QAAA,WAAW,GAA4B,qBAAU,CAAC,YAAY,CAAe;IACxF,OAAO,EAAE,qBAAU,CAAC,OAAO,CAAC,mBAAgB,CAAC,iBAAiB,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CAAC,IAAY;IAClD,OAAO,uBAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE,mBAAW,CAAC,CAAC;AACzD,CAAC;AAFD,0DAEC","sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2023 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Converter, Converters, Result } from '@fgv/ts-utils';\nimport { IPuzzlesFile } from './model';\n\nimport { JsonFile } from '@fgv/ts-json-base';\nimport { Converters as CommonConverters } from '../common';\n\n/**\n * Converts an arbitrary object to a {@link Data.Model.PuzzlesFile | PuzzlesFile}.\n * @public\n */\nexport const puzzlesFile: Converter<IPuzzlesFile> = Converters.strictObject<IPuzzlesFile>({\n puzzles: Converters.arrayOf(CommonConverters.puzzleDescription)\n});\n\n/**\n * Loads an arbitrary JSON file and parses it to return a validated\n * {@link Data.Model.PuzzlesFile | PuzzlesFile}.\n * @param path - String path to the file\n * @returns `Success` with the resulting file, or `Failure` with details if an\n * error occurs.\n * @public\n */\nexport function loadJsonPuzzlesFileSync(path: string): Result<IPuzzlesFile> {\n return JsonFile.convertJsonFileSync(path, puzzlesFile);\n}\n"]}
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@fgv/ts-sudoku-lib",
3
- "version": "2.1.1-alpha.0",
3
+ "version": "2.1.1-alpha.2",
4
4
  "description": "Sudoku rules library",
5
5
  "main": "lib/index.js",
6
6
  "types": "dist/ts-json.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/ErikFortune/fgv.git"
10
- },
11
7
  "keywords": [
12
8
  "typescript",
13
9
  "node"
@@ -18,10 +14,10 @@
18
14
  "url": "https://github.com/ErikFortune/fgv/issues"
19
15
  },
20
16
  "homepage": "https://github.com/ErikFortune/fgv/libraries/ts-sudoku-lib#readme",
17
+ "sideEffects": false,
21
18
  "devDependencies": {
22
- "@fgv/ts-json": "2.1.1-alpha.0",
23
- "@fgv/ts-utils": "2.1.1-alpha.0",
24
- "@fgv/ts-utils-jest": "2.1.1-alpha.0",
19
+ "@fgv/ts-utils": "2.1.1-alpha.2",
20
+ "@fgv/ts-utils-jest": "2.1.1-alpha.2",
25
21
  "@microsoft/api-documenter": "^7.23.17",
26
22
  "@microsoft/api-extractor": "^7.39.1",
27
23
  "@types/jest": "^29.5.11",
@@ -49,11 +45,11 @@
49
45
  "@types/heft-jest": "1.0.6",
50
46
  "@rushstack/eslint-config": "~3.6.0",
51
47
  "@rushstack/heft-jest-plugin": "~0.11.0",
52
- "eslint-plugin-tsdoc": "~0.2.17"
48
+ "eslint-plugin-tsdoc": "~0.2.17",
49
+ "@fgv/ts-json-base": "2.1.1-alpha.2"
53
50
  },
54
51
  "peerDependencies": {
55
- "@fgv/ts-utils": "^2.1.1-alpha.0",
56
- "@fgv/ts-json": "^2.1.1-alpha.0"
52
+ "@fgv/ts-utils": "^2.1.1-alpha.2"
57
53
  },
58
54
  "scripts": {
59
55
  "build": "heft test --clean",