@unchainedshop/core-languages 4.8.10 → 4.8.12

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.
@@ -1,20 +1,18 @@
1
- import { buildDbIndexes, isDocumentDBCompatModeEnabled, mongodb, } from '@unchainedshop/mongodb';
1
+ import { buildDbIndexes, mongodb } from '@unchainedshop/mongodb';
2
2
  export const LanguagesCollection = async (db) => {
3
3
  const Languages = db.collection('languages');
4
- if (!isDocumentDBCompatModeEnabled()) {
5
- await buildDbIndexes(Languages, [
6
- {
7
- index: { isoCode: 'text', _id: 'text' },
8
- options: {
9
- weights: {
10
- _id: 8,
11
- isoCode: 6,
12
- },
13
- name: 'languages_fulltext_search',
4
+ await buildDbIndexes(Languages, [
5
+ {
6
+ index: { isoCode: 'text', _id: 'text' },
7
+ options: {
8
+ weights: {
9
+ _id: 8,
10
+ isoCode: 6,
14
11
  },
12
+ name: 'languages_fulltext_search',
15
13
  },
16
- ]);
17
- }
14
+ },
15
+ ]);
18
16
  await buildDbIndexes(Languages, [
19
17
  { index: { isoCode: 1 }, options: { unique: true } },
20
18
  {
@@ -1,4 +1,4 @@
1
- import { assertDocumentDBCompatMode } from '@unchainedshop/mongodb';
1
+ import {} from '@unchainedshop/mongodb';
2
2
  import { emit, registerEvents } from '@unchainedshop/events';
3
3
  import { generateDbFilterById, buildSortOptions, mongodb, generateDbObjectId, } from '@unchainedshop/mongodb';
4
4
  import { SortDirection } from '@unchainedshop/utils';
@@ -13,7 +13,6 @@ export const buildFindSelector = ({ includeInactive = false, queryString, isoCod
13
13
  selector.isoCode = { $in: isoCodes };
14
14
  }
15
15
  if (queryString) {
16
- assertDocumentDBCompatMode();
17
16
  selector.$text = { $search: queryString };
18
17
  }
19
18
  return selector;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-languages",
3
3
  "description": "Language management module for the Unchained Engine",
4
- "version": "4.8.10",
4
+ "version": "4.8.12",
5
5
  "main": "lib/languages-index.js",
6
6
  "types": "lib/languages-index.d.ts",
7
7
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  },
36
36
  "homepage": "https://github.com/unchainedshop/unchained#readme",
37
37
  "dependencies": {
38
- "@unchainedshop/events": "^4.6.0",
39
- "@unchainedshop/utils": "^4.6.0"
38
+ "@unchainedshop/events": "^4.8.12",
39
+ "@unchainedshop/utils": "^4.8.12"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^25.0.0",