@nx/dotnet 22.6.0-beta.0 → 22.6.0-beta.10
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer-client.d.ts","sourceRoot":"","sources":["../../src/analyzer/analyzer-client.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"analyzer-client.d.ts","sourceRoot":"","sources":["../../src/analyzer/analyzer-client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMzE,MAAM,WAAW,qBAAqB;IAEpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAElD,gBAAgB,EAAE,MAAM,CACtB,MAAM,EACN;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAC7C,CAAC;CACH;AACD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;CACd;AACD,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AA2BzE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAgJD;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,cAAc,CAAC,CAyDzB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,cAAc,CASzD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,GACrB,MAAM,IAAI,mBAAmB,CAE/B;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,GACrB,MAAM,IAAI,qBAAqB,CAEjC"}
|
|
@@ -12,6 +12,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
12
12
|
const workspace_context_1 = require("nx/src/utils/workspace-context");
|
|
13
13
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
14
14
|
const file_hasher_1 = require("nx/src/hasher/file-hasher");
|
|
15
|
+
const plugin_cache_utils_1 = require("nx/src/utils/plugin-cache-utils");
|
|
15
16
|
const analyzerCaches = new Map();
|
|
16
17
|
function getCachePathForOptionsHash(optionsHash) {
|
|
17
18
|
return (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `dotnet-${optionsHash}.hash`);
|
|
@@ -21,26 +22,12 @@ function readAnalyzerCache(optionsHash) {
|
|
|
21
22
|
return analyzerCaches.get(optionsHash);
|
|
22
23
|
}
|
|
23
24
|
const cacheFilePath = getCachePathForOptionsHash(optionsHash);
|
|
24
|
-
|
|
25
|
-
return JSON.parse((0, node_fs_1.readFileSync)(cacheFilePath, 'utf-8'));
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
25
|
+
return new plugin_cache_utils_1.PluginCache(cacheFilePath);
|
|
30
26
|
}
|
|
31
27
|
function writeAnalyzerCache(optionsHash, cache) {
|
|
32
28
|
analyzerCaches.set(optionsHash, cache);
|
|
33
29
|
const cacheFilePath = getCachePathForOptionsHash(optionsHash);
|
|
34
|
-
|
|
35
|
-
if (!(0, node_fs_1.existsSync)(cacheDir)) {
|
|
36
|
-
(0, node_fs_1.mkdirSync)(cacheDir, { recursive: true });
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
(0, devkit_1.writeJsonFile)(cacheFilePath, cache);
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
devkit_1.logger.warn(`Failed to write .NET analyzer cache to ${cacheFilePath}: ${error.message}`);
|
|
43
|
-
}
|
|
30
|
+
cache.writeToDisk(cacheFilePath);
|
|
44
31
|
}
|
|
45
32
|
let cache = null;
|
|
46
33
|
/**
|
|
@@ -160,7 +147,7 @@ async function analyzeProjects(projectFiles, options) {
|
|
|
160
147
|
}
|
|
161
148
|
const optionsHash = (0, file_hasher_1.hashObject)(options);
|
|
162
149
|
const analyzerCache = readAnalyzerCache(optionsHash);
|
|
163
|
-
const cachedResult = analyzerCache
|
|
150
|
+
const cachedResult = analyzerCache.get(filesHash);
|
|
164
151
|
if (cachedResult) {
|
|
165
152
|
// Update cache
|
|
166
153
|
cache = {
|
|
@@ -178,10 +165,8 @@ async function analyzeProjects(projectFiles, options) {
|
|
|
178
165
|
result,
|
|
179
166
|
};
|
|
180
167
|
// Update persistent cache
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
[filesHash]: result,
|
|
184
|
-
});
|
|
168
|
+
analyzerCache.set(filesHash, result);
|
|
169
|
+
writeAnalyzerCache(optionsHash, analyzerCache);
|
|
185
170
|
return result;
|
|
186
171
|
}
|
|
187
172
|
catch (error) {
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/dotnet",
|
|
3
|
-
"version": "22.6.0-beta.
|
|
3
|
+
"version": "22.6.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for .NET containing graph support for working with .NET projects in an Nx workspace.",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"!dist/tsconfig.lib.tsbuildinfo"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@nx/devkit": "22.6.0-beta.
|
|
53
|
+
"@nx/devkit": "22.6.0-beta.10",
|
|
54
54
|
"tslib": "^2.3.0",
|
|
55
55
|
"ignore": "^7.0.5"
|
|
56
56
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@types/node": "^20.19.10",
|
|
60
60
|
"jest": "^30.0.2",
|
|
61
61
|
"memfs": "^4.9.2",
|
|
62
|
-
"nx": "22.6.0-beta.
|
|
62
|
+
"nx": "22.6.0-beta.10",
|
|
63
63
|
"ts-jest": "^29.4.0",
|
|
64
64
|
"typescript": "~5.9.2"
|
|
65
65
|
},
|