@twreporter/core 1.8.2-rc.2 → 1.8.2-rc.3

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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.8.2-rc.3](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/core@1.8.2-rc.2...@twreporter/core@1.8.2-rc.3) (2023-02-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * rename object ([c13468f](https://github.com/twreporter/twreporter-npm-packages/commit/c13468fe9a0ddea0e699a0cabc4c39993c6d221e))
12
+ * replace Object.fromentries() to avoid version compatiblity issue ([7623323](https://github.com/twreporter/twreporter-npm-packages/commit/762332376e6c9a941f55ebf63ec8e6da586ab6ef))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [1.8.2-rc.2](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/core@1.8.2-rc.1...@twreporter/core@1.8.2-rc.2) (2023-02-16)
7
19
 
8
20
 
@@ -44,16 +44,17 @@ exports.CATEGORY_LABEL = CATEGORY_LABEL;
44
44
  var CATEGORY_ID = (_CATEGORY_ID = {}, _defineProperty(_CATEGORY_ID, categoryPath.world, '63206383207bf7c5f871622c'), _defineProperty(_CATEGORY_ID, categoryPath.humanrights, '63206383207bf7c5f8716234'), _defineProperty(_CATEGORY_ID, categoryPath.politicsAndSociety, '63206383207bf7c5f871623d'), _defineProperty(_CATEGORY_ID, categoryPath.health, '63206383207bf7c5f8716245'), _defineProperty(_CATEGORY_ID, categoryPath.environment, '63206383207bf7c5f871624d'), _defineProperty(_CATEGORY_ID, categoryPath.econ, '63206383207bf7c5f8716254'), _defineProperty(_CATEGORY_ID, categoryPath.culture, '63206383207bf7c5f8716259'), _defineProperty(_CATEGORY_ID, categoryPath.education, '63206383207bf7c5f8716260'), _defineProperty(_CATEGORY_ID, categoryPath.podcast, '63206383207bf7c5f8716266'), _defineProperty(_CATEGORY_ID, categoryPath.opinion, '63206383207bf7c5f8716269'), _defineProperty(_CATEGORY_ID, categoryPath.photography, '574d028748fa171000c45d48'), _CATEGORY_ID); // flip CATEGORY_ID to a {id: path} object
45
45
 
46
46
  exports.CATEGORY_ID = CATEGORY_ID;
47
- var flippedCategoryID = Object.fromEntries(Object.entries(CATEGORY_ID).map(function (_ref) {
47
+ var categoryIDToPath = {};
48
+ Object.entries(CATEGORY_ID).forEach(function (_ref) {
48
49
  var _ref2 = _slicedToArray(_ref, 2),
49
50
  key = _ref2[0],
50
51
  value = _ref2[1];
51
52
 
52
- return [value, key];
53
- }));
53
+ categoryIDToPath[value] = key;
54
+ });
54
55
 
55
56
  var GET_CATEGORY_PATH_FROM_ID = function GET_CATEGORY_PATH_FROM_ID(id) {
56
- return flippedCategoryID[id];
57
+ return categoryIDToPath[id];
57
58
  };
58
59
 
59
60
  exports.GET_CATEGORY_PATH_FROM_ID = GET_CATEGORY_PATH_FROM_ID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/core",
3
- "version": "1.8.2-rc.2",
3
+ "version": "1.8.2-rc.3",
4
4
  "main": "lib/index.js",
5
5
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
6
6
  "author": "twreporter <developer@twreporter.org>",
@@ -19,5 +19,5 @@
19
19
  "files": [
20
20
  "lib"
21
21
  ],
22
- "gitHead": "fb0222caf63c434282f2e9f76c6d9ebb5c5304da"
22
+ "gitHead": "83330b20f186656318e07a6eef253b1e1a0e17b8"
23
23
  }