@testspectra/cli 1.0.50 → 1.0.52

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/dist/plugin.js CHANGED
@@ -40,7 +40,8 @@ function init(modules) {
40
40
  const tsModule = modules.typescript;
41
41
  function create(info) {
42
42
  const project = info.project;
43
- const projectDir = project.getCurrentDirectory();
43
+ const configPath = typeof project.getConfigFilePath === "function" ? project.getConfigFilePath() : "";
44
+ const projectDir = configPath ? path.dirname(configPath) : project.getCurrentDirectory();
44
45
  const workspaceRoot = findWorkspaceRoot(projectDir);
45
46
  const log = (msg) => {
46
47
  try {
@@ -53,6 +54,9 @@ function init(modules) {
53
54
  // 1. Initial Generation on project load
54
55
  try {
55
56
  TypeGenerator.writeDeclarationFiles(workspaceRoot);
57
+ if (typeof project.markAsDirty === "function") {
58
+ project.markAsDirty();
59
+ }
56
60
  log(`Generated ambient declarations on startup`);
57
61
  }
58
62
  catch (err) {
@@ -64,6 +68,9 @@ function init(modules) {
64
68
  const doRegen = () => {
65
69
  try {
66
70
  TypeGenerator.writeDeclarationFiles(workspaceRoot);
71
+ if (typeof project.markAsDirty === "function") {
72
+ project.markAsDirty();
73
+ }
67
74
  log(`Regenerated ambient declarations (${reason})`);
68
75
  }
69
76
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testspectra/cli",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "description": "TestSpectra Zero-Config Cross-Platform Test Runner CLI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@clack/prompts": "^1.7.0",
24
- "@testspectra/matchers": "^1.0.50",
24
+ "@testspectra/matchers": "^1.0.52",
25
25
  "chalk": "^5.3.0",
26
26
  "commander": "^12.1.0",
27
27
  "dotenv": "^16.4.5",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "devDependencies": {
11
11
  "@testspectra/cli": "workspace:*",
12
- "@testspectra/matchers": "^1.0.50",
12
+ "@testspectra/matchers": "^1.0.52",
13
13
  "@types/node": "^20.14.0",
14
14
  "@wdio/globals": "^9.2.8",
15
15
  "@wdio/mocha-framework": "^9.2.8",
@@ -5,7 +5,10 @@
5
5
  "moduleResolution": "NodeNext",
6
6
  "skipLibCheck": true,
7
7
  "strict": true,
8
- "noEmit": true
8
+ "noEmit": true,
9
+ "plugins": [
10
+ { "name": "@testspectra/cli" }
11
+ ]
9
12
  },
10
13
  "files": [],
11
14
  "references": [
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@testspectra/cli": "workspace:*",
14
- "@testspectra/matchers": "^1.0.50",
14
+ "@testspectra/matchers": "^1.0.52",
15
15
  "@types/node": "^20.14.0",
16
16
  "@wdio/globals": "^9.2.8",
17
17
  "@wdio/mocha-framework": "^9.2.8",
@@ -5,7 +5,10 @@
5
5
  "moduleResolution": "NodeNext",
6
6
  "skipLibCheck": true,
7
7
  "strict": true,
8
- "noEmit": true
8
+ "noEmit": true,
9
+ "plugins": [
10
+ { "name": "@testspectra/cli" }
11
+ ]
9
12
  },
10
13
  "files": [],
11
14
  "references": [