@ms-cloudpack/package-utilities 6.0.2 → 7.0.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/lib/addExportsMapEntry.js +1 -15
- package/lib/addExportsMapEntry.js.map +1 -1
- package/lib/getDisplayVersion.d.ts +9 -0
- package/lib/getDisplayVersion.d.ts.map +1 -0
- package/lib/getDisplayVersion.js +13 -0
- package/lib/getDisplayVersion.js.map +1 -0
- package/lib/getVersion.d.ts +2 -4
- package/lib/getVersion.d.ts.map +1 -1
- package/lib/getVersion.js +4 -17
- package/lib/getVersion.js.map +1 -1
- package/lib/getVersionInternal.d.ts +6 -0
- package/lib/getVersionInternal.d.ts.map +1 -0
- package/lib/getVersionInternal.js +17 -0
- package/lib/getVersionInternal.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { findFileInPackage } from './findFileInPackage.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export async function addExportsMapEntry(options, context) {
|
|
7
7
|
const { exports, packagePath, condition = 'default' } = options;
|
|
8
|
-
const importPath =
|
|
8
|
+
const importPath = normalizeRelativePath(options.importPath);
|
|
9
9
|
const { filePath, sourcePath, typesPath = options.typesPath ? normalizeRelativePath(options.typesPath) : undefined, } = await findFileInPackage({
|
|
10
10
|
packagePath,
|
|
11
11
|
filePath: options.filePath || options.importPath || '',
|
|
@@ -40,18 +40,4 @@ export async function addExportsMapEntry(options, context) {
|
|
|
40
40
|
}
|
|
41
41
|
return true;
|
|
42
42
|
}
|
|
43
|
-
function makeSafeImportKey(key) {
|
|
44
|
-
if (!key || key === '' || key === '.') {
|
|
45
|
-
return '.';
|
|
46
|
-
}
|
|
47
|
-
// if the key starts with a slash, add a dot
|
|
48
|
-
if (key.startsWith('/')) {
|
|
49
|
-
key = '.' + key;
|
|
50
|
-
}
|
|
51
|
-
// if the key doesn't start with "./", add it
|
|
52
|
-
if (!key.startsWith('./')) {
|
|
53
|
-
key = './' + key;
|
|
54
|
-
}
|
|
55
|
-
return key;
|
|
56
|
-
}
|
|
57
43
|
//# sourceMappingURL=addExportsMapEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addExportsMapEntry.js","sourceRoot":"","sources":["../src/addExportsMapEntry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAyC3D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC,EAClC,OAAuE;IAEvE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC;IAChE,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"addExportsMapEntry.js","sourceRoot":"","sources":["../src/addExportsMapEntry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAyC3D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC,EAClC,OAAuE;IAEvE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC;IAChE,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,EACJ,QAAQ,EACR,UAAU,EACV,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,GACrF,GAAG,MAAM,iBAAiB,CACzB;QACE,WAAW;QACX,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,UAAU,IAAI,EAAE;KACvD,EACD,OAAO,CACR,CAAC;IAEF,yCAAyC;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IAED,8BAA8B;IAC9B,MAAM,YAAY,GAAG,OAA0D,CAAC;IAEhF,0FAA0F;IAC1F,IACE,CAAC,SAAS;QACV,CAAC,UAAU;QACX,SAAS,KAAK,SAAS;QACvB,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,OAAO,YAAY,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAC,EAC3E,CAAC;QACD,YAAY,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,IAAI,YAAY,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;QAErD,qEAAqE;QACrE,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;YACrC,YAAY,GAAI,OAAkD,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;QAC7G,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACd,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;QACpC,CAAC;QAED,IAAI,UAAU,EAAE,CAAC;YACf,YAAY,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;QACtC,CAAC;QAED,mCAAmC;QACnC,YAAY,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\nimport type { CloudpackConfig, PackageJsonExports } from '@ms-cloudpack/config-types';\nimport { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport { findFileInPackage } from './findFileInPackage.js';\n\n/**\n * Options fo addExportsMapEntry.\n */\nexport interface AddExportsMapEntryOptions {\n /**\n * The exports map to add the entry to.\n */\n exports: PackageJsonExports;\n\n /**\n * The package path to add the entry for. This is used to resolve relative paths.\n */\n packagePath: string;\n\n /**\n * The import path to add the entry for. This is used as the key in the exports map. Defaults\n * to \".\" being the package import.\n */\n importPath?: string;\n\n /**\n * The relative path to the physical file location, representing the \"key\" in the exports map. Can be a partial\n * location, in which case we will attempt to search for the file and associated source/d.ts files. Defaults to\n * assuming `index.js`.\n */\n filePath?: string;\n\n /**\n * Optional types path. If not provided, types will be discovered for internal packages that have source files.\n * This is useful mainly when converting the default import from a package.json that has explicit typings listed.\n */\n typesPath?: string;\n\n /**\n * The condition to add the entry for. (Example: \"import\", \"require\", \"browser\", \"types\") Defaults to \"default\"\n */\n condition?: string;\n}\n\n/**\n * Given an exports map and details about an import path, adds the entry.\n */\nexport async function addExportsMapEntry(\n options: AddExportsMapEntryOptions,\n context: { packages: PackageDefinitionsCache; config: CloudpackConfig },\n): Promise<boolean> {\n const { exports, packagePath, condition = 'default' } = options;\n const importPath = normalizeRelativePath(options.importPath);\n const {\n filePath,\n sourcePath,\n typesPath = options.typesPath ? normalizeRelativePath(options.typesPath) : undefined,\n } = await findFileInPackage(\n {\n packagePath,\n filePath: options.filePath || options.importPath || '',\n },\n context,\n );\n\n // Only do work if a file path was found.\n if (!filePath) {\n return false;\n }\n\n // Create a local for casting.\n const localExports = exports as Record<string, string | Record<string, string>>;\n\n // If this is the only entry we're adding, set it to a string to minimize the exports map.\n if (\n !typesPath &&\n !sourcePath &&\n condition === 'default' &&\n (!localExports[importPath] || typeof localExports[importPath] === 'string')\n ) {\n localExports[importPath] = filePath;\n } else {\n let exportsEntry = (localExports[importPath] ??= {});\n\n // Promote string-based exports into objects with default conditions.\n if (typeof exportsEntry === 'string') {\n exportsEntry = (exports as Record<string, Record<string, string>>)[importPath] = { default: exportsEntry };\n }\n\n if (typesPath) {\n exportsEntry['types'] = typesPath;\n }\n\n if (sourcePath) {\n exportsEntry['source'] = sourcePath;\n }\n\n // Add the entry for the condition.\n exportsEntry[condition] = filePath;\n }\n\n return true;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the displayable version of the package which contains the import url provided. If the package
|
|
3
|
+
* is a local package rather than a node_modules external package, we display the version as "0.0.0-local"
|
|
4
|
+
* with the path following it.
|
|
5
|
+
* @param importUrl - import.meta.url
|
|
6
|
+
* @returns - the version of the package. If the package is not in node_modules, it returns "0.0.0-local".
|
|
7
|
+
*/
|
|
8
|
+
export declare function getDisplayVersion(importUrl: string): string;
|
|
9
|
+
//# sourceMappingURL=getDisplayVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDisplayVersion.d.ts","sourceRoot":"","sources":["../src/getDisplayVersion.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getVersionInternal } from './getVersionInternal.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the displayable version of the package which contains the import url provided. If the package
|
|
4
|
+
* is a local package rather than a node_modules external package, we display the version as "0.0.0-local"
|
|
5
|
+
* with the path following it.
|
|
6
|
+
* @param importUrl - import.meta.url
|
|
7
|
+
* @returns - the version of the package. If the package is not in node_modules, it returns "0.0.0-local".
|
|
8
|
+
*/
|
|
9
|
+
export function getDisplayVersion(importUrl) {
|
|
10
|
+
const { version, isExternal, packagePath } = getVersionInternal(importUrl);
|
|
11
|
+
return isExternal ? version : `${version} ${packagePath}`;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getDisplayVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDisplayVersion.js","sourceRoot":"","sources":["../src/getDisplayVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC3E,OAAO,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,WAAW,EAAE,CAAC;AAC5D,CAAC","sourcesContent":["import { getVersionInternal } from './getVersionInternal.js';\n\n/**\n * Returns the displayable version of the package which contains the import url provided. If the package\n * is a local package rather than a node_modules external package, we display the version as \"0.0.0-local\"\n * with the path following it.\n * @param importUrl - import.meta.url\n * @returns - the version of the package. If the package is not in node_modules, it returns \"0.0.0-local\".\n */\nexport function getDisplayVersion(importUrl: string): string {\n const { version, isExternal, packagePath } = getVersionInternal(importUrl);\n return isExternal ? version : `${version} ${packagePath}`;\n}\n"]}
|
package/lib/getVersion.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns the
|
|
3
|
-
* is a local package rather than a node_modules external package, we display the version as "0.0.0-local"
|
|
4
|
-
* with the path following it.
|
|
2
|
+
* Returns the version of the package which contains the import url provided.
|
|
5
3
|
* @param importUrl - import.meta.url
|
|
6
|
-
* @returns - the version of the package.
|
|
4
|
+
* @returns - the version of the package.
|
|
7
5
|
*/
|
|
8
6
|
export declare function getVersion(importUrl: string): string;
|
|
9
7
|
//# sourceMappingURL=getVersion.d.ts.map
|
package/lib/getVersion.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVersion.d.ts","sourceRoot":"","sources":["../src/getVersion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getVersion.d.ts","sourceRoot":"","sources":["../src/getVersion.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
package/lib/getVersion.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { findPackageRoot } from '@ms-cloudpack/path-utilities';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { isExternalPackage } from './isExternalPackage.js';
|
|
1
|
+
import { getVersionInternal } from './getVersionInternal.js';
|
|
6
2
|
/**
|
|
7
|
-
* Returns the
|
|
8
|
-
* is a local package rather than a node_modules external package, we display the version as "0.0.0-local"
|
|
9
|
-
* with the path following it.
|
|
3
|
+
* Returns the version of the package which contains the import url provided.
|
|
10
4
|
* @param importUrl - import.meta.url
|
|
11
|
-
* @returns - the version of the package.
|
|
5
|
+
* @returns - the version of the package.
|
|
12
6
|
*/
|
|
13
7
|
export function getVersion(importUrl) {
|
|
14
|
-
|
|
15
|
-
let version = `0.0.0-local ${packagePath}`;
|
|
16
|
-
if (packagePath && isExternalPackage(packagePath)) {
|
|
17
|
-
const packageJSONpath = path.join(packagePath, 'package.json');
|
|
18
|
-
// eslint-disable-next-line @ms-cloudpack/internal/no-sync-filesystem
|
|
19
|
-
version = readJsonSync(packageJSONpath).version || version;
|
|
20
|
-
}
|
|
21
|
-
return version;
|
|
8
|
+
return getVersionInternal(importUrl).version;
|
|
22
9
|
}
|
|
23
10
|
//# sourceMappingURL=getVersion.js.map
|
package/lib/getVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVersion.js","sourceRoot":"","sources":["../src/getVersion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getVersion.js","sourceRoot":"","sources":["../src/getVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;GAIG;AAEH,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;AAC/C,CAAC","sourcesContent":["import { getVersionInternal } from './getVersionInternal.js';\n\n/**\n * Returns the version of the package which contains the import url provided.\n * @param importUrl - import.meta.url\n * @returns - the version of the package.\n */\n\nexport function getVersion(importUrl: string): string {\n return getVersionInternal(importUrl).version;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVersionInternal.d.ts","sourceRoot":"","sources":["../src/getVersionInternal.ts"],"names":[],"mappings":"AAOA,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAapH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { readJsonSync } from '@ms-cloudpack/json-utilities';
|
|
2
|
+
import { findPackageRoot } from '@ms-cloudpack/path-utilities';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { isExternalPackage } from './isExternalPackage.js';
|
|
6
|
+
export function getVersionInternal(importUrl) {
|
|
7
|
+
const packagePath = findPackageRoot(path.dirname(fileURLToPath(importUrl)));
|
|
8
|
+
const result = { version: `0.0.0-local`, packagePath, isExternal: false };
|
|
9
|
+
if (packagePath && isExternalPackage(packagePath)) {
|
|
10
|
+
const packageJSONpath = path.join(packagePath, 'package.json');
|
|
11
|
+
// eslint-disable-next-line @ms-cloudpack/internal/no-sync-filesystem
|
|
12
|
+
result.version = readJsonSync(packageJSONpath).version || result.version;
|
|
13
|
+
result.isExternal = true;
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=getVersionInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVersionInternal.js","sourceRoot":"","sources":["../src/getVersionInternal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAClD,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IAE1E,IAAI,WAAW,IAAI,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAE/D,qEAAqE;QACrE,MAAM,CAAC,OAAO,GAAI,YAAY,CAAC,eAAe,CAAiB,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC;QAC1F,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/config-types';\nimport { readJsonSync } from '@ms-cloudpack/json-utilities';\nimport { findPackageRoot } from '@ms-cloudpack/path-utilities';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\nimport { isExternalPackage } from './isExternalPackage.js';\n\nexport function getVersionInternal(importUrl: string): { version: string; packagePath?: string; isExternal: boolean } {\n const packagePath = findPackageRoot(path.dirname(fileURLToPath(importUrl)));\n const result = { version: `0.0.0-local`, packagePath, isExternal: false };\n\n if (packagePath && isExternalPackage(packagePath)) {\n const packageJSONpath = path.join(packagePath, 'package.json');\n\n // eslint-disable-next-line @ms-cloudpack/internal/no-sync-filesystem\n result.version = (readJsonSync(packageJSONpath) as PackageJson).version || result.version;\n result.isExternal = true;\n }\n\n return result;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { resolve } from './resolve.js';
|
|
|
14
14
|
export { detectModuleType, type ModuleType } from './detectModuleType.js';
|
|
15
15
|
export { isExternalPackage } from './isExternalPackage.js';
|
|
16
16
|
export { findFileInPackage, type FindFileInPackageOptions, type FindFileInPackageResult } from './findFileInPackage.js';
|
|
17
|
+
export { getDisplayVersion } from './getDisplayVersion.js';
|
|
17
18
|
export { getVersion } from './getVersion.js';
|
|
18
19
|
export { getDependencies } from './getDependencies.js';
|
|
19
20
|
export { getUnusedDependencies } from './getUnusedDependencies.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export { resolve } from './resolve.js';
|
|
|
15
15
|
export { detectModuleType } from './detectModuleType.js';
|
|
16
16
|
export { isExternalPackage } from './isExternalPackage.js';
|
|
17
17
|
export { findFileInPackage } from './findFileInPackage.js';
|
|
18
|
+
export { getDisplayVersion } from './getDisplayVersion.js';
|
|
18
19
|
export { getVersion } from './getVersion.js';
|
|
19
20
|
export { getDependencies } from './getDependencies.js';
|
|
20
21
|
export { getUnusedDependencies } from './getUnusedDependencies.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,sBAAsB;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAkC,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,0BAA0B;AAC1B,OAAO,EAAE,gBAAgB,EAAmB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAA+D,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["// Package definition parsing\nexport { PackageDefinitions } from './PackageDefinitions.js';\n\n// ResolveMap creation\nexport { createResolveMap } from './createResolveMap/createResolveMap.js';\nexport type { ResolveMap } from './types/ResolveMap.js';\nexport type { ResolveMapEntry } from './types/ResolveMapEntry.js';\nexport { findResolveMapEntry } from './findResolveMapEntry.js';\nexport type { DiffResolveMapsChanges, DiffResolveMapsStats } from './createResolveMap/diffResolveMaps.js';\nexport { diffResolveMaps } from './createResolveMap/diffResolveMaps.js';\nexport type { LinkedPath } from './types/LinkedPath.js';\n\n// ExportsMap parsing and creation\nexport { flattenExportsMap } from './flattenExportsMap.js';\nexport { createExportsMap } from './createExportsMap.js';\nexport { addExportsMapEntry, type AddExportsMapEntryOptions } from './addExportsMapEntry.js';\nexport { getExportsMap } from './getExportsMap.js';\n\n// Import resolution utilities\nexport { resolve } from './resolve.js';\n\n// Other package utilities\nexport { detectModuleType, type ModuleType } from './detectModuleType.js';\nexport { isExternalPackage } from './isExternalPackage.js';\nexport { findFileInPackage, type FindFileInPackageOptions, type FindFileInPackageResult } from './findFileInPackage.js';\nexport { getVersion } from './getVersion.js';\nexport { getDependencies } from './getDependencies.js';\nexport { getUnusedDependencies } from './getUnusedDependencies.js';\nexport { findProjectRoot } from './findProjectRoot.js';\nexport { shouldExternalizePackage } from './shouldExternalizePackage.js';\nexport { ensurePackageJsonDependencies } from './ensurePackageJsonDependencies.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,sBAAsB;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAkC,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,0BAA0B;AAC1B,OAAO,EAAE,gBAAgB,EAAmB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAA+D,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["// Package definition parsing\nexport { PackageDefinitions } from './PackageDefinitions.js';\n\n// ResolveMap creation\nexport { createResolveMap } from './createResolveMap/createResolveMap.js';\nexport type { ResolveMap } from './types/ResolveMap.js';\nexport type { ResolveMapEntry } from './types/ResolveMapEntry.js';\nexport { findResolveMapEntry } from './findResolveMapEntry.js';\nexport type { DiffResolveMapsChanges, DiffResolveMapsStats } from './createResolveMap/diffResolveMaps.js';\nexport { diffResolveMaps } from './createResolveMap/diffResolveMaps.js';\nexport type { LinkedPath } from './types/LinkedPath.js';\n\n// ExportsMap parsing and creation\nexport { flattenExportsMap } from './flattenExportsMap.js';\nexport { createExportsMap } from './createExportsMap.js';\nexport { addExportsMapEntry, type AddExportsMapEntryOptions } from './addExportsMapEntry.js';\nexport { getExportsMap } from './getExportsMap.js';\n\n// Import resolution utilities\nexport { resolve } from './resolve.js';\n\n// Other package utilities\nexport { detectModuleType, type ModuleType } from './detectModuleType.js';\nexport { isExternalPackage } from './isExternalPackage.js';\nexport { findFileInPackage, type FindFileInPackageOptions, type FindFileInPackageResult } from './findFileInPackage.js';\nexport { getDisplayVersion } from './getDisplayVersion.js';\nexport { getVersion } from './getVersion.js';\nexport { getDependencies } from './getDependencies.js';\nexport { getUnusedDependencies } from './getUnusedDependencies.js';\nexport { findProjectRoot } from './findProjectRoot.js';\nexport { shouldExternalizePackage } from './shouldExternalizePackage.js';\nexport { ensurePackageJsonDependencies } from './ensurePackageJsonDependencies.js';\n"]}
|