@ms-cloudpack/package-hashes 0.6.22 → 0.6.23

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":"getPackageHashEntries.d.ts","sourceRoot":"","sources":["../src/getPackageHashEntries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,sBAAsB,EAAE,OAAO,CAAC;KACjC,CAAC;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,uBAAuB,CAAC;QAClC,OAAO,EAAE,cAAc,CAAC;KACzB,CAAC;CACH;;;;;;;;;;;wCAgDi7F,CAAC;;;;;;;;;;;;GADl7F"}
1
+ {"version":3,"file":"getPackageHashEntries.d.ts","sourceRoot":"","sources":["../src/getPackageHashEntries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,sBAAsB,EAAE,OAAO,CAAC;KACjC,CAAC;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,uBAAuB,CAAC;QAClC,OAAO,EAAE,cAAc,CAAC;KACzB,CAAC;CACH;;;;;;;;;;;wCAsCk2G,CAAC;;;;;;;;;;;;GADn2G"}
@@ -10,16 +10,7 @@ export async function getPackageHashEntries(params) {
10
10
  const { packages, patches } = context;
11
11
  const definition = await packages.get(packagePath);
12
12
  const disabledTransformsDefinition = await packages.get(packagePath, { disableTransforms: true });
13
- if (!definition) {
14
- throw new Error(`Package definition (package.json) missing or invalid at "${packagePath}"`);
15
- }
16
13
  const { name, version } = definition;
17
- if (!name) {
18
- throw new Error(`Package definition (package.json) missing name at "${packagePath}"`);
19
- }
20
- if (!version) {
21
- throw new Error(`Package definition (package.json) missing version at "${packagePath}"`);
22
- }
23
14
  // This has the cached calculated package settings, with included and excluded deps removed.
24
15
  const packageSettings = { ...definition.cloudpack };
25
16
  const isExternal = isExternalPackage(packagePath);
@@ -34,8 +25,8 @@ export async function getPackageHashEntries(params) {
34
25
  exports: definition.exports,
35
26
  // Use the original dependencies to ensure that the hash is consistent,
36
27
  // and unaffected by include and exclude changes.
37
- dependencies: disabledTransformsDefinition?.dependencies,
38
- peerDependencies: disabledTransformsDefinition?.peerDependencies,
28
+ dependencies: disabledTransformsDefinition.dependencies,
29
+ peerDependencies: disabledTransformsDefinition.peerDependencies,
39
30
  name,
40
31
  version: isExternal ? version : packagePath,
41
32
  filesHash,
@@ -1 +1 @@
1
- {"version":3,"file":"getPackageHashEntries.js","sourceRoot":"","sources":["../src/getPackageHashEntries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAS3C;IACC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEtC,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,4BAA4B,GAAG,MAAM,QA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AAgB;QAChB,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["import type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport { isExternalPackage } from '@ms-cloudpack/package-utilities';\nimport { getSourceHash } from './getSourceHash.js';\nimport type { PackagePatches } from './types/PackagePatches.js';\nimport { getPatchFileContent } from './getPatchFileContent.js';\n\n/**\n * Get an object that's used to calculate the hash of the package.\n */\nexport async function getPackageHashEntries(params: {\n options: {\n packagePath: string;\n isSourceHashingEnabled: boolean;\n };\n context: {\n packages: PackageDefinitionsCache;\n patches: PackagePatches;\n };\n}) {\n const { options, context } = params;\n const { packagePath, isSourceHashingEnabled } = options;\n const { packages, patches } = context;\n\n const definition = await packages.get(packagePath);\n const disabledTransformsDefinition = await packages.get(packagePath, { disableTransforms: true });\n\n if (!definition) {\n throw new Error(`Package definition (package.json) missing or invalid at \"${packagePath}\"`);\n }\n\n const { name, version } = definition;\n if (!name) {\n throw new Error(`Package definition (package.json) missing name at \"${packagePath}\"`);\n }\n if (!version) {\n throw new Error(`Package definition (package.json) missing version at \"${packagePath}\"`);\n }\n\n // This has the cached calculated package settings, with included and excluded deps removed.\n const packageSettings = { ...definition.cloudpack };\n\n const isExternal = isExternalPackage(packagePath);\n\n const filesHash =\n !isExternal && isSourceHashingEnabled\n ? await getSourceHash({ packagePath, inputPaths: packageSettings.inputPaths })\n : undefined;\n\n const patchFileContent = isExternal ? await getPatchFileContent(patches, name, version) : undefined;\n\n // Only include a subset of package.json properties to reduce the amount hashed.\n return {\n // This will be calculated by createPackageSettingsTransform and incorporates the original\n // exports as well as main and module.\n exports: definition.exports,\n // Use the original dependencies to ensure that the hash is consistent,\n // and unaffected by include and exclude changes.\n dependencies: disabledTransformsDefinition?.dependencies,\n peerDependencies: disabledTransformsDefinition?.peerDependencies,\n name,\n version: isExternal ? version : packagePath,\n filesHash,\n patchFileContent,\n packageSettings,\n };\n}\n"]}
1
+ {"version":3,"file":"getPackageHashEntries.js","sourceRoot":"","sources":["../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;QAC3B,uEAAuE;QACvE,iDAAiD;QACjD,YAAY,EAAE,4BAA4B,CAAC,YAAY;QACvD,gBAAgB,EAAE,4BAA4B,CAAC,gBAAgB;QAC/D,IAAI;QACJ,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;QAC3C,SAAS;QACT,gBAAgB;QAChB,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["import type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport { isExternalPackage } from '@ms-cloudpack/package-utilities';\nimport { getSourceHash } from './getSourceHash.js';\nimport type { PackagePatches } from './types/PackagePatches.js';\nimport { getPatchFileContent } from './getPatchFileContent.js';\n\n/**\n * Get an object that's used to calculate the hash of the package.\n */\nexport async function getPackageHashEntries(params: {\n options: {\n packagePath: string;\n isSourceHashingEnabled: boolean;\n };\n context: {\n packages: PackageDefinitionsCache;\n patches: PackagePatches;\n };\n}) {\n const { options, context } = params;\n const { packagePath, isSourceHashingEnabled } = options;\n const { packages, patches } = context;\n\n const definition = await packages.get(packagePath);\n const disabledTransformsDefinition = await packages.get(packagePath, { disableTransforms: true });\n\n const { name, version } = definition;\n\n // This has the cached calculated package settings, with included and excluded deps removed.\n const packageSettings = { ...definition.cloudpack };\n\n const isExternal = isExternalPackage(packagePath);\n\n const filesHash =\n !isExternal && isSourceHashingEnabled\n ? await getSourceHash({ packagePath, inputPaths: packageSettings.inputPaths })\n : undefined;\n\n const patchFileContent = isExternal ? await getPatchFileContent(patches, name, version) : undefined;\n\n // Only include a subset of package.json properties to reduce the amount hashed.\n return {\n // This will be calculated by createPackageSettingsTransform and incorporates the original\n // exports as well as main and module.\n exports: definition.exports,\n // Use the original dependencies to ensure that the hash is consistent,\n // and unaffected by include and exclude changes.\n dependencies: disabledTransformsDefinition.dependencies,\n peerDependencies: disabledTransformsDefinition.peerDependencies,\n name,\n version: isExternal ? version : packagePath,\n filesHash,\n patchFileContent,\n packageSettings,\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/package-hashes",
3
- "version": "0.6.22",
3
+ "version": "0.6.23",
4
4
  "description": "Utilities for hashing packages.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,9 +14,9 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@ms-cloudpack/common-types": "^0.18.0",
18
- "@ms-cloudpack/config": "^0.27.0",
19
- "@ms-cloudpack/package-utilities": "^9.0.5",
17
+ "@ms-cloudpack/common-types": "^0.19.0",
18
+ "@ms-cloudpack/config": "^0.27.1",
19
+ "@ms-cloudpack/package-utilities": "^10.0.0",
20
20
  "fast-glob": "^3.2.12",
21
21
  "glob-hasher": "^1.4.2",
22
22
  "object-hash": "^3.0.0"