@cashscript/utils 0.10.3 → 0.10.4

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.
Files changed (2) hide show
  1. package/dist/artifact.js +3 -1
  2. package/package.json +2 -2
package/dist/artifact.js CHANGED
@@ -8,7 +8,9 @@ export function exportArtifact(artifact, targetFile, format) {
8
8
  }
9
9
  export function formatArtifact(artifact, format) {
10
10
  if (format === 'ts') {
11
- return `export default ${stringifyAsTs(artifact)} as const;\n`;
11
+ // We remove any undefined values to make the artifact serializable using stringifyAsTs
12
+ const normalisedArtifact = JSON.parse(JSON.stringify(artifact));
13
+ return `export default ${stringifyAsTs(normalisedArtifact)} as const;\n`;
12
14
  }
13
15
  return JSON.stringify(artifact, null, 2);
14
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashscript/utils",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "CashScript utilities and types",
5
5
  "keywords": [
6
6
  "bitcoin cash",
@@ -48,5 +48,5 @@
48
48
  "jest": "^29.4.1",
49
49
  "typescript": "^5.5.4"
50
50
  },
51
- "gitHead": "1aa7c6b26ee8add3ff8cf42227141d9bea8aba66"
51
+ "gitHead": "d8993655ca9b0074d6d22c1680fcd01b23a62054"
52
52
  }