@solana/codecs-numbers 2.0.0-experimental.c42ccfd → 2.0.0-experimental.c732fad

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,6 +1,6 @@
1
1
  import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/codecs-core';
2
2
  import { NumberCodecConfig } from './common.js';
3
- export declare const getU64Encoder: (config?: NumberCodecConfig) => FixedSizeEncoder<number | bigint, 8>;
3
+ export declare const getU64Encoder: (config?: NumberCodecConfig) => FixedSizeEncoder<bigint | number, 8>;
4
4
  export declare const getU64Decoder: (config?: NumberCodecConfig) => FixedSizeDecoder<bigint, 8>;
5
- export declare const getU64Codec: (config?: NumberCodecConfig) => FixedSizeCodec<number | bigint, bigint, 8>;
5
+ export declare const getU64Codec: (config?: NumberCodecConfig) => FixedSizeCodec<bigint | number, bigint, 8>;
6
6
  //# sourceMappingURL=u64.d.ts.map
@@ -1,18 +1,18 @@
1
1
  import { FixedSizeDecoder, FixedSizeEncoder } from '@solana/codecs-core';
2
2
  import { NumberCodecConfig } from './common.js';
3
3
  type NumberFactorySharedInput<TSize extends number> = {
4
+ config?: NumberCodecConfig;
4
5
  name: string;
5
6
  size: TSize;
6
- config?: NumberCodecConfig;
7
7
  };
8
8
  type NumberFactoryEncoderInput<TFrom, TSize extends number> = NumberFactorySharedInput<TSize> & {
9
- range?: [number | bigint, number | bigint];
9
+ range?: [bigint | number, bigint | number];
10
10
  set: (view: DataView, value: TFrom, littleEndian?: boolean) => void;
11
11
  };
12
12
  type NumberFactoryDecoderInput<TTo, TSize extends number> = NumberFactorySharedInput<TSize> & {
13
13
  get: (view: DataView, littleEndian?: boolean) => TTo;
14
14
  };
15
- export declare function numberEncoderFactory<TFrom extends number | bigint, TSize extends number>(input: NumberFactoryEncoderInput<TFrom, TSize>): FixedSizeEncoder<TFrom, TSize>;
16
- export declare function numberDecoderFactory<TTo extends number | bigint, TSize extends number>(input: NumberFactoryDecoderInput<TTo, TSize>): FixedSizeDecoder<TTo, TSize>;
15
+ export declare function numberEncoderFactory<TFrom extends bigint | number, TSize extends number>(input: NumberFactoryEncoderInput<TFrom, TSize>): FixedSizeEncoder<TFrom, TSize>;
16
+ export declare function numberDecoderFactory<TTo extends bigint | number, TSize extends number>(input: NumberFactoryDecoderInput<TTo, TSize>): FixedSizeDecoder<TTo, TSize>;
17
17
  export {};
18
18
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,gBAAgB,EAChB,gBAAgB,EAEnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAU,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErD,KAAK,wBAAwB,CAAC,KAAK,SAAS,MAAM,IAAI;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF,KAAK,yBAAyB,CAAC,KAAK,EAAE,KAAK,SAAS,MAAM,IAAI,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC5F,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC3C,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACvE,CAAC;AAEF,KAAK,yBAAyB,CAAC,GAAG,EAAE,KAAK,SAAS,MAAM,IAAI,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC1F,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,GAAG,CAAC;CACxD,CAAC;AAMF,wBAAgB,oBAAoB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,K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AM,EAAE,KAAK,SAAS,MAAM,EACpF,KAAK,EAAE,yBAAyB,CAAC,KAAK,EAAE,KAAK,CAAC,GAC/C,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAahC;AAED,wBAAgB,oBAAoB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,SAAS,MAAM,EAClF,KAAK,EAAE,yBAAyB,CAAC,GAAG,EAAE,KAAK,CAAC,GAC7C,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAU9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/codecs-numbers",
3
- "version": "2.0.0-experimental.c42ccfd",
3
+ "version": "2.0.0-experimental.c732fad",
4
4
  "description": "Codecs for numbers of different sizes and endianness",
5
5
  "exports": {
6
6
  "browser": {
@@ -49,29 +49,8 @@
49
49
  "node": ">=17.4"
50
50
  },
51
51
  "dependencies": {
52
- "@solana/codecs-core": "2.0.0-experimental.c42ccfd"
53
- },
54
- "devDependencies": {
55
- "@solana/eslint-config-solana": "^1.0.2",
56
- "@swc/jest": "^0.2.29",
57
- "@types/jest": "^29.5.11",
58
- "@typescript-eslint/eslint-plugin": "^6.13.2",
59
- "@typescript-eslint/parser": "^6.3.0",
60
- "agadoo": "^3.0.0",
61
- "eslint": "^8.45.0",
62
- "eslint-plugin-jest": "^27.4.2",
63
- "eslint-plugin-sort-keys-fix": "^1.1.2",
64
- "jest": "^29.7.0",
65
- "jest-environment-jsdom": "^29.7.0",
66
- "jest-runner-eslint": "^2.1.2",
67
- "jest-runner-prettier": "^1.0.0",
68
- "prettier": "^3.1",
69
- "tsup": "^8.0.1",
70
- "typescript": "^5.2.2",
71
- "version-from-git": "^1.1.1",
72
- "build-scripts": "0.0.0",
73
- "test-config": "0.0.0",
74
- "tsconfig": "0.0.0"
52
+ "@solana/codecs-core": "2.0.0-experimental.c732fad",
53
+ "@solana/errors": "2.0.0-experimental.c732fad"
75
54
  },
76
55
  "bundlewatch": {
77
56
  "defaultCompression": "gzip",
@@ -83,17 +62,18 @@
83
62
  },
84
63
  "scripts": {
85
64
  "compile:js": "tsup --config build-scripts/tsup.config.package.ts",
86
- "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
87
- "dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
88
- "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
65
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node ../../node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
66
+ "dev": "jest -c ../../node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
67
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
68
+ "publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
89
69
  "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
90
- "test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
91
- "test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
70
+ "test:lint": "jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
71
+ "test:prettier": "jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
92
72
  "test:treeshakability:browser": "agadoo dist/index.browser.js",
93
73
  "test:treeshakability:native": "agadoo dist/index.native.js",
94
74
  "test:treeshakability:node": "agadoo dist/index.node.js",
95
75
  "test:typecheck": "tsc --noEmit",
96
- "test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
97
- "test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
76
+ "test:unit:browser": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
77
+ "test:unit:node": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
98
78
  }
99
79
  }