@vnejs/compatibility.scenario.choose-with-scenario.qte 0.1.2 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/compatibility.scenario.choose-with-scenario.qte",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,18 +30,18 @@
30
30
  "author": "",
31
31
  "license": "ISC",
32
32
  "peerDependencies": {
33
- "@vnejs/module.core": "~0.1.0",
34
- "@vnejs/contracts.scenario.choose": "~0.1.0",
35
- "@vnejs/contracts.scenario.qte": "~0.1.0",
36
- "@vnejs/shared": "~0.1.0"
33
+ "@vnejs/module.core": "~0.2.0",
34
+ "@vnejs/contracts.scenario.choose": "~0.2.0",
35
+ "@vnejs/contracts.scenario.qte": "~0.2.0",
36
+ "@vnejs/shared": "~0.2.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@vnejs/configs.ts-common": "~0.1.0",
40
- "@vnejs/configs.vitest": "~0.1.0",
41
- "@vnejs/test-utils": "~0.1.0",
42
- "@vnejs/contracts.scenario.choose": "~0.1.0",
43
- "@vnejs/contracts.scenario.qte": "~0.1.0",
44
- "@vnejs/module.core": "~0.1.0",
45
- "@vnejs/shared": "~0.1.0"
39
+ "@vnejs/configs.ts-common": "~0.2.0",
40
+ "@vnejs/configs.vitest": "~0.2.0",
41
+ "@vnejs/test-utils": "~0.2.0",
42
+ "@vnejs/contracts.scenario.choose": "~0.2.0",
43
+ "@vnejs/contracts.scenario.qte": "~0.2.0",
44
+ "@vnejs/module.core": "~0.2.0",
45
+ "@vnejs/shared": "~0.2.0"
46
46
  }
47
47
  }
package/src/index.ts CHANGED
@@ -2,12 +2,7 @@ import "@vnejs/contracts.scenario.choose";
2
2
 
3
3
  import { ModuleCore } from "@vnejs/module.core";
4
4
  import { regModule } from "@vnejs/shared";
5
- import type {
6
- ChooseOption,
7
- ChooseOptionReplaceHandler,
8
- ChooseOptionReplacePayload,
9
- ChooseOptionReplaceRegPayload,
10
- } from "@vnejs/contracts.scenario.choose";
5
+ import type { ChooseOption, ChooseOptionReplaceHandler, ChooseOptionReplacePayload, ChooseOptionReplaceRegPayload } from "@vnejs/contracts.scenario.choose";
11
6
  import type { QteEmitPayload, QteResultPayload } from "@vnejs/contracts.scenario.qte";
12
7
 
13
8
  import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "./types.js";
@@ -64,9 +59,7 @@ export class CompatibilityChooseQte extends ModuleCore<PluginEvents, PluginConst
64
59
  };
65
60
 
66
61
  resolveFailIndex = (index: number, options: ChooseOption[]) => {
67
- const fallbackIndex = options.findIndex((option) =>
68
- option.keywords?.includes(this.CONST.QTE.LINE_KEYWORDS.QTE_FALLBACK),
69
- );
62
+ const fallbackIndex = options.findIndex((option) => option.keywords?.includes(this.CONST.QTE.LINE_KEYWORDS.QTE_FALLBACK));
70
63
 
71
64
  if (fallbackIndex < 0) {
72
65
  this.emitLog({ action: "missing_fallback", index });
@@ -4,14 +4,7 @@ import { spyEvent } from "@vnejs/test-utils";
4
4
  import type { ChooseOption, ChooseOptionReplaceHandler } from "@vnejs/contracts.scenario.choose";
5
5
 
6
6
  import { CompatibilityChooseQte } from "../index.js";
7
- import {
8
- CHOOSE_EVENTS,
9
- createCompatibilityTestModule,
10
- QTE_EVENTS,
11
- QTE_LINE_KEYWORDS,
12
- QTE_PARAMS,
13
- registerCompatibilityVne,
14
- } from "./setup.js";
7
+ import { CHOOSE_EVENTS, createCompatibilityTestModule, QTE_EVENTS, QTE_LINE_KEYWORDS, QTE_PARAMS, registerCompatibilityVne } from "./setup.js";
15
8
 
16
9
  const OPTIONS: ChooseOption[] = [
17
10
  { index: 10, text: "With QTE", qte: "easy" },
package/src/types.ts CHANGED
@@ -7,9 +7,7 @@ import type {
7
7
  SubscribeEvents as QteSubscribeEvents,
8
8
  } from "@vnejs/contracts.scenario.qte";
9
9
 
10
- export type PluginEvents = ModuleCoreEvents &
11
- Record<ChoosePluginName, ChooseSubscribeEvents> &
12
- Record<QtePluginName, QteSubscribeEvents>;
10
+ export type PluginEvents = ModuleCoreEvents & Record<ChoosePluginName, ChooseSubscribeEvents> & Record<QtePluginName, QteSubscribeEvents>;
13
11
 
14
12
  export type PluginConstants = ModuleCoreConstants & Record<QtePluginName, QteConstants>;
15
13
 
package/tsconfig.json CHANGED
@@ -4,12 +4,6 @@
4
4
  "rootDir": "src",
5
5
  "outDir": "dist"
6
6
  },
7
- "include": [
8
- "src/**/*.ts"
9
- ],
10
- "exclude": [
11
- "dist",
12
- "node_modules",
13
- "src/tests"
14
- ]
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules", "src/tests"]
15
9
  }