@leofcoin/codec-format-interface 1.6.3 → 1.6.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/index.js +2 -1
  2. package/package.json +4 -3
package/dist/index.js CHANGED
@@ -222,7 +222,8 @@ let Codec$1 = class Codec extends BasicInterface$1 {
222
222
  codec;
223
223
  hashAlg;
224
224
  get codecs() {
225
- return { ...globalThis.peernet.codecs, ...codecs };
225
+ const globalCodecs = globalThis.peernet?.codecs || {};
226
+ return { ...globalCodecs, ...codecs };
226
227
  }
227
228
  constructor(buffer) {
228
229
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/codec-format-interface",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,8 +11,9 @@
11
11
  ],
12
12
  "typings": "dist/index.d.ts",
13
13
  "scripts": {
14
- "test": "echo \"Error: no test specified\" && exit 1",
15
- "build": "rollup -c"
14
+ "publish": "npm run build && npm version patch && npm publish",
15
+ "build": "rollup -c",
16
+ "test": "node test"
16
17
  },
17
18
  "repository": {
18
19
  "type": "git",