@unchainedshop/core-languages 3.0.0-alpha3 → 3.0.0-alpha5

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,4 +1,4 @@
1
- import { ModuleInput } from '@unchainedshop/core';
1
+ import { ModuleInput } from '@unchainedshop/mongodb';
2
2
  import { TimestampFields, mongodb } from '@unchainedshop/mongodb';
3
3
  import { SortOption } from '@unchainedshop/utils';
4
4
  export type Language = {
@@ -1 +1 @@
1
- {"version":3,"file":"configureLanguagesModule.d.ts","sourceRoot":"","sources":["../../src/module/configureLanguagesModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAGL,eAAe,EACf,OAAO,EAER,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAiB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIjE,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,eAAe,CAAC;AAEpB,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,iBAAiB,qCAA8C,aAAa;eAC1D,IAAI;cAAY,IAAI;YAAU,GAAG;CAM/D,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAAkB,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;6CASlF;QACD,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,KAAG,OAAO,CAAC,QAAQ,CAAC;uDAUhB,aAAa,GAAG;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,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AG;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;KAC1B,YACS,OAAO,CAAC,WAAW,KAC5B,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;mBAUN,aAAa,KAAG,OAAO,CAAC,MAAM,CAAC;qCAKb;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO,CAAC,OAAO,CAAC;qBAU/D,QAAQ,GAAG,OAAO;kBAIf,QAAQ;;;EAsC/B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-languages",
3
- "version": "3.0.0-alpha3",
3
+ "version": "3.0.0-alpha5",
4
4
  "main": "lib/languages-index.js",
5
5
  "exports": {
6
6
  ".": "./lib/languages-index.js",
@@ -31,13 +31,13 @@
31
31
  },
32
32
  "homepage": "https://github.com/unchainedshop/unchained#readme",
33
33
  "dependencies": {
34
- "@unchainedshop/events": "^3.0.0-alpha3",
35
- "@unchainedshop/utils": "^3.0.0-alpha3"
34
+ "@unchainedshop/events": "^3.0.0-alpha4",
35
+ "@unchainedshop/utils": "^3.0.0-alpha4"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^22.5.5",
38
+ "@types/node": "^22.8.1",
39
39
  "jest": "^29.7.0",
40
40
  "ts-jest": "^29.2.5",
41
- "typescript": "^5.6.2"
41
+ "typescript": "^5.6.3"
42
42
  }
43
43
  }
@@ -1,4 +1,4 @@
1
- import { ModuleInput } from '@unchainedshop/core';
1
+ import { ModuleInput } from '@unchainedshop/mongodb';
2
2
  import { emit, registerEvents } from '@unchainedshop/events';
3
3
  import {
4
4
  generateDbFilterById,
@@ -1,20 +1,26 @@
1
- import { buildFindSelector } from "./configureLanguagesModule.js";
1
+ import { buildFindSelector } from './configureLanguagesModule.js';
2
2
 
3
- describe('buildFindSelector', () => {
4
- it('Return correct filter object when passed no argument', async () => {
5
- expect(buildFindSelector({})).toEqual({ deleted: null, isActive: true })
6
- });
3
+ describe('buildFindSelector', () => {
4
+ it('Return correct filter object when passed no argument', () => {
5
+ expect(buildFindSelector({})).toEqual({ deleted: null, isActive: true });
6
+ });
7
7
 
8
- it('Return correct filter object includeInactive is set to true', async () => {
9
- expect(buildFindSelector({includeInactive: true})).toEqual({ deleted: null })
10
- });
8
+ it('Return correct filter object includeInactive is set to true', () => {
9
+ expect(buildFindSelector({ includeInactive: true })).toEqual({ deleted: null });
10
+ });
11
11
 
12
- it('Return correct filter object when passed includeInactive, queryString', async () => {
13
- expect(buildFindSelector({ includeInactive: true,queryString: "hello world"})).toEqual({ deleted: null, '$text': { '$search': 'hello world' } })
12
+ it('Return correct filter object when passed includeInactive, queryString', () => {
13
+ expect(buildFindSelector({ includeInactive: true, queryString: 'hello world' })).toEqual({
14
+ deleted: null,
15
+ $text: { $search: 'hello world' },
14
16
  });
17
+ });
15
18
 
16
- it('Return correct filter object when passed queryString', async () => {
17
- expect(buildFindSelector({ queryString: "hello world"})).toEqual({ deleted: null, isActive: true, '$text': { '$search': 'hello world' } })
19
+ it('Return correct filter object when passed queryString', () => {
20
+ expect(buildFindSelector({ queryString: 'hello world' })).toEqual({
21
+ deleted: null,
22
+ isActive: true,
23
+ $text: { $search: 'hello world' },
18
24
  });
19
-
20
- })
25
+ });
26
+ });
@@ -1,23 +1,28 @@
1
- import { buildFindSelector } from "../src/module/configureLanguagesModule.js";
1
+ import { buildFindSelector } from '../src/module/configureLanguagesModule.js';
2
2
 
3
3
  describe('Languages', () => {
4
4
  describe('buildFindSelector', () => {
5
- it('Return correct filter object when passed no argument', async () => {
6
- expect(buildFindSelector({})).toEqual({ deleted: null, isActive: true })
5
+ it('Return correct filter object when passed no argument', () => {
6
+ expect(buildFindSelector({})).toEqual({ deleted: null, isActive: true });
7
7
  });
8
8
 
9
- it('Return correct filter object includeInactive is set to true', async () => {
10
- expect(buildFindSelector({includeInactive: true})).toEqual({ deleted: null })
9
+ it('Return correct filter object includeInactive is set to true', () => {
10
+ expect(buildFindSelector({ includeInactive: true })).toEqual({ deleted: null });
11
11
  });
12
12
 
13
- it('Return correct filter object when passed includeInactive, queryString', async () => {
14
- expect(buildFindSelector({ includeInactive: true,queryString: "hello world"})).toEqual({ deleted: null, '$text': { '$search': 'hello world' } })
13
+ it('Return correct filter object when passed includeInactive, queryString', () => {
14
+ expect(buildFindSelector({ includeInactive: true, queryString: 'hello world' })).toEqual({
15
+ deleted: null,
16
+ $text: { $search: 'hello world' },
17
+ });
15
18
  });
16
19
 
17
- it('Return correct filter object when passed queryString', async () => {
18
- expect(buildFindSelector({ queryString: "hello world"})).toEqual({ deleted: null, isActive: true, '$text': { '$search': 'hello world' } })
20
+ it('Return correct filter object when passed queryString', () => {
21
+ expect(buildFindSelector({ queryString: 'hello world' })).toEqual({
22
+ deleted: null,
23
+ isActive: true,
24
+ $text: { $search: 'hello world' },
25
+ });
19
26
  });
20
-
21
- })
22
-
27
+ });
23
28
  });