@sdk-usage/core 0.0.0-next-2e1fe4c → 0.0.0-next-eab563c
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/index.cjs +11 -9
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +11 -9
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -244,15 +244,17 @@ const createContext = (path, options)=>{
|
|
|
244
244
|
if (options.includeModules && options.includeModules.length > 0 && !options.includeModules.includes(item.module)) {
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
|
-
let version;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
let version = dependencies[item.module] ?? "";
|
|
248
|
+
if (options.resolveInstalledVersions) {
|
|
249
|
+
try {
|
|
250
|
+
version = require$1(resolvePackageJson(require$1.resolve(item.module, {
|
|
251
|
+
paths: [
|
|
252
|
+
file
|
|
253
|
+
]
|
|
254
|
+
}))).version;
|
|
255
|
+
} catch {
|
|
256
|
+
// @TODO: No operation (later warnings can be added).
|
|
257
|
+
}
|
|
256
258
|
}
|
|
257
259
|
items.push(createItem({
|
|
258
260
|
...item,
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,11 @@ type Options = Partial<Pick<ScanOptions, "excludeFolders" | "includeFiles"> & {
|
|
|
91
91
|
* Only analyze components imported from the specificied module list.
|
|
92
92
|
*/
|
|
93
93
|
includeModules: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Attempt to resolve installed versions of modules. If false or not possible, the specified version from the package.json will be used.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
resolveInstalledVersions: boolean;
|
|
94
99
|
}> & Pick<ParseOptions, "plugins">;
|
|
95
100
|
declare const createContext: (path: string, options: Options) => {
|
|
96
101
|
getItems(): Promise<Item[]>;
|
package/dist/index.mjs
CHANGED
|
@@ -241,15 +241,17 @@ const createContext = (path, options)=>{
|
|
|
241
241
|
if (options.includeModules && options.includeModules.length > 0 && !options.includeModules.includes(item.module)) {
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
let version;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
let version = dependencies[item.module] ?? "";
|
|
245
|
+
if (options.resolveInstalledVersions) {
|
|
246
|
+
try {
|
|
247
|
+
version = require(resolvePackageJson(require.resolve(item.module, {
|
|
248
|
+
paths: [
|
|
249
|
+
file
|
|
250
|
+
]
|
|
251
|
+
}))).version;
|
|
252
|
+
} catch {
|
|
253
|
+
// @TODO: No operation (later warnings can be added).
|
|
254
|
+
}
|
|
253
255
|
}
|
|
254
256
|
items.push(createItem({
|
|
255
257
|
...item,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdk-usage/core",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-eab563c",
|
|
4
4
|
"description": "sdk-usage core functionalities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analyze",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@open-vanilla/visitor": "^1.0.0",
|
|
44
|
-
"@swc/core": "^1.
|
|
44
|
+
"@swc/core": "^1.10.7",
|
|
45
45
|
"fdir": "^6.4.2",
|
|
46
46
|
"picomatch": "^4.0.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/node": "22.
|
|
49
|
+
"@types/node": "22.10.6",
|
|
50
50
|
"quickbundle": "2.8.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|