@ms-cloudpack/package-utilities 2.3.13 → 2.4.0
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/getVersion.d.ts +6 -0
- package/lib/getVersion.js +21 -0
- package/lib/getVersion.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/lib/.npmignore +0 -3
- package/lib/__fixtures__/filterJson.d.ts +0 -3
- package/lib/__fixtures__/filterJson.js +0 -21
- package/lib/__fixtures__/filterJson.js.map +0 -1
- package/lib/__fixtures__/index.d.ts +0 -8
- package/lib/__fixtures__/index.js +0 -9
- package/lib/__fixtures__/index.js.map +0 -1
- package/lib/__fixtures__/testProject1.d.ts +0 -2
- package/lib/__fixtures__/testProject1.js +0 -29
- package/lib/__fixtures__/testProject1.js.map +0 -1
- package/lib/__fixtures__/testProjectFluent.d.ts +0 -2
- package/lib/__fixtures__/testProjectFluent.js +0 -32
- package/lib/__fixtures__/testProjectFluent.js.map +0 -1
- package/lib/__fixtures__/testRepo.d.ts +0 -2
- package/lib/__fixtures__/testRepo.js +0 -27
- package/lib/__fixtures__/testRepo.js.map +0 -1
- package/lib/__fixtures__/testUninstalledProject.d.ts +0 -2
- package/lib/__fixtures__/testUninstalledProject.js +0 -12
- package/lib/__fixtures__/testUninstalledProject.js.map +0 -1
- package/lib/__fixtures__/testWithReact16.d.ts +0 -2
- package/lib/__fixtures__/testWithReact16.js +0 -24
- package/lib/__fixtures__/testWithReact16.js.map +0 -1
- package/lib/__fixtures__/testWithReact17.d.ts +0 -2
- package/lib/__fixtures__/testWithReact17.js +0 -24
- package/lib/__fixtures__/testWithReact17.js.map +0 -1
- package/lib/__fixtures__/testWithUnmetDependencies.d.ts +0 -2
- package/lib/__fixtures__/testWithUnmetDependencies.js +0 -19
- package/lib/__fixtures__/testWithUnmetDependencies.js.map +0 -1
- package/lib/__fixtures__/testWithUnmetPeerDependencies.d.ts +0 -2
- package/lib/__fixtures__/testWithUnmetPeerDependencies.js +0 -19
- package/lib/__fixtures__/testWithUnmetPeerDependencies.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the version of the package which contains the import url provided.
|
|
3
|
+
* @param importUrl - import.meta.url
|
|
4
|
+
* @returns - the version of the package. If the package is not in node_modules, it returns "0.0.0-local".
|
|
5
|
+
*/
|
|
6
|
+
export declare function getVersion(importUrl: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Returns the version of the package which contains the import url provided.
|
|
8
|
+
* @param importUrl - import.meta.url
|
|
9
|
+
* @returns - the version of the package. If the package is not in node_modules, it returns "0.0.0-local".
|
|
10
|
+
*/
|
|
11
|
+
export function getVersion(importUrl) {
|
|
12
|
+
let version = '0.0.0-local';
|
|
13
|
+
const packagePath = findPackageRoot(path.dirname(fileURLToPath(importUrl)));
|
|
14
|
+
if (packagePath && isExternalPackage(packagePath)) {
|
|
15
|
+
const packageJSONpath = path.join(packagePath, 'package.json');
|
|
16
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
17
|
+
version = readJsonSync(packageJSONpath).version || version;
|
|
18
|
+
}
|
|
19
|
+
return version;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVersion.js","sourceRoot":"","sources":["../src/getVersion.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;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,IAAI,OAAO,GAAG,aAAa,CAAC;IAC5B,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE5E,IAAI,WAAW,IAAI,iBAAiB,CAAC,WAAW,CAAC,EAAE;QACjD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAE/D,gDAAgD;QAChD,OAAO,GAAI,YAAY,CAAC,eAAe,CAAiB,CAAC,OAAO,IAAI,OAAO,CAAC;KAC7E;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/bundler-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\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. If the package is not in node_modules, it returns \"0.0.0-local\".\n */\nexport function getVersion(importUrl: string): string {\n let version = '0.0.0-local';\n const packagePath = findPackageRoot(path.dirname(fileURLToPath(importUrl)));\n\n if (packagePath && isExternalPackage(packagePath)) {\n const packageJSONpath = path.join(packagePath, 'package.json');\n\n // eslint-disable-next-line no-restricted-syntax\n version = (readJsonSync(packageJSONpath) as PackageJson).version || version;\n }\n\n return version;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export { resolve } from './resolve.js';
|
|
|
11
11
|
export { detectModuleType, type ModuleType } from './detectModuleType.js';
|
|
12
12
|
export { isExternalPackage } from './isExternalPackage.js';
|
|
13
13
|
export { findFileInPackage, type FindFileInPackageOptions, type FindFileInPackageResult } from './findFileInPackage.js';
|
|
14
|
+
export { getVersion } from './getVersion.js';
|
package/lib/index.js
CHANGED
|
@@ -16,4 +16,5 @@ export { resolve } from './resolve.js';
|
|
|
16
16
|
export { detectModuleType } from './detectModuleType.js';
|
|
17
17
|
export { isExternalPackage } from './isExternalPackage.js';
|
|
18
18
|
export { findFileInPackage } from './findFileInPackage.js';
|
|
19
|
+
export { getVersion } from './getVersion.js';
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
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,uBAAuB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,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,qBAAqB;AACrB,OAAO,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AAEvE,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","sourcesContent":["// Package definition parsing\nexport { PackageDefinitions } from './PackageDefinitions.js';\n\n// ResolveMap creation\nexport { createResolveMap } from './createResolveMap.js';\nexport type { ResolveMapEntry, ResolveMap } from './createResolveMap.js';\nexport { findResolveMapEntry } from './findResolveMapEntry.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// ImportMap creation\nexport { createImportMap, type ImportMap } from './createImportMap.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';\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,uBAAuB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,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,qBAAqB;AACrB,OAAO,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AAEvE,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","sourcesContent":["// Package definition parsing\nexport { PackageDefinitions } from './PackageDefinitions.js';\n\n// ResolveMap creation\nexport { createResolveMap } from './createResolveMap.js';\nexport type { ResolveMapEntry, ResolveMap } from './createResolveMap.js';\nexport { findResolveMapEntry } from './findResolveMapEntry.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// ImportMap creation\nexport { createImportMap, type ImportMap } from './createImportMap.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';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/package-utilities",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Utilities for resolving/parsing packages and their imports.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@ms-cloudpack/bundler-types": "^0.12.0",
|
|
19
19
|
"@ms-cloudpack/json-utilities": "^0.0.6",
|
|
20
20
|
"@ms-cloudpack/package-overrides": "^0.3.4",
|
|
21
|
-
"@ms-cloudpack/path-utilities": "^2.2.
|
|
21
|
+
"@ms-cloudpack/path-utilities": "^2.2.1",
|
|
22
22
|
"@ms-cloudpack/path-string-parsing": "^1.0.1",
|
|
23
23
|
"merge": "^2.1.1",
|
|
24
24
|
"resolve": "^1.22.0"
|
package/lib/.npmignore
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
|
-
export function filterJson(json, propName, filterFunction) {
|
|
3
|
-
for (const [name, value] of Object.entries(json)) {
|
|
4
|
-
if (typeof value === 'string' && name == propName) {
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
6
|
-
json[name] = filterFunction(value);
|
|
7
|
-
}
|
|
8
|
-
else if (Array.isArray(value)) {
|
|
9
|
-
for (const item of value) {
|
|
10
|
-
if (item && typeof item === 'object') {
|
|
11
|
-
filterJson(value, propName, filterFunction);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else if (value && typeof value === 'object') {
|
|
16
|
-
filterJson(value, propName, filterFunction);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return json;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=filterJson.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterJson.js","sourceRoot":"","sources":["../../src/__fixtures__/filterJson.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,UAAU,UAAU,CACxB,IAAO,EACP,QAAgB,EAChB,cAA4C;IAE5C,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,QAAQ,EAAE;YACjD,0GAA0G;YACzG,IAAY,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;SAC7C;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;oBACpC,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;iBAC7C;aACF;SACF;aAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7C,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;SAC7C;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function filterJson<T extends { [key: string]: any }>(\n json: T,\n propName: string,\n filterFunction: (oldValue: string) => string,\n): T {\n for (const [name, value] of Object.entries(json)) {\n if (typeof value === 'string' && name == propName) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n (json as any)[name] = filterFunction(value);\n } else if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object') {\n filterJson(value, propName, filterFunction);\n }\n }\n } else if (value && typeof value === 'object') {\n filterJson(value, propName, filterFunction);\n }\n }\n\n return json;\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { testProject1 } from './testProject1.js';
|
|
2
|
-
export { testProjectFluent } from './testProjectFluent.js';
|
|
3
|
-
export { testRepo } from './testRepo.js';
|
|
4
|
-
export { testUninstalledProject } from './testUninstalledProject.js';
|
|
5
|
-
export { testWithReact16 } from './testWithReact16.js';
|
|
6
|
-
export { testWithReact17 } from './testWithReact17.js';
|
|
7
|
-
export { testWithUnmetDependencies } from './testWithUnmetDependencies.js';
|
|
8
|
-
export { testWithUnmetPeerDependencies } from './testWithUnmetPeerDependencies.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { testProject1 } from './testProject1.js';
|
|
2
|
-
export { testProjectFluent } from './testProjectFluent.js';
|
|
3
|
-
export { testRepo } from './testRepo.js';
|
|
4
|
-
export { testUninstalledProject } from './testUninstalledProject.js';
|
|
5
|
-
export { testWithReact16 } from './testWithReact16.js';
|
|
6
|
-
export { testWithReact17 } from './testWithReact17.js';
|
|
7
|
-
export { testWithUnmetDependencies } from './testWithUnmetDependencies.js';
|
|
8
|
-
export { testWithUnmetPeerDependencies } from './testWithUnmetPeerDependencies.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/__fixtures__/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["export { testProject1 } from './testProject1.js';\nexport { testProjectFluent } from './testProjectFluent.js';\nexport { testRepo } from './testRepo.js';\nexport { testUninstalledProject } from './testUninstalledProject.js';\nexport { testWithReact16 } from './testWithReact16.js';\nexport { testWithReact17 } from './testWithReact17.js';\nexport { testWithUnmetDependencies } from './testWithUnmetDependencies.js';\nexport { testWithUnmetPeerDependencies } from './testWithUnmetPeerDependencies.js';\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export function testProject1() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-project-1',
|
|
5
|
-
version: '0.0.1',
|
|
6
|
-
type: 'module',
|
|
7
|
-
exports: {
|
|
8
|
-
'.': './lib/index.js',
|
|
9
|
-
'./foo': './lib/foo.js',
|
|
10
|
-
},
|
|
11
|
-
dependencies: {
|
|
12
|
-
b: '^1.0.0',
|
|
13
|
-
c: '^1.0.0',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
'node_modules/b/package.json': {
|
|
17
|
-
name: 'b',
|
|
18
|
-
version: '1.0.0',
|
|
19
|
-
main: 'index.js',
|
|
20
|
-
},
|
|
21
|
-
'node_modules/c/package.json': {
|
|
22
|
-
name: 'c',
|
|
23
|
-
version: '1.0.0',
|
|
24
|
-
main: 'index.js',
|
|
25
|
-
browser: 'browser.js',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=testProject1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testProject1.js","sourceRoot":"","sources":["../../src/__fixtures__/testProject1.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,GAAG,EAAE,gBAAgB;gBACrB,OAAO,EAAE,cAAc;aACxB;YACD,YAAY,EAAE;gBACZ,CAAC,EAAE,QAAQ;gBACX,CAAC,EAAE,QAAQ;aACZ;SACF;QACD,6BAA6B,EAAE;YAC7B,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,UAAU;SACjB;QACD,6BAA6B,EAAE;YAC7B,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,YAAY;SACtB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testProject1(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-project-1',\n version: '0.0.1',\n type: 'module',\n exports: {\n '.': './lib/index.js',\n './foo': './lib/foo.js',\n },\n dependencies: {\n b: '^1.0.0',\n c: '^1.0.0',\n },\n },\n 'node_modules/b/package.json': {\n name: 'b',\n version: '1.0.0',\n main: 'index.js',\n },\n 'node_modules/c/package.json': {\n name: 'c',\n version: '1.0.0',\n main: 'index.js',\n browser: 'browser.js',\n },\n };\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export function testProjectFluent() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-project-fluent',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
'@fluentui/react': '^8.42.0',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
'node_modules/@fluentui/react/package.json': {
|
|
11
|
-
name: '@fluentui/react',
|
|
12
|
-
version: '8.82.1',
|
|
13
|
-
dependencies: {
|
|
14
|
-
'@fluentui/theme': '^2.6.7',
|
|
15
|
-
'@fluentui/utilities': '^8.9.0',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
'node_modules/@fluentui/theme/package.json': {
|
|
19
|
-
name: '@fluentui/theme',
|
|
20
|
-
version: '2.6.7',
|
|
21
|
-
dependencies: {
|
|
22
|
-
'@fluentui/utilities': '^8.9.0',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
'node_modules/@fluentui/utilities/package.json': {
|
|
26
|
-
name: '@fluentui/utilities',
|
|
27
|
-
version: '8.9.0',
|
|
28
|
-
dependencies: {},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=testProjectFluent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testProjectFluent.js","sourceRoot":"","sources":["../../src/__fixtures__/testProjectFluent.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,qBAAqB;YAC3B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,SAAS;aAC7B;SACF;QACD,2CAA2C,EAAE;YAC3C,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,QAAQ;gBAC3B,qBAAqB,EAAE,QAAQ;aAChC;SACF;QACD,2CAA2C,EAAE;YAC3C,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,qBAAqB,EAAE,QAAQ;aAChC;SACF;QACD,+CAA+C,EAAE;YAC/C,IAAI,EAAE,qBAAqB;YAC3B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,EAAE;SACjB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testProjectFluent(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-project-fluent',\n version: '1.0.0',\n dependencies: {\n '@fluentui/react': '^8.42.0',\n },\n },\n 'node_modules/@fluentui/react/package.json': {\n name: '@fluentui/react',\n version: '8.82.1',\n dependencies: {\n '@fluentui/theme': '^2.6.7',\n '@fluentui/utilities': '^8.9.0',\n },\n },\n 'node_modules/@fluentui/theme/package.json': {\n name: '@fluentui/theme',\n version: '2.6.7',\n dependencies: {\n '@fluentui/utilities': '^8.9.0',\n },\n },\n 'node_modules/@fluentui/utilities/package.json': {\n name: '@fluentui/utilities',\n version: '8.9.0',\n dependencies: {},\n },\n };\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export function testRepo() {
|
|
2
|
-
return {
|
|
3
|
-
'packages/app-with-missing-react/package.json': {
|
|
4
|
-
name: 'app-with-missing-react',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
react: '999.0.1-missing',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
'packages/app-with-installed-react/package.json': {
|
|
11
|
-
name: 'app-with-installed-react',
|
|
12
|
-
version: '1.0.0',
|
|
13
|
-
dependencies: {
|
|
14
|
-
react: '999.0.0',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
'package.json': {
|
|
18
|
-
name: 'repo',
|
|
19
|
-
version: '1.0.0',
|
|
20
|
-
},
|
|
21
|
-
'node_modules/react/package.json': {
|
|
22
|
-
name: 'react',
|
|
23
|
-
version: '999.0.0',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=testRepo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testRepo.js","sourceRoot":"","sources":["../../src/__fixtures__/testRepo.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ;IACtB,OAAO;QACL,8CAA8C,EAAE;YAC9C,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,KAAK,EAAE,iBAAiB;aACzB;SACF;QACD,gDAAgD,EAAE;YAChD,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,KAAK,EAAE,SAAS;aACjB;SACF;QACD,cAAc,EAAE;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;SACjB;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,SAAS;SACnB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testRepo(): TestFileStructure {\n return {\n 'packages/app-with-missing-react/package.json': {\n name: 'app-with-missing-react',\n version: '1.0.0',\n dependencies: {\n react: '999.0.1-missing',\n },\n },\n 'packages/app-with-installed-react/package.json': {\n name: 'app-with-installed-react',\n version: '1.0.0',\n dependencies: {\n react: '999.0.0',\n },\n },\n 'package.json': {\n name: 'repo',\n version: '1.0.0',\n },\n 'node_modules/react/package.json': {\n name: 'react',\n version: '999.0.0',\n },\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testUninstalledProject.js","sourceRoot":"","sources":["../../src/__fixtures__/testUninstalledProject.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,sBAAsB;IACpC,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,SAAS;aAC7B;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testUninstalledProject(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-uninstalled-project',\n version: '1.0.0',\n dependencies: {\n '@fluentui/react': '^8.42.0',\n },\n },\n };\n}\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function testWithReact16() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-with-react-16',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
react: '^16.0.0',
|
|
8
|
-
'react-dom': '^16.0.0',
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
'node_modules/react/package.json': {
|
|
12
|
-
name: 'react',
|
|
13
|
-
version: '16.0.0',
|
|
14
|
-
},
|
|
15
|
-
'node_modules/react-dom/package.json': {
|
|
16
|
-
name: 'react-dom',
|
|
17
|
-
version: '16.0.0',
|
|
18
|
-
peerDependencies: {
|
|
19
|
-
react: '^16.0.0',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=testWithReact16.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testWithReact16.js","sourceRoot":"","sources":["../../src/__fixtures__/testWithReact16.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,SAAS;aACvB;SACF;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB;QACD,qCAAqC,EAAE;YACrC,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,QAAQ;YACjB,gBAAgB,EAAE;gBAChB,KAAK,EAAE,SAAS;aACjB;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testWithReact16(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-with-react-16',\n version: '1.0.0',\n dependencies: {\n react: '^16.0.0',\n 'react-dom': '^16.0.0',\n },\n },\n 'node_modules/react/package.json': {\n name: 'react',\n version: '16.0.0',\n },\n 'node_modules/react-dom/package.json': {\n name: 'react-dom',\n version: '16.0.0',\n peerDependencies: {\n react: '^16.0.0',\n },\n },\n };\n}\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function testWithReact17() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-with-react-17',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
react: '^17.0.0',
|
|
8
|
-
'react-dom': '^17.0.0',
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
'node_modules/react/package.json': {
|
|
12
|
-
name: 'react',
|
|
13
|
-
version: '17.0.0',
|
|
14
|
-
},
|
|
15
|
-
'node_modules/react-dom/package.json': {
|
|
16
|
-
name: 'react-dom',
|
|
17
|
-
version: '17.0.0',
|
|
18
|
-
peerDependencies: {
|
|
19
|
-
react: '^17.0.0',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=testWithReact17.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testWithReact17.js","sourceRoot":"","sources":["../../src/__fixtures__/testWithReact17.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,SAAS;aACvB;SACF;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB;QACD,qCAAqC,EAAE;YACrC,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,QAAQ;YACjB,gBAAgB,EAAE;gBAChB,KAAK,EAAE,SAAS;aACjB;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testWithReact17(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-with-react-17',\n version: '1.0.0',\n dependencies: {\n react: '^17.0.0',\n 'react-dom': '^17.0.0',\n },\n },\n 'node_modules/react/package.json': {\n name: 'react',\n version: '17.0.0',\n },\n 'node_modules/react-dom/package.json': {\n name: 'react-dom',\n version: '17.0.0',\n peerDependencies: {\n react: '^17.0.0',\n },\n },\n };\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function testWithUnmetDependencies() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-with-unmet-peer-dependencies',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
library: '^1.0.0',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
'node_modules/library/package.json': {
|
|
11
|
-
name: 'library',
|
|
12
|
-
version: '1.0.0',
|
|
13
|
-
dependencies: {
|
|
14
|
-
react: '^17.0.0',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=testWithUnmetDependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testWithUnmetDependencies.js","sourceRoot":"","sources":["../../src/__fixtures__/testWithUnmetDependencies.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,mCAAmC;YACzC,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,mCAAmC,EAAE;YACnC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,KAAK,EAAE,SAAS;aACjB;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testWithUnmetDependencies(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-with-unmet-peer-dependencies',\n version: '1.0.0',\n dependencies: {\n library: '^1.0.0',\n },\n },\n 'node_modules/library/package.json': {\n name: 'library',\n version: '1.0.0',\n dependencies: {\n react: '^17.0.0',\n },\n },\n };\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function testWithUnmetPeerDependencies() {
|
|
2
|
-
return {
|
|
3
|
-
'package.json': {
|
|
4
|
-
name: 'test-with-unmet-peer-dependencies',
|
|
5
|
-
version: '1.0.0',
|
|
6
|
-
dependencies: {
|
|
7
|
-
library: '^1.0.0',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
'node_modules/library/package.json': {
|
|
11
|
-
name: 'library',
|
|
12
|
-
version: '1.0.0',
|
|
13
|
-
peerDependencies: {
|
|
14
|
-
react: '^17.0.0',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=testWithUnmetPeerDependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testWithUnmetPeerDependencies.js","sourceRoot":"","sources":["../../src/__fixtures__/testWithUnmetPeerDependencies.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,mCAAmC;YACzC,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,mCAAmC,EAAE;YACnC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,OAAO;YAChB,gBAAgB,EAAE;gBAChB,KAAK,EAAE,SAAS;aACjB;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { TestFileStructure } from '@ms-cloudpack/test-utilities';\n\nexport function testWithUnmetPeerDependencies(): TestFileStructure {\n return {\n 'package.json': {\n name: 'test-with-unmet-peer-dependencies',\n version: '1.0.0',\n dependencies: {\n library: '^1.0.0',\n },\n },\n 'node_modules/library/package.json': {\n name: 'library',\n version: '1.0.0',\n peerDependencies: {\n react: '^17.0.0',\n },\n },\n };\n}\n"]}
|